Skip to content

feat(check-archive-header-section33): validate Operational-status enum value (Codex P2 follow-up)#575

Merged
AceHack merged 2 commits intomainfrom
feat/check-archive-header-section33-validate-operational-status-enum
Apr 26, 2026
Merged

feat(check-archive-header-section33): validate Operational-status enum value (Codex P2 follow-up)#575
AceHack merged 2 commits intomainfrom
feat/check-archive-header-section33-validate-operational-status-enum

Conversation

@AceHack
Copy link
Copy Markdown
Member

@AceHack AceHack commented Apr 26, 2026

Summary

Tightens the §33 lint to validate Operational-status value (not just label presence), per GOVERNANCE.md §33 lines 777-780 strict enum spec: research-grade or operational, nothing else.

Codex caught this discipline manually across the PR #572 review chain — every iteration of the lint-tool's user-side fixes had a different free-form Operational-status value (free-form → period+elaboration → strict-enum-only). Per Otto-346, recurring review-finding → substrate primitive; this PR enforces the value-discipline at lint-time.

What this adds

  • Per-file Operational-status value check on the line matching ^Operational status:
  • Strict regex: ^Operational status: (research-grade|operational)\s*$
  • Trailing whitespace tolerated (markdownlint may strip)
  • Free-form, period+elaboration, bold-styling, etc. all flagged

Two independent failure modes

Per-file: violation increments once even if both label-missing AND value-bad. Both diagnostic lines emit when both fail.

VIOLATION: foo.md missing §33 labels: Non-fusion disclaimer:
VIOLATION: foo.md Operational-status value not enum-strict (must be 'research-grade' or 'operational' alone): Operational status: research-grade. Specification.

Acceptance criterion (now codified)

^Operational status: (research-grade|operational)\s*$

Smoke-test

Composition

Test plan

  • Smoke-test on main shows 12 unique files violating (12 missing-label + 6 enum-value-bad)
  • Regex accepts operational, accepts research-grade, rejects research-grade.
  • Shellcheck clean
  • Exit code 1 on any violation
  • Future: extend to validate Scope: / Attribution: / Non-fusion disclaimer: field structure (smaller-leverage; deferred)

