105 lines
14 KiB
Markdown
105 lines
14 KiB
Markdown
# 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](http://217.177.34.108:3000/sorokin.oleg.edu/ARCADIA-Studio/issues/27); the owner [confirmed resumed integration on September 22 at 21:52:48 UTC](http://217.177.34.108:3000/sorokin.oleg.edu/ARCADIA-Studio/issues/27#issuecomment-1005), 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`](http://217.177.34.108:3000/sorokin.oleg.edu/ARCADIA-Studio/commit/b10b28cefd1d0794073ba241a0c8de9a83e85f68) (`codex/scenario-spacing-ytr83r-20260913`).
|
||
- Ordinary/Text head T: [`3f9e6a18af96b5cd10940da4093be8da28b9c835`](http://217.177.34.108:3000/sorokin.oleg.edu/ARCADIA-Studio/commit/3f9e6a18af96b5cd10940da4093be8da28b9c835) (`codex/ordinary-text-union-9e8r6t`).
|
||
- Both objects already existed locally. Actual common ancestor: `c6d296a7e22c8f126834a1e217b88551634dd5cf`.
|
||
- `git merge-tree --name-only --write-tree S T` exits 1, returns synthetic conflict tree `f47590792c7fa3fb21f6416c03709ef5c9d6770f`, 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 `d7c0659` onto S does not compose the verified Text product.
|
||
- T's report `harness/ordinary-text-integration-20260913.md` was read at the identified commit. Its full-suite results precede the four-file `f714a25` lint 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.
|
||
|
||
1. **Lossless source updater: highest-risk semantic intersection.** S `crates/oa-core/src/source_project.rs:1136` defines `EditContext`; `:1544` defines `scenario_item_key`. The context narrows stable identity to `Diagram.layout.Scenario.lanes/messages`; message identity includes the complete reference path plus occurrence. T `source_project.rs:1169` introduces `InsertionSyntax`; `:854` onward compares CompleteForEdit declarations and separately generates Compact/CompactValues. These are complementary mechanisms. Preserve both context threading through `value`, `record`, `list`, `item_key` and 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. T `language.rs:674` changes `format_declarations` to accept a mode; all callers must use the intentional modes.
|
||
|
||
2. **Layout omission is an explicit contract decision, not just a signature fix.** S `model.rs:1522` gives Diagram.layout `skip_serializing_if = Option::is_none`. T `source_defaults.rs:87` restores selected serialization skips for complete comparisons, but has no Diagram.layout handling; T `:112` diagram defaults omit layout entirely. S `source_project.rs:1346` specially preserves authored `layout none` on unrelated edits, while removing actual cleared payloads. S `scenario_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 to `layout 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.
|
||
|
||
3. **Scenario display identity must survive new Text input admission.** S `behavior/scenario.rs:87` Context and `behavior/canvas_workspace.rs:60` Scope include representation/visit authority. S `app.rs:1276–1334` admits spacing, validates captured Scenario events, rejects stale Properties, and checks scoped canvas identity before other boundary effects. T `app.rs:1281` adds captured TextWorkspace dispatch, source-input envelopes and exact canvas input-owner checks; T `app/source_symbols.rs:34` owns 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.
|
||
|
||
4. **Details / exact saved-view Properties / arrangement picker.** Keep S `behavior/scenario.rs:23` properties_target; Context Properties/Representation variants at `:127/:131`; S `app.rs:1968` Details handling, `:2039` representation switching, `:2086` Properties handling; and `behavior/scenario/workspace.rs:267–278` actual picker plus `:383` captured Properties. Keep S `app/scenario_diagram.rs:6/:40` enter/reconcile helpers, including post-source retargeting and rename/remap handling. T's direct `Message::EditProperties(app.selected)` at `workspace.rs:204` is the older behavior, not a replacement. Preserve S's focused-panel layout in `views.rs:232` while accepting T Text rendering changes elsewhere.
|
||
|
||
5. **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. T `behavior/canvas_workspace.rs:17` separates logical keyboard ownership from passive busy state, and T `canvas_workspace/viewport.rs:14` adds `focus_pending` and 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.
|
||
|
||
6. **Reveal, usages, architectural admission and removal.** S `app/diagram_reveal.rs:49` distinguishes Derived Scenario from Saved surface and verifies pending visit; T lacks that qualification but adds passive WorkDrag events at `:87`. Keep both. S's `app/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's `ProjectionKind::Scenario`/Diagram.layout. Review these as union-only surfaces even if merge-tree produces no conflict. Retain S `model.rs:1439` Scenario variant and `lib.rs` scenario exports together with T numeric/default modules.
|
||
|
||
7. **Text diagnostic/source-session authority and Iced patch.** Preserve T `app.rs:718` publish_source_diagnostics, `:726` session reset and `:736` clear_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_widget` plus 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
|
||
|
||
- `.gitattributes`
|
||
- `Cargo.toml`
|
||
- `crates/oa-cli/src/lib.rs`
|
||
- `crates/oa-core/src/language.rs`
|
||
- `crates/oa-core/src/source_project.rs`
|
||
- `crates/oa-desktop/src/app.rs`
|
||
- `crates/oa-desktop/src/app/diagram_reveal.rs`
|
||
- `crates/oa-desktop/src/app/diagram_reveal/tests.rs`
|
||
- `crates/oa-desktop/src/app/diagram_usages.rs`
|
||
- `crates/oa-desktop/src/app/diagram_usages/tests.rs`
|
||
- `crates/oa-desktop/src/app/hosted.rs`
|
||
- `crates/oa-desktop/src/app/process_canvas.rs`
|
||
- `crates/oa-desktop/src/app/source_rename.rs`
|
||
- `crates/oa-desktop/src/app/source_rename/navigation_union_tests.rs`
|
||
- `crates/oa-desktop/src/app/source_rename/preview_scroll_tests.rs`
|
||
- `crates/oa-desktop/src/app/source_rename/tests.rs`
|
||
- `crates/oa-desktop/src/app/source_symbols.rs`
|
||
- `crates/oa-desktop/src/app/source_symbols/tests.rs`
|
||
- `crates/oa-desktop/src/behavior.rs`
|
||
- `crates/oa-desktop/src/behavior/canvas_workspace.rs`
|
||
- `crates/oa-desktop/src/behavior/canvas_workspace/focus.rs`
|
||
- `crates/oa-desktop/src/behavior/canvas_workspace/tests.rs`
|
||
- `crates/oa-desktop/src/behavior/canvas_workspace/viewport.rs`
|
||
- `crates/oa-desktop/src/behavior/contextual_source_tests.rs`
|
||
- `crates/oa-desktop/src/behavior/creation.rs`
|
||
- `crates/oa-desktop/src/behavior/scenario.rs`
|
||
- `crates/oa-desktop/src/behavior/scenario/focus.rs`
|
||
- `crates/oa-desktop/src/behavior/scenario/usage.rs`
|
||
- `crates/oa-desktop/src/behavior/scenario/workspace.rs`
|
||
- `crates/oa-desktop/src/behavior/scenario/workspace/tests.rs`
|
||
- `crates/oa-desktop/src/behavior/scenario_lifecycle/render.rs`
|
||
- `crates/oa-desktop/src/behavior/scenario_lifecycle/render_tests.rs`
|
||
- `crates/oa-desktop/src/behavior/scenario_lifecycle/union_tests.rs`
|
||
- `crates/oa-desktop/src/behavior/source_draft.rs`
|
||
- `crates/oa-desktop/src/behavior/topology.rs`
|
||
- `crates/oa-desktop/src/behavior/topology/direct.rs`
|
||
- `crates/oa-desktop/src/behavior/topology/layout_tests.rs`
|
||
- `crates/oa-desktop/src/behavior/topology/view.rs`
|
||
- `crates/oa-desktop/src/diagram_usage.rs`
|
||
- `crates/oa-desktop/src/forms/reference_chooser/trigger.rs`
|
||
- `crates/oa-desktop/src/forms/reference_chooser/widget.rs`
|
||
- `crates/oa-desktop/src/guide.rs`
|
||
- `crates/oa-desktop/src/source_navigation.rs`
|
||
- `crates/oa-desktop/src/source_navigation/controller.rs`
|
||
- `crates/oa-desktop/src/views.rs`
|
||
- `crates/oa-desktop/src/views/source_symbols.rs`
|
||
- `docs/language.html`
|
||
- `docs/language.rst`
|
||
- `harness/DECISIONS.md`
|
||
- `harness/PLAN.md`
|
||
- `harness/STATE.md`
|
||
- `harness/TASK_LEDGER.md`
|
||
- `harness/behavior-creation-contract.rs`
|
||
- `harness/fixtures/staged-source-authoring/README.md`
|
||
- `harness/release-contextual-source-creation-review-20260911.md`
|
||
- `harness/release-integrated-gates-20260910.md`
|
||
- `harness/staged-source-authoring-contract.rs`
|
||
- `scripts/test-windows-notices.ps1`
|
||
- `scripts/windows-notices/manifest.json`
|