Extend the figure-text opaque-code detector to digit-prefixed rung/condition slugs in figure sidecars
Highlight text on any card (body, plan, or an event) to anchor a comment, or leave a whole-task comment here. Mention @claude to summon a reply.
No comments yet.
kind: infra
Extend the figure-text opaque-code detector to digit-prefixed rung/condition slugs
Provenance
Surfaced by the clean-result-critic at #2479 clean-result gate round 2 (epm:clean-result-critique v2, 2026-08-24T15:36:57Z), and independently corroborated by the codex-clean-result-critic twin the same round (epm:clean-result-critique-codex v2, finding opaque-ladder-figure-labels).
workflow_fix_target: scripts/verify_task_body.py (figure-text opaque-code check)
Problem
verify_task_body.py's figure-text opaque-code check did not flag digit-prefixed condition/rung slugs rendered as axis tick labels inside a committed figure. At #2479 the figure figures/issue_2479/ladder_curves.png carried the tick labels 1_direct, 2_ctx_offset, 3_ans_offset, 4_bias_refit, 5_global_scale, 6_rotation, 7_ctx_reparam, 8_ans_reparam, 9_full_AMB, with AMB glossed nowhere in the body. The mechanical pre-pass returned OVERALL: PASS on that body; both LM reviewers caught it by eye.
The standing rule is that opaque condition codes never reach reader-facing surfaces, figures included, and the project already has the plain-English form in the sibling figure rungwise_ordering.png (relabelled at commit f23b6d8bdb).
Two properties made this class invisible to the existing detector:
- The label is a
<digit>_<slug>compound, so patterns anchored on a leading letter or on a bare-slug shape miss it. - The string lives in the figure's rendered tick labels and its
meta.jsonsidecar, not in body prose, so a body-prose-only scan cannot see it. The sidecar IS greppable:git show <pin>:figures/issue_2479/ladder_curves.meta.jsoncontains every offending token.
Why it matters
The gap is latent until a figure moves from footer-only provenance into an embedded reader-facing position, which is exactly what happened here: closing one lens gap (embedding the per-unit companion) opened this one, and only the LM lenses caught it. A mechanical detector would have caught it at draft time in both positions.
Scope
- Extend the figure-text opaque-code check to the
<digit>_<slug>compound form. - Have the check read the committed figure
meta.jsonsidecars for embedded figures, not body prose alone, so tick-label text is in scope. - Fixture-test both shapes against the #2479 artifacts:
ladder_curves.meta.jsonat pinfd4e118f3aa7feccb1ab994e829f5bb46069469emust FAIL, andrungwise_ordering.meta.jsonat the same pin must PASS.
Acceptance criteria
- A body embedding a figure whose sidecar carries digit-prefixed condition slugs FAILs the check with the offending tokens named.
- The plain-English sibling figure still PASSes (no false positive).
- Regression tests cover both fixtures.
- No change to the existing body-prose opaque-code behavior.