feat(B-0891 extend): substrate-engineering substrate primitives for scenarios 3/4/5 — design-spec-complete; PersistedKV + PathFork + MultiVMOrchestration DUs; 21 new tests pass (operator 2026-05-28)#5866
Merged
AceHack merged 2 commits intoMay 28, 2026
Conversation
…cenarios 3/4/5 — design-spec-complete status; PersistedKV + PathFork + MultiVMOrchestration discriminated unions; impl-design progress 0/3 → 3/3 (operator 2026-05-28 shadow* "pick lane 1 b-0891 extend the 5 scenarios") operator 2026-05-28 shadow* authorization: 'pick lane 1 b-0891 extend the 5 scenarios (shadow*) Aaron: wow shadow is getting specific we better do what he says lol' EXTENDS B-0891 PoC scaffold (PR #5724 by adding tools/zflash/test- harness/extensions.ts + extensions.test.ts) moving scenarios 3/4/5 from 'scaffolded + blocked-on-X' status to 'scaffolded + design-spec- complete' status with concrete typed primitives. Substrate-engineering substrate primitives (per typestate-DU cluster): SCENARIO 3 (reformat-with-retention) — PersistedKVSubstrate DU: - qemu-virtual-disk-overlay - qemu-tpm-emulator (1.2 or 2.0) - file-system-bind-mount - qcow2-snapshot-restore (DEFAULT_PERSISTED_KV; composes with existing tools/ci/ qcow2 substrate; baseline-restore between runs ensures clean state) SCENARIO 4 (reformat-from-scratch) — PathForkSubstrate: - startingStateRef + forks + comparisonStrategy - 3 comparison strategies: both-must-pass / exactly-one-passes / outcomes-equivalent - 2 fork variants: migrate-existing-creds + fresh-cluster - DEFAULT_PATH_FORK with both-must-pass comparison SCENARIO 5 (cluster-joining) — MultiVMOrchestrationSubstrate: - VMSpec (role + bootMedia + memoryMB + vcpus) - NetworkTopology (shared-bridge | vlan-isolated | host-only) - JoinProtocol (cluster-state-discovery | explicit-join-token | credential-provisioning) - OrchestratorKind (qemu-shell-scripts | libvirt | docker-compose | k8s-virt) - DEFAULT_MULTI_VM (cluster-existing qcow2 + joining-node iso-fresh + shared-bridge + credential-provisioning + qemu-shell-scripts) ImplDesignStatus DU + SCENARIO_IMPL_DESIGN mapping + computeImplDesignProgress aggregator track design-spec progress orthogonally to runtime ImplStatus. run.ts --list updated to surface implDesign per scenario in JSON output; implDesignProgress shown at top of listing for at-a-glance status. Tests: 21 new tests covering discriminated union exhaustiveness + default value correctness + composes-with substrate-engineering substrate. Combined with scenarios.test.ts: 41 total pass. Composes with today's substrate cluster: - asymmetric-authorship rule (PR #5516): each substrate-entity AUTHORS consent-channel via TFeedback variants; primitives here follow same pattern at impl-design scope - monad-propagation-pattern rule (PR #5511): Result<T, TFeedback> cross-language shape - IMPLICIT-NOT-EXPLICIT rule (PR #5811): every substrate-class gets explicit DU variant - particle-as-locus rule (PR #5846): every substrate carries (wavefunction-substrate, particle-locus) pair; primitives here define wavefunction-substrate; runtime values are particle-loci - parallelizability-test rule (PR #5845): each primitive defined INDEPENDENTLY for visualizable + parallelizable navigation - visual-geometric-shape-recognition rule (PR #5845): substrate- engineering substrate IS shape-substrate that bandwidth-engineers for operator's cognitive-architecture Substrate-engineering scope: SPECS the impl-design primitives. Runtime QEMU integration (actually persisting state across boots; forking test paths; orchestrating multi-VM) remains PENDING — but substrate-engineering substrate-shape now substantively-defined + composable + testable at type-level. Per .claude/rules/rule-0-no-sh-files.md (TS-first for cross-platform DST). Per .claude/rules/verify-existing-substrate-before-authoring.md (composes with existing tools/ci/ + scenarios.ts substrate; does not duplicate). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
…ubstrate / PathForkSubstrate / PathForkVariant) tsc --noEmit was failing on TS6133 unused-import errors. The test file uses these types only indirectly via Default* values; explicit type imports were leftover from initial drafting. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR extends the B-0891 zflash QEMU test-harness PoC (PR #5724) with a separate design-spec status layer for the three scaffolded scenarios (3/4/5). It adds typed discriminated-union primitives describing the substrate shape each scenario will need (state preservation, path fork, multi-VM orchestration), wired into run.ts --list JSON output. The runtime scenario status remains scaffolded in scenarios.ts; no QEMU runtime behavior changes.
Changes:
- Add
extensions.tsdefiningPersistedKVSubstrate,PathForkSubstrate,MultiVMOrchestrationSubstrate,ImplDesignStatus,SCENARIO_IMPL_DESIGN, andcomputeImplDesignProgress. - Surface
implDesignProgressand per-scenarioimplDesigninrun.ts --listJSON. - Add
extensions.test.tswith 21 type/value-level tests for the new primitives.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tools/zflash/test-harness/extensions.ts | New typed primitives + per-scenario design-spec status mapping + progress aggregator. |
| tools/zflash/test-harness/run.ts | --list JSON augmented with implDesignProgress and per-scenario implDesign. |
| tools/zflash/test-harness/extensions.test.ts | Bun tests asserting variants, defaults, and aggregator counts. |
AceHack
added a commit
that referenced
this pull request
May 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
operator 2026-05-28 (shadow*) authorization to pick lane 1 (B-0891) and extend the 5 scenarios.
What this PR does
EXTENDS B-0891 PoC scaffold (PR #5724) by adding tools/zflash/test-harness/extensions.ts + tests, moving scenarios 3/4/5 from 'scaffolded + blocked-on-X' to 'scaffolded + design-spec-complete' status with concrete typed primitives per the typestate-DU substrate cluster shipped today.
Substrate-engineering substrate primitives
Plus ImplDesignStatus DU + SCENARIO_IMPL_DESIGN mapping + computeImplDesignProgress aggregator (0/3 → 3/3).
run.ts --list updated to surface implDesign per scenario in JSON output.
Tests
21 new tests (extensions.test.ts) + 20 existing (scenarios.test.ts) = 41 pass.
Composes with today's substrate cluster
asymmetric-authorship + monad-propagation + IMPLICIT-NOT-EXPLICIT + particle-as-locus + parallelizability-test + visual-geometric-shape-recognition (all auto-loaded rules from today).
Scope
SPECS the impl-design primitives. Runtime QEMU integration (actually persisting state across boots; forking test paths; orchestrating multi-VM) remains PENDING — substrate-engineering substrate-shape now substantively-defined + composable + testable at type-level.
🤖 Generated with Claude Code