107 lines
6.2 KiB
Markdown
107 lines
6.2 KiB
Markdown
# First automatic-layout experiment
|
||
|
||
## Decision
|
||
|
||
Retain the hierarchy/label-spacing prototype for further experiments; do not
|
||
adopt it as production Auto-layout. It improves several named fixtures beyond
|
||
resetting old bends, but regresses shared connector length in two fixtures.
|
||
Shorter routes and zero proper crossings do not establish readable connections.
|
||
The next experiment should isolate route selection at fixed node positions,
|
||
before adding more node spacing or replacing the existing routing engine.
|
||
|
||
## Method and receipt
|
||
|
||
Tested source `e7deea7039bcf31675cffbb462cfeb19d62a7e20`, based on released
|
||
`715036e132677dd2bc2fb37ed316d93dc9987aec`. No production file changed in that
|
||
commit. Windows x86_64-pc-windows-gnullvm, Rust 1.98.1, LLVM mingw, one Cargo job,
|
||
incremental compilation disabled; Linux excluded. Command:
|
||
|
||
```text
|
||
cargo run --locked --offline -p oa-core --example auto_layout_probe
|
||
```
|
||
|
||
The recorded runner completed at 2026-09-25T00:42:06Z, exit 0, unchanged inputs,
|
||
no recorded failure. stderr contains only compile/run progress. This means the
|
||
diagnostic process completed, not that layout quality passed. The JSONL has one
|
||
metadata record and nine fixture records, with full input/result Projects and
|
||
core route geometry. Its SHA256 is
|
||
`21786ae5cb668f60e9252dc884668ee5e98289443d0b3723a9ea69bf21d47fd1`.
|
||
|
||
[Evidence archive](run-01/probe-e7deea70.zip), 900995 bytes, SHA256
|
||
`c52f82d4782cd6a7f8cbe67498c8b2371e99204a65976aa8bcbbd0a86f835069`,
|
||
contains original receipts, source inventories, output, runners and 37 offline
|
||
geometry PNGs. [Manifest](run-01/manifest.json) binds every member and the
|
||
post-run executable identity. All archive members were byte-compared to the
|
||
local originals. Original absolute paths describe this machine; reproduce using
|
||
the source commit and command above, with a suitable Windows Rust toolchain.
|
||
|
||
## Observations
|
||
|
||
Values below compare existing Layout with the layered prototype. Reset-only
|
||
matches existing Layout except for the authored-detour fixture, where it already
|
||
reduces length to 240, bends to zero and area to 90816. Shared length is pairwise
|
||
segment overlap, not the union of occupied space; area uses recorded bounds.
|
||
|
||
| Fixture | Shared length | Label/node collisions | Route length | Bends | Area |
|
||
| --- | ---: | ---: | ---: | ---: | ---: |
|
||
| Four-node chain | 0 → 0 | 0 → 0 | 720 → 246 | 0 → 0 | 213312 → 150744 |
|
||
| Seven-node chain | 0 → 0 | 0 → 0 | 2560 → 492 | 8 → 0 | 523584 → 271920 |
|
||
| Diamond | 36 → 82 | 0 → 0 | 2200 → 688 | 8 → 4 | 300576 → 260832 |
|
||
| Crossed bipartite | 276 → 344 | 0 → 0 | 3284 → 688 | 12 → 4 | 300576 → 165360 |
|
||
| Nested cross-boundary | 0 → 0 | 1 → 0 | 1076 → 364 | 6 → 2 | 284096 → 366528 |
|
||
| Authored detour/label | 0 → 0 | 0 → 0 | 2348 → 187 | 6 → 0 | 628040 → 83820 |
|
||
| Fixed ports | 0 → 0 | 0 → 0 | 916 → 863 | 4 → 4 | 125976 → 116754 |
|
||
| Reversed children in two containers | 148 → 0 | 1 → 0 | 872 → 372 | 4 → 0 | 288512 → 272800 |
|
||
| Long ordinary labels | 36 → 36 | 2 → 0 | 1340 → 1436 | 4 → 4 | 200448 → 208800 |
|
||
|
||
Proper interior crossings, unrelated node overlaps, unrelated edge/node
|
||
penetrations, label/label collisions, unrelated label/stroke intersections and
|
||
route warnings are zero in the baseline, reset and candidate outputs. This is
|
||
not proof of crossing elimination: the crossing definition excludes bend and
|
||
T contacts, and overlapping strokes can make endpoint pairing ambiguous.
|
||
|
||
The parent inspected offline geometry for the reversed-container baseline and
|
||
candidate, crossed-bipartite candidate and long-label candidate. Reordering the
|
||
right container's children separates the two routes; the bipartite result has
|
||
a visually ambiguous shared central trunk. The long-label boxes occupy the
|
||
available corridors. These images render core boxes/lines, not actual label
|
||
glyphs or the desktop application, and therefore are not native UI acceptance.
|
||
|
||
Every candidate reports exact same-input determinism, idempotence and equality
|
||
to its first result for calls 2–10. Reported semantic, node identity/metadata and
|
||
nongeometry conservation hold. JSON and canonical single-source parse/format
|
||
round trips hold for all nine before/baseline/reset/candidate Projects. The
|
||
authored-detour route changes intentionally. These assertions do not separately
|
||
establish hidden-route or attachment lifecycle policy. Other-view conservation
|
||
is vacuous in these single-view fixtures.
|
||
|
||
Existing Layout's Session operation passes one-step Undo/Redo and history
|
||
checks. The pure candidate function has no integrated command/history evidence.
|
||
The [source review](probe-review.md) defines remaining metric and fixture gaps.
|
||
Folded/filtered topology, State/Allocation diagrams, cycles/undirected graphs,
|
||
large models, multifile sources, application/API admission and native editing
|
||
remain outside this run. Issue36's multiline State candidate is not in this base.
|
||
|
||
An [independent results audit](results-audit-01.md) checked receipt bindings,
|
||
complete Projects, all 37 image hashes and eight offline images. It independently
|
||
recomputed both shared-route regressions and confirmed the scoped conclusions.
|
||
|
||
## Implications
|
||
|
||
Resetting obsolete bends is useful but insufficient. Hierarchy ordering and
|
||
label clearance have distinct value, with measurable area/length tradeoffs.
|
||
Increasing a global gap cannot be assumed to fix shared-route ambiguity.
|
||
Inspect the existing router's candidate scoring and compare complete endpoint
|
||
join costs, overlap penalties and available lane candidates using the same
|
||
geometry. Preserve the full quality vector and endpoint/obstacle invariants;
|
||
reject a change that merely converts overlap into uncounted contacts.
|
||
|
||
The [routing inspection](routing-experiment-plan.md) identified a concrete
|
||
asymmetry: a locally selected route leg scores the source join but omits the
|
||
target-stub join until after choosing that leg. Test that small correction first,
|
||
at unchanged node positions, before the auditor's proposed alignment/spacing
|
||
alternatives. This is a falsifiable source-based hypothesis, not a conclusion
|
||
that it explains all shared routes. A separate committed candidate will preserve
|
||
this first control; no overlap weight or node placement should change in that
|
||
comparison.
|