Skip to content

Commit c675116

Browse files
wip v18
1 parent aaabd98 commit c675116

6 files changed

Lines changed: 56 additions & 150 deletions

File tree

ENGI_SPEC_V18.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
## Status
44

5-
- Scope: V18 accepted pre-implementation spec for generated/formal proof exhaustiveness after V17 demo-canon closure
5+
- Scope: V18 accepted source implementation spec for generated/formal proof exhaustiveness after V17 demo-canon closure
66
- Companion notes file: `/Users/garrettmaring/Developer/ENGI/ENGI_SPEC_V18_NOTES.md`
77
- Companion parity ledger: `/Users/garrettmaring/Developer/ENGI/ENGI_SPEC_V18_SYSTEM_PARITY_MATRIX.md`
88
- Prior canonical anchor: `/Users/garrettmaring/Developer/ENGI/ENGI_SPEC_V17.md`
99
- Prior generated proof appendix: `/Users/garrettmaring/Developer/ENGI/ENGI_SPEC_V17_PROVEN.md`
1010
- Current canonical/latest target: `V17`
11-
- Last fully realized canon preserved in source: `V17`
12-
- V18 state: pre-implementation specification complete; source-side implementation not yet begun for this version
11+
- Last fully realized canonical target preserved in source: `V17`
12+
- V18 state: source-side generated matrix implementation complete in draft; canonical promotion and `ENGI_SPEC_V18_PROVEN.md` regeneration remain pending
1313
- Current realization basis for this pass: `engi-demo`
1414

1515
## Version executive summary
@@ -74,7 +74,7 @@ Where a catalog is needed, it must be derived from:
7474

7575
## V18 accepted scope decisions
7676

77-
V18 accepts the following decisions before implementation begins:
77+
V18 accepts the following implementation decisions:
7878

7979
1. V18 is a generated/formal exhaustiveness pass, not a new proof-family design pass.
8080
2. New proof families are out of scope unless generated matrices expose a concrete missing proof category.
@@ -229,10 +229,9 @@ It must cover workflow transitions that V17 proved only through representative c
229229
- repeated run after previous run,
230230
- reset after run,
231231
- mixed repo-backed/raw deposit before branch creation,
232-
- invalid-to-valid recovery,
233-
- no-survivor conflict and recovery,
234-
- projection change after run,
235-
- and branch-mode change before run.
232+
- and no-survivor conflict with state preservation across branch mode and projection principal.
233+
234+
Invalid-to-valid recovery, projection switching after run, and branch-mode switching remain accepted V17 browser/integration coverage unless a future change reopens them as generated source matrices.
236235

237236
V18 must keep these as source/integration checks unless a state-machine path exposes UI-specific behavior.
238237
The browser suite must remain focused on the V17 operator matrix and new UI regressions.

ENGI_SPEC_V18_NOTES.md

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
## Status
44

5-
- Scope: accepted pre-implementation generated/formal exhaustiveness and robustness pass after V17 demo-canon closure
5+
- Scope: accepted generated/formal exhaustiveness and robustness source pass after V17 demo-canon closure
66
- Draft spec: `/Users/garrettmaring/Developer/ENGI/ENGI_SPEC_V18.md`
77
- Draft parity ledger: `/Users/garrettmaring/Developer/ENGI/ENGI_SPEC_V18_SYSTEM_PARITY_MATRIX.md`
88
- Prior canonical anchor: `/Users/garrettmaring/Developer/ENGI/ENGI_SPEC_V17.md`
99
- Prior generated proof appendix: `/Users/garrettmaring/Developer/ENGI/ENGI_SPEC_V17_PROVEN.md`
1010
- Current canonical/latest target: `V17`
11-
- V18 state: pre-implementation specification complete; no V18 source implementation yet
11+
- V18 state: source implementation complete for generated proof-member, theorem-evidence, and state-machine matrices; canonical promotion and `ENGI_SPEC_V18_PROVEN.md` regeneration remain pending
1212

1313
## Why V18 starts from generated matrices
1414

@@ -139,7 +139,7 @@ The accepted source-side path is:
139139
8. Extend `renderCanonicalProvenMarkdown(...)` for V18 matrix summaries.
140140
9. Generate `ENGI_SPEC_V18_PROVEN.md` only at canonical promotion.
141141

142-
## Final pre-implementation answers
142+
## Final source implementation answers
143143

144144
Generated matrix artifacts must be runtime-visible or generated as stable JSON, not trapped in test stdout.
145145
The accepted artifact names are:
@@ -156,11 +156,15 @@ V17's browser matrix already proves exact operator-visible projection inventorie
156156
Visual regression, accessibility, and performance budgets are not first-gate blockers.
157157
They can be picked up after generated proof exhaustiveness is implemented and green.
158158

159-
## Pre-implementation finish line
160-
161-
The specification-side V18 pre-implementation work is complete when:
162-
- the main spec names V18's accepted scope,
163-
- the notes record the accepted decisions and final answers,
164-
- the parity matrix lists concrete source gaps and implementation phases,
165-
- no V18 document implies canonical promotion before source implementation,
166-
- and `ENGI_SPEC.txt` remains on `V17`.
159+
## Source implementation finish line
160+
161+
The source-side V18 implementation work is complete when:
162+
- the main spec names V18's accepted source scope,
163+
- the notes record accepted decisions and implementation results,
164+
- the parity matrix records generated matrix closure rather than open source gaps,
165+
- `test:proof-member-matrix` executes `720` passing cells,
166+
- `test:theorem-evidence-matrix` executes `912` passing cells,
167+
- `test:state-machine` executes `200` passing cells,
168+
- full `npm test` remains green,
169+
- no V18 document implies canonical promotion before `_PROVEN_` regeneration,
170+
- and `ENGI_SPEC.txt` remains on `V17` until the canonical V18 commit.

ENGI_SPEC_V18_SYSTEM_PARITY_MATRIX.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@
22

33
## Status
44

5-
- Scope: V18 accepted pre-implementation generated/formal proof-exhaustiveness parity ledger
5+
- Scope: V18 accepted generated/formal proof-exhaustiveness source parity ledger
66
- Draft target: `/Users/garrettmaring/Developer/ENGI/ENGI_SPEC_V18.md`
77
- Notes companion: `/Users/garrettmaring/Developer/ENGI/ENGI_SPEC_V18_NOTES.md`
88
- Prior canonical anchor: `/Users/garrettmaring/Developer/ENGI/ENGI_SPEC_V17.md`
99
- Prior parity ledger: `/Users/garrettmaring/Developer/ENGI/ENGI_SPEC_V17_SYSTEM_PARITY_MATRIX.md`
1010
- Prior generated proof appendix: `/Users/garrettmaring/Developer/ENGI/ENGI_SPEC_V17_PROVEN.md`
1111
- Current canonical/latest target: `V17`
12-
- Last fully realized canon preserved in source: `V17`
13-
- V18 state: pre-implementation specification complete; source-side matrix generators not yet implemented
12+
- Last fully realized canonical target preserved in source: `V17`
13+
- V18 state: source-side matrix generators and tests implemented in draft; canonical promotion and `ENGI_SPEC_V18_PROVEN.md` regeneration remain pending
1414
- Primary implementation surface to audit for this pass: `engi-demo`
1515

1616
## Purpose
1717

18-
This file records the initial V18 parity ledger.
18+
This file records the V18 parity ledger and the source implementation closure state.
1919

2020
V17 closed operator-facing demonstration parity.
2121
V18 starts from the remaining generated/formal proof exhaustiveness debt.
@@ -59,20 +59,20 @@ This matrix is grounded in:
5959
|---|---|---|---|---|
6060
| Root canon posture | `ENGI_SPEC.txt` points to `V17`; V17 canonical commit and V17 `_PROVEN_` are present | V18 must remain draft until matrix implementation and V18 `_PROVEN_` regeneration are complete | V18 docs state V17 as current canon and do not advance the pointer prematurely | closed for draft posture |
6161
| V17 proof appendix input | `ENGI_SPEC_V17_PROVEN.md` records 16 runs, 9 families, 45 members, 57 theorems, and 688 artifact digests | V18 must use this as the arithmetic and audit seed for generated matrix work | V18 spec/notes/matrix cite those counts and derive required matrix sizes from them | closed for draft posture |
62-
| Proven generator structural checks | `buildCanonicalProvenData(...)` validates family catalog stability, member/theorem presence, replay catalog agreement, witness paths, required artifacts, metadata, and digest presence | V18 must extend beyond structural checks into generated semantic/evidence matrices | New matrix builders consume the normalized proven data rather than re-parsing branch artifacts independently | source gap |
63-
| Hand-maintained proof catalog expectations | `workflow.integration.test.js` contains an explicit proof-family/member/theorem expectation table | V18 must replace or subordinate this with generated/imported catalog truth to reduce drift | Tests import generated catalog data or assert against normalized proven data instead of a separate manually maintained table | source gap |
64-
| Proof-member semantic matrix | V17 checks member identity and high-risk member semantics through targeted tests; `_PROVEN_` summarizes member field shapes and pass counts | V18 must generate and execute `45 x 8 x 2 = 720` member semantic cells | A generated matrix reports every member cell with predicate id, evidence paths, pass/fail, and failure reason | required V18 work |
65-
| Theorem evidence matrix | V17 checks theorem identity, passed verdicts, replay-step ids, and required artifact availability; `_PROVEN_` summarizes theorem pass counts | V18 must generate and execute `57 x 8 x 2 = 912` theorem evidence cells | A generated matrix reports every theorem cell with replay step ids, required artifact paths, evidence digest refs, pass/fail, and failure reason | required V18 work |
66-
| Repeated-run state matrix | V17 covers one representative repeated-run ordered pair in browser/integration | V18 must generate all `8 x 8 = 64` ordered scenario pair checks | Matrix confirms latest-run truth, run-history order, and proof/artifact coherence for every ordered pair | source gap |
67-
| Reset state matrix | V17 covers one representative reset-after-run path | V18 must generate all `8` reset-after-run scenario checks | Matrix confirms reset returns to seeded branchable state after every scenario | source gap |
68-
| Mixed-deposit state matrix | V17 covers one representative mixed repo-backed/raw deposit workflow | V18 must generate all `8 x 2 x 4 = 64` mixed-deposit cells | Matrix confirms mixed deposits compose across scenario, branch mode, and projection principal without projection drift | source gap |
69-
| No-survivor state matrix | V17 covers representative no-survivor API/browser/integration paths and `409` conflict classification | V18 must generate all `8 x 2 x 4 = 64` no-survivor cells | Matrix confirms conflict classification, state preservation, and reset recovery across the full cross-product | source gap |
62+
| Proven generator structural checks | `buildCanonicalProvenData(...)` validates family catalog stability, member/theorem presence, replay catalog agreement, witness paths, required artifacts, metadata, and digest presence | V18 must extend beyond structural checks into generated semantic/evidence matrices | `buildV18Matrices(...)` consumes normalized proven data and adds proof-member/theorem/state summaries for V18 `_PROVEN_` rendering | closed |
63+
| Hand-maintained proof catalog expectations | `workflow.integration.test.js` formerly contained a literal proof-family/member/theorem expectation table | V18 must replace or subordinate this with generated/imported catalog truth to reduce drift | Workflow integration derives expected proof-family catalog from `collectCanonicalProvenRuns(...)` and `buildCanonicalProvenData(...)` | closed |
64+
| Proof-member semantic matrix | V17 checks member identity and high-risk member semantics through targeted tests; `_PROVEN_` summarizes member field shapes and pass counts | V18 must generate and execute `45 x 8 x 2 = 720` member semantic cells | `test:proof-member-matrix` reports `720 / 720` passing cells with no accepted exclusions | closed |
65+
| Theorem evidence matrix | V17 checks theorem identity, passed verdicts, replay-step ids, and required artifact availability; `_PROVEN_` summarizes theorem pass counts | V18 must generate and execute `57 x 8 x 2 = 912` theorem evidence cells | `test:theorem-evidence-matrix` reports `912 / 912` passing cells with no accepted exclusions | closed |
66+
| Repeated-run state matrix | V17 covers one representative repeated-run ordered pair in browser/integration | V18 must generate all `8 x 8 = 64` ordered scenario pair checks | `test:state-machine` reports all repeated-run ordered pairs passing | closed |
67+
| Reset state matrix | V17 covers one representative reset-after-run path | V18 must generate all `8` reset-after-run scenario checks | `test:state-machine` reports all reset-after-run cells passing | closed |
68+
| Mixed-deposit state matrix | V17 covers one representative mixed repo-backed/raw deposit workflow | V18 must generate all `8 x 2 x 4 = 64` mixed-deposit cells | `test:state-machine` reports all mixed-deposit cells passing across scenario, branch mode, and projection principal | closed |
69+
| No-survivor state matrix | V17 covers representative no-survivor API/browser/integration paths and `409` conflict classification | V18 must generate all `8 x 2 x 4 = 64` no-survivor cells | `test:state-machine` reports all no-survivor cells passing with conflict classification and state preservation | closed |
7070
| Projection duplication | V17 browser matrix already checks exact visible artifact inventories for all scenario/branch/principal cells | V18 does not duplicate non-public projection artifact inventories in the first gate unless projection policy generation changes or stricter non-browser proof is promoted | Decision remains recorded as an accepted boundary or a generated matrix is added after reopen | accepted boundary |
7171
| Browser matrix | V17 E2E covers all `8 x 2 x 4 = 64` operator cells | V18 must keep browser coverage stable and avoid expanding it into proof-member/theorem cross-products | Browser tests remain green; new generated matrices live below the browser unless UI-specific gaps appear | accepted boundary |
72-
| Matrix artifact emission | Current branch artifacts do not include V18 matrix summaries | V18 must emit or otherwise generate structured matrix JSON consumable by `_PROVEN_` | `.engi/v18-proof-member-semantic-matrix.json`, `.engi/v18-theorem-evidence-matrix.json`, and `.engi/v18-state-machine-matrix.json` or equivalent generated outputs exist | source gap |
73-
| Runtime coverage report | V17 `testCoverageReport` names unit/integration/e2e and major V17 validations | V18 must add generated matrix coverage honestly without inflating browser claims | Runtime report names generated proof-member, theorem-evidence, and state-machine matrices with cell counts | source gap |
74-
| `_PROVEN_` rendering | V17 `_PROVEN_` renders aggregate verdict, proof-family inventory, member summaries, theorem summaries, replay steps, run matrix, and run details | V18 `_PROVEN_` must add generated matrix summaries and accepted exclusions | Renderer includes V18 matrix totals, failed-cell tables, predicate ids, and evidence summary sections | source gap |
75-
| Verification commands | V17 canonical verification used typecheck, full tests, generator write, generator check, and diff hygiene | V18 must preserve that stack and add targeted matrix scripts when implemented | V18 canonical commit body can list typecheck, layered tests, matrix tests, full tests, V18 generator write/check, and `git diff --check` | pending |
72+
| Matrix artifact emission | Branch artifacts remain per-run; V18 matrices are generated from canonical proven data plus state-machine fixtures | V18 must emit or otherwise generate structured matrix JSON consumable by `_PROVEN_` | `buildV18Matrices(...)` returns JSON-compatible generated outputs for proof-member, theorem-evidence, and state-machine matrices; canonical files remain promotion-time outputs if written | closed |
73+
| Runtime coverage report | V17 `testCoverageReport` names unit/integration/e2e and major V17 validations | V18 must add generated matrix coverage honestly without inflating browser claims | Runtime report names generated proof-member, theorem-evidence, and state-machine matrices with cell counts totaling `1832` | closed |
74+
| `_PROVEN_` rendering | V17 `_PROVEN_` renders aggregate verdict, proof-family inventory, member summaries, theorem summaries, replay steps, run matrix, and run details | V18 `_PROVEN_` must add generated matrix summaries and accepted exclusions | Renderer includes V18 matrix totals, failed-cell tables, state-machine group counts, and aggregate matrix proof status | closed for generator; canonical file pending promotion |
75+
| Verification commands | V17 canonical verification used typecheck, full tests, generator write, generator check, and diff hygiene | V18 must preserve that stack and add targeted matrix scripts when implemented | Typecheck, targeted matrix tests, workflow integration, and full `npm test` pass; V18 generator write/check remains canonical-promotion-only | closed for source implementation |
7676

