Files
ARCADIA-Studio/harness/experiments/scenario-label-fields-11c605f-20260913/original/README.md
T

62 lines
6.4 KiB
Markdown

# Isolated unwired label evaluator — preparation only
No Cargo, rustc, harness executable or test was run while preparing this directory. The experiment worktree remains clean at `11c605f9170eae461913410f83f333e9314714a5`. Parent owns the local compiler slot and every eventual build/run decision.
`label_harness.rs` includes the **real** `scenario_label.rs` by relative module path. That file includes its unchanged original `tests.rs` and new `field_tests.rs` normally under `cfg(test)`. No production registration or source copy is needed. Only dead-code warnings are allowed because this is an unwired API; other compiler warnings remain denied. `expected-tests.json` records 25 source-derived names: 23 normal tests, one separately isolated font-mutation test, and one optional timing diagnostic. Actual executable listing must verify this prediction before testing.
## Dependencies and missing prerequisite
Only three explicit Rust dependencies are required: `iced`, `unicode_segmentation`, and `serde_json`; everything else is reachable through the precompiled Iced graph. No oa-core, oa-server, App, or production desktop source is compiled by this wrapper. Pinned package versions/features come from the experiment's Cargo.lock and desktop manifest.
The observed desktop test fingerprint `oa-desktop-27db9628b266bf39/test-bin-arcadia-studio.json` selects these **provisional** existing files:
- `target/debug/deps/libiced-ee73abd722c72024.rlib`: Cargo sidecar value `16108679667981481544`.
- `target/debug/deps/libunicode_segmentation-85698043f7780858.rlib`: value `5667086376135872355`.
- `target/debug/deps/libserde_json-da2c4f333fc47818.rlib`: value `9111881576180166571`.
Other Iced/serde_json rlibs coexist and are not interchangeable by filename prefix. `preparation-inputs.json` records current source and selected dependency bytes, explicitly as preparation observations. They are not a post-gate build binding. **Wait for the parent's current desktop listing/build to close**, then supply its successful unchanged receipt and exact test fingerprint/executable. The build script refuses a changed executable, mismatched Cargo dependency sidecars, mixed compiler fingerprint, or different lockfile. It does not require a separate full GUI rebuild: a successful closed desktop test/list receipt with its exact executable is sufficient to identify the already built library graph; this does not assert desktop/native acceptance.
The native link path is the existing pinned `windows_x86_64_gnullvm-0.52.6/lib`. The existing dependency search directory supplies transitive rlibs/proc-macro DLLs; the toolchain's sysroot supplies std/test/runtime archives. The linker is the reference receipt's pinned clang through `.local/toolchain/env.ps1`. A bound `libunwind.dll` is copied next to the new executable. No shared-target output is written by this build, and no Cargo clean/build occurs.
## Deferred concrete build
From this repository root, after the parent releases the build slot:
```powershell
$Root = (Get-Location).Path
$Harness = "$Root/.local/scenario-label-fields-harness-20260913"
$NewOutput = "$Harness/attempt1" # must not exist
# Set this to the completed successful current desktop stage, not an in-flight log.
$ClosedReceipt = 'ABSOLUTE_PATH_TO_CLOSED_LIST_OR_TEST_RECEIPT'
& "$Harness/build.ps1" -ReferenceReceipt $ClosedReceipt `
-DesktopFingerprint "$Root/target/debug/.fingerprint/oa-desktop-27db9628b266bf39/test-bin-arcadia-studio.json" `
-IcedRlib "$Root/target/debug/deps/libiced-ee73abd722c72024.rlib" `
-UnicodeSegmentationRlib "$Root/target/debug/deps/libunicode_segmentation-85698043f7780858.rlib" `
-SerdeJsonRlib "$Root/target/debug/deps/libserde_json-da2c4f333fc47818.rlib" `
-Output $NewOutput
```
If the final fingerprint selects other artifacts, supply its exact filenames and preserve the new input binding; do not retry random libraries. The compiler command is `rustc --edition=2024 --crate-name scenario_label_harness --test -D warnings label_harness.rs --extern iced=... --extern unicode_segmentation=... --extern serde_json=... -L dependency=... -L native=... -C linker=... --emit link,dep-info=... -o <new output>/scenario-label-harness.exe`.
The before/after manifest binds the wrapper and three real source files, manifests/lockfile, selected Cargo sidecars and dep-info, reference receipt/toolchain/capture/executable, compiler/linker binaries, native runtime DLL, all dependency-directory link artifacts, Windows import libraries and sysroot libraries. Actual compiler/linker versions are compared with the reference. It records compile stdout/stderr, exact command/exit/timestamps, dep-info, new executable hash and unchanged-input result. If anything fails, preserve the output directory. No test runs automatically.
## Deferred listing and execution
First run the new, receipt-hashed executable with `--list`, preserve log and exit, and compare every unique `: test` name with `expected-tests.json.tests`; require exactly 25 tests and zero benchmarks. Then normal execution with `--test-threads=1 --nocapture` should report **23 passed, 0 failed, 2 ignored, 0 filtered**. These numbers are predictions, not receipts.
Run the font mutation test only as the sole selected test in a fresh process:
```powershell
& "$NewOutput/scenario-label-harness.exe" --exact scenario_label::tests::actual_font_load_rejects_retained_label_and_old_session --ignored --nocapture --test-threads=1
```
The optional diagnostic likewise runs alone, after correctness passes:
```powershell
$env:SCENARIO_LABEL_FIELDS_SOURCE_PIN = '11c605f9170eae461913410f83f333e9314714a5'
& "$NewOutput/scenario-label-harness.exe" --exact scenario_label::field_tests::field_lookup_4096_scalars_and_combining_heavy_full_coverage --ignored --nocapture --test-threads=1
# Restore the previous environment value afterward.
```
Each isolated invocation should report 1 passed/0 failed/0 ignored/24 filtered. Preserve each command, executable hash before/after, log, exit and the relevant source/input manifest. The timing run must also emit its structured passed-invariant JSON; it establishes no latency threshold. These are real Iced/Cosmic CPU text-layout evaluators. They do not construct a WGPU renderer/window, verify glyph ink or native clipping, establish runtime font-change parity, or test App navigation. System font identities remain environment-dependent and unpinned, with deliberate precondition assertions; a missing font precondition is not a passing geometry result.