Skip to content

feat(e83): truth in the cockpit — fix the drift the red team found - #233

Merged
danielvm-git merged 22 commits into
mainfrom
danielvm-git/epic-build-end-to-end-0a32fb
Nov 7, 2026
Merged

danielvm-git merged 22 commits into
mainfrom
danielvm-git/epic-build-end-to-end-0a32fb

Conversation

@danielvm-git

Copy link
Copy Markdown
Owner

Summary

  • Land epic e83 (5 stories). These red-team drift fixes were implemented but stranded on this branch and never merged, so main has been serving stale cockpit data.
  • e83s01 mirrors release.last_tag; e83s02 counts only bigpowers-owned skill links; e83s03 labels receipt metrics measured/estimated/backfilled honestly; e83s04 re-baselines VISION and the catalog; e83s05 names the trigger behind an ACTIVE_WORK block.
  • Fix the release blocker: sync-post.sh stamped the skill count twice (80 skills — 80 agent skills …), so sync-skills.sh could not reproduce the committed .pi/.gemini manifests and CI generated-artifact drift gate went red on every run. Red-then-green test included.
  • Replace the stale AUDIT_LATEST.md and security/REVIEW.md (both described PR fix(hooks): judge git argv instead of command substrings in guard-git #194, 2 commits) with reviews of this branch real 18-commit diff.
  • Log BUG-2026-11-07-assert-epic-gate-fail-open: the release gate passed on that stale evidence, so it would green-light an unaudited branch.

Verify

  • npm run compliance — exit 0
  • bash scripts/run-verification-gates.sh — 62/62 deterministic, combined PASS
  • bash scripts/trace-stories.sh --strict — exit 0
  • bash scripts/verify-e83.sh e83s01..e83s05 — 5/5
  • CI generated-artifact drift step reproduced locally — exit 0 (was exit 1 before the fix)
  • Conventional Commits on all 18 commits; no Co-authored-by (P1)
  • Coverage gates: no new uncovered logic paths; new behaviour has a failing-first test

specs/ artifacts

  • specs/AUDIT_LATEST.md — rewritten for this branch
  • specs/security/REVIEW.md — rewritten for this branch, no HIGH findings
  • specs/bugs/BUG-2026-11-07-assert-epic-gate-fail-open.md — new
  • specs/verifications/e83-verify.yaml, specs/verifications/CATALOG-BASELINE-2026-11-07.yaml
  • specs/state.yaml, specs/execution-status.yaml, specs/release-plan.yaml — e83 rolled to done

Story e83s05. Block semantics unchanged; JSON now carries trigger.
Story e83s01. sync-version-mirrors writes release.last_tag; sync-skills stamps the skill count into package.json and mcp-server.js.
Story e83s02. Foreign links are reported on a separate line.
Story e83s03. Publishes source breakdown and a staleness flag.
Story e83s04. Zero drift warnings against the new baseline.
Epic e83 stories s01-s05 complete.
check-catalog-drift.sh hung in the story-verify gate. Logic now lives in scripts/lib/check-catalog-drift.py; behaviour unchanged.
The epic.yaml verify lines called run-story-verify.sh, so a done story re-entered the gate without end. Real checks now live in verify-e83.sh, and run-story-verify.sh rejects a self-referential verify.
Task verify lines began with ! and were rejected as prose.
…lpath

Findings 1, 6, 8 of the independent review. Others are low severity and left.
Receipts: per-row skip, tz-correct latest entry, backfilled label, no tree mutation in verify. Story-verify guard covers wrappers via env var, with a regression test. Bug status uses the fixed vocabulary.
Terminal verdict is a single Preflight gates run.
sync-post.sh built the .pi and gemini manifest descriptions from
"${skill_count} skills — ${pkg_desc}", but package.json's description is
already stamped with the count by stamp-skill-counts.sh, so a sync emitted
"80 skills — 80 agent skills …".

This test pins the invariant — the live count appears exactly once — and
fails on the current tree.
stamp-skill-counts.sh writes the live count into package.json's description
("80 agent skills …"), and sync-post.sh then prefixed the count again for
.pi/package.json and gemini-extension.json, producing
"80 skills — 80 agent skills …".

The committed artifacts predate the stamp, so sync-skills.sh could not
reproduce what the branch commits and CI's
`git diff --exit-code .pi .gemini/extensions/bigpowers` went red on every run.
Strip the leading count before re-prefixing; sync is idempotent again and
regenerates the committed text exactly.
Picks up e83s01-s05 as done plus the new test-manifest-skill-count-once.sh link.
Generated content only; report timing churn was reverted rather than committed.
… gate

specs/AUDIT_LATEST.md and specs/security/REVIEW.md still described
fix/guard-git-flag-normalize (PR #194, 2 commits) while this branch carries 15
commits, yet assert-epic-gate.sh release reported "audit-code verified". Replace
both with reviews of the real diff and record the gate defect as
BUG-2026-11-07-assert-epic-gate-fail-open.
… bug

Generated by compliance/trace runs after BUG-2026-11-07-assert-epic-gate-fail-open
was registered and the spec-version-gap bug bundle was first emitted.
e83s03 taught build-receipts.sh to label a blended reading "mixed" and
verify-e83.sh asserts that label, but validate-okf-kinds.sh allowed only
measured/estimated/backfilled/absent. CI's sync job therefore failed on the
committed specs/receipts.json.

Accept "mixed" and strengthen the validator while doing it: a mixed reading
must carry value.source_breakdown, its keys must be known sources, and the
parts must sum to value.story_count. A "mixed" label without evidence stays a
failure.
The local gate set never ran validate-okf.sh over specs/, so compliance and
run-verification-gates.sh both reported green while CI's sync job was red on
e83s03. Add an okf-bundles gate covering the same six directories CI covers,
so the two lists cannot drift apart silently.
@danielvm-git
danielvm-git merged commit 2be64ec into main Nov 7, 2026
7 checks passed
github-actions Bot pushed a commit that referenced this pull request Nov 7, 2026
# [2.95.0](v2.94.2...v2.95.0) (2026-11-07)

### Features

* **e83:** truth in the cockpit — fix the drift the red team found ([#233](#233)) ([2be64ec](2be64ec)), closes [#194](#194)
@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 2.95.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant