Files
ARCADIA-Studio/harness/experiments/behavior-layout-scene-20260912/README.md
T

10 KiB

Actual Scene anchor experiment — pending execution

2026-09-12. Prepared by delegated reviewer /root/diagram_usage_workflows in branch codex/diagram-coverage-fixes-ytr83r-20260912, inspected base f23615ffebdc3ca6872f98b6889ec49bb4e8abda plus root's ongoing correction work. Only this experiment directory was authored. Root applied the test-only wiring on isolated branch codex/behavior-layout-scene-ytr83r-20260912, based on 46b4f3c0d0f04050ad6d705051ee0199138e47a2. Not compiled or executed. Root owns the build checkpoint. No production schema choice, native acceptance or fix is claimed.

Question and candidates

Can a minimal presentation input feed the actual current desktop Scene before it constructs rows, message polylines, nested frames and lifecycle geometry, while preserving the semantic Project and occurrence identities? Does explicit pointer intent preserve latent authored values on zero motion?

The candidate is an occurrence-ID-to-desired-row map. A tiny test-only hook raises the current Scene cursor to a requested row before recording an occurrence. This deliberately retains the existing renderer's next-row floor: it is a downward spacing adapter, not a general absolute-coordinate projector. The competing gap policy remains meaningful but is not implemented here: this experiment first tests the proposed real-Scene integration boundary. It cannot select a production storage schema.

Rejected experimental shortcuts: a standalone rectangle model would not test Scene; translating final polylines after rendering would bypass dependent frames/lifecycle; extracting the whole renderer would exceed the uncertainty being tested. This adapter uses the existing code that actually generates all those representations.

Files and exact root wiring

  • fixture.arcadia: hand-authored current source with explicit UUIDs, two occurrences sharing one communication mean, a fragment containing an operand/action box, and a self-call/reply. The self messages intentionally have unassigned global exchanges: current global relation validation rejects a self edge. Their explicit lifelines permit rendering; incomplete-exchange warnings are expected, semantic errors are not.
  • mod.rs: private child tests of behavior, a scoped thread-local anchor adapter, pointer-delta candidate operation, and independent numerical checks against actual Scene outputs.
  • wiring.patch: proposed two-site test-only wiring in crates/oa-desktop/src/behavior.rs. It adds the child module and calls resolve_row_anchor(*id, y) immediately before the if ordered block that records rows/slots in Scene::occurrences, after any self lifecycle clearance. The relative module path is from crates/oa-desktop/src. The line numbers are informational; verify the context against the exact integration version.

On the isolated wired branch, run:

cargo test -p oa-desktop behavior_layout_scene_experiment -- --nocapture

Use the project's configured Windows compiler/linker environment. No dependency, Cargo target or main-function changes are needed. The hook is compiled only under cfg(test), inactive unless the current thread installs an AnchorScope, and restored by Drop after normal return or unwind. A test checks that another thread does not inherit the anchor map and that an intentional panic restores the baseline. Do not catch or reinterpret that expected panic output as a product crash; its test must still pass.

The isolated branch already contains this wiring; wiring.patch records its reviewable delta and must not be applied twice. If a compiler/parser assertion fails, preserve the failure, identify the exact reviewed source version, and correct the fixture or adapter at this boundary. Do not weaken independent geometric assertions solely to make the test green. Never claim a passing test from the existence of these files.

Independent evaluators

The baseline is the actual Scene::sequence with no installed anchors. The hand-derived expected row coordinates are first148, second240, fragment332, nested action477, self-call636 and self-reply728. These follow the current seed metrics (message92, fragment header55, operand90, action95, trailing fragment64) and are observable implementation oracles, not proposed permanent UX rules. The nested box top is457; fragment height240; self-call endpoint y values are636 and660. Line identities and endpoints are asserted independently, not just compared between two calls to the same projector.

