LearnNewsExamplesServices
Frontmatter
id18433
titleThe engine and published archaeology guards disagree on the same line, so two files pass the hook and red CI
stateClosed
labels
bugaibuild
assigneesneo-opus-ada
createdAtSep 7, 2026, 4:16 AM
updatedAtSep 7, 2026, 8:25 AM
githubUrlhttps://github.com/neomjs/neo/issues/18433
authorneo-opus-ada
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtSep 7, 2026, 8:25 AM

The engine and published archaeology guards disagree on the same line, so two files pass the hook and red CI

neo-opus-ada
neo-opus-ada commented on Sep 7, 2026, 4:16 AM

Context

Carved out of #16553 at intake. That ticket's premise still reproduces, but its prescription has been overtaken twice and its remaining work is gated on a policy decision the engine cannot make alone — whether a deliberate ticket reference may stay in a durable comment at all. Thirteen of the seventeen ticket-ref-ok markers depend on that answer.

This is the part that needs no answer, and it closes a live trap.

The Problem

Two guards disagree on the same line, today, measured at dev@a4dc6c9441:

PUBLISHED  neo-agent-skills@0.1.3   (CI: `baseline / Source comment archaeology`)
  ✗ src/component/Gallery.mjs:33   backgroundColor_='#000000' ticket-ref-ok: hex colour…
  ✗ src/component/Helix.mjs:29     backgroundColor_='#000000' ticket-ref-ok: hex colour…

ENGINE-LOCAL  buildScripts/util/check-ticket-archaeology.mjs   (pre-commit hook)
  ✓ 0 violations

So a commit touching either file passes the hook and reds CI, on a line the change need not go near — the guard reads the whole touched file, not the diff. @neo-fable hit exactly this on PR #18347 and reworded two unrelated comments to unblock a merge.

The published guard classifies a bare ticket-ref-ok as invalid-escape and accepts a typed [not-ticket-ref: <kind>]. The engine guard knows only the bare form:

// :124
if (!comment || line.includes(ESCAPE_MARKER)) { return }

And the two markers say something false either way. ticket-ref-ok asserts a ticket reference is deliberate; #000000 is not a reference.

The Fix

Additive, and deliberately so:

  1. The engine guard accepts [not-ticket-ref: <kind>] in addition to ticket-ref-ok. Nothing is removed, so the 13 load-bearing markers keep working exactly as today and the blocked policy question stays untouched.
  2. The two hex-colour markers migrate to [not-ticket-ref: css-color], which both guards then accept and which states something true.
  3. The docblock at :22-24 stops claiming a general hex exclusion it does not provide — it describes one example (#1234ff, which has letters) and is silent about the all-numeric case that fires.

ESCAPE_MARKER stays exported: neo-agent-brain imports this module (ai/scripts/agent-preflight.mjs), and so do check-spec-retirement.mjs, the unit spec, and ticket-archaeology-lint.yml.

Acceptance Criteria

  • [not-ticket-ref: css-color] on a line is accepted by the engine guard; a bare ticket-ref-ok still is too — asserted together, so neither can regress silently.
  • Both guards report 0 violations for Helix.mjs and Gallery.mjs — verified by running each, not by inference.
  • A durable comment with a real ref and no marker still fires, and one with a real ref plus ticket-ref-ok still passes.
  • The :22-24 docblock states the actual rule; an all-numeric hex without a marker still fires, and the docblock says so rather than implying otherwise.
  • The unit spec covers the typed escape, including that an unknown kind is not a blanket bypass.

Out of Scope

  • The 13 load-bearing markers, and whether the engine's judgment-call escape category survives. That is #16553's remaining question and needs a Discussion.
  • Making the engine guard reject ticket-ref-ok. Without a target for the 13, that converts a CI-only trap into a pre-commit-blocking one — measured and reverted once already.
  • DEFAULT_SCAN_PATHS still listing ai (removed by c623b2f63c), which aborts the default audit. Real, recorded on #16553, separate.
  • The 5 pre-existing violations on dev that --base mode structurally cannot see.

Related

  • #16553 — the parent, staying open on the policy question.

Origin Session ID: 95f9ff6e-1ba5-43b6-860a-208fbf7f4442