Files
ARCADIA-Studio/harness/experiments/state-bends-b868541-20260923/native/native-plan.md
T

52 lines
9.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# State bend native acceptance draft (#23)
Prepared plan only, not observed results. No GUI, compilation, evaluator execution, staging, or frozen-input edits were performed for this draft. Candidate `.local/state-bends-20260923` is not yet frozen; bind its final commit and successful gates before execution. Parent owns execution and acceptance.
## Baseline and oracle
Reuse the original #33 immutable fixture `.local/edge-anchors-native-20260922/baseline/attachments.arcadia`, not a previous edited working file. Its complete parsed Project is B. Use a new native root/profile/working copy and a new expected catalog; never modify an earlier manifest/catalog. All IDs have prefix `ea202922-0033-4000-8000-` and twelve-digit decimal suffixes.
Edit State saved view 200, “03 Readiness — edit attachments”, transition41 Activate (Ready34 → Active35). The route starts with waypoints W=[(500,310)], source_attachment={Right,0.5}, target_attachment={Left,0.6}, label={fraction:0.5,offset:(8,-16)}. State reference view201 and OA views100/101 are exact preservation sentinels. Machine31/region32 membership, relation41 source/target/direction/details, node placements and every other Project field remain B in every checkpoint below. Selection, menu, camera and history are not Project fields.
Before GUI launch, freeze complete expected Project files by copying B and changing ONLY `diagrams[200].routes[edge41].waypoints`; retain integer fidelity in original raw JSON. Existing `attachment_snapshot.exe` can provide complete typed Projects if its parser/model/core binding is proven unchanged against the new candidate (compare source objects plus Cargo inputs); otherwise build a candidate-pinned evaluator through the parent gate. The old check.py catalog choices do not include these bend states: adapt a copy in the fresh root, not the old bound checker. Compare full Project, not a route-only subset.
One staging prerequisite is deliberately unresolved until the source pin: obtain baseline routed point array G, its authored pin traversal, and eligible interior spans BEFORE native input. Select the longest eligible span j (exclude endpoint lead spans; if equal lengths, current Rust max_by chooses the last). Let A be that span's arithmetic midpoint and k its insertion index among authored pins. Independently inspect the points and freeze numerical A,k in the new catalog and plan before launch. Do not derive them from the saved native result or invoke the same UI command implementation as the expected oracle. Record the small geometry calculation as preparation evidence. Existing snapshot output only supplies Project, not routed G; parent can obtain G with a read-only candidate/core probe. If Add bend's midpoint would duplicate W or hide behind a label/vertex, choose an alternate independently predeclared route trial before freezing; do not silently accept invisible duplicate pins.
Predeclared states (all other fields exactly B):
| State | Exact waypoint vector |
| --- | --- |
| B | [(500,310)] |
| N1 | insert A at index k into [(500,310)] |
| N2 | N1 with only waypoint[k] replaced by M=(520,370) |
| N3 | [] |
A,k are baseline-derived deterministic constants, not free allowances. N2's M is clear of Ready (x190..430,y210..330), Active (x570..810,y210..350), and Choice (x670..698,y430..458). Parent must check the new routed trial has no blocking routing diagnostics before freezing the catalog. No new model is required unless that check identifies a concrete conflict.
## Native action sequence
1. Open fresh working fixture, Behavior / State diagram, Rescue readiness, view03. Fit and select Activate on the painted route. Save checkpoint00 → B. Capture selected route, the existing square pin, both endpoints and label. Record actual canvas bounds/zoom/pan rather than reuse old screen pixels.
2. Open the selected transition's general actions menu (a request without a captured route segment; caption must be **Add bend**, not Add bend here). Capture discoverability, enabled state and full menu accessibility; invoke Add bend. Save01 → N1. Capture new square at A, original square at (500,310), unchanged endpoint attachments and label. Undo/save02 → B; Redo/save03 → N1. This establishes a single history entry for insertion.
3. With Select/move active, drag the new square at A to M=(520,370), avoiding circular endpoint handles and labels. Save04 → N2. Drag snapping is five world units: choose an integer destination pixel whose inferred world x/y both fall strictly inside (517.5,522.5) and (367.5,372.5). Undo/save05 → N1; Redo/save06 → N2. Inspect actual orthogonal route and square selection, not just model equality.
4. Right-click the moved square at M; **Remove bend** must be present and target that square. Capture the menu (this is a different context from the generic action menu), invoke Remove bend. Save07 → B, proving removal preserved the original pin. Undo/save08 → N2; Redo/save09 → B; Undo/save10 → N2 to restore two pins for Clear bends.
5. Open transition actions and choose **Clear bends**. Save11 → N3. Confirm no authored square handles remain, while source Right.5, target Left.6 and manual label remain exact. Undo/save12 → N2; Redo/save13 → N3. Reopen the menu: Clear bends should be disabled when empty. Do not claim history-no-op from a screenshot of a disabled control alone.
6. Open view04 “Readiness — untouched reference”; inspect its separate geometry. Save14 → N3 still, with the whole view201 exactly baseline. Return view03. Close normally, record exit and logs, then launch a fresh numbered run on the saved working file using a new process chained to prior normal-close. Save15 → N3. Inspect empty bends and preserved endpoint/label presentation after reopen; close normally again.
Optional bounded cancellation supplement: from N1, perform a no-motion square press/release and a completed left drag ending outside the canvas; each saved Project must remain N1, and the next Undo must be B (no hidden history entry). Only add these checkpoints if the native tool supports the exact input and start from a recorded N1 branch. Do not alter the main sequence implicitly. Mid-drag Escape, held preview, wheel interruption, away-return within one held drag and focus-loss cancellation remain automated complements unless tool support permits direct observation.
## Mapping, discoverability and eligibility risks
Use window = canvas origin + pan + zoom × world, including State's guidance-strip offset. Prior 1442×932 sessions had canvas near x275..1106,y354..878 and Fit varied around71–80%; these are orientation hints, not reproducible coordinates. World Ready bounds190,210,240,120; Active570,210,240,140; existing pin500,310; desired moved pin520,370. New A is available only after the prelaunch geometry calculation. At roughly71% zoom, five-unit snapping gives a ~3.55-pixel interval, unlike the earlier tiny-symbol hundredths problem. Confirm the current selected pin marker and inferred destination before input.
Menu growth is a primary UI risk: Properties/transition edit, Add/Clear, optional Remove, two Reconnect actions, four attachment actions, deletion and other navigation can make a tall popup. Inspect clipping/scroll access at top and bottom and distinguish Add bend from Add bend here. Do not blindly reuse prior menu y offsets. Generic menu Add uses a routed midpoint; canvas Add bend here currently stores the clicked world point without snapping. The latter is a useful separate UX check but is excluded from this exact-state main workflow because native pixel quantization would require its own predeclared coordinate.
Bend admission requires an actual projected StateTransition route with custom routing not suspended; internal transition46 is a row and must not offer enabled bend editing. Inspect that row's actions without changing it. Promoted/folded proxy routes and the 128-pin cap are targeted automated coverage, not established by this small native fixture. Direct square hit, empty-background behavior and endpoint reconnect must remain distinguishable; do not interpret a semantic reconnect as a bend movement. Pending form drafts can disable actions; clear/apply them deliberately and record any unexpected stale state.
## Evidence and claim boundary
Bind frozen candidate commit, clean source, exact GUI/runtime/evaluator hashes, gate receipts, new plan/catalog/recipes and baseline bytes. Preserve stdout/stderr, launch PID/start, close receipt, all captures, every comparison request/result and failures. Save actions must finish before copying immutable checkpoints. Every receipt should compare full typed Project and record source hashes before/after evaluation; no checkpoint may be retroactively renamed to the observed result. Capture normal exit0 and log sizes, plus before/after immutable verification. Preserve source/package relocation incidents if any; avoid bindings to a mutable shared target executable.
A full native drag call establishes completed input and resulting route, not continuous held-motion quality. Screenshots support discoverability/rendering; complete Project comparisons establish persisted deltas; Undo/Redo sequences establish the exercised history behavior. No claim of all State symbols, all projection/ancestor combinations, every menu boundary, exact camera persistence, stress/performance, or complete #23 acceptance follows from this one fixture. Publish actual outcomes separately from this draft.
Source inspected: behavior/state_menu.rs (Add/Remove/Clear construction), behavior/state_edit.rs (bend_route and command admission), behavior/state_canvas.rs (square hit radius, 3px threshold, 5-unit snapping), route_edit.rs (insertion by traversal). Source and final numerical catalog need final-pin review before staging.