Commit 4644b39
committed
spec: V22, clean-up prototyping drift
Promotes V22 as the canonical drift-detection and drift-closure release for ENGI.
Proof-source commit: `5c3410df386022bb3f7c9c102c60724be46fe1c1`
V22 was driven by detecting real canon-truth drift across the running system, demo shell, generated canon, and promotion path. The drift that was concretely found and closed in this release was:
- active canonical pointer truth and runtime/demo posture could diverge
- runtime-owned canon constants, policy/version ref, and generated appendix path could drift from `ENGI_SPEC.txt`
- `buildInitialState()` / `publicState()` posture could diverge from the active pointer
- `/api/state` posture truth could diverge from runtime posture truth
- browser shell scaffolding could retain stale hardcoded canon messaging
- operator explainer source still carried stale legacy `V15 §...` anchors and `v15-*` explainer keys
- demo README posture could drift from active canon and generated appendix truth
- V22 generated specifying artifacts were initially being written under `.engi/v21-*` paths because the shared generator still hardcoded V21 artifact names
- V22 `_PROVEN_` generation was initially non-deterministic inside promotion because canonical-input validation was computed before the pending V22 `_PROVEN_` and `.engi/v22-*` artifacts existed
- real-repo tests still asserted pre-promotion `V21 active / V22 draft` posture after the repo had actually advanced to `V22 active / V23 draft`
This release fixes those exact drift surfaces as source, spec, and promotion truth:
- `ENGI_SPEC.txt` now advances to `V22`
- runtime/demo canon posture is now promotion-coupled and rewritten to `V22 active canon / V23 system draft`
- `engi-demo/src/canon-posture.js` is now the executable canon-truth source for:
- active canon version
- draft target version
- active generated appendix path
- policy/version ref
- operator label and spec label
- `engi-demo/src/engi-demo.js` and `engi-demo/src/demo-shell-state.js` now derive posture from that runtime source instead of scattered literals
- `engi-demo/server.js` keeps `/api/state` posture truth tied to runtime `SPEC_VERSION` and `buildPublicState(...)`
- `engi-demo/public/index.html` now uses canon-posture placeholders instead of stale hardcoded hero posture
- `engi-demo/public/app.js` now renders canon posture from runtime state and no longer carries visible stale V15 posture language, legacy `V15 §...` explainer anchors, or `v15-*` explainer keys
- `engi-demo/README.md` now states the active canon, current generated appendix, and next draft posture in current-canon terms
V22 also adds executable drift detection so the same class of drift now fails closed instead of being found informally:
- `engi-demo/src/canonical/v22-canon-posture.js` builds the canonical drift report
- `scripts/check-engi-canon-posture-drift.mjs` validates 10 concrete alignment checks:
- pointer-active-canon alignment
- canon-posture constant alignment
- active proven appendix alignment
- policy-ref alignment
- runtime-state alignment
- public-state alignment
- server-api alignment
- browser-shell placeholder alignment
- browser-shell render alignment
- README alignment
- `.engi/v22-canon-posture-drift-report.json` is now a required canonical generated artifact
V22 hardens promotion itself so drift is corrected and then re-validated during canon advancement:
- `scripts/prepare-engi-spec-family-promotion.mjs` now supports V22 hand-authored family promotion truth rewriting
- `scripts/prepare-engi-runtime-canon-promotion.mjs` rewrites runtime/demo posture to the promoted active canon and next draft
- `scripts/promote-engi-canon.mjs` now supports V22 draft checks, runtime preparation, V22 `_PROVEN_` generation, post-generation canonical-input validation, post-promotion spec-family validation, and
post-promotion drift validation
V22 also fixes the generator defects surfaced by the first live promotion attempt:
- shared specifying artifact generation in `engi-demo/src/canonical/v21-specifying.js` now emits version-local artifact paths instead of hardcoded `.engi/v21-*`
- canonical-input report generation now supports assumed pending outputs so `_PROVEN_` write/check passes are deterministic inside one promotion sequence
- `engi-demo/src/canonical/proven-generator.js` now uses those assumed pending outputs for V21 and V22 generated appendix construction
- V22 generated artifact family is now correct and stable:
- `.engi/v22-spec-family-report.json`
- `.engi/v22-canonical-input-report.json`
- `.engi/v22-canon-posture-drift-report.json`
- `ENGI_SPEC_V22_PROVEN.md`
Specs and parity were updated to make drift detection foundational rather than incidental:
- `ENGI_SPEC_V22.md`
- `ENGI_SPEC_V22_DELTA.md`
- `ENGI_SPEC_V22_PARITY_MATRIX.md`
- `ENGI_SPEC_V22_NOTES.md`
These now define V22 as runtime/operator canon-truth closure, record the exact drift surfaces, and accept the first-gate boundaries explicitly rather than leaving them implicit.
Tests were updated to match promoted truth and to keep V22 drift closure executable:
- new `engi-demo/test/v22-canon-drift.test.js`
- real-repo drift checks now assert `V22 active / V23 draft`
- real-repo promoted spec-family and canonical-input checks now assert `V22`
- V22 `_PROVEN_` generation tests now assert the V22 artifact triplet and drift report presence
Accepted V22 first-gate boundaries remain explicit:
- projection-security matrix expansion stays deferred
- full mutation cross-product expansion stays deferred
- screenshot-backed visual closure stays deferred
V22 closes canon-truth drift and promotion reliability without reopening subsystem design.
Validation completed for the promoted V22 payload:
- `npm --prefix engi-demo run typecheck`
- `npm --prefix engi-demo run test:unit`
- `node scripts/generate-engi-proven.mjs --version V22 --commit 5c3410d --worktree-state clean --output ENGI_SPEC_V22_PROVEN.md --check --allow-dirty`
- `node scripts/check-engi-canonical-inputs.mjs --current-target V22`
- `node scripts/check-engi-spec-family.mjs --version V22 --mode promoted`
- `node scripts/check-engi-canon-posture-drift.mjs --active-canon V22 --draft-target V23`
- `git diff --check`
Earlier in the live V22 promotion path, integration, E2E, inherited V19 reproducible-canon gates, inherited V20 operator-quality gates, and the aggregate non-E2E suite all passed before the post-
generation V22 artifact determinism defect was exposed and corrected.
V22 canon now makes drift detection a permanent system property: pointer truth, hand-authored canon, generated canon, runtime posture, API posture, browser posture, README posture, and promotion
machinery must remain aligned or the release fails closed.1 parent 5c3410d commit 4644b39
23 files changed
Lines changed: 4014 additions & 194 deletions
File tree
- .engi
- engi-demo
- src
- canonical
- test
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
0 commit comments