16 KiB
Complete anchor plan into actual Scene — pending execution
Prepared 2026-09-12 in isolated branch codex/behavior-anchor-plan-ytr83r-20260912, base 66a1f1690f778c8814bfefff7f46fe7f6bbe520e. Parent owns compilation and publication. Not compiled or executed. Only test-only additions to crates/oa-desktop/src/behavior.rs and this new directory were authored. The existing floor experiment and its fixtures are unchanged. All new production-file statements are guarded by cfg(test); normal production rendering is unchanged.
Bounded question
Can a complete ephemeral anchor plan drive the actual Scene at exact requested y coordinates without the old running-cursor floor, preserve unspecified anchors and the entire Document, and maintain covered extents and real lifecycle derivation? This isolates the integration seam from the unresolved choice of a product movement policy.
The old floor candidate imposed existing seed increments on every requested row. This candidate seeds missing anchors from the actual baseline Scene, then replaces explicitly requested coordinates exactly. It does not impose sequence-order constraints or overlap spacing. Source-order crossings are returned as diagnostic data, not silently clamped or converted into semantic Reorder. This is a mechanical projection experiment, not evidence that crossed vertical ordering is acceptable UX.
Candidate is an external map keyed by occurrence UUID. Plan is a complete resolved input for the currently visible Scene, including operand headers missing from the ordinary rows map. It contains row roles, derived message send/receive y values, frame bounds, sequence extents and canvas height. It is not a model, parser or REST payload.
Actual code boundary and wiring
wiring.patch records the exact production-file delta from the base commit. The five new cfg(test) integration points are:
- Include this module as a private child of
behavior, next to the unchanged floor module. - Immediately after the old floor hook, consume the complete plan's exact occurrence anchor, before Scene records rows and constructs the occurrence's existing geometry.
- Before inserting an existing fragment BoxItem, use the plan's frame bounds. Existing fragment paint and label code remain in place.
- Immediately after recording a sequence's bounds, substitute planned bounds and update the existing final insertion axis. An earlier event placed lower than the last event cannot truncate the scope merely because traversal ends earlier.
- Before current lifecycle and activation construction, substitute the covered canvas height. Current
Rendering::new, message alignment, activation generation and drawing remain responsible for their actual geometry.
The plan is scoped per thread, inactive by default, restored by Drop during unwinding, and has a deliberate-panic test requiring the exact sentinel payload. Other tests on other threads cannot consume its plan. The original floor hooks remain operational when their own scope is active; the new plan is otherwise absent.
Footprints are measured from the actual baseline named boxes, message polylines and label bounds, translated by requested row deltas. This avoids cloning the renderer's line or lifecycle algorithms. Empty activation bars are excluded because the real renderer derives those later. Frames conservatively preserve seed extents and can grow downward; growth adds an explicitly experimental 20px presentation margin. A move requiring upward frame growth returns FixedFrameHeaderWouldMove, because the candidate cannot move an unspecified painted header while retaining its FrameStart and insertion slot. Mere overlap inside the existing frame is not categorically rejected. Sequence bounds preserve seed extents and measured edge padding while expanding to cover outliers; canvas height uses the original scope-to-canvas margin. Neither these margins nor nonshrinking seed extents are adopted user requirements. This is not a general container-resize solver.
Independently expected checks
Thirteen new test functions use the existing hand-authored fixtures through the actual parser and Document bundle loader. Numeric expectations below are independently stated rather than generated from the new planner:
| Case | Expected actual Scene result |
|---|---|
| Empty complete plan, both fixtures | Same rows, named boxes and marker kinds, lines and labels, scopes, slots, lifecycle, open calls and size as the unmodified baseline Scene |
| Second delivery240→200 | First148; second200; every other occurrence anchor unchanged; both second-message endpoints200; repeated exchange references retain different occurrence IDs |
| Nested action477→457 | Box top437, height70; actual fragment metadata and active header332..370 retained, header hit still resolves the fragment, before-slot290 and label unchanged; operand bounds and all other anchors unchanged |
| Nested action→300 | Proposed footprint280..350 would relocate unspecified frame top332 to260; reject with FixedFrameHeaderWouldMove before rendering |
| Nested action→353 / admitted380 overlap | Proposed353 gives footprint333 and operand start311, outside fragment start332; reject with OperandScopeOutsideEnclosingInterval. At380 the box starts360 and overlaps the fixed header while scope338..530 stays feasible; actual lifecycle diagnostics remain empty, post-fragment alive span530..845 and later self-call bars remain unchanged |
| Create243→50 or84 | Reject with LifecycleAnchorOutsideRenderScope; actual root lifecycle span starts85 even when insertion-scope planning expands higher. At85 the real birth marker and alive span85..427 remain present |
| Death427→380 | Create243 and call335 stay fixed; real alive span243..380; actual bar335..380; death marker/hit moves to380; unresolved-call cue remains, no Reply is invented |
| Self-call636→610 | Actual send610/receive634, using the current24 offset; reply728 unchanged; MessageSend role distinguished from the lifecycle MessageReceive role |
| Signed zero and candidate restoration | Both0 and-0 return the exact original sparse candidate; no first-edit materialization; restoring the original candidate restores Scene geometry |
| First event→1000, last remains728 | First1000/second240, SourceOrderCrossing diagnostic, source order unchanged; root scope end1026 and height1113 cover the earlier outlier rather than the traversal tail |
| Nested action→1000 | Box top980/bottom1050; enclosing frame bottom1070; actual root scope/canvas cover it; following self-call636 remains fixed and overlap is diagnosed |
| Invalid/unsupported input | Unknown anchor, nonfinite y, compound frame movement and same-scope inverted birth/death fail explicitly |
| Scoped execution | Another thread sees baseline geometry; a deliberate panic restores the baseline scope |
The primary cases compare the entire Project and original SourceBundle and require the real Document to remain clean with no Undo/Redo entry. Canonical parser roundtrip is used, but it covers only the semantic Project: layout stays external. Candidate restoration is a reversible-sidecar check, not a production Undo implementation. No command has been added to Document.
Explicit limitations and falsifiers
- Crossing source-ordered events is deliberately drawable with diagnostics. That proves removal of the mechanical floor, not adoption of unrestricted vertical notation. The crossing output remains an independent product-policy falsifier.
- An expanded frame can overlap the next event. Its diagnostic preserves that evidence instead of shifting the next event implicitly. The experiment does not establish a frame/header constraint policy or all feasible layouts.
- Upward growth that would relocate an unspecified frame header is explicitly unsupported. This does not ban arbitrary overlap gaps; the numeric380 example remains admitted. Full compound/header movement policy remains unresolved.
- A proposed operand interval escaping its actual enclosing fragment/caller interval returns
OperandScopeOutsideEnclosingInterval. The353 example would otherwise cause the real lifecycle traversal to report MissingGeometry and make the later lifetime unresolved, potentially suppressing a self-call bar despite stable row coordinates. No generic gap or sibling-order rule is added. General nested/cross-operand placement remains unproven. - Lifecycle receive anchors must be within the actual effective Rendering scope: root85..height-20, or its recorded non-root scope with the renderer's existing empty-scope allowance. Outside coordinates are rejected before exposing a Scene whose row exists but whose marker/lifetime is missing. This bounds the inspected bridge; it does not establish general ancestor/operand ordering or cross-operand lifetime support.
- The same-scope creation-after-deletion case returns
LifetimeInversionNotSupportedbefore rendering. Current lifecycle intervals cannot truthfully depict that inversion without another representation policy. This is an experimental bridge limitation, not permission to reject semantically valid models or a user-approved global movement rule. Cross-operand lifecycle combinations remain unproven. - Compound frame/operand movement, box resizing, horizontal layout, independent send/receive movement, route editing, drag transaction stamps, pointer capture, dirty-source recovery, persistence, REST and native UI are not implemented.
- Self-call send and receive roles are explicit, but the current activation engine still owns its existing row-based behavior. Peer #21's typed activation integration must consume the actual receive anchor and retain the existing lifetime clipping. These tests do not silently bless the old activation-start discrepancy.
- Scope/containment walking is deliberately straightforward and not a large-model performance implementation. There is no responsiveness claim.
- Some self-message fixture exchanges are unassigned because the current global relation model forbids self edges. The existing fixture's known incomplete-model warnings remain; tests reject semantic errors.
No storage or parser design should be adopted from this adapter. Coordinate any eventual payload with prospective #7, whose required addressing must preserve diagram/owner/occurrence identity and explicit anchor roles. Coordinate inverse resize with #16 and typed activation/lifetime union with #21 before broad UI work.
The accumulating frame, scope and lifecycle dependencies show that this is only a bridge for demonstrated feasible positions, not an adoptable free-editing architecture. It neither establishes unrestricted placement nor selects a semantic constraint policy. Further fundamental contradictions should become explicit falsifiers for parent replanning, not an expanding list of speculative guards in this prototype.
Parent reports peer #21 comment716, posted2026-09-12 23:06UTC: Codex-956atf owns an isolated typed-activation/lifecycle source union. Its intended order is finalized rows/height, lifecycle construction and Create/Delete alignment, then typed Call/Reply attachment, with receiver/scope clipping, logical reply timing distinct from clipped geometry, no resurrection after Delete, and unanswered-call cues preserved. That WIP is not integrated here. Retain the explicit send/receive seam and review the future union against these fixtures; this paragraph records a coordination dependency, not verified acceptance of peer code.
Reproduction and handoff
At the parent's chosen compiler checkpoint, use the configured Windows Rust/linker environment:
cargo test -p oa-desktop --bin arcadia-studio --locked --offline -- behavior_layout_scene_experiment behavior_anchor_plan_experiment --list
cargo test -p oa-desktop --bin arcadia-studio --locked --offline -- behavior_layout_scene_experiment behavior_anchor_plan_experiment --nocapture
The listing must contain thirteen complete-anchor tests and ten existing floor/lifetime tests. The following execution must report all23 passed,0 failed,0 ignored. Both filter strings are passed to the same test binary. Preserve compile failures, parser failures, numeric mismatches and diagnostics as results. Do not claim success from a zero-test filtered run or from compiling only production targets. An intentional panic should be followed by its restoration test passing; another panic payload is a failure.
Static review correction history
The frozen attempt1 candidate was preserved before these corrections. The authoritative attempt1 archive preserves all five original files; the adjacent review report records the source-verified counterexamples. The pre-review failures are static, unexecuted findings: nested300 silently moved the frame header to260 while row332/slot290 stayed fixed, and Create50 was omitted as MissingGeometry by the actual root lifetime span starting85. The corrected candidate adds named unsupported errors and independent numeric checks rather than recording either original behavior as acceptance. Production hooks and the original floor experiment remain unchanged.
Before the third correction, parent preserved all five attempt2 files and matching hashes under harness/experiments/behavior-anchor-plan-review-20260912/attempt2. That static, unexecuted candidate still admitted nested353: its operand start311 preceded enclosing fragment332, causing MissingGeometry/Unresolved in the actual lifecycle source path. The third correction rejects that exact unsupported scope escape and replaces the positive overlap example with380, including actual lifecycle diagnostics, post-fragment spans and activation-bar preservation checks. The parent-owned review archive is not modified by this experiment.
Record exact compiled commit/uncommitted patch, commands and results before publication. Source hashes supplied with the handoff identify prepared bytes, not tested code. Root should publish the complete directory and exact behavior.rs delta so remote peers can reproduce it; workspace-local paths are not remote handoffs.
Modeling intent: primary-source comparison
The Sirius sequence user guide explicitly ties displayed event order to semantic order: moving an event across another can update the model. It separately describes horizontal lifeline movement, Create/Delete attachment and blank-space gestures. This is framework evidence; the exact Capella modifier, feedback and saved-file effects were not verified natively.
The Sirius event-reorder specification provides separate predecessor information for start/send and finish/receive, including coupled synchronous-message movement. That supports preserving distinct endpoint roles; it does not specify a separate user-selected reorder mode.
Root inference: the user request for intuitive whole-arrow movement does not by itself require arbitrary cosmetic chronology crossing. Compare two coherent product gestures: presentation movement within semantic order plus an explicit reorder action, versus direct dragging that previews and commits a semantic reorder when crossing an event. Evaluate ordinary spacing, intentional order changes, accidental crossing, invalid call/reply/lifetime moves, cross-operand moves, discoverability, one-step Undo and exact preview/reopen behavior. A semantic reorder may change Project/source; presentation-only adjustment must retain semantic content. The current sidecar experiment tests the latter boundary and is not a universal nonmutation requirement for all future drag operations. No gesture or public schema is selected by this note.
Root formatting completed for the new Rust modules. Independent correction review found no new blocking source finding after the operand-scope repair, including non-vacuous actual lifetime/bar assertions. Compiler and runtime results remain pending. Prepared input hashes bind the current candidate, not an accepted build.