Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
177 commits
Select commit Hold shift + click to select a range
d68480b
docs(v0.13): define reconciled State Engine V2 authority
eybersjp Oct 14, 2026
4ba6a81
feat(v0.13): port T04 candidate state-engine-v2.mjs
eybersjp Oct 14, 2026
54de55f
feat(v0.13): port T04 candidate state-engine-migration.mjs
eybersjp Oct 14, 2026
a14d6a6
feat(v0.13): port T04 candidate state-engine-event.schema.json
eybersjp Oct 14, 2026
f0ce90b
feat(v0.13): port T04 candidate state-engine-snapshot.schema.json
eybersjp Oct 14, 2026
13ce619
feat(v0.13): port T04 candidate state-engine-index.schema.json
eybersjp Oct 14, 2026
2107d94
feat(v0.13): port T04 candidate windows-durable-rename.ps1
eybersjp Oct 14, 2026
80f1896
test(v0.13): port T04 candidate state-engine-v2.test.mjs
eybersjp Oct 14, 2026
20de1eb
test(v0.13): port T04 candidate state-engine-v2-migration.test.mjs
eybersjp Oct 14, 2026
5f80674
test(v0.13): port T04 candidate state-engine-v2-hardening.test.mjs
eybersjp Oct 14, 2026
3e85dc1
test(v0.13): port T04 candidate state-engine-v2-benchmark.mjs
eybersjp Oct 14, 2026
11ec6ec
test(v0.13): port T04 candidate t04-review-thread-blockers.mjs
eybersjp Oct 14, 2026
cb6bd42
test(v0.13): port T04 candidate t04-review-thread-blockers.test.mjs
eybersjp Oct 14, 2026
152a0bd
feat(v0.13): route Autopilot state through V2 after verified cutover
eybersjp Oct 14, 2026
26ff7ea
feat(v0.13): route orchestration state through V2 without weakening g…
eybersjp Oct 14, 2026
68cfe6e
fix(v0.13): recover unwitnessed torn canonical ledger tails safely
eybersjp Oct 14, 2026
f9a947c
fix(v0.13): make Windows durability helper explicit and storage-aware
eybersjp Oct 14, 2026
4ed9b10
fix(v0.13): wire storage-aware Windows durability helper into restore…
eybersjp Oct 14, 2026
ce934b4
feat(v0.13): add persistent hash-chained restore transaction log
eybersjp Oct 14, 2026
8915902
fix(v0.13): make restore recovery persistent and witness-driven
eybersjp Oct 14, 2026
ed9dbf2
fix(v0.13): make restore promotion transactionally persistent
eybersjp Oct 14, 2026
457e6ab
test(v0.13): add ledger-loss and persistent restore regressions
eybersjp Oct 14, 2026
0c18dd8
docs(v0.13): record binding T04 release authority
eybersjp Oct 14, 2026
dcd4819
feat(v0.13): add source-bound T04 Development Contract
eybersjp Oct 14, 2026
be2c026
feat(v0.13): expose State Engine V2 runtime APIs
eybersjp Oct 14, 2026
8bd1dd5
test(v0.13): add State Engine validation lane
eybersjp Oct 14, 2026
7f9255d
ci(v0.13): add State Engine V2 validation lane
eybersjp Oct 14, 2026
c2a6fd6
docs(v0.13): document T04 contract generator
eybersjp Oct 14, 2026
e7d444a
docs(v0.13): index State Engine authority and contract reference
eybersjp Oct 14, 2026
3bdc4ae
docs(v0.13): add State Engine script references
eybersjp Oct 14, 2026
2a214e8
docs(v0.13): add State Engine script references
eybersjp Oct 14, 2026
46c4ee6
docs(v0.13): index State Engine executable references
eybersjp Oct 14, 2026
37d1d22
fix(v0.13 T04): port CI-validated compatibility, restore witnesses an…
eybersjp Oct 30, 2026
67570ce
docs(memory): record v0.13 T04 diagnostic CI, validated port and outs…
eybersjp Oct 30, 2026
4740afd
test(t04): port verified W73-22 Windows native helper fail-closed res…
eybersjp Oct 30, 2026
8457a59
fix(t04): port Ubuntu/Windows validated native helper result verifica…
eybersjp Oct 30, 2026
a580c6e
docs(memory): record source-bound T04 W73-22 red/green CI and PR #92 …
eybersjp Oct 30, 2026
8bf7f69
fix(v0.13 T04): port tested private NTFS stage, ACL preservation and …
eybersjp Oct 30, 2026
132907d
fix(v0.13 T04): port tested private NTFS stage, ACL preservation and …
eybersjp Oct 30, 2026
11c2843
fix(v0.13 T04): port tested private NTFS stage, ACL preservation and …
eybersjp Oct 30, 2026
1f2c909
docs(memory): record test-first NTFS DACL fix, evidence and remaining…
eybersjp Oct 30, 2026
ad986f4
docs(v0.13): record exact-head cross-platform T04 evidence and unreso…
eybersjp Oct 30, 2026
6b89d9d
fix(v0.13 T04): port CI-validated W73-25 Windows helper path/alias bi…
eybersjp Oct 30, 2026
d32125c
test(v0.13 T04): port W73-25 negative helper path/parent evidence reg…
eybersjp Oct 30, 2026
993ec2a
docs(v0.13): record W73-25 red/green CI provenance and remaining T04 …
eybersjp Oct 30, 2026
cd534ad
fix(v0.13 T04): pin native Windows PowerShell helper to verified syst…
eybersjp Oct 30, 2026
ef55106
test(v0.13 T04): prevent Windows cwd PowerShell executable hijack W73-26
eybersjp Oct 30, 2026
f372d2a
fix(v0.13 T04): reject restore journals across canonical NTFS ancesto…
eybersjp Oct 30, 2026
d78a98e
test(v0.13 T04): verify interrupted restore journal blocks alternate …
eybersjp Oct 30, 2026
7351c08
docs(v0.13 T04): record test-first W73-27 Windows alias evidence and …
eybersjp Oct 30, 2026
e92c2fd
fix(t04): port verified prototype-safe patch traversal from diagnosti…
eybersjp Oct 30, 2026
42df7f1
test(t04): port reproduced prototype-pollution regression with cross-…
eybersjp Oct 30, 2026
99fe01d
fix(t04): port verified exclusive initial ledger publication from dia…
eybersjp Oct 30, 2026
f9fde7c
test(t04): port reproduced first-layout writer race with Ubuntu/Windo…
eybersjp Oct 30, 2026
3dd4f0a
docs(t04): record test-first P1 evidence, exact integration ports and…
eybersjp Oct 30, 2026
fb25ff0
test(t04): enforce v0.13 CI source routing and retained risk-3 contract
eybersjp Oct 30, 2026
a9d114f
fix(t04): enforce v0.13 CI by source presence across PRs and main pushes
eybersjp Oct 30, 2026
81e3753
docs(t04): record test-first v0.13 CI routing evidence and acceptance…
eybersjp Oct 30, 2026
7c199d0
test(v013): port CI-reproduced entity identity and concurrent schema …
eybersjp Oct 30, 2026
e75c622
fix(v013): port tested own-key identity and atomic initial schema pub…
eybersjp Oct 30, 2026
19cf3bb
docs(memory): record test-first v0.13 entity identity and atomic sche…
eybersjp Oct 30, 2026
57744d5
fix(v0.13 T04): port CI-verified collision-free index identities and …
eybersjp Oct 30, 2026
8dff8e4
test(v0.13 T04): port red/green CI-verified index collision and stale…
eybersjp Oct 30, 2026
9133ae8
docs(memory): preserve v0.13 T04 test-first index and bootstrap recov…
eybersjp Oct 30, 2026
879d773
fix(v0.13 T04): port CI-verified orphaned bootstrap hardlink recovery…
eybersjp Oct 30, 2026
410298f
test(v0.13 T04): port Windows/Ubuntu-verified orphan, external-link a…
eybersjp Oct 30, 2026
73603f8
docs(memory): record verified Windows/Ubuntu bootstrap recovery and i…
eybersjp Oct 30, 2026
385f7c9
fix(v0.13 T04): port CI-verified pending event validation before cano…
eybersjp Oct 30, 2026
130bb5c
test(v0.13 T04): port CI-verified H52 evidence-preserving pending rec…
eybersjp Oct 30, 2026
5150fb3
docs(memory): record test-first pending suffix evidence preservation …
eybersjp Oct 30, 2026
5920cd3
test(v0.13 T04): port CI-verified W73-28 Unicode alias restore regres…
eybersjp Oct 30, 2026
ea32b2b
fix(v0.13 T04): port Windows/Ubuntu CI-verified restore path alias sa…
eybersjp Oct 30, 2026
803c0c1
docs(T04): record W73-28 RED/GREEN CI and exact v0.13 port provenance
eybersjp Oct 30, 2026
4fe2fb7
fix(v0.13 T04): port CI-verified authority-aware Scale & Context API …
eybersjp Oct 30, 2026
00d5628
test(v0.13 T04): port RED/GREEN Control Center V2 projection compatib…
eybersjp Oct 30, 2026
e0b381d
docs(contract): authorize v0.13 T04 Runtime API canonical projection …
eybersjp Oct 30, 2026
952ae0d
docs(memory): record v0.13 T04 Control Center projection RED/GREEN an…
eybersjp Oct 30, 2026
f35455d
fix(v0.13 T04): permit literal JSON keys in internal patch paths (PR …
eybersjp Oct 30, 2026
b6a25cb
test(v0.13 T04): retain verified JSON-key update/deletion regression …
eybersjp Oct 30, 2026
fc1d671
fix(v0.13 T04): keep read-only projection from repairing unmigrated l…
eybersjp Oct 30, 2026
a28b3cc
test(v0.13 T04): preserve corrupt legacy pointer and unmigrated workf…
eybersjp Oct 30, 2026
66201a9
docs(memory): record test-first T04 P2 JSON-key and read-only legacy …
eybersjp Oct 30, 2026
bbe7f63
docs(memory): render T04 test-first evidence as separate Markdown ent…
eybersjp Oct 30, 2026
8de2b9c
feat(t04): port verified risk-3 acceptance evidence 1/4
eybersjp Oct 30, 2026
621dc38
feat(t04): port verified risk-3 acceptance evidence 2/4
eybersjp Oct 30, 2026
7c2b6b0
feat(t04): port verified risk-3 acceptance evidence 3/4
eybersjp Oct 30, 2026
c2635e6
feat(t04): port verified risk-3 acceptance evidence 4/4
eybersjp Oct 30, 2026
2490b27
docs(v0.13): index risk-3 T04 acceptance reference (CI red-to-green)
eybersjp Oct 30, 2026
6ffa5a6
ci(v0.13): enforce independently reviewed source-bound T04 risk-3 acc…
eybersjp Oct 30, 2026
a40b318
test(v0.13): scope branch-agnostic CI invariant to validation job, no…
eybersjp Oct 30, 2026
66b5c47
docs(v0.13): record test-first acceptance-gate enforcement and remain…
eybersjp Oct 30, 2026
f030c3e
fix(v0.13): bound Windows state-lock wait for verified NTFS multi-pro…
eybersjp Oct 30, 2026
77bfac8
test(t04): preserve pending evidence when snapshot witness I/O fails …
eybersjp Oct 30, 2026
a2dc909
fix(t04): fail closed on snapshot witness read errors before canonica…
eybersjp Oct 30, 2026
f3bc719
docs(t04): record H56 cross-platform red/green evidence and remaining…
eybersjp Oct 30, 2026
333d2f8
test(t04): bind both platform validation checkouts to exact reviewed …
eybersjp Oct 30, 2026
7502e41
fix(t04): execute Ubuntu and Windows CI on immutable reviewed PR source
eybersjp Oct 30, 2026
0e35137
docs(t04): record test-first exact-head CI provenance correction and …
eybersjp Oct 30, 2026
d0256f6
fix(t04): require authenticated CI workflow and successful v0.13 step…
eybersjp Oct 31, 2026
d558d58
test(t04): enforce full-workflow provenance and step-success negative…
eybersjp Oct 31, 2026
37b97ba
docs(t04): record A18 red/green authenticated validation provenance a…
eybersjp Oct 31, 2026
581133f
test(T04-A19): cover revoked and stale effective role approvals
eybersjp Oct 31, 2026
901f30c
fix(T04-A19): enforce latest authenticated decisive review
eybersjp Oct 31, 2026
7eb34f5
fix(T04-A19): reject superseded source-bound review receipts
eybersjp Oct 31, 2026
81b6add
docs(T04-A19): document effective role review provenance
eybersjp Oct 31, 2026
7c1d04e
docs(T04-A19): index role review provenance reference
eybersjp Oct 31, 2026
63bef36
docs(T04-A19): record red/green CI and protected v0.13 integration ev…
eybersjp Oct 31, 2026
106847d
fix(T04): preserve active writer temporary files during orphan cleanu…
eybersjp Oct 31, 2026
dddf27d
test(T04): retain active writer staging and clean abandoned temporary…
eybersjp Oct 31, 2026
d405dc7
docs(T04-A20): record red/green concurrency cleanup evidence and v0.1…
eybersjp Oct 31, 2026
1f5a4f3
fix(t04): persist ACCEPTED verdict artifact fail-closed on exact v0.1…
eybersjp Oct 31, 2026
089f30b
test(t04): enforce authenticated acceptance artifact persistence and …
eybersjp Oct 31, 2026
cade28f
docs(t04): record A21 red/green CI and safe v0.13 artifact provenance…
eybersjp Oct 31, 2026
e11da54
test(t04): preserve JSON-only canonical event semantics
eybersjp Oct 31, 2026
5d39940
fix(t04): reject lossy JSON event values before commit
eybersjp Oct 31, 2026
c0ba032
docs(t04): record JSON lossless red/green evidence and unaccepted rel…
eybersjp Oct 31, 2026
2c8f9cc
test(t04): reproduce hard-link swap at ledger tail repair descriptor …
eybersjp Oct 31, 2026
4e969e2
fix(t04): pin and verify ledger tail repair descriptor before mutation
eybersjp Oct 31, 2026
8a80847
docs(t04): record H57 red/green CI and review-thread dispositions
eybersjp Oct 31, 2026
9cd23fe
test(t04): reproduce unreadable tail witness and torn UTF-8 repair re…
eybersjp Oct 31, 2026
cd066b1
fix(t04): fail closed on unreadable tail witness and compare raw ledg…
eybersjp Oct 31, 2026
b0716b4
test(t04): port validated NTFS 8.3 restore alias regression fixtures
eybersjp Oct 31, 2026
35b1667
docs(t04): record verified NTFS 8.3 test evidence and acceptance boun…
eybersjp Oct 31, 2026
017916a
fix(t04): bind security-control receipts to verified full CI runs
eybersjp Oct 31, 2026
cfdf798
fix(t04): source-bind effective physical NTFS approval (A23 red/green…
eybersjp Oct 31, 2026
8bf8c0e
test(t04): RED A24 reject renamed GitHub identity review revocation
eybersjp Oct 31, 2026
bbf54a0
fix(t04): bind review revocation and role independence to immutable G…
eybersjp Oct 31, 2026
4cc9400
docs(t04): record A24 authenticated reviewer identity red-green CI an…
eybersjp Oct 31, 2026
8fb1e51
test(T04-H60): fail closed on ENOSPC during valid ledger tail newline…
eybersjp Oct 31, 2026
557bfed
fix(T04-H60): never truncate valid canonical event after newline I/O …
eybersjp Oct 31, 2026
f5f93e1
fix(T04-H60): use explicit LF byte in verified tail completion
eybersjp Oct 31, 2026
dfbfd02
docs(T04-H60): record red/green cross-platform canonical tail repair …
eybersjp Oct 31, 2026
176869e
test(T04-H61): port verified lock initialization EIO regressions from…
eybersjp Oct 31, 2026
21c1ae7
fix(T04-H61): port cross-platform validated fail-closed lock-init cle…
eybersjp Oct 31, 2026
b93d8af
docs(T04-H61): record red-green cross-platform lock recovery evidence…
eybersjp Oct 31, 2026
dcd3e86
test(T04-H62): fail closed on state-lock release EIO after durable ap…
eybersjp Oct 31, 2026
369b8d0
fix(T04-H62): propagate state-lock release faults without false commi…
eybersjp Oct 31, 2026
78d9e22
fix(T04-H62): retain primary transaction error when lock cleanup also…
eybersjp Oct 31, 2026
dd07080
docs(memory): record T04-H62 red/green lock-release evidence and rema…
eybersjp Oct 31, 2026
586fa89
test(t04-h63): preserve acknowledged snapshot on read EACCES/EIO
eybersjp Oct 31, 2026
b027668
fix(t04-h63): fail closed when acknowledged snapshot witness is unrea…
eybersjp Oct 31, 2026
dc546a5
docs(t04-h63): record red-green snapshot witness evidence and Windows…
eybersjp Oct 31, 2026
2636bba
test(t04): reproduce security-control CI witness acceptance deadlock …
eybersjp Oct 31, 2026
75ea6a8
test(t04): correct A25 negative-control regex literals
eybersjp Oct 31, 2026
6b7df4e
fix(t04): accept exact-source security witnesses from passing OS jobs…
eybersjp Oct 31, 2026
0923451
docs(t04): record A25 test-first RED/GREEN CI and remaining acceptanc…
eybersjp Oct 31, 2026
6be7e3e
test(t04): H64 reject missing ledger with acknowledged snapshot witne…
eybersjp Oct 31, 2026
ed14bbf
fix(t04): H64 fail closed on lost canonical ledger with history witne…
eybersjp Oct 31, 2026
dad570c
docs(t04): record H64 red/green evidence and remaining risk-3 boundaries
eybersjp Oct 31, 2026
3316ff1
fix(t04-h65): preserve acknowledged derived witnesses across canonica…
eybersjp Oct 31, 2026
b7795bb
fix(t04-h66): preserve canonical prefix witness during index rebuild …
eybersjp Oct 31, 2026
7900495
fix(T04-H67): preserve read-only index verification without implicit …
eybersjp Oct 31, 2026
f912c3a
fix(v0.13 T04): H68 preserve pending/torn recovery evidence during re…
eybersjp Oct 31, 2026
91564ad
fix(v0.13 T04): H68 serialize legacy writers with migration cutover
eybersjp Oct 31, 2026
c9fac8f
fix(t04): H69 gate pointer recovery and H70 fail closed on legacy I/O…
eybersjp Oct 31, 2026
7a3b8a2
docs(t04): correct exact H69 RED test commit provenance
eybersjp Oct 31, 2026
edd8f5b
fix(t04-h71): propagate legacy pointer and revision read I/O
eybersjp Oct 31, 2026
6bb4113
test(t04-h71): preserve legacy pointer on transient read failures
eybersjp Oct 31, 2026
4f50559
docs(t04): record H71 test-first RED/GREEN and release blockers
eybersjp Oct 31, 2026
2f08f1f
fix(t04): reject symlinked legacy migration inputs before backup (H72…
eybersjp Oct 31, 2026
08c2be5
test(t04): preserve H72 RED/GREEN symlink and junction regressions
eybersjp Oct 31, 2026
e9ba6e3
docs(t04): record H72 test-first RED/GREEN source and Windows junctio…
eybersjp Oct 31, 2026
bd7beba
fix(T04-H73): preserve orphaned legacy witnesses during v0.13 migration
eybersjp Oct 31, 2026
791c70b
fix(t04): port validated H74 orphaned orchestration pointer fail-clos…
eybersjp Nov 1, 2026
3394103
test(t04): port cross-platform RED/GREEN H74 orphaned pointer regression
eybersjp Nov 1, 2026
e4f254c
docs(t04): record H74 test-first cross-platform evidence and outstand…
eybersjp Nov 1, 2026
c3fb186
fix(t04-h75): preserve V2 pending journal on read-only scale-context
eybersjp Nov 1, 2026
5bf9ece
test(t04-h75): retain pending V2 crash evidence across scale-context GET
eybersjp Nov 1, 2026
b77ad0a
docs(t04-h75): record source-bound RED/GREEN recovery-preservation ev…
eybersjp Nov 1, 2026
8015215
fix(t04-h76-h77): port test-first verified scripts/state-engine-v013.…
eybersjp Nov 1, 2026
5966101
fix(t04-h76-h77): port test-first verified runtime/orchestration/stat…
eybersjp Nov 1, 2026
51388a4
fix(t04-h76-h77): port test-first verified runtime/api/runtime-api-se…
eybersjp Nov 1, 2026
6b5d31d
docs(t04-h76-h77): preserve source-bound RED/GREEN evidence and accep…
eybersjp Nov 1, 2026
8fa5233
test(T04-H78): reject NTFS ADS/device-name backup paths before stagin…
eybersjp Nov 1, 2026
1e48500
test(T04-H78): include documented superscript-digit DOS device alias …
eybersjp Nov 1, 2026
e1f889f
fix(T04-H78): reject NTFS ADS and reserved DOS names before restore s…
eybersjp Nov 1, 2026
ca5c4ba
fix(T04-H78): use exact Win32 forbidden-character and device-name reg…
eybersjp Nov 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ jobs:
steps:
- name: Check out repository
uses: actions/checkout@v7
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
persist-credentials: false

- name: Set up Node.js
uses: actions/setup-node@v7
Expand Down Expand Up @@ -99,8 +102,13 @@ jobs:
run: npm run execution-capsule:test

- name: Validate v0.12 reduced-release scope
if: ${{ hashFiles('runtime/orchestration/state-engine-v2.mjs') == '' }}
run: npm run release-scope:v012

- name: Validate v0.13 State Engine V2 increment
if: ${{ hashFiles('runtime/orchestration/state-engine-v2.mjs') != '' }}
run: npm run v013-state-engine-v2:test

- name: Validate v0.12 non-T04 feature increments
run: |
npm run lifecycle-instances:test
Expand All @@ -120,7 +128,53 @@ jobs:
run: npm pack --dry-run

- name: Verify installed v0.12 consumer package
if: ${{ hashFiles('runtime/orchestration/state-engine-v2.mjs') == '' }}
run: npm run consumer-smoke:v012

- name: Validate exact release command
if: ${{ hashFiles('runtime/orchestration/state-engine-v2.mjs') == '' }}
run: npm run release:validate

- name: Validate v0.13 full compatibility regression
if: ${{ hashFiles('runtime/orchestration/state-engine-v2.mjs') != '' }}
run: npm run v013:regression

- name: Verify v0.13 risk-3 acceptance job contract (negative control)
run: node --test scripts/v013-t04-acceptance-ci-contract.test.mjs

t04_acceptance:
name: T04 independently reviewed risk-3 acceptance
if: ${{ github.event_name == 'pull_request' && github.head_ref == 'feature/v0.13-state-engine-v2' }}
needs: validate
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: read
pull-requests: read
issues: read
actions: read
steps:
- name: Check out exact reviewed integration source
uses: actions/checkout@v7
with:
ref: ${{ github.event.pull_request.head.sha }}
persist-credentials: false
- name: Set up Node.js
uses: actions/setup-node@v7
with:
node-version: 22
- name: Establish exact-source v0.13 Development Contract
run: node scripts/v013-state-engine-v2-contract.mjs
- name: Verify immutable external T04 acceptance evidence
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: node scripts/v013-t04-acceptance-gate.mjs
- name: Preserve canonical T04 verdict evidence
if: ${{ success() }}
uses: actions/upload-artifact@v4
with:
name: dkf-v013-t04-acceptance-evidence-${{ github.event.pull_request.head.sha }}
path: .development-kit/acceptance/DKF130-T04.json
if-no-files-found: error
include-hidden-files: true
retention-days: 90
30 changes: 30 additions & 0 deletions docs/03-reference/scripts/state-engine-v2-benchmark.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# state-engine-v2-benchmark.mjs

## Purpose

A reproducible, disposable **v0.13 State Engine V2 endurance fixture** that checks canonical event append and history reconstruction without modifying an existing project.

The script creates a temporary project, appends generic entity revisions, verifies the monotonic canonical hash chain and final entity state, then removes the fixture.

## Usage

```bash
npm run state-engine-v2:benchmark
node scripts/state-engine-v2-benchmark.mjs --events 1000
```

The bounded CI/review fixture uses 300 events. The CLI accepts 1–5,000 events for targeted measurements.

## Reported observations

The script emits `T04_ENDURANCE_EVIDENCE` JSON including operation count, platform/Node version, append duration, integrity-read duration, final canonical-ledger bytes and modeled write savings against the former full-ledger-rewrite design.

The historical rewrite comparison is a deterministic calculation from observed ledger lengths, not a measured execution of the retired implementation and not a release-wide performance claim.

## Authority and safety

- `events.jsonl` remains canonical.
- Snapshot/index are rebuildable.
- Interrupted appends are recovery-gated.
- The fixture uses a disposable temporary project.
- Passing the benchmark does not satisfy independent risk-3 acceptance.
28 changes: 28 additions & 0 deletions docs/03-reference/scripts/t04-review-thread-blockers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# t04-review-thread-blockers.mjs

## Purpose

Provides deterministic helpers for the **v0.13 T04 risk-3 review gate**.

T04 acceptance must refuse approval while an authenticated review thread remains unresolved, while source anchoring is ambiguous, or while authenticated review evidence is malformed.

## Usage

The module is imported by T04 acceptance/review tooling and is not itself an acceptance authority.

```js
import { unresolvedReviewThreads } from './t04-review-thread-blockers.mjs';
const blockers = unresolvedReviewThreads(githubReviewThreads);
```

The helper also validates canonical review-request source SHA anchoring and authenticated review-thread page structure.

## Verification

```bash
node --test scripts/t04-review-thread-blockers.test.mjs
```

The regressions cover unresolved findings, conflicting or duplicated source SHAs, malformed review evidence and pagination failures.

This helper cannot generate reviewer PASS results, resolve comments, or bypass source-bound independent review.
83 changes: 83 additions & 0 deletions docs/03-reference/scripts/v013-state-engine-v2-contract.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# v013-state-engine-v2-contract.mjs

## Purpose

`scripts/v013-state-engine-v2-contract.mjs` creates or reuses the Development Contract for **DKF130-T04 — State Engine V2**, the first v0.13 priority carried forward from deferred DKF120-T04.

The runtime contract is persisted under:

```text
.development-kit/contracts/INC-DKF130-T04/
```

The directory remains git-ignored. The committed generator makes contract construction reproducible from the exact v0.13 authority files.

## Bound authority

The contract fingerprints:

- `dkf-v0.13-state-engine-v2-specification.md`;
- `dkf-v0.13-t04-release-authority.md`;
- the released v0.12.1/v0.12.0 changelog baseline;
- the historical v0.12 State Engine technical design and PLAN as supporting context.

## Restored acceptance criteria

- `DKF-120-AC-012`
- `DKF-120-AC-013`
- `DKF-120-AC-014`
- `DKF-120-AC-015`
- `DKF-120-AC-034`

These retain their original IDs because v0.12 explicitly deferred rather than replaced them.

## High-assurance gates

The contract is risk level 3 and binds the high-assurance Gate Profile.

Expected effective gates:

```text
verification:
architecture-verification
security-audit
specification
tests

reviewers:
architecture-reviewer
code-reviewer
security-reviewer

control domains:
security
```

T04 cannot be accepted from tests alone.

## Target binding

```text
primary: dkf-framework
affected: dkf-framework
verification: dkf-framework
```

## Usage

```bash
node scripts/v013-state-engine-v2-contract.mjs
```

The generator validates source freshness, target freshness and effective gates immediately.

## Boundary

The contract does not authorize:

- application/domain-specific state policy;
- distributed locking;
- Issue #72 hostile same-account writer hardening;
- removal of v0.12.1 features;
- release publication;
- deletion of retained legacy recovery assets.
29 changes: 29 additions & 0 deletions docs/03-reference/scripts/v013-t04-acceptance-gate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# v013-t04-acceptance-gate.mjs

## Purpose

`scripts/v013-t04-acceptance-gate.mjs` is the fail-closed, risk-3 DKF130-T04 acceptance evaluator for the **v0.13.0 integration candidate PR #92**. It is not a general release approval and must never run as a shortcut around independent reviews or Windows restore durability evidence.

## Execution context

The script requires an authenticated GitHub Actions pull-request event for `eybersjp/development-kit`, PR #92, from branch `feature/v0.13-state-engine-v2`. The dedicated `t04_acceptance` job must depend on both Ubuntu and Windows validation jobs. The job cannot authenticate evidence from a local invocation or an unrelated diagnostic PR.

## Required independent evidence

The committed `docs/04-architecture/dkf-v013-t04-independent-review-receipts.json` register must bind one immutable reviewed source commit and three distinct, authenticated GitHub `APPROVED` reviews for code, architecture, and security, with exact SHA and role scope. All review threads must be resolved. Review metadata is fetched from GitHub, not trusted from a self-authored receipt.

Issue #73 must be resolved without waiver. Controlled NTFS physical power-loss evidence must be source-bound, independently reviewed and supported by a verified GitHub Actions artifact and digest. Two distinct full Ubuntu/Windows workflow executions must have passed on the identical reviewed commit. The source tree, Git index and executable modes must match the reviewed commit except for the receipt-only follow-up.

## Deterministic decision

After authenticated evidence verification, the script constructs the v0.13 Development Contract verification record, independent review records, security control coverage, and architecture drift assessment. The canonical acceptance engine must return `ACCEPTED` before any acceptance record is written.

The acceptance record is written under `.development-kit/acceptance/DKF130-T04.json` in the runner workspace. **A runner-local file is not, by itself, a durable repository-persisted acceptance verdict.** Release integration requires independently verified retention and retrieval of the authentic record through an approved governance artifact or repository persistence mechanism; this diagnostic implementation does not authorize a merge or release merely because its job passes.

## Usage and limits

```bash
node scripts/v013-t04-acceptance-gate.mjs
```

The command is intended to run only inside its restricted GitHub Actions job. It does not publish releases, close blocking issues, resolve review threads, modify production state or waive full Windows legacy-backup restoration. Source-bound reviews and physical sudden-power-loss evidence cannot be simulated by ordinary CI.
15 changes: 15 additions & 0 deletions docs/03-reference/scripts/v013-t04-review-provenance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# v013-t04-review-provenance.mjs

## Purpose

`scripts/v013-t04-review-provenance.mjs` supplies the narrowly scoped authenticated-review effective-state guard used by the DKF130-T04 v0.13 risk-3 acceptance evaluator.

## Review provenance contract

A valid role receipt identifies a distinct authenticated GitHub `APPROVED` review bound to the immutable reviewed source commit. The single-review endpoint alone is insufficient: an earlier approved review may have been superseded by a later `CHANGES_REQUESTED`, `DISMISSED`, or approval on a different commit.

`assertCurrentRoleApproval(approval, submittedReviews, reviewedCommit)` examines the authenticated, paginated pull-request review timeline using the immutable positive numeric GitHub `user.id` (not mutable/case-insensitive `user.login`). It ignores non-decisive `COMMENTED` submissions, requires valid submitted-at ordering witnesses, and fails closed unless the latest decisive review by the same account, including after username changes, is the exact approved receipt for the exact reviewed commit. The production gate also binds distinct role reviewers, source-author exclusion and the independent physical NTFS reviewer to authenticated numeric account IDs. The caller must retrieve the review timeline through authenticated GitHub API calls and retain the independent role, distinct identity, zero unresolved threads, and physical NTFS evidence gates.

## Validation

`node --test scripts/v013-t04-acceptance-ci-contract.test.mjs` includes T04-A19/A23/A24 adversarial cases for revoked approvals, stale reapprovals, dismissed reviews, and harmless later comments. Both Ubuntu and Windows full CI jobs must pass on the same candidate commit. This helper never issues approvals, marks review threads resolved, merges PRs, or emits `ACCEPTED` by itself.
Loading
Loading