14 KiB
Scenario / ordinary–Text composition analysis — 2026-09-22
Branch-specific read-only composition proposal, originally analyzed on 2026-09-22. The two products have not been integrated by this work, no tests were rerun, and the peer proposal is not an accepted union or release. Integration ownership remains with Codex-956atf / issue #27; the owner confirmed resumed integration on September 22 at 21:52:48 UTC, published b278866e8c79ea15ed842c1ba6bab3ca97da380a, and reported reviewing fetched 3f9e6a18af96b5cd10940da4093be8da28b9c835. Ownership is unchanged. The analysis inspected the exact published inputs below without a build, GUI operation, index update, working-tree merge, checkout, or product edit. git merge-tree --write-tree computed temporary Git objects without modifying a branch, index, or worktree. This document records reusable compatibility evidence and candidate resolutions, not a live integration plan or acceptance decision.
Identified inputs and reproducible finding
- Scenario head S:
b10b28cefd1d0794073ba241a0c8de9a83e85f68(codex/scenario-spacing-ytr83r-20260913). - Ordinary/Text head T:
3f9e6a18af96b5cd10940da4093be8da28b9c835(codex/ordinary-text-union-9e8r6t). - Both objects already existed locally. Actual common ancestor:
c6d296a7e22c8f126834a1e217b88551634dd5cf. git merge-tree --name-only --write-tree S Texits 1, returns synthetic conflict treef47590792c7fa3fb21f6416c03709ef5c9d6770f, and identifies 59 conflict paths (listed below). Many are add/add because the branches independently incorporated work after an old base. Conflict count is not defect count.- T is substantially more than ordinary omission: numeric analysis, Text workspace, diagnostic decorations, vendored Iced editor, allocation drag, diagram removal, and navigation changes are present. Merely cherry-picking
d7c0659onto S does not compose the verified Text product. - T's report
harness/ordinary-text-integration-20260913.mdwas read at the identified commit. Its full-suite results precede the four-filef714a25lint repair; affected tests, strict Clippy and matching builds/native evidence bind to the repaired production inputs. Those results are reported evidence, not checks rerun here, and cannot certify a prospective union.
Exact interfaces requiring composition
Line references below are one-based at S or T, not the current working checkout.
-
Lossless source updater: highest-risk semantic intersection. S
crates/oa-core/src/source_project.rs:1136definesEditContext;:1544definesscenario_item_key. The context narrows stable identity toDiagram.layout.Scenario.lanes/messages; message identity includes the complete reference path plus occurrence. Tsource_project.rs:1169introducesInsertionSyntax;:854onward compares CompleteForEdit declarations and separately generates Compact/CompactValues. These are complementary mechanisms. Preserve both context threading throughvalue,record,list,item_keyand T's insertion-template plumbing. Do not replace Scenario keyed rows with generic positional/list matching, or apply Scenario keys to arbitrary similarly named user records. Tlanguage.rs:674changesformat_declarationsto accept a mode; all callers must use the intentional modes. -
Layout omission is an explicit contract decision, not just a signature fix. S
model.rs:1522gives Diagram.layoutskip_serializing_if = Option::is_none. Tsource_defaults.rs:87restores selected serialization skips for complete comparisons, but has no Diagram.layout handling; T:112diagram defaults omit layout entirely. Ssource_project.rs:1346specially preserves authoredlayout noneon unrelated edits, while removing actual cleared payloads. Sscenario_layout/tests/source_lifecycle.rs:219(explicit_none_survives_other_edits_while_real_payload_clear_removes_values) requires preserved authored none/comment, None→Some, and Some→None removal with comment retained. Retaining S's special case and absent-layout comparison while adopting T insertion plumbing is the smallest behavior-preserving candidate. Alternatively restoring layout null in CompleteForEdit needs additional deliberate clear/removal logic; a mechanical restore could change the existing clear result tolayout none. This consequence is inferred from the code, not executed. Keep parser/default documentation and all three format modes consistent; add combined ordinary/layout tests before choosing a generalized treatment. -
Scenario display identity must survive new Text input admission. S
behavior/scenario.rs:87Context andbehavior/canvas_workspace.rs:60Scope include representation/visit authority. Sapp.rs:1276–1334admits spacing, validates captured Scenario events, rejects stale Properties, and checks scoped canvas identity before other boundary effects. Tapp.rs:1281adds captured TextWorkspace dispatch, source-input envelopes and exact canvas input-owner checks; Tapp/source_symbols.rs:34owns that envelope. Compose early admission gates so a stale Text or Scenario message cannot cancel a newer spacing gesture, retire a reveal, apply a draft, or change selection. Retain both sides' intent, do not simply prepend all gates without checking allowed passive messages and busy behavior. -
Details / exact saved-view Properties / arrangement picker. Keep S
behavior/scenario.rs:23properties_target; Context Properties/Representation variants at:127/:131; Sapp.rs:1968Details handling,:2039representation switching,:2086Properties handling; andbehavior/scenario/workspace.rs:267–278actual picker plus:383captured Properties. Keep Sapp/scenario_diagram.rs:6/:40enter/reconcile helpers, including post-source retargeting and rename/remap handling. T's directMessage::EditProperties(app.selected)atworkspace.rs:204is the older behavior, not a replacement. Preserve S's focused-panel layout inviews.rs:232while accepting T Text rendering changes elsewhere. -
Camera and pointer lifecycle. Keep S representation/visit-qualified viewport keys, restore receipts and scope IDs, tiny-scale camera policy,
Event::Focus, and controls' optional focus argument. Tbehavior/canvas_workspace.rs:17separates logical keyboard ownership from passive busy state, and Tcanvas_workspace/viewport.rs:14addsfocus_pendingand later same-batch keyboard suppression. Add those protections to S's richer scope rather than reverting scope shape. Update topology/state callers and struct literals that merge automatically: textual cleanliness does not ensure the new Scope/controls signatures are covered. -
Reveal, usages, architectural admission and removal. S
app/diagram_reveal.rs:49distinguishes Derived Scenario from Saved surface and verifies pending visit; T lacks that qualification but adds passive WorkDrag events at:87. Keep both. S'sapp/diagram_usages.rs,diagram_usage.rs, projection classification and saved-Scenario refusal preserve the correct workspace. T brings new diagram-removal/allocation-drag consumers that were never compiled against S'sProjectionKind::Scenario/Diagram.layout. Review these as union-only surfaces even if merge-tree produces no conflict. Retain Smodel.rs:1439Scenario variant andlib.rsscenario exports together with T numeric/default modules. -
Text diagnostic/source-session authority and Iced patch. Preserve T
app.rs:718publish_source_diagnostics,:726session reset and:736clear_source_presentation wherever S reconciles models, histories, Save As, hosted state, recovery and rename. Keep T Text modules, source annotations/diagnostic input, peer's final removal of SymbolEvent::Close, and current HideDrawer test messages. Retain T Cargo.toml vendor exclusion and[patch.crates-io] iced_widgetplus all vendor files, lockfile and notice entries. Taking S Cargo.toml wholesale silently drops the Text editor dependency patch.
Candidate composition approach (not performed or accepted)
Use a dedicated integration branch under the existing owner's explicit coordination, retaining both histories. Treat T as authority for complete ordinary/Text subsystem and its dependency/vendor additions; treat S as authority for saved Scenario semantics, arrangement rendering, Details admission, scoped spacing and scenario source-row identity. Resolve shared app/view/navigation code by function and invariant, not file-wide ours/theirs. This minimizes reconstructing independently verified Text internals while keeping S's Scenario modules intact. A clean content merge is not acceptance. Do not copy T's model/Scenario/camera files wholesale; do not copy S's source updater/app/views wholesale. The two tightly coupled edits are source updater composition and the app admission/navigation boundary. Resolve those before bulk adapting tests. Preserve current AGENTS/user specification exactly; consolidate records without reviving legacy task ledgers. Regenerate language HTML from the combined normative source, preserving both contracts.
Verification implications for a prospective integration
- Compile/list full desktop tests first to expose Scope/Context/Diagram literals and ProjectionKind exhaustiveness; compare executable membership against both input inventories. Run full core, CLI/HTTP and desktop suites, strict all-target Clippy, and matching builds against an identified clean union commit. Existing pass counts are reference inventories, not additive expected totals.
- Source union regressions: compact declarations containing saved Scenario layout; omitted/explicit default preservation; authored
layout none; actual clear with comments; lane/message reorder with reference-qualified occurrence identity; duplicate occurrence via two reference paths; graph spacing edit after Text Apply; rename/remap; undo/redo; Save As and reopen; server mutation/restart. Compare exact intended byte differences plus full decoded model parity. - Mounted/native combined workflow: open saved Scenario, focus canvas, Details restores inspector, select the exact saved diagram and open Properties, change arrangement via real picker, drag spacing and cancel with Escape, then Text navigation/diagnostic drawer/edit/Apply and return. Verify stale retained picker, Properties, viewport, spacing finish and Text drawer events cannot change a newer visit. Include busy/passive completion and F6/Tab same-batch focus boundaries.
- Exercise T's diagram removal/allocation drag with Saved Scenario visible/selected and verify only supported actions route; no accidental architecture projection conversion or loss of layout. Check invalid saved geometry fallback and latent messages remain inspectable.
- Generate notices with patched Iced dependency; regenerate teaching source where ordinary defaults change expected bytes; strict language documentation render. Publish source and evidence only after owner accepts integration, with all limits accurately scoped.
Complete merge-tree conflict path inventory
.gitattributesCargo.tomlcrates/oa-cli/src/lib.rscrates/oa-core/src/language.rscrates/oa-core/src/source_project.rscrates/oa-desktop/src/app.rscrates/oa-desktop/src/app/diagram_reveal.rscrates/oa-desktop/src/app/diagram_reveal/tests.rscrates/oa-desktop/src/app/diagram_usages.rscrates/oa-desktop/src/app/diagram_usages/tests.rscrates/oa-desktop/src/app/hosted.rscrates/oa-desktop/src/app/process_canvas.rscrates/oa-desktop/src/app/source_rename.rscrates/oa-desktop/src/app/source_rename/navigation_union_tests.rscrates/oa-desktop/src/app/source_rename/preview_scroll_tests.rscrates/oa-desktop/src/app/source_rename/tests.rscrates/oa-desktop/src/app/source_symbols.rscrates/oa-desktop/src/app/source_symbols/tests.rscrates/oa-desktop/src/behavior.rscrates/oa-desktop/src/behavior/canvas_workspace.rscrates/oa-desktop/src/behavior/canvas_workspace/focus.rscrates/oa-desktop/src/behavior/canvas_workspace/tests.rscrates/oa-desktop/src/behavior/canvas_workspace/viewport.rscrates/oa-desktop/src/behavior/contextual_source_tests.rscrates/oa-desktop/src/behavior/creation.rscrates/oa-desktop/src/behavior/scenario.rscrates/oa-desktop/src/behavior/scenario/focus.rscrates/oa-desktop/src/behavior/scenario/usage.rscrates/oa-desktop/src/behavior/scenario/workspace.rscrates/oa-desktop/src/behavior/scenario/workspace/tests.rscrates/oa-desktop/src/behavior/scenario_lifecycle/render.rscrates/oa-desktop/src/behavior/scenario_lifecycle/render_tests.rscrates/oa-desktop/src/behavior/scenario_lifecycle/union_tests.rscrates/oa-desktop/src/behavior/source_draft.rscrates/oa-desktop/src/behavior/topology.rscrates/oa-desktop/src/behavior/topology/direct.rscrates/oa-desktop/src/behavior/topology/layout_tests.rscrates/oa-desktop/src/behavior/topology/view.rscrates/oa-desktop/src/diagram_usage.rscrates/oa-desktop/src/forms/reference_chooser/trigger.rscrates/oa-desktop/src/forms/reference_chooser/widget.rscrates/oa-desktop/src/guide.rscrates/oa-desktop/src/source_navigation.rscrates/oa-desktop/src/source_navigation/controller.rscrates/oa-desktop/src/views.rscrates/oa-desktop/src/views/source_symbols.rsdocs/language.htmldocs/language.rstharness/DECISIONS.mdharness/PLAN.mdharness/STATE.mdharness/TASK_LEDGER.mdharness/behavior-creation-contract.rsharness/fixtures/staged-source-authoring/README.mdharness/release-contextual-source-creation-review-20260911.mdharness/release-integrated-gates-20260910.mdharness/staged-source-authoring-contract.rsscripts/test-windows-notices.ps1scripts/windows-notices/manifest.json