Files
ARCADIA-Studio/harness/scenario-selection-20260924.md
T

52 lines
9.0 KiB
Markdown

# Scenario selection adapter
Branch-specific continuation of [the Scenario group planner](scenario-group-planner-20260924.md), tracked in [Gitea #29](http://217.177.34.108:3000/sorokin.oleg.edu/ARCADIA-Studio/issues/29). This work is outside the frozen #37 prerelease candidate. It does not complete Scenario group movement or aggregate removal.
## Behavior and boundaries
Scenario selection uses exact rendered targets and the shared insertion-ordered selection with an explicit primary. Its envelope additionally includes the complete Scenario representation and visit, so saved A, saved B, and Automatic remain independent input destinations. Shift-click toggles a member; a stationary plain click on a selected group member selects only that member. A background press clears selection and retains ordinary panning. Contextual actions expose Add, Remove from selection, Inspect, and Select only. The normal workspace shows the selected count and identifies the primary whose properties are inspected.
Selecting a group does not grant permission to apply a singleton operation to its primary. Motion, deletion and index arrows refuse the whole group while the semantic operation adapter is unfinished. Ordinary first-press singleton saved spacing remains available, including a press on a message different from the current singleton. Automatic singleton ordering remains on its existing path. Selection alone does not edit model/source or history; pending edits are not silently applied.
The source boundary preserves existing saved body/header spacing. The open group gesture decision and semantic destination preview are recorded in [the group policy](scenario-group-reorder-policy-20260924.md); this increment does not resolve them by reinterpreting a saved body drag.
## Review and experiments
The first adapter source was `879eb1d5c8792a720433022e49f415d2c58ff72c`. Its Windows Scenario run executed 263 passing tests, one failing test, and one ignored test. All 809 captured inputs remained unchanged and matched that Git commit. The failure was the older mounted deletion test's expectation that a menu snapshot remained valid after a Scenario owner change. The new destination check correctly invalidated it. The corrected test first asserts that real invalidation, then uses a deliberately current unqualified snapshot to isolate the independent captured-owner guard; it retains actual removal, source consistency, and Undo assertions.
Independent review also identified two production issues: selection Clear advanced the camera lifetime and interrupted the pan started by the same blank press; legacy singleton selection reconciliation could change generation without retiring an old spacing Begin. The correction retires spacing through the canvas context on all admitted selection changes, while keeping the camera lifetime during selection-only input. A legacy A/B/A evaluator covers both generic selection and Scenario canvas selection. Mounted tests cover same-press blank panning with singleton/group selection and batched/split events.
Additional mounted evaluators use the actual Properties Name input to test passive Shift across focus, busy rebuilding, release and window loss. A saved spacing evaluator begins with an unrelated singleton, requires Begin on the first press without a replacement-selection packet, checks the complete expected project after the drag, and verifies one Undo/Redo. These are production widget-tree tests; busy rebuilding is not evidence of a child-state remount.
The next run at `a0a70340a625c16b1249d0beb71dca4fdd206636` passed 266 tests and failed two, with one ignored. All new mounted tests and the deletion fixture passed. One old direct reorder assertion still expected selection to preserve its gesture context; the test now requires a new epoch with the same view visit and captures a fresh reorder. The other failure exposed a real regression: unconditional retirement during reconciliation invalidated a newly scheduled reveal. Retirement now occurs at the App action boundary only when its complete context is unchanged and its selection snapshot changed. Navigation that already advanced the context retains its newly scheduled reveal. Independent review was updated to acknowledge the missed reveal path.
Run `selection-scenario-3` was intentionally interrupted because the parent started it before the formatter/commit command finished. `app.rs` changed after input capture; its closed result records exit 1 and `inputsUnchanged: false`, with no executable or executed tests. It is preserved in [the invalid-attempt archive](scenario-selection-evidence-20260924/invalid-attempt-3/manifest.json), excluded from accepted checks, and has no source-proof claim.
Corrective source `ca1f18e6b0d53814f0ff16261f810aef49281c26`: `selection-scenario-4` passed 268 tests, zero failed, one ignored; the complete menu filter passed 14 tests with none failed or ignored. Formatting passed. Each closed run retained unchanged 809-input captures, with an independent comparison to the exact Git blobs.
Strict lint then found a redundant `expect` following an `is_some` check. Final source `ed55b1781d86ec49af5d2588cbd06f7b878d9009` binds the same captured Context/Snapshot directly with `if let`. Independent review found no behavior change in either group press or background Clear. Strict lint, formatting, executable build and the final-source regression repeat all pass with exact input proofs.
UTC changed discontinuously during run 4, also observed by both prerelease peers. The raw timestamps are retained verbatim; its separately measured monotonic duration is 515.96 seconds. Do not calculate build duration or infer inactivity from the wall-clock difference. Source/stream/executable pins and process completion are independent of that clock change.
## Final-source verification
Windows toolchain: Cargo/Rust 1.98.1, `stable-x86_64-pc-windows-gnullvm`, LLVM-MinGW 20260826, clang 23.1; `CARGO_BUILD_JOBS=1`, `CARGO_INCREMENTAL=0`. Linux builds/checks remain excluded by the user's current prerelease instruction.
| Command | Receipt | Result |
| --- | --- | --- |
| `cargo clippy -p oa-desktop --all-targets --message-format=json -- -D warnings` | selection-lint-2 | Pass |
| `cargo fmt --all -- --check` | selection-format-3 | Pass |
| `cargo build -p oa-desktop --bin arcadia-studio --message-format=json` | selection-build-1 | Pass |
| `cargo test -p oa-desktop --bin arcadia-studio --message-format=json scenario -- --test-threads=1` | selection-scenario-5 | 268 passed, 0 failed, 1 ignored |
| `cargo test -p oa-desktop --bin arcadia-studio --message-format=json model_menu -- --test-threads=1` | selection-menu-2 | 14 passed, 0 failed, 0 ignored |
Filters overlap and must not be summed as unique tests. The ignored Scenario timing test is not a pass. These are scoped desktop checks, not a full workspace gate. Each final receipt captured unchanged inputs and was independently matched to all 809 exact Git-visible input blobs at `ed55b178`.
[Portable checks](scenario-selection-evidence-20260924/checks/README.md) contain 12 closed runs, three preserved ordinary failures, 12 source proofs and four distinct input capsules. The invalid changed-input attempt remains separate. Checks ZIP: 12,926,901 bytes, SHA256 `05d040e856d0b37adf44f6a9e3d2789d4d76c026e61e85fdfcab0e7bebca4dd4`. Run `python -B harness/scenario-selection-evidence-20260924/checks/verify.py`. The packaging self-check also passed archive equality, existing-output refusal and 11 corruption rejection cases; its local command output is not an archived raw gate. [Independent final audit](scenario-selection-evidence-20260924/reviews/final-checks.md) repeated all four input/Git comparisons and raw archive comparisons.
[Native Windows exercise](scenario-selection-evidence-20260924/native/README.md) records contextual group selection, primary inspection, whole-group refusal, same-press background clear/pan, stationary singleton collapse, first-press singleton spacing, exact saved-source comparisons and one Undo. Selection-only Save all preserves exact source bytes. The spacing edit changes only the expected saved A ordinate; Undo restores the entire original file. Representation navigation and a clean exit were also observed. Native Shift and other unexercised paths are explicitly separated from mounted test evidence. Run `python -B harness/scenario-selection-evidence-20260924/native/verify.py` for archived byte and source-delta checks.
The [independent native evidence review](scenario-selection-evidence-20260924/reviews/native-checks.md) verified all 99 original archive members, linked the build to the accepted Cargo package, compared the executable and fixture, repeated the full saved-file comparisons, and inspected the pan/collapse/spacing screenshot pairs. It found no material issue within this scope.
This delivers the selection adapter increment for review on its contribution branch. It remains outside frozen #37, does not complete #29, and does not claim integrated or published-release acceptance. Group movement/removal and their user-facing destination design remain next work.