Tests cover:

  1. Actual oa_core::language::parse and canonical format/reparse Project equality; baseline actual Scene equality after semantic source round trip; repeated exchange references retain distinct line UUIDs.
  2. Move only second delivery by40: its row becomes280, first stays148, nested action becomes517, fragment translates with unchanged height240, and self-call/reply geometry moves by40 with unchanged x and identity. Whole Project and canonical semantic source remain equal.
  3. Move the nested action by30: actual fragment grows from240 to270 while its top remains332; later self-call shifts. Move that self-call by18 and assert actual send/receive y684/708 and reply776; the nested box remains unchanged.
  4. Move first by200: second is visibly displaced to440 while its authored desired value stays240. Zero pointer delta returns the exact original candidate. Moving first back restores second240. Explicitly assigning second.desired=440 before moving first back deliberately preserves440 instead, exposing the distinction between pointer no-op and explicit latent-intent change.
  5. Reorder the repeated occurrences in actual source and parse it; the override stays attached to the second occurrence UUID. Its row is280 and the first follows at372. Projection does not write back any semantic model change.
  6. Scope restoration on panic and isolation from other test threads.
  7. Explicit upward-drag counterexample: the requested y200 remains rendered at240 under the current floor.

Model equality compares the entire Project. Scene equality checks rows, scopes, size, lanes, lifecycle, open calls, lines/labels, boxes and insertion slots; it does not invoke GPU painting. Explicit UUIDs are necessary because parsing declarations without IDs allocates new identities, which would make separate source parses unsuitable for occurrence-address comparison.

Limits and next decision

This is real parser/Scene construction evidence only after it runs. Layout maps remain external experimental data; source round trips cover the semantic Project, not persisted layout. No new parser syntax, Document transaction, REST operation, undo stack, dirty-source workflow, route bend, text measurement, native gesture, inspector, resize, or performance result is established.

The current floor retains automatic whitespace and cannot establish all feasible free positions, upward drag, independent frame resize, gap-policy superiority or minimal displacement. Its limitation is useful evidence: if feeding requested anchors into the existing cursor still feels rigid, a real constraint/inverse policy is required, not more seed spacing. The next bounded choice is a declared anchor/constraint policy, then one typed layout record through source/Document/REST; broad renderer extraction is not justified by this probe.

Self-call send/receive assertions intentionally follow the actual current polyline contract. They do not assert activation correctness or substitute for peer #21's work. Activation boxes are generated by the real existing Scene/lifecycle path, and source roundtrip equality includes them, but that is not an independent oracle for nested activation start/depth/paint order. The fixture does not cover delayed creation/deletion, parallel operands, nested calls, cross-operand semantic moves, hidden views, copy/delete/reidentify lifecycle, or large models. Coordinate any later anchor contract with #16/#21 owners and retain these gaps in published evidence.

Root should publish this directory and the exact wired code/test result together for remote peer review. Independent machines cannot consume workspace-local links.

Root source review before execution

The panic-restoration evaluator originally accepted any panic inside its scope, so an earlier failed geometry/thread assertion could have looked like successful deliberate unwinding. Root corrected it to require the exact deliberate panic payload. Moved message polylines now also require equal point counts before zipped endpoint comparisons. These are evaluator corrections; execution remains pending.

Independent bounded review confirmed hook placement, fixture assumptions and the hand-derived coordinates without executing them. Its coverage caveat prompted adding box marker metadata and insertion-slot labels to equality comparisons. Transient selection, camera and interaction state are not part of this geometry comparison. No material source finding remains from that review; compiler/runtime evidence is still required.

Peer activation integration boundary

A read-only check of peer source 8112dea7a371755c7373f4ecc09a6488a73ac136 found that the pre-row hook remains upstream of typed activation construction and final message anchoring. That anchoring preserves generated y coordinates. Its column-zero self-call changes x from the old lane/lane+75/lane+75/lane path to lane/lane+66/lane+66/lane+6; receive y remains660 in this fixture, and the activation begins there rather than at send y636.

The peer branch and this branch have different lifetime integration states. This branch has production lifetime rendering, message alignment, self-lifecycle clearance and alive_spans clipping. In the peer checkpoint, scenario_lifecycle is cfg(test)-only and typed activation_segment emits an unclipped span. A future union must retain the lifetime behavior and reconcile duplicate activation methods; copying either whole Scene implementation is insufficient. Compare both lifecycle geometry and typed segment identity/rectangle/column/finish, and verify delayed Create/Delete inside and outside operands. Do not remove the existing lifecycle comparison to make the peer version compile. A segment clipped before its semantic reply must not falsely claim a visible reply termination. No peer code has been merged by this experiment.

Shared integration finding and peer activation source. This is source compatibility evidence, not runtime acceptance.