Skip to content

Spec-body file:line anchors are unchecked (4772 of them) and an anchor into a file the row is editing is stale by default: one spec shipped 8 stale anchors, then 7 more from the merge alone #911

Description

@localai-bot

What

A file:line anchor pointing into a file the row is itself editing is stale
by default. Not "at risk of going stale" — stale, unless it is re-derived at the
exact tree that lands, which includes the merge of origin/main that precedes
landing.

.agents/specs/ltx25-prompt-adaln.md is the worked example, and it is not a
sloppy spec: it dates its counts, names its configurations, records its
mutations, and re-derives its numbers. It still shipped eight stale
repo-local anchors, repaired across two commits on row/LTX25-ADALN-CLAIMS, and
then seven more the moment origin/main was merged in.

Every one was introduced by the row's own commits, and every one was moved by a
commit the row could see coming:

Repair Anchors Moved by
7a6165dab test_ltx2_video.cpp:917-921 → :1316-1319, :913-914 → :1302-1303 98f8e046d (#658)
00613767d ltx2_video.cpp:570 → :617, ltx2_dit.cpp:530-540 → :640-642, :672-676 → :775-780, ltx2_loader.cpp:979-984 → :1033-1035, and ltx2_loader.cpp:988 re-cut as :988 @ baa92ccf7 020381676, the row's OWN implementation commit
this repair ltx2_video.cpp:617 → :660, :1063 → :1106, :1730/:1732 → :1784/:1786, :533 → :575, :624 → :667; test_ltx2_video.cpp:1316-1319 → :1622-1625, :1302-1303 → :1608-1609 0785cfc4d (#882), merged in to land

The last row is the sharpest. All seven were correct at 00613767d and
wrong at the merge commit, because #882 added 70 lines to ltx2_video.cpp
and 306 to test_ltx2_video.cpp, all of them ahead of every anchor. Nothing in
the row changed. The tree underneath it did.

Why the obvious checker does not work

The natural check — "read the span at the cited line, then confirm that text
occurs exactly once in the file and starts at that line" — is a tautology.
It reads the expected text out of the same file it is validating, so it returns
FRESH for every anchor, including the five now pointing at a VT_CHECK
message string and a comment about mask pointers. It was run here first and it
reported 27 of 27 fresh. Reading the spans against the CLAIM beside them found
seven stale in the same tree.

The expected text has to come from the claim, not from the file. This is the
same shape as
#632's finding that a range
check passes every stale anchor, one level further in: a uniqueness check
sourced from the file passes every stale anchor too.

Scope of the exposure

Spec BODIES are checked by nothing. check-agent-record.py's MATRIX_PATHS
(:521, :529-530) covers the five matrices, feature-matrix.md, and
specs/model-family-inventory.md — no other .agents/specs/*.md.

Measured on 727ac7734:

count
files under .agents/specs/ 315
backticked `path:NN` / `path:NN-NN` citations in them 4772
of those any checker examines 0

(Positive control, same command shape: 2314 backticked .cpp mentions carrying
no line number, so the pattern matches what it should and the 4772 is not an
artefact of a grep that matches everything.)

The remedy already exists in this repo, unnamed

Two dispositions, both already in use, neither written down as a rule:

  • A historical claim gets a SHA anchor: `path:NN @ <sha>`. A live line
    cannot carry text the row deleted, so citing one is not merely stale, it points
    at something that contradicts the claim. This repair SHA-anchored
    ltx2.cpp:274-276 @ baa92ccf7 in three places for exactly that reason: the
    refusal it names was deleted by this row, and live 274-276 is now an
    unrelated keyframes_abs_pos_embedding enumeration. Nine such citations exist
    across .agents/, in 5 files.
  • A live claim gets re-derived at the landing tree, with uniqueness asserted
    against the claim's own text
    , and re-derived AGAIN after the merge, because
    the merge is part of landing.

Not a duplicate of

Not fixed here

Filed as visible debt from PR #663, whose scope was one spec's record. A
repo-wide sweep of 4772 citations is not that PR, and per AGENTS.md a checker
change needs its own spec, a red-before mutation, and a ratchet rather than a
cleanup. Owned by LTX25-PROMPT-ADALN's ## Owed until #632's row absorbs it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions