From 5dece0542c164dfdf44330c03ee25685a0b20e79 Mon Sep 17 00:00:00 2001 From: Codex-ytr83r Date: Sat, 12 Sep 2026 20:27:58 -0700 Subject: [PATCH] Document bounded scenario renderer bridge and evaluators --- harness/scenario-renderer-bridge.md | 41 +++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 harness/scenario-renderer-bridge.md diff --git a/harness/scenario-renderer-bridge.md b/harness/scenario-renderer-bridge.md new file mode 100644 index 00000000..608d8cfd --- /dev/null +++ b/harness/scenario-renderer-bridge.md @@ -0,0 +1,41 @@ +# Scenario renderer bridge: bounded implementation and evaluators + +Status: proposed internal implementation slice, 2026-09-13. Reviewed the [frozen layout candidate aed07176](http://217.177.34.108:3000/sorokin.oleg.edu/ARCADIA-Studio/src/commit/aed07176ab453b981d5f9c76e504c531f6dd7f42/harness/scenario-layout-contract-candidate.md) and the complete-anchor experiment. Source symbols below refer to that pinned candidate unless stated otherwise. This note adds no renderer implementation or runtime evidence. The existing [Windows experiment receipt](experiments/behavior-anchor-plan-gates-20260913/README.md) records the separate 23-check result. + +## Contract versus proposal + +The selected storage direction uses a saved Diagram identity distinct from its Scenario owner, sparse Lifeline x and direct occurrence-address send-y values, finite shared coordinate bounds, and checked source/model history. Direct includes the Scenario's own nested Fragment/Branch sequences, but excludes expanded references. Missing endpoint assignments can leave authored coordinates latent. Opening, passive projection and zero motion must not materialize or rewrite coordinates. See the pinned [storage direction](http://217.177.34.108:3000/sorokin.oleg.edu/ARCADIA-Studio/src/commit/aed07176ab453b981d5f9c76e504c531f6dd7f42/harness/scenario-layout-design.md) and [candidate contract](http://217.177.34.108:3000/sorokin.oleg.edu/ARCADIA-Studio/src/commit/aed07176ab453b981d5f9c76e504c531f6dd7f42/harness/scenario-layout-contract-candidate.md) for status: public codec/version adoption and gesture policy are separate gates. + +The proposed bridge is a pure complete-plan resolver, not the experiment's thread-local hook. Build baseline anchors from the actual sequence layout, overlay authored lane centers before deriving headers/messages/lifecycle/activation, and overlay authored message send-y before dependent vertical geometry. Missing overrides retain automatic anchors. Normal inter-lifeline messages have receive-y = send-y; self messages preserve the current +24 receive offset. The legacy self Create/Delete row denotes receive-y, so convert explicitly at that adapter. Determine self identity from effective Lifeline endpoints, including Timer's implicit local receiver, never from equal x coordinates. + +These renderer offsets describe the existing bridge, not new schema fields or an independently adopted gesture policy. The bridge must not reorder semantic steps, reparent operands or silently clamp authored coordinates. Collision handling, source-order crossing behavior and the final release gesture remain unadopted. + +## Next narrow pure-resolver slice + +Implement an internal resolver accepting an immutable accepted Project and an explicit derived-or-saved Scenario representation. Return `Result>`; names are internal proposals. The successful plan contains resolved lane centers, separate message send/receive anchors, all automatic non-message anchors needed by the existing Scene, frame bounds, operand/sequence scopes, insertion slots, and full structural bounds with an origin. Preserve semantic IDs and sequence membership. Carry enough representation/owner identity to reject a mismatched caller; document/revision/visit freshness remains the consuming adapter's responsibility. + +Avoid a parallel renderer: extract/reuse the actual baseline layout calculations and feed the resolved data into the existing geometry builders. Do not retain ambient TLS or recursively build a Scene whose construction resolves itself. Do not expose partially updated geometry after a resolver error. Classify an unfinished message as latent rather than fabricating an arrow; its stored coordinate remains untouched. + +For the first resolver checkpoint, leave production workspace/gesture/navigation dispatch unchanged. Exercise the resolver and a narrow real-Scene construction adapter in tests. That checkpoint proves geometry integration only, not visible persisted editing. The adapter must cover the #21 activation contract below before its output can become production paint. Workspace/camera/usage wiring is the next explicit integration increment, sharing this plan rather than implementing another resolver. + +Proposed error presentation for that later increment: return named issues, then let the caller choose one complete automatic fallback scene and visibly report the unsupported authored layout. Do not mix authored arrows with automatic scopes/activations, erase saved overrides, or treat fallback coordinates as new authored intent. This fallback policy is proposed, not yet accepted product behavior. + +## Five integration seams and falsifiers + +| Seam | Concrete source fact and bounded requirement | Observable evaluator | +| --- | --- | --- | +| Frames, scopes and lifecycle feasibility | `behavior.rs::occurrences` derives frames/slots/scopes from the traversal cursor. `behavior/scenario_lifecycle/render.rs::Rendering::new` replaces the root scope with 85..height-20. The complete-plan experiment rejects nested353 because its operand would begin311 above enclosing frame332, and rejects Create50 because actual root lifecycle begins85. Resolve all dependent scopes and slots, preserving named unsupported outcomes; removing a cursor floor alone is insufficient. | Replay nested353 rejection, admitted380 overlap, Create50/85, and an early event positioned below the final traversal row. Compare real frame headers, insertion slots, lifecycle diagnostics and outlier bounds. Project and source remain exact. | +| Endpoint identity versus geometry | `behavior.rs::occurrences` compares endpoint x values; `behavior/scenario_lifecycle/render.rs::align_messages` independently compares sender x and receiver x. Both must use effective Lifeline identity. Equal-x distinct lanes do not become a self loop. A degenerate inter-lifeline arrow requires an explicit geometry issue/representation policy. | Distinct Lifelines at equal x, reversed lanes, genuine self, Timer without receiver, and both self/inter-lifeline Create/Delete. Assert endpoint coordinates, receive offsets and marker identities. | +| Mandatory #21 adapter | Current `behavior.rs::activation_sequence` starts from the call row, which denotes send for ordinary/self calls. The complete-plan self610/634 test explicitly excludes this activation defect. Coordinate with the #21 owner and the [aadc6396 typed-activation source](http://217.177.34.108:3000/sorokin.oleg.edu/ARCADIA-Studio/src/commit/aadc6396d39ff336d05381d58d545093d3f37a73/crates/oa-desktop/src/behavior.rs); consume finalized endpoints/scopes, construct lifecycle and align Create/Delete, then attach typed activation geometry while retaining death clipping and unresolved-call cues. Do not independently overwrite peer activation semantics. | Self Call send610/receive634 starts the actual activation at634. Move correlated Reply and receiver Delete separately; assert the full nonempty typed activation vector, logical correlation, clipped bounds and no resurrection. | +| Full bounds and representation camera | `behavior/scenario/workspace.rs::Presentation::fit_scale` consumes Size; Fit has a 0.05 floor. `workspace::view` keys viewport/camera by semantic owner. Later wiring must use rectangle origin for fit/centering and explicit saved representation identity. Million-unit gaps cannot fit through the existing floor. | Negative lanes -500/+900 and near-opposite coordinate bounds remain reachable; Fit includes headers/lifecycle geometry. Switching two saved views of one owner rejects prior viewport/camera envelopes even without an intermediate frame. | +| Paint, operation visibility and usage agreement | `behavior/scenario/usage.rs::diagram_usages` independently constructs an automatic Scene; usages use `Surface::Scenario(owner)` and reveal repeats that query. `label_field_visible` independently assumes 32-grapheme shortening. Later wiring must consume the selected representation's resolved geometry and the same measured displayed-prefix result as paint. | Two saved views yield distinct bounds; Choose revalidates the selected representation; fallback targets use actual fallback bounds; operation suffix membership agrees with paint at destination zoom. | + +Pinned source map: [Scene](http://217.177.34.108:3000/sorokin.oleg.edu/ARCADIA-Studio/src/commit/aed07176ab453b981d5f9c76e504c531f6dd7f42/crates/oa-desktop/src/behavior.rs), [lifecycle rendering](http://217.177.34.108:3000/sorokin.oleg.edu/ARCADIA-Studio/src/commit/aed07176ab453b981d5f9c76e504c531f6dd7f42/crates/oa-desktop/src/behavior/scenario_lifecycle/render.rs), [workspace camera](http://217.177.34.108:3000/sorokin.oleg.edu/ARCADIA-Studio/src/commit/aed07176ab453b981d5f9c76e504c531f6dd7f42/crates/oa-desktop/src/behavior/scenario/workspace.rs), and [usage/reveal](http://217.177.34.108:3000/sorokin.oleg.edu/ARCADIA-Studio/src/commit/aed07176ab453b981d5f9c76e504c531f6dd7f42/crates/oa-desktop/src/behavior/scenario/usage.rs). Relevant original line anchors at review: `behavior.rs` 1503-1529 and1704-1709; `behavior/scenario_lifecycle/render.rs`40-57 and113-150; `behavior/scenario/workspace.rs`47-100; `behavior/scenario/usage.rs`7-22 and155-201. Symbol references remain authoritative after edits. + +## Resolver checkpoint evidence + +Retain the experiment's independent numeric expectations and full Project/SourceBundle guards, replacing TLS lifetime checks with explicit plan isolation: resolving view A must not affect view B or an automatic view. Cover None, present-empty and explicit overrides equal to baseline, including signed zero, without model/source/revision/history changes. Include two views of one Scenario, repeated performer/exchange definitions under different appearance IDs, unfinished latent messages, negative x, wide gaps, nested operands, self Call/Reply and Create/Delete. Assert actual geometry, not only plan fields or nonempty counts. + +The existing 23-check experiment comprises thirteen complete-anchor checks plus ten earlier floor/lifetime checks. See the [complete-plan module](experiments/behavior-anchor-plan-20260912/mod.rs), [numeric tests](experiments/behavior-anchor-plan-20260912/tests.rs), [prepared rationale](experiments/behavior-anchor-plan-20260912/README.md), and adjacent [floor/lifetime experiment](experiments/behavior-layout-scene-20260912/README.md). Its frame padding/nonshrinking bounds are experimental preferences, not adopted constraints. It does not establish horizontal layout, saved-view camera behavior, measured operation visibility or the #21 typed activation union. The [execution receipt](experiments/behavior-anchor-plan-gates-20260913/README.md) reports 23 passed, zero failed/ignored against 4b782a71, with unchanged 574-input manifests. The prepared README's pending-execution wording is historical; that result does not establish this proposed resolver or the later typed-activation union. + +No schema extension is required by this resolver proposal. No gesture/navigation rewrite, semantic reordering policy, expanded-reference editing or native acceptance is claimed by the pure-resolver checkpoint. The integration owner coordinates implementation and publication; #21 activation ownership remains an explicit dependency. Pinned peer source is a compatibility input, not evidence that this bridge has been integrated or accepted.