12 KiB
Independent critique of interval-first port placement — 2026-09-12
Scope: fresh design/source review of .local/resize-port-policy-revision-design-20260912.md, prior independent review, actual .local/native-qa/resize-falsifiers-a95-01/case-1.log and case-2.log, their run receipt, and experimental projection/port-layout/router source. No implementation, compiler, native interaction or Gitea posts. This report is the only reviewer-written file. Root owns all other concurrent changes.
Judgment
Proceed with the isolated stable-ranking attribution control already assigned. A flat, common-obstacle interval experiment is justified next, but the evidence does not select interval-first as the general policy over bounded position-aware repair. Both need a correct placement witness; scalar common capacities stop being an adequate model once edge-specific ancestor exceptions matter. Neither nominal gap nor deterministic identities is an ergonomic stability guarantee.
The original 7e25b3d policy remains rejected. The executed a95db10 cases actually failed their intended criteria: 12/20 side changes at 259.9→260, and the added Top stub/NoClearPath failure. The logs also preserve the controls' limitations: Current height568 instead of259.9, and spacing-only gap11.78421. These observations do not establish a winning alternative.
The revision correctly rejects midpoint-only clearance and side-only repair, preserves frozen owner bounds, separates shadow assignment from manual overrides, and avoids routing feedback. Its near-corner shifted-position witness is useful. The following are concrete remaining challenges, not claims that the unimplemented candidate already fails.
1. A common interval capacity is exact only for genuinely common legal sets
Source boundary: routing.rs:627–647 constructs obstacles per edge from the ancestors of both endpoint owners. :739–747 excludes only the source owner from its source-stub test and only the target owner from its target-stub test. Port identity alone does not determine an obstacle's full-rectangle versus header treatment.
Source-derived nested witness, using frozen projected rectangles:
| Object | Rectangle / role |
|---|---|
| A | Owner at (0,0), 224×160 |
| P | Separate visible compound at (230,−120), 400×440 |
| B | Visible child of P at (260,70), 184×132 |
| C | Distant external left peer, outside P |
| Ports a1…a4 | A ports connected to B |
| Port z | A port connected to C |
For a1…a4, P is a target ancestor: its ordinary 64-unit header inflated by12 ends at y−44. P therefore does not block their Right stubs at y18…142. B's inflated left boundary248 is beyond their stub endpoint x242. Four Right positions18,59⅓,100⅔,142 are a nominal-gap witness.
For z, P is not an endpoint ancestor. Its inflated full rectangle starts at x218 and spans y−132…332, blocking every Right stub. A Left placement for z remains available.
A shared legal-set intersection across all five ports declares Right unusable despite the four clear Right placements. A shared union incorrectly grants z the same positions. Adding one external port can thus erase useful capacity for every internal-target port under the conservative common policy. Exact typed projection and routes still need execution; these are supplied projected-geometry premises, not a claim that arbitrary authored rectangles survive enclosure unchanged.
Decision implication: using the intersection is safe as a conservative flat experiment, with explicit unresolved classification, but cannot justify “insufficient usable border capacity” for the actual model or routine migration of all four ports. An unaffected-side/port-aware repair could retain them while dealing with z. The proposal's acknowledged per-port limit is therefore a practical competing-candidate discriminator, not only a theoretical matcher extension.
For one port with several incident edges, intersect its legal sets across those edges first: a single geometric port must serve all of them. Do not intersect different ports' sets and then present the resulting count as their true capacity.
2. Capacity witnesses cannot be fed back through the old independent interval spread
Source: projection/port_layout.rs:336 onward currently sums capacities and allocates counts proportionally before spreading independently within each interval. Anchor exclusions make sufficiently wide gaps between its original intervals; arbitrary obstacle cuts remove that protection.
Minimal pure interval witness at gap28:
- Legal union: [18,46] ∪ [48,76].
- Summed independent capacities:2+2=4, but four points cannot fit in the total58-unit span at minimum gap28.
- Global earliest-legal packing yields three valid points18,46,74.
- Even if a new capacity helper correctly returns3, the old proportional allocation chooses2+1 and spreads to18,46,62. The cross-gap separation is16. Choosing1+2 gives32,48,76 and the same defect.
Thus both count and final witness placement must change together. “Distribute remaining slack” is not harmless postprocessing. Every adjusted point must remain legal and every adjacent pair, including pairs in different intervals, must meet the selected gap. Earliest-legal packing is an exact maximum-count method for identical legal unions and equal separation: choosing an earlier feasible first point cannot reduce room for later points. That argument does not transfer automatically to independently restricted ports.
Per-port order also needs an honest boundary. If stable order is p then q, p permits only[80,108] and q only[18,46], no placement preserves that order; q=18,p=80 is feasible if reordering is allowed. A common count or unordered feasibility witness cannot prove feasibility under the existing peer-coordinate/ID order. Record “unresolved under preserved order” rather than equating it with geometric impossibility. No general matching implementation is required to expose this distinction.
3. Fixed identity ranking leaves two independent churn mechanisms
Primary preference threshold
Actual port_layout.rs:59–76 compares normalized center displacement. With owner (0,0), width224, six neutral ports connected to one far peer centered at(2000,2000), compare height223.9→224.0→224.1.
At223.9, normalized dy is greater than dx, so every port prefers Bottom. At224, equality chooses Right. Both relevant sides have seven nominal slots on both sides of this threshold; there is no scarcity. Six ports can therefore switch sides at once for0.1 height, for any chosen stable UUID set. Fixed fallback ranks never participate.
This is not a defect in the proposed identity mixer. It disproves treating stable ranks as a general resize-stability result. Retain the hard-preference threshold as an explicit ergonomic candidate decision; compare displacement and actual route/readability before deciding its benefit warrants the collective move.
Gap-tier reset
The revision proposes trying28 across sides before14 but does not fully define whether a failed nominal allocation restarts the whole owner at14. That natural implementation creates another analytic falsifier:
-17 ports all prefer Right; only Left and Right have clear legal intervals. -Width224; heights259.9 and260.0 are above the neutral semantic/content minimum for17 ports. -At259.9, nominal capacities are8+8, insufficient for17. At14 they are16+16, so preferred-first assignment is16Right/1Left. -At260, nominal capacities become9+9, and the whole-owner nominal retry assigns9Right/8Left. -Result: seven ports move away from the preferred side when the owner becomes0.1 taller, independent of fixed-ID fallback ranking.
This can be represented by clear vertical sides and fully blocked Top/Bottom corridors; use actual frozen projection and stub checks to establish that premise in a model fixture. A different tier policy may avoid the prediction. Define that policy before attributing a passing result to intervals. Per-side or localized degradation, or preserving a near28 spread for the extra port, are competing small policies to measure, not recommendations to add state or a general optimizer.
The inherited28 target is not itself a user-authored priority above all side stability. The executed eight-port spacing-only control already has17.71428 centers, clear exits and stable preferred sides. Its glyph/label readability still needs inspection, but it is a meaningful control against scattering across the owner simply to exceed28. Treat the28-before14 ordering as an experimental choice.
4. Manual overrides and exact router semantics are hard boundaries
The proposed shadow contract is sound: compute shadow sides without authored side/fraction overrides, then place manual ports exactly and repack only automatic positions within their existing sides. An anchor edit must not influence a conservative “common interval” cache, side count or repair order that changes unrelated automatic sides.
Use an explicit scarcity check: one automatic port's chosen side has a narrow clear interval around80; a manual anchor is moved to80. If the required exclusion consumes the interval, retain exact manual metadata and the automatic side and report the actual conflict. Silently dropping the obstacle restriction, using the legacy emergency evenly-spaced fallback, changing the automatic side or growing the owner would violate one of the stated boundaries. The current automatic_positions emergency return below gap0.001 does not accept obstacle intervals; it must not silently become the final obstacle-aware fallback.
Sharing the router's pure effective-obstacle logic is preferable to another geometric interpretation. Include EPSILON0.001 and strict boundary comparisons (routing.rs:335–353), source/target owner exclusion, the64-unit ordinary header, and the dedicated state header rule. Full visible rectangles are insufficient. Port geometry must still consume eligible edges before presentation filtering (projection.rs:547); a hidden exchange must not change side assignment. Folded descendants disappear before layout; promoted endpoints may no longer have a semantic port; dedicated state views bypass this layout. Preserve these exact stage boundaries without importing route search or occupied-path cost into projection.
Smallest decision-producing next checks
- Complete the already assigned stable-ranking attribution against the two frozen failures. Add the six-port diagonal preference and17-port tier examples as bounded policy falsifiers once the tier behavior is explicit; do not replace their criteria with determinism alone.
- Before integrating obstacle intervals, verify the three-point cross-gap witness and final placement checks, including open/boundary tolerance and a manual exclusion that consumes all legal space. Carry the accepted witness into final projection.
- Compare interval-first and a narrowly described position-aware repair on the already proposed near-corner scene; both should keep five clear nominal-gap Right ports. Then use the nested a1…a4/z witness to determine whether a common-capacity model is too conservative for the intended scope. Do not implement two complete frameworks merely for symmetry.
- Preserve the exact route rule boundary with a compact filtered/unfiltered and folded/unfolded pair, plus one mixed-ancestor port. Check actual ProjectedView nodes/endpoints first, then every relevant mandatory stub. Escalate to matching only if these executed fixtures expose a useful layout the bounded representation cannot provide.
Bounds/source/manual identity, final glyph gaps, blocked stubs, route warnings and adjacent-frame side/position displacement are sufficient immediate outputs. Broader route/label/native eight-handle acceptance remains root-owned and is still necessary before adoption. No revised production policy, expanded format specification or issue closure is endorsed here.