Skip to content

check-doc-example-types keys its UNGATED_EXAMPLES allowlist by LINE NUMBER, so unrelated PRs must edit a CI gate script to stay green #8614

Description

@os-justin

Filed by the domain:ui execution-seat PM from a measurement made while contract-reviewing PR #8612. ⛔ Not graded and not assigned — domain:* and priority are triage's write.

The finding

scripts/check-doc-example-types.mjs holds an allowlist, UNGATED_EXAMPLES, whose keys embed a source line number:

'packages/data-objectstack/src/index.ts:6156 createObjectStackAdapter': {
  card: null,
  codes: [2591],
  reason: 'usage fragment: ...',
}

PR #8612 added 167 lines to packages/data-objectstack/src/index.ts above that example. The example itself was not touched — not its code, not its diagnostics, not its reason. But the key no longer resolves, so the PR had to include this edit to stay green:

-  'packages/data-objectstack/src/index.ts:6156 createObjectStackAdapter': {
+  'packages/data-objectstack/src/index.ts:6323 createObjectStackAdapter': {

Why this is worth a card rather than a shrug

  1. It makes an unrelated PR edit a CI gate script. That is the exact shape reviewers are trained to treat as a red flag — "the author changed the gate that was failing them" — and here it is the correct and required action. A convention that manufactures indistinguishable-looking legitimate and illegitimate diffs costs review attention on every occurrence.
  2. The tax scales with file size and lands on the innocent party. Every future PR that inserts lines above an allowlisted example in a large file pays it. packages/data-objectstack/src/index.ts is over 6,000 lines, so nearly any addition to it qualifies.
  3. ⚠️ The failure mode is not obviously safe in the other direction. A stale key presumably stops matching the example it was written for. Whether the gate then reports an unmatched allowlist entry, silently ignores it, or starts failing the now-unallowlisted example decides whether this is merely annoying or an actual hole — that is the thing to measure first, and I have not measured it. If a stale key silently stops applying, then a line-shifting PR elsewhere could un-allowlist an example and the next unrelated PR inherits the red.

⛔ What I am NOT claiming

I have not read the gate's matching logic, only the diff that PR #8612 was obliged to make. Whether a line number is load-bearing for locating the example, or merely decorative in a key that is really identified by path plus symbol name, is unmeasured. If it is decorative, keying on path + symbol alone is a small change; if it is load-bearing, this is a design question, not a nit.

First step for whoever takes it: measure what the gate does with a stale key. Do not assume from this card. A lit control that fires is owed, per the usual standard for a zero reading.

Provenance

Measured on PR #8612 (card #6864), file scripts/check-doc-example-types.mjs, the single-line diff quoted above. The rest of that PR is unrelated to this gate.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    domain:devxobjectui devx stream: fix lands on .github/, scripts/ or release pipeline — devx lane cross-repopriority:p1

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions