Record measured label boundary for saved Scenario workspace

This commit is contained in:
2026-09-12 21:57:09 -07:00
parent 4c789e6cfa
commit 75d4c39bd7
5 changed files with 62 additions and 3 deletions
@@ -1 +1,2 @@
* -text -whitespace
measured-label-integration.md -text
@@ -1,10 +1,12 @@
# Saved Scenario workspace preparation — 2026-09-13
Read-only preparation for the next workspace increment, based on frozen [renderer68a81c3](http://217.177.34.108:3000/sorokin.oleg.edu/ARCADIA-Studio/commit/68a81c3f50d846e34cae96090979543878514c1e) and the [selected display policy at920b718](http://217.177.34.108:3000/sorokin.oleg.edu/ARCADIA-Studio/src/commit/920b718f62c20ba3c58f664dae3c5ec6b0e65ce6/harness/scenario-renderer-bridge.md#next-display-policy). Neither note implements or executes the proposed integration.
Read-only preparation for the next workspace increment, based on frozen [renderer68a81c3](http://217.177.34.108:3000/sorokin.oleg.edu/ARCADIA-Studio/commit/68a81c3f50d846e34cae96090979543878514c1e) and the [selected display policy at920b718](http://217.177.34.108:3000/sorokin.oleg.edu/ARCADIA-Studio/src/commit/920b718f62c20ba3c58f664dae3c5ec6b0e65ce6/harness/scenario-renderer-bridge.md#next-display-policy). These notes do not implement or execute the proposed integration.
- [Acceptance matrix](acceptance.md): actual Scene/Project/source/history guards, saved-view isolation, fallback/error behavior, full-origin Fit and zoom controls, deferred reveal, held events and a later native workflow.
- [Independent identity critique](identity-review.md): verified entry, context, active-diagram, Back, semantic-form and usage/reveal call paths; Page::Behavior remains the simplest route provided representation and semantic ownership stay distinct.
[Manifest](manifest.json) binds the two original notes by exact byte count and SHA256. Both archives preserve original bytes and line references; source references mean68a81c3 unless stated otherwise. Their historical planning language is not execution evidence, and any referenced prospective test count requires its own actual gate receipt. Original notes are preserved with `-text` attributes.
- [Measured-label integration boundary](measured-label-integration.md): current long-label limitation, the structural bounds/measurement cycle, and unresolved destination-scale and corridor decisions for a separately gated increment.
[Manifest](manifest.json) binds the three original notes by exact byte count and SHA256. The archived notes preserve original bytes and line references; source references mean68a81c3 unless stated otherwise. Their historical planning language is not execution evidence, and any referenced prospective test count requires its own actual gate receipt. Original notes are preserved with `-text` attributes.
The [bridge note](../../scenario-renderer-bridge.md#next-display-policy) holds the selected next-display policy and its short implementation constraints. This archive adds preparation evidence, not a new schema, gesture policy, feature completion or runtime acceptance claim.
@@ -16,6 +16,13 @@
"bytes": 9862,
"sha256": "9b3d17e0442db2c99a36188bf5ba36095bba7e8cd2e38c61e79eb81f7d0ba466",
"exact_original_bytes": true
},
{
"original_name": "scenario-measured-label-integration-20260913.md",
"archived_path": "measured-label-integration.md",
"bytes": 8526,
"sha256": "6ef8a10bca8707c1dd805198a1a53d23194ffb7574e02ca2a2a2d50bfdd9db3c",
"exact_original_bytes": true
}
]
}
}
@@ -0,0 +1,47 @@
# Measured Scenario labels: next integration seam
Read-only findings against `68a81c3f50d846e34cae96090979543878514c1e`, 2026-09-13. The parent selected this sequencing: preserve existing short32 paint/usage agreement during the saved-workspace identity increment; explicitly retain the long-label and heuristic-band limitation. Integrate measured labels in a separate gate using actual Scene geometry, corridor policy and destination measurement context. This note adds no implementation or acceptance claim.
## Current contract and smallest coherent change
Widening saved lanes alone cannot reveal long names. Production [behavior.rs](http://217.177.34.108:3000/sorokin.oleg.edu/ARCADIA-Studio/src/commit/68a81c3f50d846e34cae96090979543878514c1e/crates/oa-desktop/src/behavior.rs) still caps `Line::label_bounds` at 225 (line 1164), duplicates the heuristic for hit-testing (1773) and backplates (2113), and paints `short(&l.label, 32)` (2204). [scenario/usage.rs](http://217.177.34.108:3000/sorokin.oleg.edu/ARCADIA-Studio/src/commit/68a81c3f50d846e34cae96090979543878514c1e/crates/oa-desktop/src/behavior/scenario/usage.rs) independently models that 32-grapheme policy at 7-22 and derives operation-field visibility at 94-137.
The smallest coherent measured integration is a label preparation pass on the actual resolved Scene, after lifecycle/activation endpoint alignment and after selecting the actual camera scale. Each labelled occurrence needs one prepared artifact: displayed text, original-source field spans, text position, backplate/hit rectangle and measurement context. Paint, hit-testing and operation usage must consume it. Replace every heuristic copy together; preserve exact-call operation resolution for Replies and existing arrow/activation hit precedence. A label hit rectangle must not steal an adjacent activation's exposed shoulder.
**Do not introduce a geometry → Fit → measurement → geometry cycle.** [scenario_layout.rs](http://217.177.34.108:3000/sorokin.oleg.edu/ARCADIA-Studio/src/commit/68a81c3f50d846e34cae96090979543878514c1e/crates/oa-desktop/src/behavior/scenario_layout.rs) consumes `label_bounds()` for footprints at 146 and final bounds at 794. Replacing that method with zoom-dependent text measurements inside structural planning would make camera and geometry depend on each other. Define finite structural label bands first and require prepared text/backplates to remain inside them. Structural scope and camera bounds must not depend on the currently truncated string. A self-label band that extends content bounds must contribute its finite structural extent before Fit. Oversized vertical metrics need an explicit outcome; do not silently redesign row heights in this slice.
## Available primitives and their limits
The unwired [scenario_label.rs](http://217.177.34.108:3000/sorokin.oleg.edu/ARCADIA-Studio/src/commit/68a81c3f50d846e34cae96090979543878514c1e/crates/oa-desktop/src/behavior/scenario_label.rs) measures with Iced's actual text allocator/font system, style and scaled text size. `Label` guards render-session identity, font Version and exact zoom. `retains_any` maps retained text through whitespace normalization and grapheme truncation back to original-source ranges; use those ranges rather than repeating an independent prefix-length estimate. The candidate measures advances, not raster ink, and does not guarantee the globally longest fitting prefix under nonmonotone contextual shaping.
`Cache::resolve` is intended to survive Scene rebuilds through per-live-occurrence ownership, keyed by representation and occurrence. Its two recent entries are not a two-entry global Scene cache. No production frame-time or large-model cache result has been established. Headless measurement can contend for the global font-system lock; do not move all-view shaping onto the UI path without a bounded evaluator.
The unwired [corridor.rs](http://217.177.34.108:3000/sorokin.oleg.edu/ARCADIA-Studio/src/commit/68a81c3f50d846e34cae96090979543878514c1e/crates/oa-desktop/src/behavior/scenario_label/corridor.rs) selects one widest connected clear interval after padded blockers, with deterministic ties. It does not infer the structural band, self-message policy, blocker padding or raster containment.
Settled fonts remain an experimental contract: Iced's WGPU text-cache key omits font Version. Rejecting stale `Label` artifacts cannot repair the renderer's old glyph buffers after dynamic font loading. Establish the font session only after fonts settle and a fresh renderer/cache exists; forbid font changes through actual draw. A check just before `fill_text` is not atomic against concurrent loading. Production startup/session ownership still needs explicit integration.
## Inactive destination measurement is unresolved
[app/diagram_usages.rs:57-60](http://217.177.34.108:3000/sorokin.oleg.edu/ARCADIA-Studio/src/commit/68a81c3f50d846e34cae96090979543878514c1e/crates/oa-desktop/src/app/diagram_usages.rs) constructs a default Scenario state in its lookup worker. It has neither the destination camera nor a settled rendering session. Text measurement itself needs no WGPU renderer, but paint agreement requires the same font environment, style, corridor and zoom. The current document/revision stamp alone cannot establish font/zoom freshness.
Two concrete candidates remain:
1. Measure inactive destinations at an explicit readable navigation zoom and actually enter at that zoom; first viewport arrival adjusts pan without silently changing scale. This is smaller but changes navigation camera policy.
2. Collect structural candidates first, then measure/revalidate label-dependent membership against the destination display context before presenting or activating it. This preserves adaptive camera behavior but adds asynchronous states.
Measuring at 1x and painting later at an independently fitted scale is not agreement. This note does not select either policy or allow an approximation disconnected from paint. Saved identity and automatic-fallback geometry provenance must remain distinct through either approach.
## Remaining corridor decisions and evaluator
- Ordinary/reversed messages can share a band between finalized endpoint positions; text direction need not follow arrow direction.
- Self messages have no inter-lane gap. Specify a finite structural label band; viewport width or an unlimited extension is not justified by current evidence.
- Exercise intermediate activations, fragment headers, adjacent labels and completely blocked corridors. If labels become blockers, avoid an unspecified order-dependent placement loop.
- Corridors at or below the six-unit reserve need a truthful empty/truncated outcome and source/inspection access. Font metrics exceeding the fixed vertical band need an explicit outcome too.
Reuse the [published inset evidence](http://217.177.34.108:3000/sorokin.oleg.edu/ARCADIA-Studio/src/commit/51797790bd21e4c61b2de9c331c84cdc64379f15/harness/experiments/scenario-label-wgpu-inset-20260913/README.md) without broadening it: 32 valid rendering probes, zero candidate findings, but 12 cases whose actual ink exceeded layout advances. True corridors 160/760 retained a three-world-unit horizontal inset on each side. The declared pixel oracle included a one-physical-pixel halo. These results do not prove universal ink containment or a universal three-unit overhang bound. The original uninset policy's eight italic failures remain separate rejection evidence.
Those probes used `(zoom,DPI)` values `(0.65,1)`, `(1,1)`, `(1.75,1)`, `(1,1.5)`. They did not exercise the extremely small Fit scales now required by widely spaced saved lanes, actual Scene activation/frame interactions, self/reversed corridor choice, production cache performance, native application behavior or Linux. Existing font coverage controls are not complete portable font-file provenance.
The next gate should compare actual Scene paint, hits and operation membership together: widen a lane until a previously hidden operation becomes visible; test reversed/self messages and blockers; invalidate font/zoom artifacts; exercise extreme Fit. Preserve the real `Frame::fill_text` transform and inspect pixels instead of treating advances as ink. Until that gate passes, saved-workspace acceptance must retain the long-label limitation.
No further research, production/plan edits, compiler or native execution was performed for this save. The parent owns synthesis and eventual links into existing label evidence/design.
+2
View File
@@ -55,3 +55,5 @@ For the next workspace increment, use one complete automatic fallback only when
One presentation adapter must supply the actual Scene, origin-bearing bounds, identity and status to paint, hit-testing, usage and reveal. App owns document/revision/view-visit freshness; existing Scenario state owns presentation. Inspection, navigation and guarded semantic/source repair remain available. Coordinate-dependent input is refused in fallback at both controls and event admission, including a held drag released after repair. An explicit repair must never save fallback coordinates implicitly. This is a selected reversible display policy for the next implementation; native feedback, focus, stale input and persistence acceptance remain required.
The [workspace acceptance preparation and independent identity review](experiments/scenario-workspace-preparation-20260913/README.md) define the next integration checks. Route saved Scenarios through Page::Behavior with explicit representation, semantic owner and a stable view-visit stamp across controls, passive callbacks and Back; restoring a caller restores presentation into a fresh visit. Fit and every zoom transition must use full origin-bearing bounds without a conflicting minimum-scale clamp. Do not enable a saved chooser destination until paint, query and reveal consume the same resolved Scene and representation. These are implementation constraints for the next increment, not implemented or executed workspace support.
The workspace increment retains the current 32-grapheme message labels and heuristic label bands. Widening lanes alone will not reveal long names. [Measured-label integration findings](experiments/scenario-workspace-preparation-20260913/measured-label-integration.md) keep actual Scene paint/hits/operation membership, finite structural bands and destination font/zoom context together as a separately gated increment; the standalone WGPU experiment does not establish production label acceptance.