Files
ARCADIA-Studio/harness/allocation-arrange-planner-20260923.md
T

137 lines
8.4 KiB
Markdown

# Allocation Arrange policy and pure planner — 2026-09-23
Codex-9e8r6t contribution to [issue 29](http://217.177.34.108:3000/sorokin.oleg.edu/ARCADIA-Studio/issues/29), above Process delivery `6d99aacab8ca1a91c857a2179baa14d80a2901e9`.
**Pure planner verified; App integration and native acceptance remain open.**
This is not a release or full Allocation/multiselect completion claim.
## Result and decision
The [accepted amendment](allocation-arrange-amendment-20260923.md) defines explicit
Arrange for one or more work/performer placements. It preserves engineering
records and moves one union: semantic descendants of explicitly selected work
plus accepted visual descendants of explicitly selected performers. It does not
acquire incidental semantic parents or siblings. Ordinary assignment retains its
existing per-root responsibility and coherence rules.
The experiment compared strict refusal, visible-selected-only movement and this
combined footprint. Strict refusal discarded valid semantics-preserving layouts;
visible-only movement omitted hidden/semantic descendants. Actual OA/SA examples
support the bounded union policy, subject to complete geometry checks. There is
no automatic packing, convergence, semantic reparenting or target unfolding.
Both visible and required diagnostic scenes check **all** unrelated card pairs.
An unselected performer's derived enclosure can grow into an obstacle even when
none of the moved cards touches it. Diagnostics unfold affected placements and
their required visual ancestors; unrelated stationary folded interiors remain
outside that domain. The experiment explicitly distinguishes this policy from
universal unfolding. Future expansion can reveal overlap.
At source **9b83f7ca0dcd34056765b9399863a21da72c3a9f**,
[`arrange.rs`](../crates/oa-desktop/src/allocation_drag/arrange.rs) implements
immutable capture/place/finish, exact original placement identities, one snapped
anchor delta, route translation using actual accepted endpoint owners, combined
projection, every selected header, stale/tamper rejection and an exact final
Project comparison. Motion reuses the semantic index and captured footprint;
it does not clone/validate a Project per pointer position. Pairwise collision
cost remains real; no large-scene latency benchmark is claimed.
The planner's ID map is deliberately not an input capability. App must validate
the entire original typed selection before conversion, retaining its exact
snapshot/generation and clean-owner lifetime. The new module is not yet connected
to App; its temporary dead-code annotation states that boundary. The only change
to singleton capture extracts its already-validated fact collector; ordinary
singleton policy is unchanged.
## Exact verification
All twelve closed runs are preserved in the [portable evidence](allocation-arrange-evidence-20260923/checks/README.md).
Every run reports unchanged captured inputs, including all 71 patched Iced files.
Recorded compile failures remain failures. Historical HEAD alone does not identify
uncommitted captured inputs; named source proofs compare the complete relevant
Git inventory and every blob byte with the captured map.
| Gates | Observed result | Exact source |
| --- | --- | --- |
| experiment-1 | 2 OA experiment tests pass | 743 blobs at `3a7923b96d671041cbc747a614cbd0fad6b6b3d3` |
| experiment-2 | Compile failure: imported module resolved desktop-wide tests | Captured capsule retained; no named-commit proof |
| experiment-3 | Four OA/SA experiment families pass, 57 filtered | 744 blobs at `8dbbaf262e3b8d26a32d6c30f0cc5f963fab47a0` |
| planner-document-1 | All 61 planner/Document module tests pass | Same `8dbbaf2` bytes |
| probe-lint-1 / format-1 | Strict scoped Clippy and workspace format pass | Same `8dbbaf2` bytes |
| arrange-planner-1 / -2 | Compile failures: missing explicit module path, then test temporary-array borrow | Both exact capsules retained |
| arrange-planner-3 | 67 tests pass, 2.44s | Earlier captured planner/tests; not labelled as `8dbbaf2` |
| arrange-planner-4 | **70 tests pass**, 2.77s | 746 blobs at `9b83f7ca0dcd34056765b9399863a21da72c3a9f` |
| arrange-lint-1 / arrange-format-1 | Strict scoped Clippy and workspace format pass | Same `9b83f7c` bytes |
The final input-map SHA-256 is
`c8192fd84fba63fa576975e9fd44f0fa2d6c8ed2e6b5ada3fd4bee076d36f686`.
The 70 include nine new Arrange test families and the existing 61 module tests.
Literal full-Project oracles check engineering records, sizes/folds, other views,
internal and one-ended saved routes. Actual Document execution checks compiled
source, reopen and one exact Undo/Redo. Further cases exercise either selected
anchor, parent/child deduplication, role-only work, unplaced leaves, simultaneous
vacated-space movement, preexisting-overlap preservation versus growth, hidden
collision versus unselected enclosure growth, no-op, stale/tampered results and
all selected headers. These are pure/source checks, not native gesture evidence.
The first experiment's untouched fresh-Document assertion was not atomic refusal
evidence; the successor removed that overstatement. Independent review also
corrected SA oracle literals before execution: FunctionalExchange auto-ports
raise projected work height from OA 94 to SA 132, enclosure height 218 to 256,
and the hidden overlap area 13696 to 20116. Production sizing was not changed to
fit an oracle.
## Independent review and remaining checks
[Preserved reviews](allocation-arrange-evidence-20260923/reviews/README.md) record
policy criticism, the SA oracle finding, the selection boundary and fresh planner
review. No concrete planner defect was found. Review R1/R2 led to independent
collision-cause discriminators, a singleton-refuses/combined-passes vacated-space
case, and unchanged-overlap versus enlargement controls. The final planner
production bytes are unchanged from the reviewed 67-test capture; only
`arrange_tests.rs` differs in the 70-test capture.
Deeper nested folded ancestry, explicit endpoint attachment fixtures and broader
tamper/non-grid cases remain protective P3 coverage suggestions, not reproduced
defects or completed checks. App must retain minimum readable text scale; the
pure planner validates world-space header containment and finite positive zoom.
App integration must still prove exact whole typed-set admission, deferred
selected-member click collapse, an irreversible drag threshold, one-shot Arrange
on both performer/work anchors, dirty/source-failure preservation, stale selection
generation, cancellation, frozen geometry and truthful preview/counts. Ordinary
work-only group assignment needs its own combined semantic candidate. OA/SA native
workflows, actual Save/reopen, Scenario group operations and aggregate deletion
remain open. Existing Process routing overlap is not solved here. Linux/WSL
verification remains user-paused.
## Reproduction and portable records
Verified on Windows x86_64 gnullvm, Rust/Cargo 1.98.1, LLVM-MinGW20260826,
one build job and incremental compilation disabled. Initialize the documented
project toolchain/DLL environment before invoking Cargo. From the named source:
```powershell
$env:CARGO_BUILD_JOBS='1'
$env:CARGO_INCREMENTAL='0'
cargo test -p oa-desktop --example allocation_policy_probe --message-format=json -- --test-threads=1
cargo clippy -p oa-desktop --example allocation_policy_probe --tests --message-format=json -- -D warnings
cargo fmt --all -- --check
python -B harness/allocation-arrange-evidence-20260923/checks/verify.py
```
The focused example imports the actual planner and Document modules. It does not
replace desktop/App/native acceptance. The initial full desktop experiment
reported 30m42s compile time; the focused successor reported 7.11s. This useful
iteration improvement is not a controlled benchmark: target graphs, warm artifacts
and machine state differ.
The package retains twelve runs, three compile failures, eight named source
proofs, 95 logical files in 85 stored members and seven deduplicated source
capsule pairs. Offline verification checks exact inventories, pins, streams,
receipts, source capsule contents and proof relationships; it does not execute
archived code, independently authenticate logs or repeat Git comparisons.
The packager's corruption checks rejected eleven changed relationships and an
attempt to overwrite an existing output. Root verified all eleven exact staged
evidence files in a fresh export: the portable checks verifier and every review
archive/member pin passed without consulting working-copy evidence bytes.