Repository navigation
Description
Problem
Two classes of repo-hygiene defect have repeatedly escaped into main history, and neither is caught by any current CI check, build step, or drift guard:
1. Attribution trailers on commits. The recorded 2026-07-08 owner policy is that commit messages carry no Co-Authored-By / "Generated with" attribution trailers. Four commits from the recent batches nonetheless landed on main carrying Co-Authored-By: Claude … <noreply@anthropic.com> trailers:
3926466— PR feat(client): in-window session start/stop control (#136) #233 (feat(route): on-surface session controls + one-tap call-to-call switch suggestions #136 in-window session control)31b0051andd1bd387— PR fix(chat): input keeps focus/caret/IME across refresh, Enter submits, calm status strip (#222) #225 (fix(chat): input loses focus on refresh, Enter won't submit, machine slop under the box #222 chat input cluster + hardening)22f2a1d— PR fix(query): honest display scope — session:'current' never falls back to whole-workspace (#210) #214 (Honest display-scope resolution: never fall back to whole-workspace when a session is not live #210 honest display scope)
(Older trailered commits from 2026-07-13/14 — e.g. the 0.0.18 cut, #175, #206 — confirm this is a recurring escape, not a one-off. PR #237's trailer was caught and stripped pre-merge this batch, which shows the only thing standing between the policy and a violation today is a human remembering to look.) Merged history is not rewritten; the point is to stop the NEXT one.
2. Raw control bytes in text source. Raw NUL (and other C0 control bytes) have appeared in authored text/source files three times now: one shipped (#213), two self-caught by authoring agents pre-commit (#218, #239). A raw NUL in a source file is invisible in most diffs and can silently corrupt parsing, string handling, or downstream tooling. The self-catch ritual is a standing tax that a guard should retire.
Both are cheap to detect mechanically and expensive to catch by eye.
Scope
- Add a CI check (a new job, or an extension of the existing schema-drift-guard job) that runs on every PR and scans:
- PR commit messages for attribution trailers (
Co-Authored-By:,Generated with, and the emoji-robot signature), failing red when present. - the PR diff / changed text-source files for raw C0 control bytes (NUL
\x00and other non-tab/newline control bytes), failing red when present. Scope to text source (skip known-binary extensions) to avoid false positives on legitimate binary assets.
- PR commit messages for attribution trailers (
- Keep the guard fast and self-contained (no network), mirroring the existing drift-guard job shape.
- Do not rewrite existing history; the guard is forward-looking.
Acceptance criteria
- The check goes red on a PR commit whose message carries a
Co-Authored-By(or other attribution) trailer. - The check goes red on a PR that introduces a raw NUL (or other C0 control byte) into a text-source file — proven by a negative probe (a deliberately-seeded NUL fails the guard).
- The check goes green on a clean PR (no trailer, no control bytes).
- The guard is documented (CODE_MAP / the CI workflow) and runs under the existing Node 22 CI, adding no meaningful wall-clock cost.
Refs #213 (shipped NUL), #218/#239 (self-caught NULs), #214/#225/#233 (escaped trailers), #87 (schema-drift-guard lineage this can extend).
Activity
Ambisphaeric commentedon Jul 18, 2026
Evidence for machine enforcement — two more near-misses this wave (both caught only by fresh-eyes review)
The "perfect the note-taker pad" wave produced two more instances of exactly the classes this guard would catch, neither surfaced by CI:
apps/engine/src/store/workspaces.ts. CI stayed green because no source-byte guard exists; the bytes were found only in fresh-eyes review and replaced with escapes (byte-identical, proven by an identical correction-id hash before/after).Running tally: attribution-trailer escapes/near-misses now 5; raw-NUL-byte near-misses now 4. Both classes remain undetected by the current pipeline.