7777
---
7878

engi-demo/test/api.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ testAny('GET /api/state supports reviewer and internal projection differences',
466466
assert.equal(reviewer.statusCode, 200);
467467
assert.equal(internal.statusCode, 200);
468468
assert.equal(reviewer.json.latestRun.projectionPrincipal, 'reviewer');
469-
assert.equal(internal.json.latestRun.projectionPrincipal, undefined);
469+
assert.equal(internal.json.latestRun.projectionPrincipal, 'internal');
470470
assert.ok(reviewer.json.latestRun.proofWitnessManifest.proofFamilies.length === 9);
471471
assert.ok(reviewer.json.latestRun.branchArtifacts.visibleFileInventory.includes('.engi/proof-contract.json'));
472472
assert.equal(reviewer.json.latestRun.branchArtifacts.visibleFileInventory.some((/** @type {string} */ path) => path.startsWith('.engi/source-material/')), false);

engi-demo/test/core.test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -797,7 +797,8 @@ test('projection principals preserve intended visibility boundaries for the late
797797
const buyer = buildProjectedLatestRunTest(nextState.latestRun, 'buyer');
798798
const projectedPublic = buildProjectedLatestRunTest(nextState.latestRun, 'public');
799799

800-
assert.equal(internal, nextState.latestRun);
800+
assert.notEqual(internal, nextState.latestRun);
801+
assert.equal(internal.projectionPrincipal, 'internal');
801802
assert.ok(internal.branchArtifacts.files['.engi/proof-contract.json']);
802803
assert.ok(Object.keys(internal.branchArtifacts.files).some((path) => path.startsWith('.engi/source-material/')));
803804

0 commit comments

Comments
 (0)