Preserve Details saved-source comparator and verified fixture self-check

This commit is contained in:
2026-09-13 05:32:37 -07:00
parent 1d8a0dd8b6
commit 727d2e0b3f
48 changed files with 37743 additions and 0 deletions
@@ -0,0 +1 @@
* -text -whitespace
@@ -0,0 +1,42 @@
# Details saved-source comparator: closed build and self-check
The strict standalone comparator build exited 0, and its self-check exited 0 with all 13 reported checks passing. Both real source fixtures were admitted; all six approved typed checkpoints were accepted. These results validate the comparator and its falsifiers. No native saved output, desktop source-writing action, runtime state, or Undo history was evaluated in this run.
The linked core source is [8bf7607a3f3b53db0c36364f54f57674c64ea2f1](http://217.177.34.108:3000/sorokin.oleg.edu/ARCADIA-Studio/src/commit/8bf7607a3f3b53db0c36364f54f57674c64ea2f1). The exact comparator [source](original/main.rs), [builder](original/build.ps1), [checker](original/check.ps1), fixtures, and expectations are preserved here. The comparator is external test tooling, not a product change.
## What it checks
The `name` mode allows only the independently predetermined Name change on one element, compared with an independently captured baseline Project. The planned incident target is `70200000-0000-4000-8000-000000000020`, changing `Initial incident report` to `Initial incident report [Details trial]`. The `typed` mode compares the complete actual saved Project against exact approved JSON checkpoint bytes. Expectations are never derived from the actual saved output.
Both source inputs pass through actual `source_files::load_project`, `compile_bundle`, unchanged input/compiled SourceBundle comparison, exactly one reachable file, and core admission. Canonicalization sorts object keys only; arrays and serialized scalar values remain exact, including signed zero. No aliases, sequence order, other saved views, or unrelated fields are excluded.
The six expected JSON files and service fixture match the independently published [core checkpoint evidence at 698126e](../scenario-service-details-core-20260913/README.md), bound by [expected-catalog.json](original/expected-catalog.json). This run reused those expectations; it did not manufacture them from future native output.
## Actual results and bindings
| Observation | Closed result |
| --- | --- |
| `rustc --edition=2024 -D warnings` | Exit 0; empty compile log; 1,595 before/after input records identical |
| Comparator self-check | Exit 0; 13 named checks passed; 636 before/after input records identical; empty stderr |
| Real fixtures | Incident and service source admitted without migration, identity insertion, or passive SourceBundle change |
| Typed expectations | Baseline plus checkpoints 1, 3a, 3b, 3c, 3d accepted |
| Falsifiers | Wrong occurrence, extra alias, semantic array order, extra layout, signed-zero change, invalid Name target/no-op, wrong checkpoint/Project identity, and unknown expected field exercised |
The authoritative raw [build receipt](original/build-01/build-receipt.json), [self-check receipt](original/self-check-01/receipt.json), [self-check assertions report](original/self-check-01/project-comparison/self-check.json), logs, captured fixtures and decoded baseline Projects are unchanged. [Verified results](verified-results.json) summarize archival checks.
The builder used the successful exact 8bf desktop **LIST** as its dependency reference: [receipt](reference-list/list-receipt.json), SHA-256 `e2d9258afab904c7d0d9f3efbb3c3cc02511a33296c1698b3114b3d6b7a125a1`. That list identifies 1,089 desktop tests and 295 focused names with 611 unchanged source inputs. It is not a claim that the later focused/full desktop gates passed. The exact frozen [native verifier helper](reference-verifier/verify.ps1) is included because the core-only builder imports its read-only source and membership checks; it does not invoke five-gate native staging admission.
| Omitted binary | Bytes | SHA-256 |
| --- | ---: | --- |
| `details-source-oracle.exe` | 19,775,488 | `deba40e3d224b1326f3f38d5eb7f692ac9bb453876c6f63e1fe2d540cae79183` |
| Adjacent `libunwind.dll` | 190,464 | `aa282fa47bb2c4e210cea5e470cdbdca58568f0be0bc73e404d86ab9cd95ef6a` |
Build receipt SHA-256: `9755e8a94e4075caaaef276e08e92cb1773423785a8c9b3046b39011b1e068ef`. Self-check receipt SHA-256: `2fe1db299c2a2ed7b4edc3fe8655ced603a5da7c9165df81cf71360eca1dc8cc`. The checker bound the actual adjacent runtime DLL and child environment before and after execution.
## Preservation and reproduction
[Archive manifest](archive-manifest.json) binds 44 copied original files totaling 2,217,831 bytes. Archival verification checked every copied byte, receipt/log/artifact bindings, exact build/run manifest equality, 627 current build-source records, all 636 current run-input records, the executable and DLL. It did not redundantly rehash the entire transitive dependency cache; the closed build's before/after dependency proof is preserved. No compiler, oracle, or desktop was invoked during archival. Raw-evidence Git attributes prevent line-ending normalization.
The preserved [original recipe](original/README.md) gives explicit build and `self-check`, `name`, and `typed` commands. Its preparation-only wording predates these closed results. For a new run, restore `original/` as a fresh local comparator recipe directory alongside a checkout of exact 8bf and a reviewed matching desktop LIST/dependency build. Supply the archived verifier explicitly through `-NativeVerifier` or restore its documented sibling path. The scripts intentionally validate workspace layout, compiler/fingerprint edges, exact rlibs, lockfile, source inputs and runtime; archived absolute paths describe this Windows host and are not assumed to exist on a peer machine. Use fresh output directories and newly reviewed executable/receipt hashes. The archive is a source-and-receipt reproduction record, not a bundled compiler/cache or runnable binary package.
Native staging still requires its complete desktop/focused/full/strict/build gates. Actual Name and typed saved-output comparisons, Properties interaction, Revert/Apply, source-writing behavior and history remain separate acceptance work. The old spacing oracle remains responsible for lane/message/repair comparisons.
@@ -0,0 +1,271 @@
{
"status": "Exact originals preserved; no build or execution during archival",
"files": [
{
"source": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\scenario-details-source-oracle-20260913\\adaptation-provenance.json",
"path": "original/adaptation-provenance.json",
"bytes": 1402,
"sha256": "2c0ce573723eff3f5a6008a7856629c8807e53bb72140e03b5c34c70e87ad6c5"
},
{
"source": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\scenario-details-source-oracle-20260913\\build-01\\build-receipt.json",
"path": "original/build-01/build-receipt.json",
"bytes": 182432,
"sha256": "9755e8a94e4075caaaef276e08e92cb1773423785a8c9b3046b39011b1e068ef"
},
{
"source": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\scenario-details-source-oracle-20260913\\build-01\\compile.log",
"path": "original/build-01/compile.log",
"bytes": 0,
"sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
},
{
"source": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\scenario-details-source-oracle-20260913\\build-01\\details-source-oracle.d",
"path": "original/build-01/details-source-oracle.d",
"bytes": 3612,
"sha256": "886602da0be322a41a700dc48f289b916f473a847ea4363e56aaac692cee5436"
},
{
"source": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\scenario-details-source-oracle-20260913\\build-01\\inputs-after.json",
"path": "original/build-01/inputs-after.json",
"bytes": 408910,
"sha256": "a03cfb285423ed94a1ec65d12de4a52fa9c95969e2a1516b99a856887b6052d1"
},
{
"source": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\scenario-details-source-oracle-20260913\\build-01\\inputs-before.json",
"path": "original/build-01/inputs-before.json",
"bytes": 408910,
"sha256": "a03cfb285423ed94a1ec65d12de4a52fa9c95969e2a1516b99a856887b6052d1"
},
{
"source": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\scenario-details-source-oracle-20260913\\build-01\\toolchain.json",
"path": "original/build-01/toolchain.json",
"bytes": 784,
"sha256": "c36a1a1733ad1e94510ef61b42a40e44941c7c4b34141ccdb804abd6714fd859"
},
{
"source": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\scenario-details-source-oracle-20260913\\build.ps1",
"path": "original/build.ps1",
"bytes": 13669,
"sha256": "eb4cea60c2b483b2507f792bf3e6feaa1c7d741a484f561e11a994e70e326e80"
},
{
"source": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\scenario-details-source-oracle-20260913\\check.ps1",
"path": "original/check.ps1",
"bytes": 11515,
"sha256": "dba9dbad6ac27eead3334d913d303d92d5f406df30e317d18d708511ce2a8d48"
},
{
"source": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\scenario-details-source-oracle-20260913\\expected\\after-1.expected.project.json",
"path": "original/expected/after-1.expected.project.json",
"bytes": 10578,
"sha256": "c03cf59f83bc1ae4db64584abf1257efc775cc47b49f2b2db4ac47159dfb90a0"
},
{
"source": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\scenario-details-source-oracle-20260913\\expected\\after-3a.expected.project.json",
"path": "original/expected/after-3a.expected.project.json",
"bytes": 10495,
"sha256": "ce3d58385815d0a1d01320bdd711d707cb4c530f0614545eca2b83533077b6f0"
},
{
"source": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\scenario-details-source-oracle-20260913\\expected\\after-3b.expected.project.json",
"path": "original/expected/after-3b.expected.project.json",
"bytes": 10487,
"sha256": "81f16c54db0e7be1960be5de6a89a6e16a56d6c62d45e15aa7f59bc9d85c8925"
},
{
"source": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\scenario-details-source-oracle-20260913\\expected\\after-3c.expected.project.json",
"path": "original/expected/after-3c.expected.project.json",
"bytes": 10565,
"sha256": "3c4521eef6cf2a6024275f8c6bf5e9a55d7f6e10cb58c9cc846be56cfa121aca"
},
{
"source": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\scenario-details-source-oracle-20260913\\expected\\after-3d.expected.project.json",
"path": "original/expected/after-3d.expected.project.json",
"bytes": 10565,
"sha256": "36dfe596c1e2f39a82795237f545787996e9138d9c160217611b201da14ce66a"
},
{
"source": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\scenario-details-source-oracle-20260913\\expected\\baseline.project.json",
"path": "original/expected/baseline.project.json",
"bytes": 10576,
"sha256": "e59d4f08fda2bae23ca2b84bda0c8679703b1b75a0b7c1916b2f49d2762a90c6"
},
{
"source": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\scenario-details-source-oracle-20260913\\expected-catalog.json",
"path": "original/expected-catalog.json",
"bytes": 1974,
"sha256": "5607c2f3cd44aeb18b923f6afc42f82a693e4320778be69f7d1ce1d616e21a1a"
},
{
"source": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\scenario-details-source-oracle-20260913\\fixtures\\incident-workspace.arcadia",
"path": "original/fixtures/incident-workspace.arcadia",
"bytes": 6206,
"sha256": "74cd2c1dd5eed7eb19895a752bb8ff9ce93655f7638a5312c96f56218568ebb3"
},
{
"source": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\scenario-details-source-oracle-20260913\\fixtures\\service-details.arcadia",
"path": "original/fixtures/service-details.arcadia",
"bytes": 6132,
"sha256": "0e4325222a451b9d4e503974ce86bb95a9931edd0d2d65b8cd9db8d0f99d69e5"
},
{
"source": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\scenario-details-source-oracle-20260913\\main.rs",
"path": "original/main.rs",
"bytes": 11873,
"sha256": "502b488eae0b7775cb01e7de4580dfa6efece63389d6fb57dc782df2fad48af0"
},
{
"source": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\scenario-details-source-oracle-20260913\\preparation-verification.json",
"path": "original/preparation-verification.json",
"bytes": 3464,
"sha256": "18375c54464f8d97bbdc1f844b3df15da9de927fa53f412cba777d81f6bcb5e7"
},
{
"source": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\scenario-details-source-oracle-20260913\\proposed-build-inputs.json",
"path": "original/proposed-build-inputs.json",
"bytes": 1156,
"sha256": "119c58c5d9ea5dabb2f262dc57dd36fa9d91768080c881205d172b5e6091ae7e"
},
{
"source": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\scenario-details-source-oracle-20260913\\README.md",
"path": "original/README.md",
"bytes": 6975,
"sha256": "05721f6a05e70a3fe18b92ae4bd5e3826b7ff5f728bcd3e91db6130dc06a7fcd"
},
{
"source": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\scenario-details-source-oracle-20260913\\script-validation.json",
"path": "original/script-validation.json",
"bytes": 649,
"sha256": "f52072c24023a30794dc7930656a03e14e360801a82401a29e5498095dcf5ab3"
},
{
"source": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\scenario-details-source-oracle-20260913\\self-check-01\\input-0.arcadia",
"path": "original/self-check-01/input-0.arcadia",
"bytes": 6206,
"sha256": "74cd2c1dd5eed7eb19895a752bb8ff9ce93655f7638a5312c96f56218568ebb3"
},
{
"source": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\scenario-details-source-oracle-20260913\\self-check-01\\input-1.arcadia",
"path": "original/self-check-01/input-1.arcadia",
"bytes": 6132,
"sha256": "0e4325222a451b9d4e503974ce86bb95a9931edd0d2d65b8cd9db8d0f99d69e5"
},
{
"source": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\scenario-details-source-oracle-20260913\\self-check-01\\inputs-after.json",
"path": "original/self-check-01/inputs-after.json",
"bytes": 175466,
"sha256": "b0292988ad1447b55e9ba110df4bb67a531c67a4f928a0d200caa6581f094b00"
},
{
"source": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\scenario-details-source-oracle-20260913\\self-check-01\\inputs-before.json",
"path": "original/self-check-01/inputs-before.json",
"bytes": 175466,
"sha256": "b0292988ad1447b55e9ba110df4bb67a531c67a4f928a0d200caa6581f094b00"
},
{
"source": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\scenario-details-source-oracle-20260913\\self-check-01\\project-comparison\\incident.baseline.project.json",
"path": "original/self-check-01/project-comparison/incident.baseline.project.json",
"bytes": 9452,
"sha256": "60dab6b528c1f273d2b076897a6f95c492a74cdaa15bd27cd873bf12ce865391"
},
{
"source": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\scenario-details-source-oracle-20260913\\self-check-01\\project-comparison\\self-check.json",
"path": "original/self-check-01/project-comparison/self-check.json",
"bytes": 484,
"sha256": "62471fe9fe92746dea9253eb3e0e5ac326f35e4ccf927fc877a19c26f6aaa928"
},
{
"source": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\scenario-details-source-oracle-20260913\\self-check-01\\project-comparison\\service.baseline.project.json",
"path": "original/self-check-01/project-comparison/service.baseline.project.json",
"bytes": 10576,
"sha256": "e59d4f08fda2bae23ca2b84bda0c8679703b1b75a0b7c1916b2f49d2762a90c6"
},
{
"source": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\scenario-details-source-oracle-20260913\\self-check-01\\receipt.json",
"path": "original/self-check-01/receipt.json",
"bytes": 4252,
"sha256": "2fe1db299c2a2ed7b4edc3fe8655ced603a5da7c9165df81cf71360eca1dc8cc"
},
{
"source": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\scenario-details-source-oracle-20260913\\self-check-01\\request.json",
"path": "original/self-check-01/request.json",
"bytes": 129,
"sha256": "7b6d280159217b38f71a1a98e85b5d4c8f8311370bb05c2ef982cfee1165b752"
},
{
"source": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\scenario-details-source-oracle-20260913\\self-check-01\\stderr.log",
"path": "original/self-check-01/stderr.log",
"bytes": 0,
"sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
},
{
"source": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\scenario-details-source-oracle-20260913\\self-check-01\\stdout.log",
"path": "original/self-check-01/stdout.log",
"bytes": 55,
"sha256": "e196f844e223e514c2d060617424d8468da244fda4c7d42f42962a22c48345ff"
},
{
"source": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\scenario-details-source-oracle-20260913\\source-inputs.json",
"path": "original/source-inputs.json",
"bytes": 2428,
"sha256": "2709d846d62801fb832bbf33b5def79fd6b1c1fd85d5fdea9fccb529698f3d4a"
},
{
"source": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\scenario-details-source-oracle-20260913\\validate-scripts.ps1",
"path": "original/validate-scripts.ps1",
"bytes": 684,
"sha256": "94923b46cf98fcd03ad02e03bb433011b49727a8a1819b04374a560d5673d868"
},
{
"source": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\scenario-details-gates-attempt2-20260913\\list-receipt.json",
"path": "reference-list/list-receipt.json",
"bytes": 160008,
"sha256": "e2d9258afab904c7d0d9f3efbb3c3cc02511a33296c1698b3114b3d6b7a125a1"
},
{
"source": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\scenario-details-gates-attempt2-20260913\\list.log",
"path": "reference-list/list.log",
"bytes": 120099,
"sha256": "214572d5f64e584e37666c5c13a7589116143df4ed5e2c968f339038da3f5aca"
},
{
"source": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\scenario-details-gates-attempt2-20260913\\inputs-complete-list-before.json",
"path": "reference-list/inputs-complete-list-before.json",
"bytes": 119187,
"sha256": "13af0adbe53803a9655af5e442f4d03c592570172e778da7624b21fbcd28d692"
},
{
"source": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\scenario-details-gates-attempt2-20260913\\inputs-complete-list-after.json",
"path": "reference-list/inputs-complete-list-after.json",
"bytes": 119187,
"sha256": "7f709cf87c191641a541b77ae73de974fa266305e5b3a898fb092a9d662a3986"
},
{
"source": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\scenario-details-gates-attempt2-20260913\\toolchain-versions.json",
"path": "reference-list/toolchain-versions.json",
"bytes": 2268,
"sha256": "6ab6b9767eae2ceec8ace9924324baa1819141612d499f0014ca0efb8b307c3c"
},
{
"source": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\scenario-details-gates-attempt2-20260913\\expected-tests.json",
"path": "reference-list/expected-tests.json",
"bytes": 157428,
"sha256": "4eaa6987aa91c7dcabb14ad4a3b17a4cec7718a30a820034ea4efa1a3afcb6d0"
},
{
"source": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\scenario-details-gates-attempt2-20260913\\finalization.json",
"path": "reference-list/finalization.json",
"bytes": 611,
"sha256": "c529de5736e8d1fecf201901c60a081cfd92839c595baf3287eedce02a454d80"
},
{
"source": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\scenario-details-native-8bf7607-20260913\\verify.ps1",
"path": "reference-verifier/verify.ps1",
"bytes": 14784,
"sha256": "91b29e336b861d0c59c1c310556d737330871bc54aaed6d5e509bd33dce07945"
}
],
"file_count": 44,
"bytes": 2217831
}
@@ -0,0 +1,57 @@
# Details saved-source comparator (prepared, uncompiled)
This is a separate core-only evaluator. It does not change the spacing oracle or product. `name` compares an independently captured pre-edit incident source Project with an actual saved source, allowing only the supplied element's exact new Name. `typed` compares an actual saved service source with one of six independently authored, published core checkpoints. There is no generic ignore list and no field projection.
Both source inputs use actual `source_files::load_project`, `compile_bundle`, unchanged compiled-versus-input SourceBundle, exactly one reachable file, and empty-batch core admission. Full Project JSON object keys are sorted only; arrays and serialized scalars remain exact, including signed zero. UUIDs, aliases, scenario.steps, other records, replies, types and every saved view remain part of the comparison. Formatting/comments may differ between two source files, but neither parse may need migration or identity insertion. This does not inspect the desktop's accepted source buffer or history.
## Independent expectations
The exact incident Name task already declared by the native plan is element `70200000-0000-4000-8000-000000000020`, from `Initial incident report` to `Initial incident report [Details trial]`. Capture the pre-edit source and its SHA **before** that edit; do not derive a baseline or NewName from the result. Save the working fixture at the intended accepted Name checkpoint before comparing. Revert/Undo equality checks can continue using the existing spacing oracle's `same` mode. This new Name mode refuses unchanged names and Diagram IDs; the native SavedB case checks inspector access, not a Diagram-name mutation.
`expected/` contains exact baseline/1/3a/3b/3c/3d JSON bytes from the [published core evidence](http://217.177.34.108:3000/sorokin.oleg.edu/ARCADIA-Studio/src/commit/698126e1a0b9ab37cb3cac4339ffcf3a6bf0a340/harness/experiments/scenario-service-details-core-20260913/README.md). These were produced independently of future native output. `expected-catalog.json` binds each checkpoint SHA and fixture identity. The runner rejects any other expected bytes; Rust also requires the exact embedded approved bytes, complete Project round-trip, correct service owner/view and core admission. The five edit checkpoints are cumulative as specified in that fixture: payload edit, Reply annotation removal, operation/field replacement, Reply annotation addition, final pressure edit. A rejected change after task1 compares to checkpoint1. No expected value is learned from Actual.
## Deferred build
No comparator compilation or execution has occurred. The builder requires the **closed successful exact8bf desktop LIST**, actual1089 names,295 focused membership/611-source preparation, bound test EXE and matching test fingerprint. It checks desktop -> core, desktop -> serde_json and core -> serde_json fingerprint edges, same compiler fingerprint, Cargo.lock/core/all source inputs, actual compiler/linker versions and link/search artifacts before/after. This is sufficient for the core-only evaluator; it does not invoke the native verifier's five-stage admission. The reused verifier supplies read-only source/membership helpers only. Native staging still requires all five gates.
Only after the parent grants the exclusive compiler slot:
```powershell
./build.ps1 -SourcePin '8bf7607a3f3b53db0c36364f54f57674c64ea2f1' `
-ReferenceReceipt '../scenario-details-gates-attempt2-20260913/list-receipt.json' `
-DesktopFingerprint '<absolute actual oa-desktop-.../test-bin-arcadia-studio.json>' `
-CoreRlib '<absolute matching liboa_core-....rlib>' `
-SerdeJsonRlib '<absolute matching libserde_json-....rlib>' `
-WindowsImportLibDirectory '<absolute windows_x86_64_gnullvm-0.52.6/lib>' `
-Output '<fresh build evidence directory>'
```
The DLL source defaults to the previously verified private package. The builder hashes it among inputs, copies it adjacent to the comparator only after successful linking, and records path/size/SHA. No global PATH or profile changes occur. Rlib names above are deliberately not guessed: the explicit paths must pass the actual closed-list/fingerprint checks. Build with `-D warnings`; preserve a failure rather than reuse its output directory.
## Deferred execution
The checker requires explicit reviewed EXE and build-receipt SHA256 values. It verifies the successful build, before/after manifests, compile/toolchain receipts, current comparator plus all bound source inputs, and the **actual adjacent libunwind.dll** before and after execution. It snapshots native source/expected input files before invoking the comparator with a child-only package/Windows PATH. Each run needs a fresh output directory and preserves stdout/stderr, decoded expected/actual JSON, request, before/after inputs and final receipt. It does not stage or run the desktop.
```powershell
# Define these from the successfully reviewed build receipt, never placeholders:
$exe = '<absolute details-source-oracle.exe>'
$exeSha = '<64-hex reviewed executable SHA>'
$receipt = '<absolute build-receipt.json>'
$receiptSha = '<64-hex reviewed receipt SHA>'
./check.ps1 -OracleExe $exe -OracleSha256 $exeSha -BuildReceipt $receipt -BuildReceiptSha256 $receiptSha `
-Mode self-check -Output '<fresh self-check directory>'
./check.ps1 -OracleExe $exe -OracleSha256 $exeSha -BuildReceipt $receipt -BuildReceiptSha256 $receiptSha `
-Mode name -Baseline '<immutable pre-edit incident.arcadia>' -BaselineSha256 '<previously recorded SHA>' `
-Actual '<saved named incident.arcadia>' -Target '70200000-0000-4000-8000-000000000020' `
-NewName 'Initial incident report [Details trial]' -Output '<fresh name comparison directory>'
./check.ps1 -OracleExe $exe -OracleSha256 $exeSha -BuildReceipt $receipt -BuildReceiptSha256 $receiptSha `
-Mode typed -ExpectedProject './expected/after-1.expected.project.json' -Checkpoint '1' `
-Actual '<saved service-details.arcadia after task1>' -Output '<fresh typed comparison directory>'
```
The prepared Rust self-check admits both real fixtures, checks all six approved typed checkpoints and the actual service baseline, and falsifies wrong occurrence, extra alias, reordered semantic steps, extra layout change, signed-zero collapse, non-element target, unchanged Name, wrong checkpoint, wrong expected Project identity and unknown expected fields. These assertions are **unexecuted** until the parent builds/runs the comparator. PowerShell syntax checks are not Rust compilation or fixture self-check acceptance.
Scope: complete parsed saved Project and passive parse nonmutation only. No runtime Scene/camera/editor state, actual click/selection, draft recovery, Undo stack, source-writer transaction or native acceptance is established. Core command/history evidence remains the separate published probe; the desktop source-writing and native observations still have to be exercised.
@@ -0,0 +1,26 @@
{
"status": "Uncompiled/unexecuted comparator source; read-only source adaptations and exact fixture/checkpoint copies",
"adapted_sources": [
{
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\scenario-spacing-native-preparation-20260913\\oracle\\main.rs",
"bytes": 9060,
"sha256": "3e9d33d47c2ec18e1af191407d9809bbca4753456eea0fc8a4692dedd07e7205"
},
{
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\scenario-details-native-preparation-20260913\\build-core-probe.ps1",
"bytes": 10633,
"sha256": "85b0a3cb25292573076a5e395dcfe08b4b179b5f44d510225247b43e20fddde3"
},
{
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\scenario-spacing-native-preparation-20260913\\oracle\\check.ps1",
"bytes": 4418,
"sha256": "0ed86689968e55c2a8f7bcbe69f7043928ba3331a772659a0dd8ee10e898ff71"
}
],
"native_plan": {
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\scenario-details-native-8bf7607-20260913\\native-run-plan.md",
"bytes": 20735,
"sha256": "e9992a4aaf18f146c4caf73db42b10e393fcb976719a2f3e687c9f285a16248a"
},
"publication": "http://217.177.34.108:3000/sorokin.oleg.edu/ARCADIA-Studio/src/commit/698126e1a0b9ab37cb3cac4339ffcf3a6bf0a340/harness/experiments/scenario-service-details-core-20260913/README.md"
}
@@ -0,0 +1,13 @@
C:\Users\User\Documents\Git\ARCADIA-Studio\.local\scenario-details-source-oracle-20260913\build-01\details-source-oracle.d: C:\Users\User\Documents\Git\ARCADIA-Studio\.local\scenario-details-source-oracle-20260913\main.rs C:\Users\User\Documents\Git\ARCADIA-Studio\.local\scenario-details-source-oracle-20260913\fixtures/incident-workspace.arcadia C:\Users\User\Documents\Git\ARCADIA-Studio\.local\scenario-details-source-oracle-20260913\fixtures/service-details.arcadia C:\Users\User\Documents\Git\ARCADIA-Studio\.local\scenario-details-source-oracle-20260913\expected/baseline.project.json C:\Users\User\Documents\Git\ARCADIA-Studio\.local\scenario-details-source-oracle-20260913\expected/after-1.expected.project.json C:\Users\User\Documents\Git\ARCADIA-Studio\.local\scenario-details-source-oracle-20260913\expected/after-3a.expected.project.json C:\Users\User\Documents\Git\ARCADIA-Studio\.local\scenario-details-source-oracle-20260913\expected/after-3b.expected.project.json C:\Users\User\Documents\Git\ARCADIA-Studio\.local\scenario-details-source-oracle-20260913\expected/after-3c.expected.project.json C:\Users\User\Documents\Git\ARCADIA-Studio\.local\scenario-details-source-oracle-20260913\expected/after-3d.expected.project.json
C:\Users\User\Documents\Git\ARCADIA-Studio\.local\scenario-details-source-oracle-20260913\build-01\details-source-oracle.exe: C:\Users\User\Documents\Git\ARCADIA-Studio\.local\scenario-details-source-oracle-20260913\main.rs C:\Users\User\Documents\Git\ARCADIA-Studio\.local\scenario-details-source-oracle-20260913\fixtures/incident-workspace.arcadia C:\Users\User\Documents\Git\ARCADIA-Studio\.local\scenario-details-source-oracle-20260913\fixtures/service-details.arcadia C:\Users\User\Documents\Git\ARCADIA-Studio\.local\scenario-details-source-oracle-20260913\expected/baseline.project.json C:\Users\User\Documents\Git\ARCADIA-Studio\.local\scenario-details-source-oracle-20260913\expected/after-1.expected.project.json C:\Users\User\Documents\Git\ARCADIA-Studio\.local\scenario-details-source-oracle-20260913\expected/after-3a.expected.project.json C:\Users\User\Documents\Git\ARCADIA-Studio\.local\scenario-details-source-oracle-20260913\expected/after-3b.expected.project.json C:\Users\User\Documents\Git\ARCADIA-Studio\.local\scenario-details-source-oracle-20260913\expected/after-3c.expected.project.json C:\Users\User\Documents\Git\ARCADIA-Studio\.local\scenario-details-source-oracle-20260913\expected/after-3d.expected.project.json
C:\Users\User\Documents\Git\ARCADIA-Studio\.local\scenario-details-source-oracle-20260913\main.rs:
C:\Users\User\Documents\Git\ARCADIA-Studio\.local\scenario-details-source-oracle-20260913\fixtures/incident-workspace.arcadia:
C:\Users\User\Documents\Git\ARCADIA-Studio\.local\scenario-details-source-oracle-20260913\fixtures/service-details.arcadia:
C:\Users\User\Documents\Git\ARCADIA-Studio\.local\scenario-details-source-oracle-20260913\expected/baseline.project.json:
C:\Users\User\Documents\Git\ARCADIA-Studio\.local\scenario-details-source-oracle-20260913\expected/after-1.expected.project.json:
C:\Users\User\Documents\Git\ARCADIA-Studio\.local\scenario-details-source-oracle-20260913\expected/after-3a.expected.project.json:
C:\Users\User\Documents\Git\ARCADIA-Studio\.local\scenario-details-source-oracle-20260913\expected/after-3b.expected.project.json:
C:\Users\User\Documents\Git\ARCADIA-Studio\.local\scenario-details-source-oracle-20260913\expected/after-3c.expected.project.json:
C:\Users\User\Documents\Git\ARCADIA-Studio\.local\scenario-details-source-oracle-20260913\expected/after-3d.expected.project.json:
@@ -0,0 +1,20 @@
{
"clang_exit": 0,
"rustc_exit": 0,
"clang": [
"clang version 23.1.1 (https://github.com/llvm/llvm-project.git 6dfe1677ab8dffbc6ec13d53a1e0215d75147689)",
"Target: x86_64-w64-windows-gnu",
"Thread model: posix",
"InstalledDir: C:/Users/User/Documents/Git/ARCADIA-Studio/.local/toolchain/llvm-mingw-20260908-ucrt-x86_64/bin",
"Configuration file: C:/Users/User/Documents/Git/ARCADIA-Studio/.local/toolchain/llvm-mingw-20260908-ucrt-x86_64/bin/x86_64-w64-windows-gnu.cfg"
],
"rustc": [
"rustc 1.98.1 (48a229cea 2026-09-01)",
"binary: rustc",
"commit-hash: 48a229ceaefd4985c50990b14116b6d856af0985",
"commit-date: 2026-09-01",
"host: x86_64-pc-windows-gnullvm",
"release: 1.98.1",
"LLVM version: 22.1.8"
]
}
@@ -0,0 +1,150 @@
#Requires -Version 7.0
[CmdletBinding()]
param(
[Parameter(Mandatory=$true)][ValidatePattern('^[0-9a-f]{40}$')][string]$SourcePin,
[Parameter(Mandatory=$true)][string]$ReferenceReceipt,
[Parameter(Mandatory=$true)][string]$DesktopFingerprint,
[Parameter(Mandatory=$true)][string]$CoreRlib,
[Parameter(Mandatory=$true)][string]$SerdeJsonRlib,
[Parameter(Mandatory=$true)][string]$Output,
[Parameter(Mandatory=$true)][string]$WindowsImportLibDirectory,
[string]$NativeVerifier=(Join-Path $PSScriptRoot '../scenario-details-native-8bf7607-20260913/verify.ps1'),
[string]$RuntimeDll='C:/Users/User/Documents/Git/ARCADIA-Studio/.local/navigation-rename-native-a49b0ec-20260913/package/libunwind.dll'
)
Set-StrictMode -Version Latest
$ErrorActionPreference='Stop'
$pin='8bf7607a3f3b53db0c36364f54f57674c64ea2f1'
if($SourcePin -cne $pin){throw 'Exact reviewed8bf source required'}
$workspace=(Resolve-Path (Join-Path $PSScriptRoot '../scenario-spacing-ytr83r-20260913')).Path
$root=(Resolve-Path (Join-Path $PSScriptRoot '../..')).Path
$deps=[IO.Path]::GetFullPath((Join-Path $root 'target/debug/deps'))
$fingerprints=[IO.Path]::GetFullPath((Join-Path $root 'target/debug/.fingerprint'))
$native=(Resolve-Path -LiteralPath $WindowsImportLibDirectory).Path
function Hash([string]$Path){(Get-FileHash -LiteralPath $Path -Algorithm SHA256).Hash.ToLowerInvariant()}
function Json([string]$Path){Get-Content -Raw -LiteralPath $Path|ConvertFrom-Json}
function Save([string]$Name,$Value){
$path=Join-Path $Output $Name
$stream=[IO.File]::Open($path,[IO.FileMode]::CreateNew,[IO.FileAccess]::Write,[IO.FileShare]::Read)
try{$bytes=[Text.UTF8Encoding]::new($false).GetBytes(($Value|ConvertTo-Json -Depth 20)+"`n");$stream.Write($bytes,0,$bytes.Length)}finally{$stream.Dispose()}
}
function Assert-Source {
Push-Location -LiteralPath $workspace
try{if((git rev-parse HEAD) -cne $pin -or $LASTEXITCODE -ne 0){throw 'Wrong core reference source pin'};if(@(git status --porcelain).Count -or $LASTEXITCODE -ne 0){throw 'Reference source must be clean'}}finally{Pop-Location}
}
Assert-Source
$ReferenceReceipt=(Resolve-Path -LiteralPath $ReferenceReceipt).Path
$reference=Json $ReferenceReceipt
if($reference.base -cne $pin -or $reference.stage -cne 'list' -or $reference.workspace -ine $workspace -or [IO.Path]::GetFullPath($reference.target) -ine [IO.Path]::GetFullPath((Join-Path $root 'target'))){throw 'Reference must be the exact8bf LIST in the original spacing workspace/target'}
if($reference.cargoExitCode -ne 0 -or -not $reference.selectionValid -or -not $reference.inputsUnchanged -or -not $reference.testBinaryBindingValid -or $null -ne $reference.postflightFailure){throw 'A closed successful desktop receipt with executable binding is required'}
$evidence=Split-Path $ReferenceReceipt
# Reuse read-only source/name helpers only. Do not require the five native stages here.
. $NativeVerifier
$nativePin=$pin;$nativeInputCount=611
Assert-CurrentNativeSource $evidence
$selection=Json (Join-Path $evidence 'expected-tests.json')
$final=Json (Join-Path $evidence 'finalization.json')
if($selection.source_commit -cne $pin -or $selection.expected_desktop_count -ne 1089 -or $selection.expected_count -ne 295 -or $final.base -cne $pin -or $final.sourceCount -ne 611){throw 'Wrong1089/295/611 list preparation'}
Assert-NativeNames $selection.desktop_tests $reference.listedTests
if(($reference.listSummaries|Measure-Object tests -Sum).Sum -ne 1089 -or ($reference.listSummaries|Measure-Object benchmarks -Sum).Sum -ne 0){throw 'Actual list totals differ'}
foreach($binding in $reference.boundScriptAndInputHashes.PSObject.Properties){if((Hash (Join-Path $evidence $binding.Name)) -cne $binding.Value){throw 'Bound listing recipe changed'}}
if((Hash (Join-Path $evidence 'list.log')) -cne $reference.rawLogSha256){throw 'Actual listing log changed'}
$versionPath=Join-Path $evidence 'toolchain-versions.json'
$versions=Json $versionPath
if((Hash $versionPath) -cne $reference.toolchainVersionsSha256){throw 'Changed toolchain record'}
$capturePath=Join-Path $evidence ('inputs-complete-'+$reference.stage+'-after.json')
if((Hash $capturePath) -cne $reference.afterCaptureSha256){throw 'Changed source capture'}
$beforeCapture=Join-Path $evidence 'inputs-complete-list-before.json'
if((Hash $beforeCapture) -cne $reference.beforeCaptureSha256){throw 'Changed before capture'}
Assert-InputPair (Json $beforeCapture) (Json $capturePath)
$locks=@((Json $capturePath).files|Where-Object path -CEQ 'Cargo.lock')
if($locks.Count -ne 1 -or (Hash (Join-Path $workspace 'Cargo.lock')) -cne $locks[0].sha256){throw 'Reference dependency graph differs from experiment lockfile'}
$DesktopFingerprint=(Resolve-Path -LiteralPath $DesktopFingerprint).Path
$desktop=Json $DesktopFingerprint
$folder=Split-Path $DesktopFingerprint -Parent
if((Split-Path $DesktopFingerprint -Leaf) -cne 'test-bin-arcadia-studio.json' -or (Split-Path $folder -Leaf) -cnotmatch '^oa-desktop-([0-9a-f]{16})$'){throw 'Explicit desktop test fingerprint required'}
if((Split-Path $folder -Parent) -ine $fingerprints -or @($reference.testExecutables).Count -ne 1){throw 'Fingerprint must be under the gated target and list exactly one test executable'}
$testExe=Join-Path $deps ('arcadia_studio-'+$Matches[1]+'.exe')
$bound=@($reference.testExecutables|Where-Object {$_.path -ieq $testExe})
if($bound.Count -ne 1 -or (Get-Item $testExe).Length -ne $bound[0].bytes -or (Hash $testExe) -cne $bound[0].sha256){throw 'Fingerprint must belong to the exact reference test executable'}
$selected=@{oa_core=$CoreRlib;serde_json=$SerdeJsonRlib}
$selectedRecords=@()
foreach($name in @('oa_core','serde_json')){
$file=(Resolve-Path -LiteralPath $selected[$name]).Path
if((Split-Path $file -Parent) -ine $deps -or (Split-Path $file -Leaf) -cnotmatch ('^lib'+$name+'-([0-9a-f]{16})\.rlib$')){throw "Wrong explicit rlib: $name"}
$package=if($name -ceq 'oa_core'){'oa-core'}else{$name}
$sidecar=Join-Path $fingerprints ($package+'-'+$Matches[1]+'/lib-'+$name)
$hex=(Get-Content -Raw -LiteralPath $sidecar).Trim()
if($hex -cnotmatch '^[0-9a-f]{16}$'){throw 'Invalid Cargo fingerprint sidecar'}
$bytes=[Convert]::FromHexString($hex);if(-not [BitConverter]::IsLittleEndian){[Array]::Reverse($bytes)}
$value=[BitConverter]::ToUInt64($bytes,0)
$edges=@($desktop.deps|Where-Object {$_[1] -ceq $name})
if($edges.Count -ne 1 -or [UInt64]$edges[0][3] -ne $value){throw "Reference dependency edge differs: $name"}
$record=Json ($sidecar+'.json')
if($record.rustc -ne $desktop.rustc){throw 'Mixed Cargo compiler fingerprints'}
$selected[$name]=$file
$selectedRecords+=@($sidecar,($sidecar+'.json'),(Join-Path $deps ($name+'-'+([IO.Path]::GetFileNameWithoutExtension($file).Split('-')[-1])+'.d')))
}
# Verify the selected core's serde_json edge as well as the desktop's two edges.
$coreName=[IO.Path]::GetFileNameWithoutExtension($selected.oa_core).Substring('lib'.Length)
$coreJson=Json (Join-Path $fingerprints ($coreName.Replace('oa_core-','oa-core-')+'/lib-oa_core.json'))
$serdeEdge=@($desktop.deps|Where-Object {$_[1] -ceq 'serde_json'})
$coreSerdeEdge=@($coreJson.deps|Where-Object {$_[1] -ceq 'serde_json'})
if($coreSerdeEdge.Count -ne 1 -or [UInt64]$coreSerdeEdge[0][3] -ne [UInt64]$serdeEdge[0][3]){throw 'Core serde_json linkage differs from selected desktop dependency'}
$coreInputs=@((Json $capturePath).files)
if($coreInputs.Count -ne 611){throw 'Closed receipt does not enumerate core source inputs'}
foreach($inputFile in $coreInputs){if((Hash (Join-Path $workspace $inputFile.path)) -cne $inputFile.sha256){throw ('Core source differs from compiled reference: '+$inputFile.path)}}
if(Test-Path -LiteralPath $Output){throw 'Output must be a new evidence directory'}
$Output=[IO.Path]::GetFullPath($Output)
$environment=$versions.externalEnvironmentPath
if((Hash $environment) -cne $versions.externalEnvironmentSha256){throw 'Changed compiler environment'}
. $environment
$rustc=(Get-Command rustc -CommandType Application).Source
$clang=(Get-Command clang -CommandType Application).Source
if($rustc -ine $versions.rustcPath -or $clang -ine $versions.clangPath){throw 'Compiler/linker paths differ from the reference'}
$toolchain=Join-Path $env:RUSTUP_HOME ('toolchains/'+$env:RUSTUP_TOOLCHAIN)
$sysroot=Join-Path $toolchain 'lib/rustlib/x86_64-pc-windows-gnullvm/lib'
$wrapper=Join-Path $PSScriptRoot 'main.rs'
$sourceManifest=Json (Join-Path $PSScriptRoot 'source-inputs.json')
$sources=@(foreach($f in $sourceManifest.files){$p=Join-Path $PSScriptRoot $f.path;if((Get-Item -LiteralPath $p).Length -ne $f.bytes -or (Hash $p) -cne $f.sha256){throw 'Prepared comparator source changed'};$p})
$runtimeSourcePaths=@(($sources+@($PSCommandPath,$NativeVerifier,(Join-Path $PSScriptRoot 'source-inputs.json'))+@($coreInputs|ForEach-Object {Join-Path $workspace $_.path}))|ForEach-Object {(Resolve-Path -LiteralPath $_).Path}|Sort-Object -Unique)
$runtimeHash='aa282fa47bb2c4e210cea5e470cdbdca58568f0be0bc73e404d86ab9cd95ef6a'
if((Hash $RuntimeDll) -cne $runtimeHash){throw 'Wrong pinned runtime DLL'}
function Inputs {
$paths=@((Join-Path $PSScriptRoot 'source-inputs.json'),$NativeVerifier,$PSCommandPath,$ReferenceReceipt,$DesktopFingerprint,$versionPath,$capturePath,$testExe,$environment,$rustc,$clang,$RuntimeDll,(Join-Path $toolchain 'bin/rustc.exe'),(Join-Path $workspace 'Cargo.lock'),(Join-Path $workspace 'Cargo.toml'),(Join-Path $workspace 'crates/oa-core/Cargo.toml'))+$sources+$selectedRecords+@($coreInputs|ForEach-Object {Join-Path $workspace $_.path})
$paths+=@($reference.boundScriptAndInputHashes.PSObject.Properties|ForEach-Object {Join-Path $evidence $_.Name})+@((Join-Path $evidence 'list.log'),$beforeCapture)
foreach($directory in @($deps,$native,$sysroot)){$paths+=@(Get-ChildItem -LiteralPath $directory -File|Where-Object {$_.Extension -in @('.rlib','.rmeta','.dll','.lib','.a')}|ForEach-Object FullName)}
@($paths|ForEach-Object {(Resolve-Path -LiteralPath $_).Path}|Sort-Object -Unique|ForEach-Object {$item=Get-Item -LiteralPath $_;[ordered]@{path=$item.FullName;bytes=$item.Length;sha256=(Hash $item.FullName)}})
}
[void][IO.Directory]::CreateDirectory($Output)
$before=@(Inputs);Save 'inputs-before.json' $before
$PSNativeCommandUseErrorActionPreference=$false
$rustcVersion=@(& $rustc --version --verbose 2>&1|ForEach-Object ToString);$rustcExit=$LASTEXITCODE
$clangVersion=@(& $clang --version 2>&1|ForEach-Object ToString);$clangExit=$LASTEXITCODE
Save 'toolchain.json' @{rustc=$rustcVersion;rustc_exit=$rustcExit;clang=$clangVersion;clang_exit=$clangExit}
if($rustcExit -ne 0 -or $clangExit -ne 0 -or ($rustcVersion -join "`n") -cne (@($versions.rustc) -join "`n") -or ($clangVersion -join "`n") -cne (@($versions.clang) -join "`n")){throw 'Compiler/linker versions differ'}
$exe=Join-Path $Output 'details-source-oracle.exe'
$argsForRustc=@('--edition=2024','--crate-name','details_source_oracle','-D','warnings',$wrapper,'--extern',('oa_core='+$selected.oa_core),'--extern',('serde_json='+$selected.serde_json),'-L',('dependency='+$deps),'-L',('native='+$native),'-C',('linker='+$clang),'--emit',('link,dep-info='+(Join-Path $Output 'details-source-oracle.d')),'-o',$exe)
$start=[DateTime]::UtcNow.ToString('o')
& $rustc @argsForRustc *> (Join-Path $Output 'compile.log')
$exit=$LASTEXITCODE
$end=[DateTime]::UtcNow.ToString('o')
$unchanged=$false;$failure=$null
try{
$after=@(Inputs);Save 'inputs-after.json' $after
if(($before|ConvertTo-Json -Depth 6 -Compress) -cne ($after|ConvertTo-Json -Depth 6 -Compress)){throw 'A source/link input changed'}
Assert-Source
Assert-CurrentNativeSource $evidence
$unchanged=$true
}catch{$failure=$_.Exception.Message}
$binary=if(Test-Path -LiteralPath $exe){$item=Get-Item $exe;@{path=$exe;bytes=$item.Length;sha256=(Hash $exe)}}else{$null}
if($exit -eq 0 -and $unchanged){
try{
$runtimeInput=@($before|Where-Object {$_.path -ieq (Resolve-Path -LiteralPath $RuntimeDll).Path})
[IO.File]::Copy($RuntimeDll,(Join-Path $Output 'libunwind.dll'),$false)
if($runtimeInput.Count -ne 1 -or (Hash (Join-Path $Output 'libunwind.dll')) -cne $runtimeInput[0].sha256){throw 'Staged runtime differs from bound input'}
}catch{$unchanged=$false;$failure=$_.Exception.Message}
}
Save 'build-receipt.json' @{source_commit=$pin;reference_receipt=$ReferenceReceipt;reference_receipt_sha256=(Hash $ReferenceReceipt);command=@($rustc)+$argsForRustc;start_utc=$start;end_utc=$end;exit_code=$exit;inputs_unchanged=$unchanged;postflight_failure=$failure;binary=$binary;source_files=@($before|Where-Object {$_.path -cin $runtimeSourcePaths});runtime_path=(Join-Path $Output 'libunwind.dll');runtime_bytes=(Get-Item -LiteralPath $RuntimeDll).Length;runtime_sha256=(Hash $RuntimeDll);before_manifest_sha256=(Hash (Join-Path $Output 'inputs-before.json'));after_manifest_sha256=if(Test-Path (Join-Path $Output 'inputs-after.json')){Hash (Join-Path $Output 'inputs-after.json')}else{$null};toolchain_sha256=(Hash (Join-Path $Output 'toolchain.json'));compile_log_sha256=(Hash (Join-Path $Output 'compile.log'));tests_executed=$false;scope='Core-only comparator compilation bound to the exact successful8bf desktop LIST, not a GUI/native gate. Source/cache link inputs are unchanged; execution remains separate.'}
if($exit -ne 0 -or -not $unchanged -or $null -eq $binary -or $binary.bytes -le 0){throw 'Isolated compilation or input provenance failed; preserve evidence'}
Write-Output 'Details comparator compiled only; self-check and saved-source comparison remain separate. No GUI/native acceptance.'
@@ -0,0 +1,100 @@
#Requires -Version 7.0
[CmdletBinding()]
param(
[Parameter(Mandatory=$true)][string]$OracleExe,
[Parameter(Mandatory=$true)][ValidatePattern('^[0-9a-f]{64}$')][string]$OracleSha256,
[Parameter(Mandatory=$true)][string]$BuildReceipt,
[Parameter(Mandatory=$true)][ValidatePattern('^[0-9a-f]{64}$')][string]$BuildReceiptSha256,
[Parameter(Mandatory=$true)][ValidateSet('self-check','name','typed')][string]$Mode,
[Parameter(Mandatory=$true)][string]$Output,
[string]$Baseline,
[ValidatePattern('^[0-9a-f]{64}$')][string]$BaselineSha256,
[string]$Actual,
[string]$Target,
[string]$NewName,
[string]$ExpectedProject,
[ValidateSet('baseline','1','3a','3b','3c','3d')][string]$Checkpoint
)
Set-StrictMode -Version Latest
$ErrorActionPreference='Stop'
function Hash([string]$Path){(Get-FileHash -LiteralPath $Path -Algorithm SHA256).Hash.ToLowerInvariant()}
function Record([string]$Path){$p=Get-Item -LiteralPath $Path;if($p.PSIsContainer -or ($p.Attributes -band [IO.FileAttributes]::ReparsePoint)){throw 'Plain file required'};[ordered]@{path=$p.FullName;bytes=$p.Length;sha256=(Hash $p.FullName)}}
function Read-Json([string]$Path){Get-Content -Raw -LiteralPath $Path|ConvertFrom-Json}
function Write-NewJson([string]$Path,$Value){$f=[IO.File]::Open($Path,[IO.FileMode]::CreateNew,[IO.FileAccess]::Write,[IO.FileShare]::Read);try{$b=[Text.UTF8Encoding]::new($false).GetBytes(($Value|ConvertTo-Json -Depth 20)+"`n");$f.Write($b,0,$b.Length);$f.Flush($true)}finally{$f.Dispose()}}
function Assert-Records($Files){foreach($x in $Files){$y=Record $x.path;if($x.bytes -ne $y.bytes -or $x.sha256 -cne $y.sha256){throw ('Changed bound input: '+$x.path)}}}
if(Test-Path -LiteralPath $Output){throw 'Output must be new; preserve earlier evidence'}
if((Hash $OracleExe) -cne $OracleSha256 -or (Hash $BuildReceipt) -cne $BuildReceiptSha256){throw 'Reviewed EXE/build receipt hashes differ'}
$build=Read-Json $BuildReceipt
$exe=(Resolve-Path -LiteralPath $OracleExe).Path
$buildDir=Split-Path -Parent ((Resolve-Path -LiteralPath $BuildReceipt).Path)
if($build.source_commit -cne '8bf7607a3f3b53db0c36364f54f57674c64ea2f1' -or $build.exit_code -ne 0 -or -not $build.inputs_unchanged -or $null -ne $build.postflight_failure -or $build.binary.path -ine $exe -or $build.binary.sha256 -cne $OracleSha256 -or (Get-Item -LiteralPath $exe).Length -ne $build.binary.bytes){throw 'Successful exact8bf comparator build required'}
$proofFiles=@([ordered]@{name='inputs-before.json';sha=$build.before_manifest_sha256},[ordered]@{name='inputs-after.json';sha=$build.after_manifest_sha256},[ordered]@{name='toolchain.json';sha=$build.toolchain_sha256},[ordered]@{name='compile.log';sha=$build.compile_log_sha256})
foreach($f in $proofFiles){if((Hash (Join-Path $buildDir $f.name)) -cne $f.sha){throw 'Build evidence changed'}}
$buildBefore=@(Read-Json (Join-Path $buildDir 'inputs-before.json'));$buildAfter=@(Read-Json (Join-Path $buildDir 'inputs-after.json'))
if(($buildBefore|ConvertTo-Json -Depth 8 -Compress) -cne ($buildAfter|ConvertTo-Json -Depth 8 -Compress)){throw 'Build input manifests differ'}
if(@($build.source_files).Count -lt 611){throw 'Complete source input binding missing'}
$buildPaths=@{};foreach($f in $buildBefore){if($buildPaths.ContainsKey($f.path)){throw 'Duplicate build input'};$buildPaths[$f.path]=$f}
foreach($f in $build.source_files){if(-not $buildPaths.ContainsKey($f.path) -or $buildPaths[$f.path].bytes -ne $f.bytes -or $buildPaths[$f.path].sha256 -cne $f.sha256){throw 'Source record not bound by build manifest'}}
if((Hash $build.reference_receipt) -cne $build.reference_receipt_sha256){throw 'Closed list reference changed'}
$reference=Read-Json $build.reference_receipt
$referenceCapture=Join-Path (Split-Path -Parent $build.reference_receipt) 'inputs-complete-list-after.json'
if($reference.base -cne $build.source_commit -or $reference.stage -cne 'list' -or $reference.cargoExitCode -ne 0 -or -not $reference.inputsUnchanged -or -not $reference.selectionValid -or (Hash $referenceCapture) -cne $reference.afterCaptureSha256){throw 'Exact successful list/source capture missing'}
$compiledSources=Read-Json $referenceCapture
if($compiledSources.count -ne 611 -or @($compiledSources.files).Count -ne 611){throw 'Expected all611 compiled source inputs'}
foreach($f in $compiledSources.files){$path=(Resolve-Path -LiteralPath (Join-Path $reference.workspace $f.path)).Path;$match=@($build.source_files|Where-Object {$_.path -ieq $path});if($match.Count -ne 1 -or $match[0].bytes -ne $f.bytes -or $match[0].sha256 -cne $f.sha256){throw 'A compiled source file is missing from the build/runtime source binding'}}
Assert-Records $build.source_files
$runtime=Join-Path (Split-Path -Parent $exe) 'libunwind.dll'
if($build.runtime_path -ine $runtime -or $build.runtime_sha256 -cne 'aa282fa47bb2c4e210cea5e470cdbdca58568f0be0bc73e404d86ab9cd95ef6a' -or (Hash $runtime) -cne $build.runtime_sha256 -or (Get-Item -LiteralPath $runtime).Length -ne $build.runtime_bytes){throw 'Actual adjacent runtime DLL differs from build binding'}
$catalog=Read-Json (Join-Path $PSScriptRoot 'expected-catalog.json')
$sourceManifest=Read-Json (Join-Path $PSScriptRoot 'source-inputs.json')
foreach($f in $sourceManifest.files){$path=(Resolve-Path -LiteralPath (Join-Path $PSScriptRoot $f.path)).Path;$matching=@($build.source_files|Where-Object {$_.path -ieq $path});if($matching.Count -ne 1 -or $matching[0].bytes -ne $f.bytes -or $matching[0].sha256 -cne $f.sha256){throw 'Current comparator source is not the compiled source'}}
$paths=@($build.reference_receipt,$referenceCapture,$exe,$runtime,$BuildReceipt,$PSCommandPath,(Join-Path $PSScriptRoot 'source-inputs.json'))+@($proofFiles|ForEach-Object {Join-Path $buildDir $_.name})+@($build.source_files|ForEach-Object path)
# Only one admitted source file per native fixture; all successful parse inputs are bound.
$inputs=@();$extra=@();$request=[ordered]@{mode=$Mode;expected_origin='Declared before reading actual output; no expectation inferred from Actual'}
switch($Mode){
'self-check' {
if($Baseline -or $BaselineSha256 -or $Actual -or $Target -or $NewName -or $ExpectedProject -or $Checkpoint){throw 'Self-check accepts no native comparison inputs'}
$inputs=@((Join-Path $PSScriptRoot 'fixtures/incident-workspace.arcadia'),(Join-Path $PSScriptRoot 'fixtures/service-details.arcadia'))
}
'name' {
if([string]::IsNullOrWhiteSpace($Baseline) -or [string]::IsNullOrWhiteSpace($BaselineSha256) -or [string]::IsNullOrWhiteSpace($Actual) -or $Target -notmatch '^[0-9a-fA-F-]{36}$' -or [string]::IsNullOrEmpty($NewName) -or $ExpectedProject -or $Checkpoint){throw 'Name mode requires independent baseline SHA, Actual, exact element Target and predetermined NewName only'}
if((Hash $Baseline) -cne $BaselineSha256){throw 'Pre-edit baseline changed'}
$inputs=@($Baseline,$Actual);$extra=@($Target,$NewName);$request.element=$Target;$request.new_name=$NewName;$request.baseline_sha256=$BaselineSha256
}
'typed' {
if([string]::IsNullOrWhiteSpace($ExpectedProject) -or [string]::IsNullOrWhiteSpace($Actual) -or [string]::IsNullOrWhiteSpace($Checkpoint) -or $Baseline -or $BaselineSha256 -or $Target -or $NewName){throw 'Typed mode requires ExpectedProject, exact Checkpoint and Actual only'}
$approved=$catalog.checkpoints.$Checkpoint
if((Hash $ExpectedProject) -cne $approved.sha256 -or (Get-Item -LiteralPath $ExpectedProject).Length -ne $approved.bytes){throw 'Expected JSON is not the independently approved checkpoint bytes'}
$inputs=@($ExpectedProject,$Actual);$extra=@($Checkpoint);$request.checkpoint=$Checkpoint;$request.expected_sha256=$approved.sha256
}
}
$inputs=@($inputs|ForEach-Object {(Resolve-Path -LiteralPath $_).Path});$paths+=@($inputs)
$before=@($paths|ForEach-Object {(Resolve-Path -LiteralPath $_).Path}|Sort-Object -Unique|ForEach-Object {Record $_})
$Output=[IO.Path]::GetFullPath($Output);[void][IO.Directory]::CreateDirectory($Output)
$copies=@();for($i=0;$i -lt $inputs.Count;$i++){$copy=Join-Path $Output ('input-'+$i+[IO.Path]::GetExtension($inputs[$i]));[IO.File]::Copy($inputs[$i],$copy,$false);if((Hash $copy) -cne (Hash $inputs[$i])){throw 'Input snapshot copy differs'};$copies+=@($copy)}
Write-NewJson (Join-Path $Output 'request.json') $request
Write-NewJson (Join-Path $Output 'inputs-before.json') $before
$argsForOracle=@($Mode)+$copies+@((Join-Path $Output 'project-comparison'))+$extra
$start=[DateTime]::UtcNow.ToString('o');$exit=$null;$failure=$null;$process=$null;$stdout=$null;$stderr=$null;$unchanged=$false;$semantic=$false
try {
$info=[Diagnostics.ProcessStartInfo]::new();$info.FileName=$exe;$info.WorkingDirectory=$Output;$info.UseShellExecute=$false;$info.CreateNoWindow=$true;$info.WindowStyle=[Diagnostics.ProcessWindowStyle]::Hidden;$info.RedirectStandardOutput=$true;$info.RedirectStandardError=$true
foreach($arg in $argsForOracle){$info.ArgumentList.Add($arg)}
$info.Environment['PATH']=(Split-Path -Parent $exe)+';'+(Join-Path $env:SystemRoot 'System32')+';'+$env:SystemRoot
$stdout=[IO.File]::Open((Join-Path $Output 'stdout.log'),[IO.FileMode]::CreateNew,[IO.FileAccess]::Write,[IO.FileShare]::Read)
$stderr=[IO.File]::Open((Join-Path $Output 'stderr.log'),[IO.FileMode]::CreateNew,[IO.FileAccess]::Write,[IO.FileShare]::Read)
$process=[Diagnostics.Process]::new();$process.StartInfo=$info;if(-not $process.Start()){throw 'Comparator process did not start'}
$outCopy=$process.StandardOutput.BaseStream.CopyToAsync($stdout);$errCopy=$process.StandardError.BaseStream.CopyToAsync($stderr)
$process.WaitForExit();[Threading.Tasks.Task]::WaitAll([Threading.Tasks.Task[]]@($outCopy,$errCopy));$exit=$process.ExitCode
$stdout.Flush($true);$stderr.Flush($true)
} catch {$failure=$_.Exception.Message} finally {if($stdout){$stdout.Dispose()};if($stderr){$stderr.Dispose()};if($process){$process.Dispose()}}
try {
Assert-Records $before
for($i=0;$i -lt $copies.Count;$i++){if((Hash $copies[$i]) -cne (Hash $inputs[$i])){throw 'Comparison snapshot changed'}}
$after=@($before|ForEach-Object {Record $_.path});Write-NewJson (Join-Path $Output 'inputs-after.json') $after;$unchanged=$true
$result=Join-Path $Output ('project-comparison/'+$(if($Mode -eq 'self-check'){'self-check.json'}else{'comparison.json'}))
if(Test-Path -LiteralPath $result){$v=Read-Json $result;$semantic=$v.status -ceq 'passed';if($Mode -ne 'self-check'){$semantic=$semantic -and $v.mode -ceq $Mode -and $v.full_project_exact}}
} catch {if($null -eq $failure){$failure=$_.Exception.Message}}
$artifacts=@(Get-ChildItem -LiteralPath $Output -File -Recurse|ForEach-Object {Record $_.FullName})
Write-NewJson (Join-Path $Output 'receipt.json') ([ordered]@{source_commit=$build.source_commit;command=@($exe)+$argsForOracle;mode=$Mode;start_utc=$start;end_utc=[DateTime]::UtcNow.ToString('o');exit_code=$exit;failure=$failure;inputs_unchanged=$unchanged;semantic_pass=$semantic;runtime_binding=@($before|Where-Object {$_.path -ieq $runtime})[0];oracle_sha256=$OracleSha256;build_receipt_sha256=$BuildReceiptSha256;artifacts=$artifacts;scope='Complete admitted saved-source Project comparison only; no renderer, source editor, native action or runtime/history claim'})
if($exit -ne 0 -or -not $unchanged -or -not $semantic -or $null -ne $failure){throw 'Comparator or input stability failed; preserve outputs'}
Write-Output 'Saved-source Details comparison passed; runtime/history/native evidence remains separate.'
@@ -0,0 +1,43 @@
{
"status": "Exact independently expected core-run01 checkpoints, published and byte-verified by parent; native output not used",
"core_source": "0409a481c7571e887f8912f0a8cdb93cfdcc01a7",
"receipt_sha256": "9bceeddc309095d29ec8bb2942bc3e8a85d008917199a2502e4b64e22b830571",
"project": "80300000-0000-4000-8000-000000000000",
"scenario": "80300000-0000-4000-8000-000000000050",
"diagram": "80300000-0000-4000-8000-000000000070",
"checkpoints": {
"baseline": {
"path": "expected/baseline.project.json",
"bytes": 10576,
"sha256": "e59d4f08fda2bae23ca2b84bda0c8679703b1b75a0b7c1916b2f49d2762a90c6"
},
"1": {
"path": "expected/after-1.expected.project.json",
"bytes": 10578,
"sha256": "c03cf59f83bc1ae4db64584abf1257efc775cc47b49f2b2db4ac47159dfb90a0"
},
"3a": {
"path": "expected/after-3a.expected.project.json",
"bytes": 10495,
"sha256": "ce3d58385815d0a1d01320bdd711d707cb4c530f0614545eca2b83533077b6f0"
},
"3b": {
"path": "expected/after-3b.expected.project.json",
"bytes": 10487,
"sha256": "81f16c54db0e7be1960be5de6a89a6e16a56d6c62d45e15aa7f59bc9d85c8925"
},
"3c": {
"path": "expected/after-3c.expected.project.json",
"bytes": 10565,
"sha256": "3c4521eef6cf2a6024275f8c6bf5e9a55d7f6e10cb58c9cc846be56cfa121aca"
},
"3d": {
"path": "expected/after-3d.expected.project.json",
"bytes": 10565,
"sha256": "36dfe596c1e2f39a82795237f545787996e9138d9c160217611b201da14ce66a"
}
},
"published_commit": "698126e1a0b9ab37cb3cac4339ffcf3a6bf0a340",
"published_path": "harness/experiments/scenario-service-details-core-20260913/original/core-run-01/probe-output/",
"published_url": "http://217.177.34.108:3000/sorokin.oleg.edu/ARCADIA-Studio/src/commit/698126e1a0b9ab37cb3cac4339ffcf3a6bf0a340/harness/experiments/scenario-service-details-core-20260913/README.md"
}
@@ -0,0 +1,108 @@
arcadia 7;
project incident_workspace "Incident report review" id "70200000-0000-4000-8000-000000000001" {
// Two operational activities, with one lifeline appearance per Scenario.
oa_activity report_incident "Report incident" id "70200000-0000-4000-8000-000000000002" {}
oa_activity assess_incident "Assess incident" id "70200000-0000-4000-8000-000000000003" {}
interaction incident_report "Incident report" id "70200000-0000-4000-8000-000000000004" {
source @report_incident;
target @assess_incident;
}
oa_scenario incident_response "Review a reported incident" id "70200000-0000-4000-8000-000000000010" {
viewpoint OperationalActivity;
steps [@initial_report, @updated_report, @assess_call, @assess_reply, @unfinished_notice, @use_review];
}
oa_lifeline reporter "Reporting activity" id "70200000-0000-4000-8000-000000000011" {
parent @incident_response; represented @report_incident;
}
oa_lifeline assessor "Assessment activity" id "70200000-0000-4000-8000-000000000012" {
parent @incident_response; represented @assess_incident;
}
// Both appearances reuse one definition. Navigation must retain the occurrence.
oa_occurrence initial_report "Initial incident report" id "70200000-0000-4000-8000-000000000020" {
parent @incident_response;
body { Exchange { exchange @incident_report; sender @reporter; receiver @assessor; message_kind Asynchronous; }; };
}
oa_occurrence updated_report "Updated incident report" id "70200000-0000-4000-8000-000000000021" {
parent @incident_response;
body { Exchange { exchange @incident_report; sender @reporter; receiver @assessor; message_kind Asynchronous; }; };
}
// A correlated self call/reply with deliberately unassigned exchange definitions.
oa_occurrence assess_call "Assess report details" id "70200000-0000-4000-8000-000000000022" {
parent @incident_response;
body { Exchange { exchange none; sender @assessor; receiver @assessor; message_kind Call; }; };
}
oa_occurrence assess_reply "Assessment ready" id "70200000-0000-4000-8000-000000000023" {
parent @incident_response;
body { Exchange { exchange none; sender @assessor; receiver @assessor; message_kind Reply; reply_to @assess_call; }; };
}
// Intentional unfinished work: no receiver and therefore no fabricated arrow.
oa_occurrence unfinished_notice "Follow-up recipient undecided" id "70200000-0000-4000-8000-000000000024" {
parent @incident_response;
body { Exchange { exchange @incident_report; sender @reporter; receiver none; message_kind Asynchronous; }; };
}
oa_occurrence use_review "Use the reviewed reporting procedure" id "70200000-0000-4000-8000-000000000025" {
parent @incident_response;
body { ScenarioUse {
bindings [{ local @reporter; referenced @review_reporter; }, { local @assessor; referenced @review_assessor; }];
scenario @reporting_review;
}; };
}
// This definition stays opaque in the caller. Open it, then Back to the saved view.
oa_scenario reporting_review "Reporting procedure detail" id "70200000-0000-4000-8000-000000000030" {
viewpoint OperationalActivity;
steps [@review_delivery];
}
oa_lifeline review_reporter "Reporting activity in detail" id "70200000-0000-4000-8000-000000000031" {
parent @reporting_review; represented @report_incident;
}
oa_lifeline review_assessor "Assessment activity in detail" id "70200000-0000-4000-8000-000000000032" {
parent @reporting_review; represented @assess_incident;
}
oa_occurrence review_delivery "Check the incident report" id "70200000-0000-4000-8000-000000000033" {
parent @reporting_review;
body { Exchange { exchange @incident_report; sender @review_reporter; receiver @review_assessor; message_kind Asynchronous; }; };
}
diagram incident_readable "A - Incident review readable" id "70200000-0000-4000-8000-000000000040" {
layer Oa;
projection { Scenario { scenario @incident_response; }; };
layout { Scenario {
lanes [{ lifeline @reporter; x 160; }, { lifeline @assessor; x 640; }];
messages [
{ address { references []; occurrence @initial_report; }; send_y 160; },
{ address { references []; occurrence @updated_report; }; send_y 252; },
{ address { references []; occurrence @assess_call; }; send_y 344; },
{ address { references []; occurrence @assess_reply; }; send_y 436; }
];
}; };
}
diagram incident_wide "B - Incident review negative and far" id "70200000-0000-4000-8000-000000000041" {
layer Oa;
projection { Scenario { scenario @incident_response; }; };
layout { Scenario {
lanes [{ lifeline @reporter; x -500; }, { lifeline @assessor; x 50000; }];
messages [
{ address { references []; occurrence @initial_report; }; send_y 160; },
{ address { references []; occurrence @updated_report; }; send_y 252; },
{ address { references []; occurrence @assess_call; }; send_y 344; },
{ address { references []; occurrence @assess_reply; }; send_y 436; }
];
}; };
}
diagram incident_repair "C - Incident review needs layout repair" id "70200000-0000-4000-8000-000000000042" {
layer Oa;
projection { Scenario { scenario @incident_response; }; };
layout { Scenario {
// These valid authored lanes must remain saved during complete fallback.
lanes [{ lifeline @reporter; x 900; }, { lifeline @assessor; x -500; }];
messages [
// REPAIR: change only this 300 to 424, then Undo and Redo the edit.
{ address { references []; occurrence @assess_reply; }; send_y 300; },
// This authored value stays latent while the receiver is missing.
{ address { references []; occurrence @unfinished_notice; }; send_y 2000; }
];
}; };
}
}
@@ -0,0 +1,113 @@
arcadia 7;
project service_details "Valve service Details trial" id "80300000-0000-4000-8000-000000000000" {
sa_actor console "Operator console" id "80300000-0000-4000-8000-000000000001" {}
sa_system valve "Valve service" id "80300000-0000-4000-8000-000000000002" {}
sa_port caller_port "Console service client" id "80300000-0000-4000-8000-000000000003" {
parent @console; contract { Component { kind Standard; orientation Unset; }; };
}
sa_port provider_port "Valve service endpoint" id "80300000-0000-4000-8000-000000000004" {
parent @valve; contract { Component { kind Standard; orientation Unset; }; };
}
sa_data_type text_value "Service text" id "80300000-0000-4000-8000-000000000010" {
definition { String { minimum_length 0; maximum_length 128; }; };
}
sa_data_type pressure_value "Pressure in bar" id "80300000-0000-4000-8000-000000000011" {
definition { Real { minimum 0; maximum 100; }; }; unit "bar";
}
sa_data_type accepted_value "Acceptance flag" id "80300000-0000-4000-8000-000000000012" { definition Boolean; }
sa_exchange_item read_status "ReadStatus" id "80300000-0000-4000-8000-000000000020" {
kind Information; mechanism Operation;
}
sa_data_field read_scope "Scope" id "80300000-0000-4000-8000-000000000021" {
parent @read_status; type_ref { Named @text_value; }; direction In;
minimum 0; maximum 1; storage Value;
}
sa_data_field read_result "Status" id "80300000-0000-4000-8000-000000000022" {
parent @read_status; type_ref { Named @text_value; }; direction Return;
minimum 0; maximum 1; storage Value;
}
sa_exchange_item set_limit "SetLimit" id "80300000-0000-4000-8000-000000000030" {
kind Information; mechanism Operation;
}
sa_data_field limit_value "Pressure limit" id "80300000-0000-4000-8000-000000000031" {
parent @set_limit; type_ref { Named @pressure_value; }; direction In;
minimum 0; maximum 1; storage Value;
}
sa_data_field limit_accepted "Accepted" id "80300000-0000-4000-8000-000000000032" {
parent @set_limit; type_ref { Named @accepted_value; }; direction Return;
minimum 0; maximum 1; storage Value;
}
sa_interface valve_api "Valve commands" id "80300000-0000-4000-8000-000000000040" {}
interface_item_allocation read_allocation "ReadStatus allocation" id "80300000-0000-4000-8000-000000000041" {
source @valve_api; target @read_status; order 0;
transmission Synchronous; acquisition Accept;
}
interface_item_allocation limit_allocation "SetLimit allocation" id "80300000-0000-4000-8000-000000000042" {
source @valve_api; target @set_limit; order 1;
transmission Synchronous; acquisition Accept;
}
interface_requirement requires_api "Console requires Valve commands" id "80300000-0000-4000-8000-000000000043" {
source @caller_port; target @valve_api;
}
interface_provision provides_api "Valve provides Valve commands" id "80300000-0000-4000-8000-000000000044" {
source @provider_port; target @valve_api;
}
boundary_exchange service_channel "Valve service channel" id "80300000-0000-4000-8000-000000000045" {
source @caller_port; target @provider_port; oriented false;
items [@read_status, @set_limit];
}
sa_scenario service_review "Review service calls" id "80300000-0000-4000-8000-000000000050" {
viewpoint BoundaryInterface;
steps [@first_call, @first_reply, @control_call, @control_reply];
}
sa_lifeline caller "Console caller" id "80300000-0000-4000-8000-000000000051" {
parent @service_review; represented @console;
}
sa_lifeline provider "Valve provider" id "80300000-0000-4000-8000-000000000052" {
parent @service_review; represented @valve;
}
sa_occurrence first_call "Read primary status" id "80300000-0000-4000-8000-000000000060" {
parent @service_review;
body { Exchange {
exchange @service_channel; sender @caller; receiver @provider; message_kind Call;
operation { allocation @read_allocation; };
values [{ path []; field @read_scope; expression "\"primary\""; }];
}; };
}
sa_occurrence first_reply "Primary status response" id "80300000-0000-4000-8000-000000000061" {
parent @service_review;
body { Exchange {
exchange @service_channel; sender @provider; receiver @caller;
message_kind Reply; reply_to @first_call;
values [{ path []; field @read_result; expression "\"READY\""; }];
}; };
}
sa_occurrence control_call "Set reserve limit" id "80300000-0000-4000-8000-000000000062" {
parent @service_review;
body { Exchange {
exchange @service_channel; sender @caller; receiver @provider; message_kind Call;
operation { allocation @limit_allocation; };
values [{ path []; field @limit_value; expression "12.5"; }];
}; };
}
sa_occurrence control_reply "Reserve limit accepted" id "80300000-0000-4000-8000-000000000063" {
parent @service_review;
body { Exchange {
exchange @service_channel; sender @provider; receiver @caller;
message_kind Reply; reply_to @control_call;
values [{ path []; field @limit_accepted; expression "true"; }];
}; };
}
diagram service_details_view "Service calls - Details trial" id "80300000-0000-4000-8000-000000000070" {
layer Sa; projection { Scenario { scenario @service_review; }; };
layout { Scenario {
lanes [{ lifeline @caller; x 160; }, { lifeline @provider; x 650; }];
messages [
{ address { references []; occurrence @first_call; }; send_y 160; },
{ address { references []; occurrence @first_reply; }; send_y 270; },
{ address { references []; occurrence @control_call; }; send_y 390; },
{ address { references []; occurrence @control_reply; }; send_y 500; }
];
}; };
}
}
@@ -0,0 +1,317 @@
//! Saved-source Details comparator. No desktop renderer, controller or history inspection.
//! name BASELINE_SOURCE ACTUAL_SOURCE OUT ELEMENT NEW_NAME
//! typed EXPECTED_PROJECT_JSON ACTUAL_SOURCE OUT CHECKPOINT
//! self-check INCIDENT_SOURCE SERVICE_SOURCE OUT
use oa_core::{
DiagramLayout, Id, Project, execute_batch, source_files,
source_project::{ProjectLimits, compile_bundle},
validation::Severity,
};
use serde_json::{Value, json};
use std::{fs, io::Write, path::Path};
const INCIDENT: &str = include_str!("fixtures/incident-workspace.arcadia");
const SERVICE: &str = include_str!("fixtures/service-details.arcadia");
const EXPECTED: [(&str, &str); 6] = [
("baseline", include_str!("expected/baseline.project.json")),
("1", include_str!("expected/after-1.expected.project.json")),
(
"3a",
include_str!("expected/after-3a.expected.project.json"),
),
(
"3b",
include_str!("expected/after-3b.expected.project.json"),
),
(
"3c",
include_str!("expected/after-3c.expected.project.json"),
),
(
"3d",
include_str!("expected/after-3d.expected.project.json"),
),
];
fn incident(last: u128) -> Id {
Id::from_u128(0x70200000000040008000000000000000 | last)
}
fn service(last: u128) -> Id {
Id::from_u128(0x80300000000040008000000000000000 | last)
}
// Object order is irrelevant; array order and every serialized scalar remain exact.
// Scalar serialization distinguishes signed zero, unlike float PartialEq.
fn canonical(value: &Value) -> String {
match value {
Value::Object(map) => {
let mut keys: Vec<_> = map.keys().collect();
keys.sort();
format!(
"{{{}}}",
keys.into_iter()
.map(|k| format!(
"{}:{}",
serde_json::to_string(k).unwrap(),
canonical(&map[k])
))
.collect::<Vec<_>>()
.join(",")
)
}
Value::Array(a) => format!(
"[{}]",
a.iter().map(canonical).collect::<Vec<_>>().join(",")
),
_ => serde_json::to_string(value).unwrap(),
}
}
fn full(project: &Project) -> String {
canonical(&serde_json::to_value(project).unwrap())
}
fn put(path: &Path, bytes: &[u8]) {
let mut f = fs::OpenOptions::new()
.write(true)
.create_new(true)
.open(path)
.unwrap();
f.write_all(bytes).unwrap();
f.sync_all().unwrap();
}
fn load_source(path: &Path, project_id: Id) -> Project {
assert!(fs::symlink_metadata(path).unwrap().file_type().is_file());
let loaded = source_files::load_project(path, ProjectLimits::default()).unwrap();
assert!(
!loaded
.diagnostics
.iter()
.any(|d| d.diagnostic.severity == Severity::Error),
"source loader errors: {:?}",
loaded.diagnostics
);
let raw = loaded.reachable_bundle();
assert_eq!(
raw.files.len(),
1,
"Bound native fixtures require exactly one source file"
);
let compiled = compile_bundle(&raw, ProjectLimits::default()).unwrap();
assert_eq!(
compiled.bundle, raw,
"No migration, identity insertion or passive source rewrite is admitted"
);
let p = compiled.decoded.project;
execute_batch(&p, &[]).unwrap();
assert_eq!(p.id, project_id, "Wrong fixture Project identity");
p
}
fn renamed(base: &Project, selected: Id, name: &str) -> Result<Project, String> {
if base.id != incident(1) {
return Err("Name mode requires the incident fixture Project".into());
}
let mut p = base.clone();
let e = p
.elements
.get_mut(&selected)
.ok_or("Selected identity must be an existing element")?;
if name.is_empty() || e.name == name {
return Err("Name must be a predetermined nonempty change".into());
}
e.name = name.into();
execute_batch(&p, &[]).map_err(|e| format!("Invalid name candidate: {e:?}"))?;
Ok(p)
}
fn approved_expected(raw: &str, checkpoint: &str) -> Result<Project, String> {
let approved = EXPECTED
.iter()
.find(|(key, _)| *key == checkpoint)
.ok_or("Unknown approved checkpoint")?
.1;
let value: Value = serde_json::from_str(raw).map_err(|e| e.to_string())?;
let p: Project = serde_json::from_value(value.clone()).map_err(|e| e.to_string())?;
// Do not silently discard unknown/defaulted fields while decoding expected JSON.
if full(&p) != canonical(&value) {
return Err("Expected JSON does not round-trip as the complete Project".into());
}
if p.id != service(0)
|| !p.elements.contains_key(&service(0x50))
|| p.diagrams.len() != 1
|| p.diagrams
.get(&service(0x70))
.and_then(|d| d.projection.scenario())
!= Some(service(0x50))
{
return Err("Wrong expected service fixture identity".into());
}
let allowed: Value = serde_json::from_str(approved).map_err(|e| e.to_string())?;
if raw.as_bytes() != approved.as_bytes() || canonical(&value) != canonical(&allowed) {
return Err("Expected Project differs from independently approved checkpoint".into());
}
execute_batch(&p, &[]).map_err(|e| format!("Expected checkpoint is not admitted: {e:?}"))?;
Ok(p)
}
fn self_check(base: &Project, typed: &Project, out: &Path) {
assert_eq!(
base.elements[&incident(0x20)].name,
"Initial incident report"
);
let name = "Initial incident report [Details trial]";
let expected = renamed(base, incident(0x20), name).unwrap();
let expected_full = full(&expected);
assert_ne!(full(base), expected_full);
let wrong = renamed(base, incident(0x21), name).unwrap();
assert_ne!(
full(&wrong),
expected_full,
"Wrong occurrence must fail full comparison"
);
let mut alias = expected.clone();
alias
.elements
.get_mut(&incident(0x20))
.unwrap()
.alias
.push_str("_extra");
assert_ne!(
full(&alias),
expected_full,
"Extra alias change must not be ignored"
);
let mut reordered = serde_json::to_value(&expected).unwrap();
reordered
.pointer_mut(&format!(
"/elements/{}/body/Oa/Shared/Scenario/steps",
incident(0x10)
))
.unwrap()
.as_array_mut()
.unwrap()
.swap(0, 1);
let reordered: Project = serde_json::from_value(reordered).unwrap();
assert_ne!(
full(&reordered),
expected_full,
"Semantic order is not normalized away"
);
let mut geometry = expected.clone();
let Some(DiagramLayout::Scenario(layout)) =
&mut geometry.diagrams.get_mut(&incident(0x40)).unwrap().layout
else {
panic!("Scenario layout required")
};
layout.lanes[0].x += 1.;
assert_ne!(
full(&geometry),
expected_full,
"Extra layout mutation rejected"
);
let mut zeros = base.clone();
let Some(DiagramLayout::Scenario(layout)) =
&mut zeros.diagrams.get_mut(&incident(0x40)).unwrap().layout
else {
panic!("Scenario layout required")
};
layout.lanes[0].x = -0.;
let negative = full(&zeros);
let Some(DiagramLayout::Scenario(layout)) =
&mut zeros.diagrams.get_mut(&incident(0x40)).unwrap().layout
else {
unreachable!()
};
layout.lanes[0].x = 0.;
assert_ne!(negative, full(&zeros));
assert!(
renamed(base, incident(0x40), name).is_err(),
"Diagram identity is outside element-name mode"
);
assert!(renamed(base, incident(0x20), "Initial incident report").is_err());
let baseline = approved_expected(EXPECTED[0].1, "baseline").unwrap();
assert_eq!(
full(typed),
full(&baseline),
"Actual admitted fixture must equal approved baseline"
);
for (key, text) in EXPECTED {
assert!(approved_expected(text, key).is_ok());
}
assert!(
approved_expected(EXPECTED[1].1, "3a").is_err(),
"Wrong checkpoint rejected"
);
let mut wrong_id: Value = serde_json::from_str(EXPECTED[0].1).unwrap();
wrong_id["id"] = json!(incident(1));
assert!(approved_expected(&canonical(&wrong_id), "baseline").is_err());
let mut unknown: Value = serde_json::from_str(EXPECTED[0].1).unwrap();
unknown["unapproved_extra"] = json!(true);
assert!(approved_expected(&canonical(&unknown), "baseline").is_err());
put(
&out.join("incident.baseline.project.json"),
full(base).as_bytes(),
);
put(
&out.join("service.baseline.project.json"),
full(typed).as_bytes(),
);
put(&out.join("self-check.json"),serde_json::to_string_pretty(&json!({"status":"passed",
"checks":["name_only_candidate","wrong_occurrence","extra_alias","semantic_array_order","extra_layout",
"signed_zero","non_element_target","unchanged_name","admitted_service_baseline", "all_six_approved_checkpoints",
"wrong_checkpoint","wrong_expected_project_identity","unknown_expected_field"],
"scope":"Comparator self-check only; no saved native output or runtime/history acceptance"})).unwrap().as_bytes());
}
fn main() {
let args: Vec<String> = std::env::args().collect();
let mode = args.get(1).expect("Expected name, typed or self-check");
assert_eq!(
args.len(),
match mode.as_str() {
"name" => 7,
"typed" => 6,
"self-check" => 5,
_ => panic!("Unknown mode"),
}
);
let out = Path::new(&args[4]);
fs::create_dir(out).expect("Output must be fresh; preserve earlier evidence");
if mode == "self-check" {
assert_eq!(fs::read_to_string(&args[2]).unwrap(), INCIDENT);
assert_eq!(fs::read_to_string(&args[3]).unwrap(), SERVICE);
self_check(
&load_source(Path::new(&args[2]), incident(1)),
&load_source(Path::new(&args[3]), service(0)),
out,
);
println!("Details comparator self-check passed; no native result");
return;
}
let (expected, actual, change) = if mode == "name" {
let base = load_source(Path::new(&args[2]), incident(1));
put(&out.join("baseline.project.json"), full(&base).as_bytes());
let selected = args[5].parse::<Id>().unwrap();
let expected = renamed(&base, selected, &args[6]).unwrap();
let old = &base.elements[&selected].name;
(
expected,
load_source(Path::new(&args[3]), incident(1)),
json!({"element":selected,"before":old,"after":args[6]}),
)
} else {
let expected = approved_expected(&fs::read_to_string(&args[2]).unwrap(), &args[5]).unwrap();
(
expected,
load_source(Path::new(&args[3]), service(0)),
json!({"approved_checkpoint":args[5]}),
)
};
let expected = full(&expected);
let actual = full(&actual);
let equal = expected == actual;
put(&out.join("expected.project.json"), expected.as_bytes());
put(&out.join("actual.project.json"), actual.as_bytes());
put(&out.join("comparison.json"),serde_json::to_string_pretty(&json!({"status":if equal {"passed"}else{"failed"},
"mode":mode,"expected_change":change,"full_project_exact":equal,
"scope":"Complete admitted saved-source Project only; no runtime, editor-buffer, camera, Undo stack or native action claim"})).unwrap().as_bytes());
assert!(
equal,
"Complete Project differs; inspect preserved expected/actual outputs"
);
println!("Details saved-source comparison passed: {mode}");
}
@@ -0,0 +1,99 @@
{
"status": "Frozen source-only preparation; independent source review no concrete finding; uncompiled/unexecuted",
"rustfmt": "edition2024 skip_children=true exit0; no compiler",
"powershell_scripts": "3 parsed; no builder/checker executed",
"self_checks": "13 named Rust checks prepared, unexecuted",
"independent_review": "navigation_prerequisite reviewed main/build/check and all six published expected checkpoints; no concrete finding",
"files": [
{
"path": "adaptation-provenance.json",
"bytes": 1402,
"sha256": "2c0ce573723eff3f5a6008a7856629c8807e53bb72140e03b5c34c70e87ad6c5"
},
{
"path": "build.ps1",
"bytes": 13669,
"sha256": "eb4cea60c2b483b2507f792bf3e6feaa1c7d741a484f561e11a994e70e326e80"
},
{
"path": "check.ps1",
"bytes": 11515,
"sha256": "dba9dbad6ac27eead3334d913d303d92d5f406df30e317d18d708511ce2a8d48"
},
{
"path": "expected/after-1.expected.project.json",
"bytes": 10578,
"sha256": "c03cf59f83bc1ae4db64584abf1257efc775cc47b49f2b2db4ac47159dfb90a0"
},
{
"path": "expected/after-3a.expected.project.json",
"bytes": 10495,
"sha256": "ce3d58385815d0a1d01320bdd711d707cb4c530f0614545eca2b83533077b6f0"
},
{
"path": "expected/after-3b.expected.project.json",
"bytes": 10487,
"sha256": "81f16c54db0e7be1960be5de6a89a6e16a56d6c62d45e15aa7f59bc9d85c8925"
},
{
"path": "expected/after-3c.expected.project.json",
"bytes": 10565,
"sha256": "3c4521eef6cf2a6024275f8c6bf5e9a55d7f6e10cb58c9cc846be56cfa121aca"
},
{
"path": "expected/after-3d.expected.project.json",
"bytes": 10565,
"sha256": "36dfe596c1e2f39a82795237f545787996e9138d9c160217611b201da14ce66a"
},
{
"path": "expected/baseline.project.json",
"bytes": 10576,
"sha256": "e59d4f08fda2bae23ca2b84bda0c8679703b1b75a0b7c1916b2f49d2762a90c6"
},
{
"path": "expected-catalog.json",
"bytes": 1974,
"sha256": "5607c2f3cd44aeb18b923f6afc42f82a693e4320778be69f7d1ce1d616e21a1a"
},
{
"path": "fixtures/incident-workspace.arcadia",
"bytes": 6206,
"sha256": "74cd2c1dd5eed7eb19895a752bb8ff9ce93655f7638a5312c96f56218568ebb3"
},
{
"path": "fixtures/service-details.arcadia",
"bytes": 6132,
"sha256": "0e4325222a451b9d4e503974ce86bb95a9931edd0d2d65b8cd9db8d0f99d69e5"
},
{
"path": "main.rs",
"bytes": 11873,
"sha256": "502b488eae0b7775cb01e7de4580dfa6efece63389d6fb57dc782df2fad48af0"
},
{
"path": "proposed-build-inputs.json",
"bytes": 1156,
"sha256": "119c58c5d9ea5dabb2f262dc57dd36fa9d91768080c881205d172b5e6091ae7e"
},
{
"path": "README.md",
"bytes": 6975,
"sha256": "05721f6a05e70a3fe18b92ae4bd5e3826b7ff5f728bcd3e91db6130dc06a7fcd"
},
{
"path": "script-validation.json",
"bytes": 649,
"sha256": "f52072c24023a30794dc7930656a03e14e360801a82401a29e5498095dcf5ab3"
},
{
"path": "source-inputs.json",
"bytes": 2428,
"sha256": "2709d846d62801fb832bbf33b5def79fd6b1c1fd85d5fdea9fccb529698f3d4a"
},
{
"path": "validate-scripts.ps1",
"bytes": 684,
"sha256": "94923b46cf98fcd03ad02e03bb433011b49727a8a1819b04374a560d5673d868"
}
]
}
@@ -0,0 +1,14 @@
{
"status": "Read-only proposed paths selected through successful8bf LIST fingerprint edges; builder must revalidate before compilation. No build run.",
"source_pin": "8bf7607a3f3b53db0c36364f54f57674c64ea2f1",
"reference_receipt": {
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\scenario-details-gates-attempt2-20260913\\list-receipt.json",
"bytes": 160008,
"sha256": "e2d9258afab904c7d0d9f3efbb3c3cc02511a33296c1698b3114b3d6b7a125a1"
},
"desktop_fingerprint": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\target\\debug\\.fingerprint\\oa-desktop-27db9628b266bf39\\test-bin-arcadia-studio.json",
"core_rlib": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\target\\debug\\deps\\liboa_core-86a2622fbe014324.rlib",
"serde_json_rlib": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\target\\debug\\deps\\libserde_json-da2c4f333fc47818.rlib",
"windows_import_library_directory": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\toolchain\\cargo\\registry\\src\\index.crates.io-1949cf8c6b5b557f\\windows_x86_64_gnullvm-0.52.6\\lib",
"output": "<parent-chosen fresh directory>"
}
@@ -0,0 +1,23 @@
{
"status": "parsed",
"scripts": [
{
"path": "build.ps1",
"bytes": 13669,
"sha256": "eb4cea60c2b483b2507f792bf3e6feaa1c7d741a484f561e11a994e70e326e80"
},
{
"path": "check.ps1",
"bytes": 11515,
"sha256": "dba9dbad6ac27eead3334d913d303d92d5f406df30e317d18d708511ce2a8d48"
},
{
"path": "validate-scripts.ps1",
"bytes": 684,
"sha256": "94923b46cf98fcd03ad02e03bb433011b49727a8a1819b04374a560d5673d868"
}
],
"compiler_executed": false,
"oracle_executed": false,
"scope": "PowerShell syntax only. Rust self-checks prepared but unexecuted."
}
@@ -0,0 +1,108 @@
arcadia 7;
project incident_workspace "Incident report review" id "70200000-0000-4000-8000-000000000001" {
// Two operational activities, with one lifeline appearance per Scenario.
oa_activity report_incident "Report incident" id "70200000-0000-4000-8000-000000000002" {}
oa_activity assess_incident "Assess incident" id "70200000-0000-4000-8000-000000000003" {}
interaction incident_report "Incident report" id "70200000-0000-4000-8000-000000000004" {
source @report_incident;
target @assess_incident;
}
oa_scenario incident_response "Review a reported incident" id "70200000-0000-4000-8000-000000000010" {
viewpoint OperationalActivity;
steps [@initial_report, @updated_report, @assess_call, @assess_reply, @unfinished_notice, @use_review];
}
oa_lifeline reporter "Reporting activity" id "70200000-0000-4000-8000-000000000011" {
parent @incident_response; represented @report_incident;
}
oa_lifeline assessor "Assessment activity" id "70200000-0000-4000-8000-000000000012" {
parent @incident_response; represented @assess_incident;
}
// Both appearances reuse one definition. Navigation must retain the occurrence.
oa_occurrence initial_report "Initial incident report" id "70200000-0000-4000-8000-000000000020" {
parent @incident_response;
body { Exchange { exchange @incident_report; sender @reporter; receiver @assessor; message_kind Asynchronous; }; };
}
oa_occurrence updated_report "Updated incident report" id "70200000-0000-4000-8000-000000000021" {
parent @incident_response;
body { Exchange { exchange @incident_report; sender @reporter; receiver @assessor; message_kind Asynchronous; }; };
}
// A correlated self call/reply with deliberately unassigned exchange definitions.
oa_occurrence assess_call "Assess report details" id "70200000-0000-4000-8000-000000000022" {
parent @incident_response;
body { Exchange { exchange none; sender @assessor; receiver @assessor; message_kind Call; }; };
}
oa_occurrence assess_reply "Assessment ready" id "70200000-0000-4000-8000-000000000023" {
parent @incident_response;
body { Exchange { exchange none; sender @assessor; receiver @assessor; message_kind Reply; reply_to @assess_call; }; };
}
// Intentional unfinished work: no receiver and therefore no fabricated arrow.
oa_occurrence unfinished_notice "Follow-up recipient undecided" id "70200000-0000-4000-8000-000000000024" {
parent @incident_response;
body { Exchange { exchange @incident_report; sender @reporter; receiver none; message_kind Asynchronous; }; };
}
oa_occurrence use_review "Use the reviewed reporting procedure" id "70200000-0000-4000-8000-000000000025" {
parent @incident_response;
body { ScenarioUse {
bindings [{ local @reporter; referenced @review_reporter; }, { local @assessor; referenced @review_assessor; }];
scenario @reporting_review;
}; };
}
// This definition stays opaque in the caller. Open it, then Back to the saved view.
oa_scenario reporting_review "Reporting procedure detail" id "70200000-0000-4000-8000-000000000030" {
viewpoint OperationalActivity;
steps [@review_delivery];
}
oa_lifeline review_reporter "Reporting activity in detail" id "70200000-0000-4000-8000-000000000031" {
parent @reporting_review; represented @report_incident;
}
oa_lifeline review_assessor "Assessment activity in detail" id "70200000-0000-4000-8000-000000000032" {
parent @reporting_review; represented @assess_incident;
}
oa_occurrence review_delivery "Check the incident report" id "70200000-0000-4000-8000-000000000033" {
parent @reporting_review;
body { Exchange { exchange @incident_report; sender @review_reporter; receiver @review_assessor; message_kind Asynchronous; }; };
}
diagram incident_readable "A - Incident review readable" id "70200000-0000-4000-8000-000000000040" {
layer Oa;
projection { Scenario { scenario @incident_response; }; };
layout { Scenario {
lanes [{ lifeline @reporter; x 160; }, { lifeline @assessor; x 640; }];
messages [
{ address { references []; occurrence @initial_report; }; send_y 160; },
{ address { references []; occurrence @updated_report; }; send_y 252; },
{ address { references []; occurrence @assess_call; }; send_y 344; },
{ address { references []; occurrence @assess_reply; }; send_y 436; }
];
}; };
}
diagram incident_wide "B - Incident review negative and far" id "70200000-0000-4000-8000-000000000041" {
layer Oa;
projection { Scenario { scenario @incident_response; }; };
layout { Scenario {
lanes [{ lifeline @reporter; x -500; }, { lifeline @assessor; x 50000; }];
messages [
{ address { references []; occurrence @initial_report; }; send_y 160; },
{ address { references []; occurrence @updated_report; }; send_y 252; },
{ address { references []; occurrence @assess_call; }; send_y 344; },
{ address { references []; occurrence @assess_reply; }; send_y 436; }
];
}; };
}
diagram incident_repair "C - Incident review needs layout repair" id "70200000-0000-4000-8000-000000000042" {
layer Oa;
projection { Scenario { scenario @incident_response; }; };
layout { Scenario {
// These valid authored lanes must remain saved during complete fallback.
lanes [{ lifeline @reporter; x 900; }, { lifeline @assessor; x -500; }];
messages [
// REPAIR: change only this 300 to 424, then Undo and Redo the edit.
{ address { references []; occurrence @assess_reply; }; send_y 300; },
// This authored value stays latent while the receiver is missing.
{ address { references []; occurrence @unfinished_notice; }; send_y 2000; }
];
}; };
}
}
@@ -0,0 +1,113 @@
arcadia 7;
project service_details "Valve service Details trial" id "80300000-0000-4000-8000-000000000000" {
sa_actor console "Operator console" id "80300000-0000-4000-8000-000000000001" {}
sa_system valve "Valve service" id "80300000-0000-4000-8000-000000000002" {}
sa_port caller_port "Console service client" id "80300000-0000-4000-8000-000000000003" {
parent @console; contract { Component { kind Standard; orientation Unset; }; };
}
sa_port provider_port "Valve service endpoint" id "80300000-0000-4000-8000-000000000004" {
parent @valve; contract { Component { kind Standard; orientation Unset; }; };
}
sa_data_type text_value "Service text" id "80300000-0000-4000-8000-000000000010" {
definition { String { minimum_length 0; maximum_length 128; }; };
}
sa_data_type pressure_value "Pressure in bar" id "80300000-0000-4000-8000-000000000011" {
definition { Real { minimum 0; maximum 100; }; }; unit "bar";
}
sa_data_type accepted_value "Acceptance flag" id "80300000-0000-4000-8000-000000000012" { definition Boolean; }
sa_exchange_item read_status "ReadStatus" id "80300000-0000-4000-8000-000000000020" {
kind Information; mechanism Operation;
}
sa_data_field read_scope "Scope" id "80300000-0000-4000-8000-000000000021" {
parent @read_status; type_ref { Named @text_value; }; direction In;
minimum 0; maximum 1; storage Value;
}
sa_data_field read_result "Status" id "80300000-0000-4000-8000-000000000022" {
parent @read_status; type_ref { Named @text_value; }; direction Return;
minimum 0; maximum 1; storage Value;
}
sa_exchange_item set_limit "SetLimit" id "80300000-0000-4000-8000-000000000030" {
kind Information; mechanism Operation;
}
sa_data_field limit_value "Pressure limit" id "80300000-0000-4000-8000-000000000031" {
parent @set_limit; type_ref { Named @pressure_value; }; direction In;
minimum 0; maximum 1; storage Value;
}
sa_data_field limit_accepted "Accepted" id "80300000-0000-4000-8000-000000000032" {
parent @set_limit; type_ref { Named @accepted_value; }; direction Return;
minimum 0; maximum 1; storage Value;
}
sa_interface valve_api "Valve commands" id "80300000-0000-4000-8000-000000000040" {}
interface_item_allocation read_allocation "ReadStatus allocation" id "80300000-0000-4000-8000-000000000041" {
source @valve_api; target @read_status; order 0;
transmission Synchronous; acquisition Accept;
}
interface_item_allocation limit_allocation "SetLimit allocation" id "80300000-0000-4000-8000-000000000042" {
source @valve_api; target @set_limit; order 1;
transmission Synchronous; acquisition Accept;
}
interface_requirement requires_api "Console requires Valve commands" id "80300000-0000-4000-8000-000000000043" {
source @caller_port; target @valve_api;
}
interface_provision provides_api "Valve provides Valve commands" id "80300000-0000-4000-8000-000000000044" {
source @provider_port; target @valve_api;
}
boundary_exchange service_channel "Valve service channel" id "80300000-0000-4000-8000-000000000045" {
source @caller_port; target @provider_port; oriented false;
items [@read_status, @set_limit];
}
sa_scenario service_review "Review service calls" id "80300000-0000-4000-8000-000000000050" {
viewpoint BoundaryInterface;
steps [@first_call, @first_reply, @control_call, @control_reply];
}
sa_lifeline caller "Console caller" id "80300000-0000-4000-8000-000000000051" {
parent @service_review; represented @console;
}
sa_lifeline provider "Valve provider" id "80300000-0000-4000-8000-000000000052" {
parent @service_review; represented @valve;
}
sa_occurrence first_call "Read primary status" id "80300000-0000-4000-8000-000000000060" {
parent @service_review;
body { Exchange {
exchange @service_channel; sender @caller; receiver @provider; message_kind Call;
operation { allocation @read_allocation; };
values [{ path []; field @read_scope; expression "\"primary\""; }];
}; };
}
sa_occurrence first_reply "Primary status response" id "80300000-0000-4000-8000-000000000061" {
parent @service_review;
body { Exchange {
exchange @service_channel; sender @provider; receiver @caller;
message_kind Reply; reply_to @first_call;
values [{ path []; field @read_result; expression "\"READY\""; }];
}; };
}
sa_occurrence control_call "Set reserve limit" id "80300000-0000-4000-8000-000000000062" {
parent @service_review;
body { Exchange {
exchange @service_channel; sender @caller; receiver @provider; message_kind Call;
operation { allocation @limit_allocation; };
values [{ path []; field @limit_value; expression "12.5"; }];
}; };
}
sa_occurrence control_reply "Reserve limit accepted" id "80300000-0000-4000-8000-000000000063" {
parent @service_review;
body { Exchange {
exchange @service_channel; sender @provider; receiver @caller;
message_kind Reply; reply_to @control_call;
values [{ path []; field @limit_accepted; expression "true"; }];
}; };
}
diagram service_details_view "Service calls - Details trial" id "80300000-0000-4000-8000-000000000070" {
layer Sa; projection { Scenario { scenario @service_review; }; };
layout { Scenario {
lanes [{ lifeline @caller; x 160; }, { lifeline @provider; x 650; }];
messages [
{ address { references []; occurrence @first_call; }; send_y 160; },
{ address { references []; occurrence @first_reply; }; send_y 270; },
{ address { references []; occurrence @control_call; }; send_y 390; },
{ address { references []; occurrence @control_reply; }; send_y 500; }
];
}; };
}
}
@@ -0,0 +1,19 @@
{
"checks": [
"name_only_candidate",
"wrong_occurrence",
"extra_alias",
"semantic_array_order",
"extra_layout",
"signed_zero",
"non_element_target",
"unchanged_name",
"admitted_service_baseline",
"all_six_approved_checkpoints",
"wrong_checkpoint",
"wrong_expected_project_identity",
"unknown_expected_field"
],
"scope": "Comparator self-check only; no saved native output or runtime/history acceptance",
"status": "passed"
}
@@ -0,0 +1,77 @@
{
"source_commit": "8bf7607a3f3b53db0c36364f54f57674c64ea2f1",
"command": [
"C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\scenario-details-source-oracle-20260913\\build-01\\details-source-oracle.exe",
"self-check",
"C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\scenario-details-source-oracle-20260913\\self-check-01\\input-0.arcadia",
"C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\scenario-details-source-oracle-20260913\\self-check-01\\input-1.arcadia",
"C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\scenario-details-source-oracle-20260913\\self-check-01\\project-comparison"
],
"mode": "self-check",
"start_utc": "2026-09-13T12:24:20.8616681Z",
"end_utc": "2026-09-13T12:24:32.7422763Z",
"exit_code": 0,
"failure": null,
"inputs_unchanged": true,
"semantic_pass": true,
"runtime_binding": {
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\scenario-details-source-oracle-20260913\\build-01\\libunwind.dll",
"bytes": 190464,
"sha256": "aa282fa47bb2c4e210cea5e470cdbdca58568f0be0bc73e404d86ab9cd95ef6a"
},
"oracle_sha256": "deba40e3d224b1326f3f38d5eb7f692ac9bb453876c6f63e1fe2d540cae79183",
"build_receipt_sha256": "9755e8a94e4075caaaef276e08e92cb1773423785a8c9b3046b39011b1e068ef",
"artifacts": [
{
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\scenario-details-source-oracle-20260913\\self-check-01\\input-0.arcadia",
"bytes": 6206,
"sha256": "74cd2c1dd5eed7eb19895a752bb8ff9ce93655f7638a5312c96f56218568ebb3"
},
{
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\scenario-details-source-oracle-20260913\\self-check-01\\input-1.arcadia",
"bytes": 6132,
"sha256": "0e4325222a451b9d4e503974ce86bb95a9931edd0d2d65b8cd9db8d0f99d69e5"
},
{
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\scenario-details-source-oracle-20260913\\self-check-01\\inputs-after.json",
"bytes": 175466,
"sha256": "b0292988ad1447b55e9ba110df4bb67a531c67a4f928a0d200caa6581f094b00"
},
{
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\scenario-details-source-oracle-20260913\\self-check-01\\inputs-before.json",
"bytes": 175466,
"sha256": "b0292988ad1447b55e9ba110df4bb67a531c67a4f928a0d200caa6581f094b00"
},
{
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\scenario-details-source-oracle-20260913\\self-check-01\\request.json",
"bytes": 129,
"sha256": "7b6d280159217b38f71a1a98e85b5d4c8f8311370bb05c2ef982cfee1165b752"
},
{
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\scenario-details-source-oracle-20260913\\self-check-01\\stderr.log",
"bytes": 0,
"sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
},
{
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\scenario-details-source-oracle-20260913\\self-check-01\\stdout.log",
"bytes": 55,
"sha256": "e196f844e223e514c2d060617424d8468da244fda4c7d42f42962a22c48345ff"
},
{
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\scenario-details-source-oracle-20260913\\self-check-01\\project-comparison\\incident.baseline.project.json",
"bytes": 9452,
"sha256": "60dab6b528c1f273d2b076897a6f95c492a74cdaa15bd27cd873bf12ce865391"
},
{
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\scenario-details-source-oracle-20260913\\self-check-01\\project-comparison\\self-check.json",
"bytes": 484,
"sha256": "62471fe9fe92746dea9253eb3e0e5ac326f35e4ccf927fc877a19c26f6aaa928"
},
{
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\scenario-details-source-oracle-20260913\\self-check-01\\project-comparison\\service.baseline.project.json",
"bytes": 10576,
"sha256": "e59d4f08fda2bae23ca2b84bda0c8679703b1b75a0b7c1916b2f49d2762a90c6"
}
],
"scope": "Complete admitted saved-source Project comparison only; no renderer, source editor, native action or runtime/history claim"
}
@@ -0,0 +1,4 @@
{
"mode": "self-check",
"expected_origin": "Declared before reading actual output; no expectation inferred from Actual"
}
@@ -0,0 +1 @@
Details comparator self-check passed; no native result
@@ -0,0 +1,75 @@
{
"status": "Frozen preparation source only; uncompiled/unexecuted",
"files": [
{
"path": "main.rs",
"bytes": 11873,
"sha256": "502b488eae0b7775cb01e7de4580dfa6efece63389d6fb57dc782df2fad48af0"
},
{
"path": "build.ps1",
"bytes": 13669,
"sha256": "eb4cea60c2b483b2507f792bf3e6feaa1c7d741a484f561e11a994e70e326e80"
},
{
"path": "check.ps1",
"bytes": 11515,
"sha256": "dba9dbad6ac27eead3334d913d303d92d5f406df30e317d18d708511ce2a8d48"
},
{
"path": "validate-scripts.ps1",
"bytes": 684,
"sha256": "94923b46cf98fcd03ad02e03bb433011b49727a8a1819b04374a560d5673d868"
},
{
"path": "README.md",
"bytes": 6975,
"sha256": "05721f6a05e70a3fe18b92ae4bd5e3826b7ff5f728bcd3e91db6130dc06a7fcd"
},
{
"path": "expected-catalog.json",
"bytes": 1974,
"sha256": "5607c2f3cd44aeb18b923f6afc42f82a693e4320778be69f7d1ce1d616e21a1a"
},
{
"path": "fixtures/incident-workspace.arcadia",
"bytes": 6206,
"sha256": "74cd2c1dd5eed7eb19895a752bb8ff9ce93655f7638a5312c96f56218568ebb3"
},
{
"path": "fixtures/service-details.arcadia",
"bytes": 6132,
"sha256": "0e4325222a451b9d4e503974ce86bb95a9931edd0d2d65b8cd9db8d0f99d69e5"
},
{
"path": "expected/after-1.expected.project.json",
"bytes": 10578,
"sha256": "c03cf59f83bc1ae4db64584abf1257efc775cc47b49f2b2db4ac47159dfb90a0"
},
{
"path": "expected/after-3a.expected.project.json",
"bytes": 10495,
"sha256": "ce3d58385815d0a1d01320bdd711d707cb4c530f0614545eca2b83533077b6f0"
},
{
"path": "expected/after-3b.expected.project.json",
"bytes": 10487,
"sha256": "81f16c54db0e7be1960be5de6a89a6e16a56d6c62d45e15aa7f59bc9d85c8925"
},
{
"path": "expected/after-3c.expected.project.json",
"bytes": 10565,
"sha256": "3c4521eef6cf2a6024275f8c6bf5e9a55d7f6e10cb58c9cc846be56cfa121aca"
},
{
"path": "expected/after-3d.expected.project.json",
"bytes": 10565,
"sha256": "36dfe596c1e2f39a82795237f545787996e9138d9c160217611b201da14ce66a"
},
{
"path": "expected/baseline.project.json",
"bytes": 10576,
"sha256": "e59d4f08fda2bae23ca2b84bda0c8679703b1b75a0b7c1916b2f49d2762a90c6"
}
]
}
@@ -0,0 +1,9 @@
#Requires -Version 7.0
$ErrorActionPreference='Stop'
$records=@(foreach($name in @('build.ps1','check.ps1','validate-scripts.ps1')){
$path=Join-Path $PSScriptRoot $name;$tokens=$null;$errors=$null
[void][Management.Automation.Language.Parser]::ParseFile($path,[ref]$tokens,[ref]$errors)
if(@($errors).Count){throw ($errors|Out-String)}
[ordered]@{path=$name;bytes=(Get-Item -LiteralPath $path).Length;sha256=(Get-FileHash -LiteralPath $path -Algorithm SHA256).Hash.ToLowerInvariant()}
})
[ordered]@{status='parsed';scripts=$records;compiler_executed=$false;oracle_executed=$false;scope='PowerShell syntax only. Rust self-checks prepared but unexecuted.'}|ConvertTo-Json -Depth 5
@@ -0,0 +1,13 @@
{
"base": "8bf7607a3f3b53db0c36364f54f57674c64ea2f1",
"capturedUtc": "2026-09-13T11:37:00.5175682Z",
"sourceCount": 611,
"focusedCount": 295,
"desktopExpectedCount": 1089,
"cleanPerformed": false,
"cargoExecuted": false,
"sourceBeforeSha256": "918c5f24b8d65e09ae39850d394015d92265003aa14776b35ef0882b4869c73f",
"selectionSha256": "4eaa6987aa91c7dcabb14ad4a3b17a4cec7718a30a820034ea4efa1a3afcb6d0",
"parserSha256": "38286acc9bdd913af5194cb26d53c8e9905734853ae168c8f2d67c2c7e490375",
"status": "Prepared only; parent dispatches list, focused, all, clippy, build sequentially"
}
@@ -0,0 +1,47 @@
{
"base": "8bf7607a3f3b53db0c36364f54f57674c64ea2f1",
"capturedUtc": "2026-09-13T11:39:22.1108070Z",
"externalEnvironmentPath": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\toolchain\\env.ps1",
"externalEnvironmentSha256": "be2226f08764bb6961b4be8513ce55bab076890cddd2fef0f54a4031f94a82d4",
"cargo": [
"cargo 1.98.1 (797e8a9bc 2026-08-05)",
"release: 1.98.1",
"commit-hash: 797e8a9bca276c1c9f9f738d2a20f484fa4eea9d",
"commit-date: 2026-08-05",
"host: x86_64-pc-windows-gnullvm",
"libgit2: 1.9.4 (sys:0.21.0 vendored)",
"libcurl: 8.21.0-DEV (sys:0.4.90+curl-8.21.0 vendored ssl:Schannel)",
"os: Windows 10.0.26200 (Windows 11 Professional) [64-bit]"
],
"cargoExitCode": 0,
"rustc": [
"rustc 1.98.1 (48a229cea 2026-09-01)",
"binary: rustc",
"commit-hash: 48a229ceaefd4985c50990b14116b6d856af0985",
"commit-date: 2026-09-01",
"host: x86_64-pc-windows-gnullvm",
"release: 1.98.1",
"LLVM version: 22.1.8"
],
"rustcExitCode": 0,
"clippy": [
"clippy 0.1.98 (48a229ceae 2026-09-01)"
],
"clippyExitCode": 0,
"clang": [
"clang version 23.1.1 (https://github.com/llvm/llvm-project.git 6dfe1677ab8dffbc6ec13d53a1e0215d75147689)",
"Target: x86_64-w64-windows-gnu",
"Thread model: posix",
"InstalledDir: C:/Users/User/Documents/Git/ARCADIA-Studio/.local/toolchain/llvm-mingw-20260908-ucrt-x86_64/bin",
"Configuration file: C:/Users/User/Documents/Git/ARCADIA-Studio/.local/toolchain/llvm-mingw-20260908-ucrt-x86_64/bin/x86_64-w64-windows-gnu.cfg"
],
"clangExitCode": 0,
"cargoPath": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\toolchain\\cargo\\bin\\cargo.exe",
"rustcPath": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\toolchain\\cargo\\bin\\rustc.exe",
"clangPath": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\toolchain\\llvm-mingw-20260908-ucrt-x86_64\\bin\\clang.exe",
"cargoHome": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\toolchain\\cargo",
"rustupHome": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\toolchain\\rustup",
"rustupToolchain": "stable-x86_64-pc-windows-gnullvm",
"buildJobs": "1",
"incremental": "0"
}
@@ -0,0 +1,162 @@
#Requires -Version 7.0
Set-StrictMode -Version Latest
$ErrorActionPreference = 'Stop'
# Source pin and count are supplied by the reviewed gate at staging; never inferred from HEAD.
function Get-NativeHash([string]$Path) { (Get-FileHash -LiteralPath $Path -Algorithm SHA256).Hash.ToLowerInvariant() }
function Write-NativeJson([string]$Path, $Value) {
$stream=[IO.File]::Open($Path,[IO.FileMode]::CreateNew,[IO.FileAccess]::Write,[IO.FileShare]::Read)
try {$bytes=[Text.UTF8Encoding]::new($false).GetBytes(($Value|ConvertTo-Json -Depth 30)+"`n");$stream.Write($bytes,0,$bytes.Length);$stream.Flush($true)} finally {$stream.Dispose()}
}
function Assert-NativeFiles([string]$Root,$Files) {
$prefix=[IO.Path]::GetFullPath($Root)+[IO.Path]::DirectorySeparatorChar
foreach($file in $Files){
$path=[IO.Path]::GetFullPath((Join-Path $Root $file.path))
if(-not $path.StartsWith($prefix,[StringComparison]::OrdinalIgnoreCase)){throw 'Manifest path escapes staging directory.'}
$item=Get-Item -LiteralPath $path -Force
if($item.PSIsContainer -or ($item.Attributes -band [IO.FileAttributes]::ReparsePoint) -ne 0 -or $item.Length -ne $file.bytes -or (Get-NativeHash $path) -cne $file.sha256){throw "Changed input: $path"}
}
}
function Get-NativeRecord([string]$Root,[string]$Path){
$item=Get-Item -LiteralPath $Path
[ordered]@{path=[IO.Path]::GetRelativePath($Root,$item.FullName).Replace('\','/');bytes=$item.Length;sha256=(Get-NativeHash $Path)}
}
function Assert-InputPair($Before,$After){
foreach($record in @($Before,$After)){if($record.base -cne $nativePin -or $record.count -ne $nativeInputCount -or @($record.files).Count -ne $nativeInputCount){throw 'Complete current-pin source records required.'}}
$rows=@{}
foreach($file in $Before.files){if($rows.ContainsKey($file.path)){throw 'Duplicate source input.'};$rows[$file.path]=$file}
foreach($file in $After.files){
if(-not $rows.ContainsKey($file.path)){throw 'Unexpected or duplicate source input.'}
$old=$rows[$file.path];if($old.bytes -ne $file.bytes -or $old.sha256 -cne $file.sha256){throw 'Source input changed.'};$rows.Remove($file.path)
}
if($rows.Count){throw 'Missing source inputs.'}
}
function Assert-BuildEvidence([string]$Gate){
Assert-SelectionEvidence $Gate
$initial=Get-Content -Raw -LiteralPath (Join-Path $Gate 'inputs-complete-before.json')|ConvertFrom-Json
Assert-InputPair (Read-NativeJson (Join-Path $Gate 'expected-inputs.json')) $initial
$previous=$null
foreach($stage in @('list','focused','all','clippy','build')){
$receiptPath=Join-Path $Gate ($stage+'-receipt.json')
$r=Get-Content -Raw -LiteralPath $receiptPath|ConvertFrom-Json
if($r.stage -cne $stage -or $r.base -cne $nativePin -or $r.cargoExitCode -ne 0 -or -not $r.selectionValid -or -not $r.inputsUnchanged -or -not $r.testBinaryBindingValid -or $null -ne $r.postflightFailure){throw "Successful unchanged current-pin stage required: $stage"}
if($stage -eq 'clippy' -and $r.command -cne 'cargo clippy -p oa-desktop -p oa-server --all-targets --locked --offline -- -D warnings'){throw 'Combined desktop/server strict acceptance required.'}
foreach($binding in $r.boundScriptAndInputHashes.PSObject.Properties){if((Get-NativeHash (Join-Path $Gate $binding.Name)) -cne $binding.Value){throw "Gate binding changed: $($binding.Name)"}}
if((Get-NativeHash (Join-Path $Gate ($stage+'.log'))) -cne $r.rawLogSha256){throw 'Gate raw log changed.'}
if((Get-NativeHash (Join-Path $Gate 'toolchain-versions.json')) -cne $r.toolchainVersionsSha256){throw 'Toolchain receipt changed.'}
if($null -ne $previous){if($r.priorStage.stage -cne $previous -or $r.priorStage.receiptSha256 -cne (Get-NativeHash (Join-Path $Gate ($previous+'-receipt.json')))){throw 'Broken sequential gate chain.'}}
$beforePath=Join-Path $Gate ('inputs-complete-'+$stage+'-before.json');$afterPath=Join-Path $Gate ('inputs-complete-'+$stage+'-after.json')
if((Get-NativeHash $beforePath) -cne $r.beforeCaptureSha256 -or (Get-NativeHash $afterPath) -cne $r.afterCaptureSha256){throw 'Gate capture changed.'}
$before=Get-Content -Raw -LiteralPath $beforePath|ConvertFrom-Json;$after=Get-Content -Raw -LiteralPath $afterPath|ConvertFrom-Json
Assert-InputPair $initial $before;Assert-InputPair $before $after
$previous=$stage
}
if($null -eq $r.binary -or $r.binary.bytes -le 0 -or $r.binary.sha256 -notmatch '^[0-9a-f]{64}$'){throw 'Successful build must bind an actual binary.'}
return $r
}
function Read-NativeJson([string]$Path) { Get-Content -Raw -LiteralPath $Path | ConvertFrom-Json }
function Assert-NativeNames($Expected,$Actual) {
$a=@($Expected);$b=@($Actual)
if($a.Count -ne $b.Count -or @($a|Sort-Object -Unique).Count -ne $a.Count -or @($b|Sort-Object -Unique).Count -ne $b.Count -or @(Compare-Object $a $b -CaseSensitive).Count){throw 'Exact unique membership differs.'}
}
function Assert-NativeBinaries($Expected,$Actual) {
$a=@($Expected);$b=@($Actual)
if($a.Count -ne 1 -or $b.Count -ne 1 -or $a[0].path -ine $b[0].path -or $a[0].bytes -le 0 -or $a[0].bytes -ne $b[0].bytes -or $a[0].sha256 -cne $b[0].sha256 -or $a[0].sha256 -notmatch '^[0-9a-f]{64}$'){throw 'Exact test executable continuity differs.'}
}
function Assert-SelectionEvidence([string]$Gate) {
if($nativePin -cne '8bf7607a3f3b53db0c36364f54f57674c64ea2f1' -or $nativeInputCount -ne 611){throw 'Exact reviewed8bf source and611 inputs required.'}
$selection=Read-NativeJson (Join-Path $Gate 'expected-tests.json')
$final=Read-NativeJson (Join-Path $Gate 'finalization.json')
if($selection.source_commit -cne $nativePin -or $selection.expected_count -ne 295 -or $selection.expected_desktop_count -ne 1089 -or $selection.expected_filtered -ne 794 -or @($selection.tests).Count -ne 295 -or @($selection.desktop_tests).Count -ne 1089 -or @($selection.ignored_tests).Count -ne 4){throw 'Wrong 295/1089/4 selection contract.'}
if($final.base -cne $nativePin -or $final.sourceCount -ne $nativeInputCount -or $final.focusedCount -ne 295 -or $final.desktopExpectedCount -ne 1089){throw 'Wrong finalized source or test contract.'}
$previous=$null
foreach($stage in @('list','focused','all','clippy','build')) {
$r=Read-NativeJson (Join-Path $Gate ($stage+'-receipt.json'))
if($null -ne $previous){Assert-NativeBinaries $previous.testExecutables $r.testExecutablesBefore;Assert-NativeBinaries $r.testExecutablesBefore $r.testExecutables
if($r.priorStage.rawLogSha256 -cne $previous.rawLogSha256){throw 'Prior raw-log chain differs.'}
} else {Assert-NativeBinaries $r.testExecutables $r.testExecutables}
if($stage -eq 'focused'){Assert-BatchedFocusedEvidence $Gate $r $selection;$previous=$r;continue}
if($stage -eq 'list') {
Assert-NativeNames $selection.desktop_tests $r.listedTests
if(($r.listSummaries|Measure-Object -Property tests -Sum).Sum -ne 1089 -or ($r.listSummaries|Measure-Object -Property benchmarks -Sum).Sum -ne 0){throw 'Wrong actual listing count.'}
}
if($stage -in @('focused','all')) {
$expected=if($stage -eq 'focused'){$selection.tests}else{$selection.desktop_tests}
Assert-NativeNames $expected @($r.executedTests|ForEach-Object {$_.name})
$ignored=@($r.executedTests|Where-Object {$_.result -eq 'ignored'}|ForEach-Object {$_.name})
if(@($r.executedTests|Where-Object {$_.result -notin @('ok','ignored')}).Count -or @($r.testResultSummaries).Count -ne 1){throw 'Unexpected actual test result.'}
$s=$r.testResultSummaries[0]
$pass=if($stage -eq 'focused'){295}else{1085};$ignore=if($stage -eq 'focused'){0}else{4};$filtered=if($stage -eq 'focused'){794}else{0}
if($s.status -cne 'ok' -or $s.passed -ne $pass -or $s.failed -ne 0 -or $s.ignored -ne $ignore -or $s.measured -ne 0 -or $s.filtered -ne $filtered -or $ignored.Count -ne $ignore){throw 'Wrong actual pass/ignored/filtered totals.'}
if($stage -eq 'all'){Assert-NativeNames $selection.ignored_tests $ignored}
}
$previous=$r
}
}
function Assert-CurrentNativeSource([string]$Gate) {
$expected=Read-NativeJson (Join-Path $Gate 'expected-inputs.json')
$enumeration=Read-NativeJson (Join-Path $Gate 'enumeration.json')
$external=Read-NativeJson (Join-Path $Gate 'external-inputs.json')
if($expected.base -cne $nativePin -or $enumeration.base -cne $nativePin -or $external.base -cne $nativePin){throw 'Wrong source-input pin.'}
Assert-InputPair $expected $expected
Push-Location -LiteralPath $expected.workspace
try {
$head=git rev-parse HEAD
if($LASTEXITCODE -ne 0 -or $head -cne $nativePin){throw 'Source HEAD differs.'}
$status=@(git status --porcelain)
if($LASTEXITCODE -ne 0 -or $status.Count){throw 'Source worktree is not frozen and clean.'}
$roots=@($enumeration.rootInputs);$scopes=@($enumeration.scopes)
$tracked=@(git ls-files -- @roots @scopes)
if($LASTEXITCODE -ne 0){throw 'Source Git enumeration failed.'}
$present=@(rg --files @scopes)
if($LASTEXITCODE -ne 0){throw 'Source filesystem enumeration failed.'}
$actual=@(($present+$roots)|ForEach-Object {$_.Replace('\','/')}|Sort-Object -Unique)
Assert-NativeNames @($enumeration.gitPaths) @($tracked|ForEach-Object {$_.Replace('\','/')})
Assert-NativeNames @($expected.files|ForEach-Object {$_.path}) $actual
Assert-NativeFiles $expected.workspace $expected.files
foreach($f in $external.files) {
$exists=Test-Path -LiteralPath $f.path
if($exists -ne $f.present){throw "External config presence changed: $($f.path)"}
if($exists -and ((Get-Item -LiteralPath $f.path).Length -ne $f.bytes -or (Get-NativeHash $f.path) -cne $f.sha256)){throw "External input changed: $($f.path)"}
}
} finally {Pop-Location}
}
function Assert-BatchedFocusedEvidence([string]$Gate,$Receipt,$Selection) {
if($Receipt.executionMode -cne 'bounded-exact-batches-v1'){throw 'Explicit bounded focused recovery required'}
$planPath=Join-Path $Gate 'batches.json';$plan=Read-NativeJson $planPath
if((Get-NativeHash $planPath) -cne $Receipt.batchPlanSha256 -or $plan.schema -cne 'scenario_details_exact_batches_v1' -or $plan.source_commit -cne $nativePin -or $plan.focused_count -ne 295 -or $plan.desktop_count -ne 1089 -or $plan.max_command_characters -ne 12000 -or $plan.upstream_list_receipt_sha256 -cne (Get-NativeHash (Join-Path $Gate 'list-receipt.json')) -or $plan.upstream_list_log_sha256 -cne (Get-NativeHash (Join-Path $Gate 'list.log'))){throw 'Wrong focused batch plan/list binding'}
if(@($plan.batches).Count -eq 0 -or @($Receipt.batchReceipts).Count -ne @($plan.batches).Count -or @($Receipt.testResultSummaries).Count -ne @($plan.batches).Count){throw 'Missing focused batch receipts or actual summaries'}
$union=@();$previous=$null;$raw=[Collections.Generic.List[byte]]::new()
$initial=Read-NativeJson (Join-Path $Gate 'inputs-complete-before.json')
for($i=0;$i -lt @($plan.batches).Count;$i++){
$batch=$plan.batches[$i];$binding=$Receipt.batchReceipts[$i];$name=('focused-batch{0:d2}' -f ($i+1))
if($batch.id -cne $name -or $binding.stage -cne $name){throw 'Batch sequence differs'}
$path=Join-Path $Gate ($name+'-receipt.json');$log=Join-Path $Gate ($name+'.log');$r=Read-NativeJson $path
if((Get-NativeHash $path) -cne $binding.receiptSha256 -or (Get-NativeHash $log) -cne $binding.rawLogSha256 -or $r.rawLogSha256 -cne $binding.rawLogSha256){throw 'Batch receipt or log changed'}
if($r.schema -cne 'scenario_details_exact_batch_v1' -or $r.stage -cne $name -or $r.base -cne $nativePin -or $r.workspace -ine $Receipt.workspace -or $r.target -ine $Receipt.target -or $r.cargoExitCode -ne 0 -or -not $r.selectionValid -or -not $r.inputsUnchanged -or -not $r.testBinaryBindingValid -or $null -ne $r.postflightFailure -or $r.listReceiptSha256 -cne $plan.upstream_list_receipt_sha256 -or $r.batchPlanSha256 -cne $Receipt.batchPlanSha256){throw 'Batch did not pass with exact source/binary bindings'}
if(($null -eq $previous) -ne ($null -eq $r.priorBatch)){throw 'Wrong first/prior batch binding'}
if($null -ne $previous -and ($r.priorBatch.stage -cne $previous.stage -or $r.priorBatch.receiptSha256 -cne $previous.receiptSha256 -or $r.priorBatch.rawLogSha256 -cne $previous.rawLogSha256)){throw 'Broken batch chain'}
$args=@('test','-p','oa-desktop','--bin','arcadia-studio','--locked','--offline','--','--exact')+@($batch.tests)+@('--test-threads=1')
if(Compare-Object $args @($r.arguments) -SyncWindow 0 -CaseSensitive){throw 'Actual batch arguments differ'}
$length=0;foreach($arg in @($plan.cargo_path)+$args){$length+=$arg.Length+3}
if($length -gt 12000 -or $length -ne $batch.command_characters -or $r.commandCharacters -ne $length){throw 'Batch command exceeds reviewed bound'}
Assert-NativeNames @($batch.tests) @($r.executedTests|ForEach-Object {$_.name})
if(@($r.executedTests|Where-Object {$_.result -cne 'ok'}).Count -or @($r.testResultSummaries).Count -ne 1){throw 'Batch contains failed/ignored outcomes'}
$s=$r.testResultSummaries[0];$n=@($batch.tests).Count
if($n -le 0 -or $s.status -cne 'ok' -or $s.passed -ne $n -or $s.failed -ne 0 -or $s.ignored -ne 0 -or $s.measured -ne 0 -or $s.filtered -ne (1089-$n)){throw 'Wrong per-batch actual totals'}
foreach($field in @('status','passed','failed','ignored','measured','filtered')){if($Receipt.testResultSummaries[$i].$field -cne $s.$field){throw 'Aggregate summary differs from actual batch'}}
foreach($side in @('before','after')){$capture=Join-Path $Gate ('inputs-complete-'+$name+'-'+$side+'.json');$property=$side+'CaptureSha256';if((Get-NativeHash $capture) -cne $r.$property){throw 'Batch capture changed'};Assert-InputPair $initial (Read-NativeJson $capture)}
foreach($bindingInput in $r.boundScriptAndInputHashes.PSObject.Properties){if((Get-NativeHash (Join-Path $Gate $bindingInput.Name)) -cne $bindingInput.Value){throw 'Batch script/input binding changed'}}
if($r.toolchainVersionsSha256 -cne $Receipt.toolchainVersionsSha256){throw 'Batch toolchain binding differs'}
Assert-NativeBinaries $Receipt.testExecutablesBefore $r.testExecutablesBefore
Assert-NativeBinaries $r.testExecutablesBefore $r.testExecutables
Assert-NativeBinaries $r.testExecutables $Receipt.testExecutables
$union+=@($r.executedTests|ForEach-Object {$_.name});$raw.AddRange([IO.File]::ReadAllBytes($log));$previous=$binding
}
Assert-NativeNames $Selection.tests $union
Assert-NativeNames $union @($Receipt.executedTests|ForEach-Object {$_.name})
if(@($Receipt.executedTests|Where-Object {$_.result -cne 'ok'}).Count -or @($Receipt.ignoredTests).Count){throw 'Aggregate contains nonpassing tests'}
$combined=[Convert]::ToHexString([Security.Cryptography.SHA256]::HashData($raw.ToArray())).ToLowerInvariant()
if($combined -cne $Receipt.rawLogSha256){throw 'Focused raw log is not the exact batch concatenation'}
}
@@ -0,0 +1,37 @@
{
"source_commit": "8bf7607a3f3b53db0c36364f54f57674c64ea2f1",
"build_exit_code": 0,
"build_before_after_exact_count": 1595,
"self_check_exit_code": 0,
"self_check_before_after_exact_count": 636,
"current_build_source_records_rehashed": 627,
"current_run_input_records_rehashed": 636,
"checks": [
"name_only_candidate",
"wrong_occurrence",
"extra_alias",
"semantic_array_order",
"extra_layout",
"signed_zero",
"non_element_target",
"unchanged_name",
"admitted_service_baseline",
"all_six_approved_checkpoints",
"wrong_checkpoint",
"wrong_expected_project_identity",
"unknown_expected_field"
],
"binary_omitted": {
"bytes": 19775488,
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\scenario-details-source-oracle-20260913\\build-01\\details-source-oracle.exe",
"sha256": "deba40e3d224b1326f3f38d5eb7f692ac9bb453876c6f63e1fe2d540cae79183"
},
"runtime_omitted": {
"path": "C:\\Users\\User\\Documents\\Git\\ARCADIA-Studio\\.local\\scenario-details-source-oracle-20260913\\build-01\\libunwind.dll",
"bytes": 190464,
"sha256": "aa282fa47bb2c4e210cea5e470cdbdca58568f0be0bc73e404d86ab9cd95ef6a"
},
"build_receipt_sha256": "9755e8a94e4075caaaef276e08e92cb1773423785a8c9b3046b39011b1e068ef",
"self_check_receipt_sha256": "2fe1db299c2a2ed7b4edc3fe8655ced603a5da7c9165df81cf71360eca1dc8cc",
"scope": "Core comparator and its self-check only; no native saved output or runtime/history acceptance. Build dependency before/after equality verified from receipts; current full transitive dependency cache was not redundantly rehashed during archival."
}