Skip to content

[finding] check-drift-comment.mjs has no fixture that reaches the SDK-bridge line, so that bullet's rendered bytes — the cause split included — are pinned only by source grep #12148

Description

@yinlianghui

Observed while implementing #11867 (PR #12146). Filed unassigned for grading. ⛔ Not a claim on anyone's time.

The reading

scripts/docs-audit/check-drift-comment.mjs is the repo's end-to-end pin on what the docs-drift comment actually says: it runs real fixture diffs through the real affected-docs.mjs and the real github-script block, then asserts on the posted bytes. Its own header states why that shape was chosen — a source grep "would pass on text that is never REACHED".

None of its five fixtures reach the SDK-bridge line. That is deliberate and documented:

// `MAX_WIDGETS` is the anchorable symbol on purpose — an ALL-CAPS name is excluded from// the sdk route bridge, so these repos (which declare no route ledger) do not trip the// bridge's broken-scan verdicts and the fixture stays about the headline.

The consequence is narrow and worth recording: the bridge bullet in the fold — now the longest single line the comment renders, carrying reachable / clientRows / unreachableand, since PR #12146, the three-way cause split — has its existence pinned by source grep in affected-docs.mjs --self-test (/bridge\.causes/, /parts === bridge\.unreachable/) but its rendered bytes pinned by nothing. Every other verdict that comment produces is byte-pinned by this harness; this one is not.

What that does and does not cost

The shape, if taken

A sixth fixture whose repo declares a *-route-ledger.ts and a registrar file, with a non-ALL-CAPS changed symbol, so the bridge runs and the bullet renders. Cost worth pricing before committing: such a fixture must not trip brokenScan, so its ledger has to be spelled the way parseLedgerSource reads (single-quoted route: / client:), and the existing comment's reasoning for avoiding the bridge is exactly that this is fiddly. A cheaper variant that pins the arms without a ledger: drive renderComment from a synthesised affected.json rather than a git fixture — weaker, since it no longer rides the real mapper, but it would pin the three arms' bytes.

Not claimed

  • No opinion on whether this is worth a fixture. The harness's cost-of-entry is real and the source pins are not nothing.
  • Whether the other unpinned fold lines (crossCutting, overbroad, weak) are in the same position was not checked — this was noticed about the bridge line only.

Refs

#11867 · PR #12146 (where the cause split reached this line) · #11357 (the harness and why it spawns fixtures) · #9433 (the half-wired-key rule)

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions