Repository navigation
Separate layout coordination from connector routing - #29
mepcotterell wants to merge 9 commits into
Conversation
|
This work now depends on PR #29 — Separate layout coordination from connector routing: #29. PR #29 starts from Existing source-to-object semantics, the 300 ms stress limits, native visual review, and historical production default remain in force. Coordinator extraction alone does not establish a performance improvement or close acceptance criteria 19, 20, or 22. GitHub's native issue-dependency API rejected a pull request as a dependency target ( After each of the five plan steps, PR #29 will receive a completion comment with results, decisions, verification limits, and records carried forward. |
Step 1 completed — current algorithm auditThe source inventory distinguishes immutable main baseline Important results carried into research and design:
This step was a static audit, not runtime or performance acceptance. Independently captured before-change evidence includes the unmodified main benchmark and 12 native SVG/PNG pairs, with verified dimensions and frame restoration. Those measurements do not substitute for PR #28's original controlled-policy stress protocol. Next: finish literature synthesis, then compare independent coordinator interfaces under the approved bounded-repair scope and separate stack/heap model requirement. Existing <=300 ms stress limits, native review, and historical default remain unchanged. Record: committed algorithm inventory. Source-link definitions and line ranges were checked; |
Step 2 completed — spatial and temporal researchThe narrative research report and supporting notes are committed. The notes retain two complete research cycles per theme: orthogonal routing, spatial placement/mental-map stability, and temporal planning/DP. They include primary papers, APA references, search/evidence logs, assumptions, counterexamples, confidence, and access limits. The report distinguishes source observations, published guarantees, empirical workload results, and application deductions. Important results and decisions carried into interface design:
The 2014 paper's accessible manuscript and publisher abstract use different canonicality wording; the report preserves that discrepancy and does not promote it into an application guarantee. Broader global rearrangement and new sparse/incremental algorithms remain separately measured proposals. The first coordinator implementation preserves current placement behavior and bounded repair policy. This is research evidence, not runtime, pedagogy, or performance acceptance. All existing 300 ms stress gates, native review requirements, and historical default remain unchanged. Next: compare the three independently designed interfaces and select the smallest interface that gives separate stack/heap ownership, typed routing outcomes, bounded repair/rollback, and deterministic trace-context handling. Records: narrative research report, routing evidence and method, temporal/placement evidence and method. |
Step 3 completed — independent interfaces and selected ownershipThree independent designs were compared: one-shot transaction, long-lived coordinator with independent region models, and compiled trace plans with measurement binding. The committed comparison presents signatures, caller examples, hidden responsibilities, trade-offs, and the chosen synthesis. Decision: one per-visualizer, synchronous coordinator with independent stack/global and heap strategies; borrow transactional repair ownership and keep semantic trace context separate from measured geometry. The first adapters preserve existing placement and path policies and must be used by real rendering paths, not merely declared for future use. The coordinator owns resizing/movement/canvas allocation, bounded retry accounting, remeasurement, reverse-order repair restoration, and final paint publication. Routing consumes a DOM-free measured scene and returns a full plan or typed constraint failure. Reservation-only retries remain distinct from layout repair. Immediate rollback restores the current state's intrinsic, sized, model-placed baseline and clears stale route paint; it does not rewind semantic navigation or promise a full previous-view transaction. We rejected a mandatory asynchronous trace compiler/full semantic-DOM transaction for the initial extraction because it would change the public synchronous contract and expand scope. The supplied sequence, model versions, dimensions, and canonical context remain separate inputs so later append-frame, heap-peak, anchor, and finite-candidate DP experiments can be introduced deliberately. No navigation-seeded temporal cache or global optimum is implemented by this decision. Domain terms are recorded in
Next: implement the selected boundaries and actual independent region-model call sites, then verify geometry/navigation, failure rollback, native exports, and the original performance protocol. Records: interface comparison, ADR 0001, glossary. |
Step 4 completed — production layout coordinator and region modelsImplemented in The independently replaceable stack/global and heap models are used by real rendering paths. Both receive supplied-sequence context and their own canonical predecessor; measured placement can see dimensions of both regions. The legacy adapters preserve Java ordering, heap row traversal/grouping, the executable 96px nudge, label/value sizing, and explicit drag restoration. This introduces no global rearrangement or new public factory policy. Repairs are restored in reverse order, with original inline values and priorities. Failure clears stale paint and accepted-route reuse; rollback returns to the current step's sized, model-placed baseline, rather than rewinding semantic navigation. Accepted routes can be reused only when their complete routing dependencies and placement revision match; canvas allocation is independently revalidated. Reset and disposal release effects and retained plans. The extracted orthogonal search preserves orientation states, neighbor/tie order, Manhattan plus 18-unit axis-change cost, weights, caps, and stale-pop accounting. An independent small Dijkstra oracle compares the same graph objective; terminal stubs/turns, signed directions, arrowheads and rounding remain outside that objective. Its exhaustive fixtures include 256 blocked-edge configurations. Weighted/bounded production routing gains no global optimality claim. Runtime navigation exposed two issues now fixed: new frames could duplicate a surviving frame's DOM ID, and Java's final content-normalization hook ran after routing, leaving routes measured against String labels that were subsequently hidden. Frame IDs are unique while keyed nodes survive, and intrinsic-content hooks now finish inside the materialization batch before final measurement/paint. The native navigation test observes ordinary navigation passively, without an export-triggered redraw masking stale output. Validation on the implemented sources: 296 frontend tests passed in 21 files; production build passed; 9 focused public native/navigation/cropping/frame-parent tests passed; Ruff, Python type checking and documentation checks passed. Independent static search and production reviews reported no actionable findings. Two evidence-review findings (active redraw during navigation observation and skipped failure artifacts) were corrected and re-reviewed. The final intrinsic-hook ordering change is also receiving a focused independent re-review. The native review generator produces 12 PNG/SVG pairs, separately reopened SVG rasters, an offline gallery, and a provenance manifest. CI uploads it even when capture checks fail, and PR checks now cover stacked PRs as well as main-targeting PRs. The fixture is synthetic renderer evidence, not proof of tracer-generated calls. Source/bundle hashes do not by themselves prove a rebuild; the parent rebuilt the frozen implementation before these native tests. Carry forward into step 5: run the complete coverage/check/example suite; capture clean-commit native before/after evidence; compare the unchanged main benchmark; integrate the coordinator into dependent PR #28 and retain its controlled-policy gates. The historical default, criterion 19 maintainer approval, original maximum-of-six ≤300ms stress limits, redraw limits, and default-enablement hold remain unchanged. No release, merge, issue closure, or maintainer approval is inferred. Records: coordinator, region models, native review tool, implementation boundaries. |
Step 5 — rendered/native, navigation, performance, and integration verificationThe coordinator implementation and dependent integration are complete. Current pushed heads are 9b9eebe for this PR and 01eb6cf for PR #28. PR #28 targets Implementation and review results
Correctness and native evidenceOn clean runtime head The public-export coordinator package contains 12 native PNG/SVG pairs plus 12 separately reopened SVG rasters: four frame-transition states in each theme, plus aliases, cycle, arrays, and self-loop. All seven manifest checks pass, including dimensions, at least 4 px on every side, and first/restored PNG and SVG-route equality. Passive direct/forward/backward/indexed navigation checks do not invoke export preparation or another repaint. The frame fixture uses supplied synthetic helper frames; it establishes rendering transitions, not Java tracer call semantics. The before/after gallery was presented in the implementation thread. Preserved policy does not mean identical output: all 12 SVG descriptions match the supplied baseline, but 0/12 PNG pixel comparisons and 0/12 SVG route-record comparisons are identical. Eleven dimensions match; self-loop changes from 498×150 to 497×150. Reopened SVGs pass their own bounds checks but are not pixel-identical to native PNGs. These differences remain visible review evidence, without inferred maintainer approval. The historical baseline is supplied evidence, not a retroactive clean-commit capture. The clean after manifest binds 74 inputs and 36 export/raster files; build execution and the source-map checks provide separate build provenance. On combined runtime head The coordinator CI run for runtime head 7271983 also passed both JDK jobs, builds, wheel checks, examples and native capture. Its downloadable layout review artifact is available. The artifact captures the CI merge ref Final-head CI is complete and successful: PR #29 / Downloaded final-head review artifacts are available: coordinator, combined coordinator, and combined shared references. The manifests record clean CI merge refs Performance results and retained failuresThe 11-case main-refactor comparison used the original main harness with frozen baseline The separate original policy-switch acceptance run covers all 14 cases under both controlled policies, with public historical initialization, policy selection, font readiness and final redraw included. Both reports contain six fresh samples, five warmups, 40 repaints, 40 full redraws, state/style transitions, and valid controlled baselines. Hardware/browser: Apple M2 Pro / 32 GiB / macOS 26.7.1; Electron 44.9.3 / Chromium 152.0.7977.167; 1536×960. No agent tests/builds/native captures overlapped timing. Browser-fetched SHA-256 values matched the combined bundles. There was no elapsed-time cutoff; initial-policy results were not substituted.
The unchanged raw-sample checker exits 1 for the four stress failures. Dense-48 passes 300 ms under both policies; fan-in-48 and many-groups-12x4 fail 300 ms under both. Representative redraws pass 16 ms and dense-48 passes 50 ms. Restored-state logical paths match under both policies. State/style latencies are separately recorded and are not ordinary redraw measurements. Six fresh samples for each acceptance-gated case
Raw reports, logs, manifests, and offline galleries are retained under the ignored local Carry forward: criterion 19 still requires documented maintainer review; criterion 20 remains failed, with the original ≤300 ms maximum required for both stress cases and policies; criterion 22/default enablement remains held. Historical routing stays the default. Exact Dijkstra claims remain limited to the supplied graph/cost, excluding terminal stub/turn/head/rounding effects. Research does not establish global layout optimality or a universal DP/cache speedup. No main merge, release, issue closure, or maintainer approval is implied. |
Summary
Layout repair previously changed DOM geometry inside route orchestration. This gives a per-visualizer coordinator ownership of sizing, movement, bounded repair, canvas allocation, rollback, and final paint, while path selection consumes measured data.
The initial models retain the legacy placement policies. Independent strategy seams accommodate future frame-order and trace-based heap planning; this PR does not enable global rearrangement. The extracted orientation-aware search preserves production weights/caps and gains an independent, bounded Dijkstra comparison oracle on the same graph and cost. Its exactness excludes endpoint stub turns, terminal stubs, heads, and rounding.
Prerequisite for issue #27 and PR #28. PR #28 targets this branch and includes its head as an ancestor. The algorithm inventory, two-cycle research report, interface comparison, glossary, and ADR explain algorithms, guarantees, DP/cache conditions, and future contracts.
Evidence
Before: routing owned resizing/movement and retry sequencing; entering frames could reuse DOM IDs; final Java intrinsic content could change after route measurement.
After: measured-scene routing, coordinator-owned effects/cleanup, independent production region models, unique frame IDs, intrinsic content before measurement, passive navigation regression checks, and one initial configured-state materialization. Ordinary filter setters remain synchronous, including the initial height callback; its regression was demonstrated RED and fixed.
Current pushed head:
9b9eebe4b61ac9df5b8b276b3a5f53b635d370d4. Runtime evidence binds clean7271983ec755166d51c8b95f1e591c5373517098; only two research-note wording corrections follow. No runtime, input, test, or bundle bytes changed. Markdown/link checks passed after the corrections.make check: 686 Python tests / 100% coverage / 2,091 statements, 300 frontend tests / 21 files, lint/types/docs. JDK 25 examples: 34 examples / 415 images. Focused native/navigation/cropping/frame-parent suite: 9 passed. Independent static reviews have no remaining actionable findings in their frozen scopes.12 native PNG/SVG pairs plus 12 reopened SVG rasters pass dimensions, four-sided ≥4 px padding, and first/restored PNG and SVG-route checks. All 12 descriptions match the supplied baseline; none of the PNG pixels or SVG route records is identical. Eleven dimensions match; self-loop is 1 px narrower. The frame fixture uses supplied synthetic helper frames. Native differences remain review evidence, without inferred approval or tracer semantics.
The 11-case main comparison retains six fresh layouts, five warmups, and 40 repaints/redraws. Dense-48 fresh maximum is 226.5 → 222.8 ms, full-redraw p95 14.0 → 15.8 ms; representative final redraw p95 ≤1.3 ms. This is not the independent/shared acceptance protocol or a general speedup claim.
Runtime-head CI passed JDK 21/25, builds, wheel checks, examples and native capture. Its review artifact records the CI merge ref separately. Final-head CI also passed JDK 21/25, builds, wheel checks, examples and capture. Its current review artifact has all seven checks true and all 74 input hashes matching current files.
Combined PR Add controlled shared-reference routing #28 runtime head
c688db7passes 367 frontend tests and CI's 693 Python tests / 100% coverage, plus examples and both native packages. All 28 controlled baselines pass, but both stress cases still fail 300 ms under both policies. Criteria 19, 20, and 22 remain open; historical routing stays default. See the detailed step-5 record for all 14 cases, six fresh samples for every gated case, provenance, and remaining limits.Step 1 — algorithm audit
Step 2 — literature research
Step 3 — interface comparison and design
Step 4 — implementation
Step 5 — native/navigation/performance and dependent integration verification
Merge Danger
Door: two-way
Legacy placement and routing policies remain in force, with measured output differences from correctness fixes and materialization ordering. Global rearrangement, default sharing enablement, main merge, release, and issue closure are outside this delivery.
Blast Radius: rendering
Stack/heap placement, geometry measurement, bounded repairs, routing lifecycle, navigation, and native exports are affected. The exact oracle verifies the supplied graph objective; it does not prove optimal painted drawings or optimal execution sequences.