Copilot AI review requested due to automatic review settings April 26, 2026 08:41
@AceHack AceHack enabled auto-merge (squash) April 26, 2026 08:41
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds stricter §33 archive-header enforcement by validating the value of the Operational status: header in docs/research/** imports, aligning the lint with GOVERNANCE.md §33’s enum requirement.

Changes:

  • Detects and reports non-enum Operational status: values (must be exactly research-grade or operational).
  • Keeps violation counting per-file (single increment) while emitting separate diagnostics for missing labels vs bad enum value.

Comment thread tools/hygiene/check-archive-header-section33.sh Outdated
Comment thread tools/hygiene/check-archive-header-section33.sh Outdated
Comment thread tools/hygiene/check-archive-header-section33.sh Outdated
AceHack added 2 commits April 26, 2026 04:46
…m value (Codex P2 follow-up)

Tightens the §33 lint to validate Operational-status VALUE per
GOVERNANCE.md §33 lines 777-780 (strict enum: 'research-grade' or
'operational', nothing else).

Codex P2 finding (PR #572 review chain) caught the value-discipline
manually each time a free-form value like 'research-grade specification
with implementation-ready type signatures...' shipped. Per Otto-346
(recurring review-finding → substrate primitive), the lint should
catch it pre-merge.

What this adds:
- After the missing-label scan, a per-file value check on the
  Operational-status line
- Strict regex: ^Operational status: (research-grade|operational)\s*$
- Trailing whitespace tolerated (markdownlint may strip)
- Anything else (free-form, period+elaboration, bold-styling) flagged
- Two independent failure modes per file: missing-label (Set A) +
  bad-value (Set B). Either failing increments violation count once
  per file, but both diagnostic lines emit if both fail.

Smoke-test on main: lint now flags 12 unique files (was 12 with
label-only check; same files but with additional value-discipline
violations). 6 of the 12 docs that had bold-stripped labels via #573
ALSO have free-form Operational-status values; this commit catches
both gaps.

Acceptance criterion (formerly latent, now codified):
  Operational-status line must match exactly:
  '^Operational status: (research-grade|operational)\s*$'

Composes with:
- The PR #572 chain that established the strict-enum discipline via
  iterative Codex review
- Otto-346 (recurring inline pattern → substrate primitive)
- Otto-341 (mechanism over vigilance)
- B-0036 backlog row (already noted this enhancement as a follow-up
  in the Test Plan section)
…ce:]] + anchored label match + diagnostic wording

Three #575 review findings:

P0 (Copilot) — '\\s*' is NOT POSIX ERE; with grep -E, '\\s' matches a
literal 's' (the regex \\s* would match zero-or-more 's' characters,
not whitespace). This makes trailing-whitespace tolerance ineffective
AND can accidentally accept strings ending in 's' (e.g.
'research-grades').

  Fix: replaced '\\s*' with portable POSIX class '[[:space:]]*'.
  Verified: trailing-whitespace tolerated; 'research-grades' correctly
  rejected.

P1 (Copilot) — label-presence check used 'grep -qF' (fixed-string,
matches mid-line) but value check used '^Operational status:'
(start-of-line anchor). Mismatch: label-presence accepted
'- Operational status:' (mid-list-item) as compliant while value
check would skip it.

  Fix: changed label-presence to 'grep -qE \"^\$label\"' (anchored
  ERE). Now both checks use the same start-of-line anchoring.
  Side-effect: violation count went 18 → 19 because at least one doc
  had a §33 label mid-line that the old fixed-string check
  inappropriately accepted. The anchor change strengthens discipline.

P2 (Copilot) — diagnostic text used 'Operational-status' (hyphen) but
actual label is 'Operational status:' (space). Confusing for grep-
based searching.

  Fix: aligned wording — diagnostic now says \"'Operational status:'
  value not enum-strict\" matching the literal label.

Composes with the #571/#575 substrate-primitive lifecycle: the
substrate primitive matures via review-driven correctness-tightening,
not via design-by-perfection. Each round shaves a discipline-shape
sharper.
@AceHack AceHack force-pushed the feat/check-archive-header-section33-validate-operational-status-enum branch from f2b8be8 to d872b16 Compare April 26, 2026 08:47
AceHack added a commit that referenced this pull request Apr 26, 2026
…ct on 6 Shape A pre-existing docs (#576)

Continuation of B-0036 Sub-task 1 backfill; complement to PR #575
(enum-value validation in §33 lint).

The 6 Shape A docs (had bold-styled labels stripped via #573) ALSO
had multi-line elaboration in their Operational-status field —
the lint's new value-validation in #575 catches these as enum-strict
violations.

Fix: normalized each file's Operational-status block to the strict
enum-only single-line form 'Operational status: research-grade'.
Multi-line continuation content removed.

Side-effect benefit: shifting the field shorter pulled 3 of 6 docs'
Non-fusion disclaimer back into the first-20-lines window:

- aminata-threat-model: Non-fusion line 21 → 19 (now passes lint)
- muratori-zeta-pattern: Non-fusion line 23 → 19 (now passes lint)
- quantum-sensing: Non-fusion line 25 → 20 (now passes lint)

3 docs (blake3, oracle-scoring, provenance) still have Non-fusion
past line 20; calibration tension from B-0036 remains for those.

Lint count: 12 unique violations → 9 (3 of 6 Shape A docs cleared
fully; the rest still flag for the line-20 calibration).

Composes with:
- PR #575 (enum-value validation) — this fix satisfies that lint's
  new acceptance criterion
- PR #573 (Shape A bold-strip) — same Shape A doc set, now also
  enum-strict on Operational-status
- B-0036 (calibration tension on Non-fusion past line 20) — still
  3 docs affected; resolution paths a/b/c remain pending

Files normalized:
- aminata-threat-model-7th-ferry-oracle-rules
- blake3-receipt-hashing-v0-design-input-to-lucent-ksk-adr
- muratori-zeta-pattern-mapping
- oracle-scoring-v0-design-addressing-aminata-critical
- provenance-aware-claim-veracity-detector
- quantum-sensing-low-snr-detection-and-analogy-boundaries
@AceHack AceHack merged commit c94e117 into main Apr 26, 2026
15 checks passed
@AceHack AceHack deleted the feat/check-archive-header-section33-validate-operational-status-enum branch April 26, 2026 08:49
AceHack added a commit that referenced this pull request Apr 26, 2026
…t-model-5th-ferry doc (#578)

Caught by PR #575's anchored-label fix: this doc had all 4 §33 labels
in bold-styled form (\*\*Scope:\*\* etc.). The pre-#575 fixed-string
search accepted bold-styled (substring match); the post-#575 anchored
ERE search correctly rejects them.

Fix: same shape as #573 (bold-strip) + #576 (enum-strict). Stripped
bold from all 4 labels in lines 1-30; normalized Operational-status
to enum-only ('research-grade').

Lint progression: this doc was flagged after #575 + #576 landed
(was passing under fixed-string check; now fails under anchored
check). This commit clears that flag. Total lint count: 10 → 9
post-merge. Once #577 also lands, residual is 3 (calibration-tension
cases blake3/oracle-scoring/provenance).

Composes with #573 / #575 / #576 backfill chain — same bold-strip +
enum-strict pattern.
AceHack added a commit that referenced this pull request Apr 26, 2026
…estone tick (#581)

Tick row capturing B-0036 Sub-task 1 completion: lint count 36 → 0 on
main. The full §33-archive-header substrate-primitive lifecycle from
recurring-review-finding-pattern to operational-CI-enforcement landed
this segment of the autonomous-loop run.

Highlights:
- 6-PR backfill chain: #572/#573/#576/#577/#578/#579
- Lint enhancements: #571 (initial) + #575 (enum-value validation)
- Lint progression: 36 → 19 → 12 → 9 → 4 → 1 → 0
- B-0036 Sub-task 2 (CI wire) opened as PR #580; auto-merge enabled
- Aaron returned from break this tick

Three observations captured:
1. Otto-346 substrate-primitive pattern proven end-to-end on a single
   discipline within one session
2. Discipline-correctness over rule-relaxation (path a/b/c choice)
3. Autonomous-loop sustained substantive output for ~hour-long quiet
   window per never-be-idle priority ladder

Per check-tick-history-order: 134 rows in non-decreasing chronological
order.
AceHack added a commit that referenced this pull request Apr 26, 2026
…I lint (B-0036 Sub-task 2) (#580)

* feat(gate.yml): wire check-archive-header-section33.sh as enforcing CI lint job (B-0036 Sub-task 2)

Adds 'lint (archive header §33)' as a new gate.yml lint job alongside
existing lint-tick-history-order, lint-no-conflict-markers,
lint-no-empty-dirs, lint-markdown.

Now any future courier-ferry / external-conversation import under
docs/research/** will:
- FAIL CI on missing §33 4-field archive header in lines 1-20
- FAIL CI on Operational-status value not in enum {research-grade,
  operational}
- BLOCK MERGE per branch protection's required-status-checks

This is B-0036 Sub-task 2 — Sub-task 1 (backfill) was completed via
PR #572/#573/#576/#577/#578/#579 reducing pre-existing violations
from 36 → 0 on main.

The substrate-primitive lifecycle is now operational:
- Otto-346 recurring-pattern observed: §33 retrofitted post-review
  on 9+ PRs in the 11-Amara-refinement lineage
- PR #571 shipped lint tool (label-presence)
- PR #575 enhanced lint to validate enum-value (Operational status)
- 6-PR backfill chain cleared all pre-existing violations
- THIS PR: enforcing CI gate

Composes with:
- check-tick-history-order.sh (same Otto-346 substrate-primitive
  template — recurring discipline-violation → CI lint)
- check-no-conflict-markers.sh (same template; the 3 lint scripts
  now form a consistent §33-discipline enforcement triple)
- B-0036 backlog row (Sub-task 2 satisfied; row can close once this
  lands)

Future operator note: if a legitimate courier-ferry doc lands and
this lint flags a false-positive, two fixes available:
  (a) add §33 header (most common; 9 in 9 review-finding cases this
      session were legit § missing)
  (b) refine the courier-ferry-import detection regex in the script
      (rare; only if the doc isn't actually external-conversation)

* ci(gate.yml #580 thread): role-refs replace name attribution per AGENT-BEST-PRACTICES

Per Copilot P1 on #580: workflow YAML comments are current-state
operational surfaces; AGENT-BEST-PRACTICES rule 'No name attribution
in code, docs, or skills' requires role-refs not first names.

Replacements (4 occurrences):
- 'Aaron 2026-04-26 asked' → 'Maintainer 2026-04-26 asked' (line 328)
- 'Aaron 2026-04-26 ask:' → 'Maintainer 2026-04-26 ask:' (line 349)
- 'Otto observation 2026-04-26:' → 'Factory observation 2026-04-26:' (line 376)
- '11-Amara-refinement courier-ferry lineage' → '11-refinement courier-ferry lineage' (line 377)

Per Otto-279 history-surface carve-out: names ALLOWED in research /
ROUND-HISTORY / ADRs / aurora archive (history surfaces), preferred
role-refs in code / skills / workflow YAML / current-state docs.
Workflow YAML is current-state surface.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants