158 lines
10 KiB
Markdown
158 lines
10 KiB
Markdown
# Independent allocation-drag proposal review — 2026-09-11
|
|
|
|
Codex-956atf `/root/allocation_drag_critic`, bounded source/design critique of
|
|
[the proposal](release-activity-allocation-drag-design-20260911.md) for
|
|
[issue 3](http://217.177.34.108:3000/sorokin.oleg.edu/ARCADIA-Studio/issues/3).
|
|
Read local AGENTS/PROJECT_GOAL, remote `main` AGENTS, STATE, issue 3/comments and
|
|
[issue 4 coordination](http://217.177.34.108:3000/sorokin.oleg.edu/ARCADIA-Studio/issues/4#issuecomment-446).
|
|
Working branch read from `.git/HEAD`: `codex/behavior-authoring-20260910`, HEAD
|
|
`06ec9621297627a1f7d5c3bc65efb237d1c9923e`. Source anchors below refer to the
|
|
files inspected in that workspace. Only this new report was written. No build,
|
|
test, native execution, production edit, Git/index change or Gitea write occurred.
|
|
This is not implementation or acceptance evidence. Root owns synthesis and integration.
|
|
|
|
## Judgment
|
|
|
|
The diagnosis and principal choice are sound: ordinary drag in an Allocation
|
|
view should compose allocation and placement. Existing `MoveNode` only moves
|
|
placements/routes; projected parentage comes from `allocation_summary` and
|
|
semantic ancestry. Work-to-performer `Reparent`, relaxed leaf-only validation,
|
|
or turning off enclosure would damage the existing model. Direct allocation
|
|
retargeting should preserve relation identity and metadata. Preserve separate
|
|
decomposition, effective role responsibility and actual direct allocation.
|
|
|
|
The proposal needs the following corrections before it is precise enough to
|
|
implement. The first three can otherwise cause hidden semantic changes or a
|
|
broken ordinary gesture.
|
|
|
|
## Material corrections
|
|
|
|
1. **Resolve same-performer role semantics.** A leaf with `RoleAssignment R → x`
|
|
and `RoleRealization A → R` is displayed under A without direct Allocation.
|
|
The gesture text promises **Arrange within A**, but the no-direct-allocation
|
|
table says to create `A → x` on that drop. These are observably different:
|
|
direct allocation subsequently overrides role changes, and OA communication
|
|
allocation uses actual allocation rather than role responsibility. Specify
|
|
that dropping within the current unique effective performer is layout-only
|
|
for ordinary drag, including uniformly role-derived composites. Creating a
|
|
direct assignment to that same performer requires an explicit Assign action.
|
|
Dropping onto a different B may create direct allocation with the existing
|
|
advisory role warning. If removing direct A reveals role-derived B, the label
|
|
must say **Remove direct assignment; role places work in B**, not Unallocated.
|
|
A role-only outward drop should explain its retained role grouping and leave
|
|
accepted placement unchanged when it cannot fulfill the requested exit.
|
|
Sources: [effective performer](../crates/oa-core/src/validation.rs#L2850),
|
|
[role conflict is a warning](../crates/oa-core/src/validation.rs#L2553),
|
|
[actual OA communication allocation](../crates/oa-core/src/ports.rs#L1180).
|
|
|
|
2. **Compare surviving semantic records as well as deleted IDs.**
|
|
`deletion_impact` is not a complete semantic-change report. Counterexample:
|
|
same-layer Constraint C references Allocation a in `constrained`. Deleting a
|
|
clears C's reference while retaining C; the candidate can remain valid and
|
|
the removed-ID set can be exactly `{a}`. The proposed extra-deletion gate
|
|
would approve a silent constraint edit. Compare the prepared candidate's full
|
|
semantic diff to the intended allocation edits, and expose/refuse any other
|
|
semantic mutation as well as cascaded deletion. Presentation cleanup of the
|
|
deleted relation's own route is a distinct expected effect. Full validation
|
|
remains necessary for retargeting: state availability/actions and participant
|
|
scenarios also depend on effective performer. Preserve allowed warnings;
|
|
notably OA unallocation may leave a communication mapping incomplete with a
|
|
warning, whereas SA can cascade through port and exchange allocations.
|
|
Sources: [constraint validity](../crates/oa-core/src/validation.rs#L560),
|
|
[surviving-record cleanup](../crates/oa-core/src/references.rs#L403),
|
|
[deferred deletion](../crates/oa-core/src/references.rs#L372),
|
|
[state context](../crates/oa-core/src/validation.rs#L2920).
|
|
|
|
3. **Guard mouse-down selection, not just release.** Current node press arms
|
|
`state.drag` and publishes `SelectNode` without checking `editable`.
|
|
`SelectNode` can call `apply()` before a drop happens. Merely removing
|
|
`apply()` from the new release handler does not prevent unrelated dirty
|
|
properties from entering history, and may invalidate the captured revision
|
|
immediately. Give semantic drag a clean-owner admission/selection path at
|
|
press and recheck it at release. Dirty-source/property/behavior refusal must
|
|
not fall through to legacy movement that applies the draft. Preserve simple
|
|
selection behavior deliberately; do not silently commit a form to make drag
|
|
work. Sources: [press](../crates/oa-desktop/src/diagram.rs#L797),
|
|
[selection applies](../crates/oa-desktop/src/app.rs#L2129),
|
|
[legacy release dispatch](../crates/oa-desktop/src/app.rs#L2943).
|
|
|
|
4. **Specify two scopes and an actual placement rule for composites.** Define
|
|
the semantic same-kind work closure/leaf set separately from the presentation
|
|
placements that move. Counterexample: mixed composite P has x allocated to A
|
|
and y to B. x and y can be projected directly under those performers, outside
|
|
P's visual subtree. Changing both allocations to C while moving only P's
|
|
captured visual descendants leaves x/y at their old distant coordinates;
|
|
C then encloses all of them. Even translating all semantic placements by one
|
|
delta preserves that excessive spread. Specify a bounded packing rule for
|
|
this converging case, or retain a truthful refusal until it exists. Capture
|
|
hidden placements too; never invent placements for unplaced leaves, and edit
|
|
only the active diagram's geometry. An outgoing child can also make its
|
|
previously uniform composite move to a different projected group: include
|
|
affected ancestor grouping in the preview. Existing insertion adjustment only
|
|
pushes colliding siblings down; it does not solve arbitrary distributed
|
|
subtree packing. Sources: [parent derivation](../crates/oa-core/src/projection.rs#L81),
|
|
[descendant movement](../crates/oa-core/src/session.rs#L771),
|
|
[insertion adjustment](../crates/oa-desktop/src/diagram.rs#L79).
|
|
|
|
5. **Keep the target contract stable and the candidate projection fresh.**
|
|
Press-time rectangles are the right defense against enclosure chasing. Keep
|
|
their destination outline visible while candidate enclosures change, or the
|
|
visible target and accepted hit area can disagree. Define semantic ancestor
|
|
containment for nested performer precedence; geometric inclusion alone must
|
|
not turn overlapping peers into parent/child. Define the boundary/overlap and
|
|
work-card occlusion cases explicitly. Capture/invalidate bounds, camera and
|
|
view lifetime as proposed, preserving the ordered native pointer handling.
|
|
Semantic preview also requires a candidate `Project` and candidate `ViewIndex`:
|
|
the current preview clones only Diagram and reuses the accepted semantic
|
|
index. Extend scene-cache keys with semantic destination/plan identity, so an
|
|
unchanged coordinate cannot reuse a previous target's scene. Recompute model
|
|
work when destination/scope changes, rather than cloning and validating a
|
|
large project on every pointer pixel. Sources:
|
|
[existing preview/cache](../crates/oa-desktop/src/diagram.rs#L410),
|
|
[index lifetime contract](../crates/oa-core/src/projection.rs#L229).
|
|
|
|
## Smallest coherent implementation path
|
|
|
|
Keep one pure, bounded proposal composer plus stamped canvas gesture/App
|
|
admission. Use current commands and `Document::execute`; its source compilation
|
|
precedes its single commit and history stores exact source snapshots
|
|
([transaction](../crates/oa-desktop/src/document.rs#L301)). No metamodel change,
|
|
allocation inheritance or new generic draft framework is needed.
|
|
|
|
First establish ordinary incoming, between-performer, outgoing and same-performer
|
|
leaf gestures, then uniform composites with explicit descendant scope. Keep
|
|
unsupported role exits, collateral semantic edits and unreadable mixed layouts
|
|
as named local refusals with existing repair navigation. This is a staged scope,
|
|
not grounds to claim every composite workflow complete. A full mixed-impact
|
|
editor and automatic dependency repair are larger capabilities and should not
|
|
block proving the user's basic direct workflow. Mixed status alone is not a
|
|
semantic error or a reason for obligatory confirmation once a safe, readable
|
|
exact-set preview exists. Extra Apply steps should resolve a real scope/impact
|
|
decision. A visible **Arrange only** alternative should be temporary or clearly
|
|
indicated, not a sticky mode users must remember after every assignment.
|
|
|
|
## Acceptance additions before claiming the fix
|
|
|
|
- OA and SA leaf incoming/reassign/outgoing: exact relation identities and
|
|
metadata, work parents, active-diagram positions/routes, save/reopen, and one
|
|
exact Project/source Undo/Redo step. A snapped no-op creates no history.
|
|
- Role-only same-performer arrangement creates no direct allocation. Direct
|
|
removal that reveals another role performer has the same grouping and wording
|
|
in preview and result; warnings remain advisory.
|
|
- Constraint referencing an allocation, artifact/trace attached to an allocation,
|
|
SA port/exchange dependencies, OA communication mapping and participant-bound
|
|
scenario/state behavior: no unshown semantic deletion or surviving-record edit.
|
|
- Dirty form before press, dirty source, modal/save ownership, revision change,
|
|
peer first-child allocation/role-assignment transfer, camera/bounds change, Escape/unfocus and
|
|
outside release: no hidden apply or partial history. Include the actual mounted
|
|
press → SelectNode → move → release dispatch, not only planner calls.
|
|
- Uniform folded/unplaced children and mixed P/x/y fixture: exact leaf scope,
|
|
hidden-placement handling, bounded readable grouping or explicit refusal,
|
|
unchanged other-diagram geometry, and no target/enclosure chasing. Verify
|
|
competing/overlapping/nested targets and that the shown destination is the
|
|
committed destination.
|
|
|
|
Exercise the completed direct workflow in the actual Windows package at the
|
|
minimum client size. Planner tests and this source review cannot establish
|
|
target discoverability, cognitive load, readable layout or native event behavior.
|