Files
ARCADIA-Studio/harness/experiments/resize-port-policy-20260912/source-handoff.md
T

6.4 KiB
Raw Blame History

Port-policy prototype source handoff — 2026-09-12

Root-owned issue16 experiment; no policy promotion or production integration.

  • Worktree: C:/Users/User/Documents/Git/ARCADIA-Studio/.local/resize-port-policy-20260912
  • Branch: codex/resize-port-policy-experiment-956atf-20260912
  • Base: e57c390
  • Source commit: 7e25b3d3907693cbbf03bb51b5e08b01d743a934 — Prototype port layout policies without changing defaults
  • Worktree status after commit: clean.

Only four owned experimental core/test files changed. Root tracked inputs, Gitea and native apps were not touched. rustfmt performed source-only formatting and git diff --cached --check passed. The three foundational gates subsequently passed under root's serialized compiler lease, against this exact unchanged commit, using a fresh isolated target directory. Compiler lease was released at 2026-09-12 22:10 UTC; no owned compiler remains live.

Source shape

crates/oa-core/src/projection.rs adds a deliberately experimental, nonpersisted ExperimentalPortPolicy enum and project_diagram_with_experimental_port_policy. Ordinary projection and availability entrypoints explicitly use Current; no schema or UI/backend setting exists.

projection/port_layout.rs keeps the current side-choice and position pipeline. Current retains its original capacity enlargement and second enclosure. SameSidesAdaptSpacing omits that enlargement. CapacityAware assigns automatic shadow sides within finalized edge capacities before applying the existing manual overrides/position allocator; it likewise omits the enlargement.

projection/port_capacity_experiment.rs implements the bounded four-side allocator. It prefers a directly free clear side, then tries alternating reassignment over at most four visited side bins. If clear capacity cannot fit all ports, it favors a crowded clear exit over an empty blocked side and leaves spacing adaptation to the existing allocator. Manual metadata never enters shadow assignment, preserving owner/unrelated-side stability on manual edits. No generic flow library or inverse iteration was added.

Executed evaluator set

tests/experimental_port_policy.rs contains eight actual-core comparisons:

  1. Explicit Current equals ordinary default projection for the demo and generated fixtures, accompanied by the historical728×2808 control and the three forbidden-rectangle controls elsewhere in the tests.
  2. The three previously impossible absolute rectangles remain impossible under Current and are exact under both alternatives.
  3. All eight outward handles over the eight-port fixture preserve fixed edges and inactive authored axes under the alternatives. 4.100 concentrated neutral ports compare Current, spacing-only and capacity-aware geometry/gaps; the test expects spacing-only overlap below14-unit glyph width while capacity-aware uses available sides at nominal28 spacing.
  4. Manual anchor edits retain all node geometry and unrelated automatic sides, plus canonical source roundtrip.
  5. Exact crowded/corner manual fractions and complete projection survive canonical reopen under both alternatives.
  6. The established narrow peer-gap example keeps clear sides, actual port route endpoints, orthogonality and no route warning in all modes.
  7. Capacity projection is deterministic, alias-independent and does not change the selected node's geometry when peers move.

Three private allocator tests cover the20-demand scarcity assignment, overflow choosing a clear rather than blocked side, and all343 nonempty three-side mask triples against an exhaustive small assignment oracle.

The scarcity mask test is assignment-level only. Its clear masks have not yet been realized by a validated model with real peer blockers. No claim of full geometric scarcity coverage is made.

Verified execution

Receipts: resize-port-policy-20260912/.local/gate-7e25b3d-20260912-01/. The exact input and binary hashes, toolchain paths, environment, commands, exits and unchanged checks are in inputs.json, per-gate JSON/log pairs and accepted-summary.json. Windows gnullvm rustc/cargo 1.98.1; root absolute .local/toolchain/env.ps1; CARGO_BUILD_JOBS=1; isolated CARGO_TARGET_DIR=.../resize-port-policy-20260912/.local/target-7e25b3d-01.

cargo test --locked --jobs 1 -p oa-core --test experimental_port_policy -- --nocapture --test-threads=1
cargo test --locked --jobs 1 -p oa-core --lib capacity_experiment::tests -- --nocapture --test-threads=1
cargo test --locked --jobs 1 -p oa-core --test port_anchors -- --nocapture --test-threads=1

Results: comparison 8/8 (0.36s test time; 362.671s including fresh build), corrected allocator 3/3 (0.01s; 1.437s total), port anchors 13/13 (0.42s; 12.328s total), all exit 0. The initial allocator filename filter selected zero tests; its original allocator.json/log is preserved but excluded as test evidence. The corrected module filter explicitly required three passing tests. summary.json records original command exits only; use accepted-summary.json for the corrected three-gate conclusion. All stamped inputs and protected root oldcore rlib/environment hashes remained unchanged.

Measured 100-port owner bounds and minimum same-side center gaps: Current 728×2808 / 27.999878; SameSidesAdaptSpacing 728×804 / 7.757538; CapacityAware 728×804 / 28.444397. The isolated core rlib SHA-256 is 0682ad081a8bc4ff5aaba85ad800d7f54303da08ee47f8529a451cd0d8a49531.

The independent review resize-port-policy-independent-review-20260912.md was read after the base gates closed. Its concrete predicted 20-port threshold churn (12 side changes for 259.9→260 height) and unrelated-top-obstacle blocked mandatory stub are valid next falsifiers, not covered by these green tests. Both predictions remain unexecuted. Preserve this committed implementation for comparison and add those cases in a later authorized source/compiler cycle before selecting a production policy.

The new tests are useful foundational gates, not policy acceptance. The100-port test measures geometry and glyph spacing, not full100-edge routed readability. Actual offset-specific stub clearance, realistic routing/label/crossing costs, source/API transaction lifecycle, enclosure/fold/state inverse suites, native UX, large-model performance and upgrade rendering drift remain downstream evidence. The existing resize-port-policy-20260912.md comparison records those criteria and rejected approaches.

No compiler or long-running task remains owned by this source handoff.