Files
ARCADIA-Studio/harness/experiments/scc-placement-20260925/source-review.md
T

10 KiB
Raw Blame History

Independent SCC-placement source review

2026-09-25. Reviewed the initial condensed.rs handoff and the formatted candidate at 5300a8c803119dd57d86424867d3107db0ef256d, plus the parent CLI and plan. No compiler, router, engine or GUI execution; no candidate edits by reviewer. This report is pre-experiment and pending the accepted perimeter correction below.

Reviewed formatted hashes:

  • crates/oa-core/examples/auto_layout_probe/condensed.rs: 3bb9bcf2ee96d0c0c5beb2b7173c4307c9c9571a38bde3c621f3b5eae0834f86.
  • crates/oa-core/examples/auto_layout_probe.rs: 36b81ec8c2ba58d1845f80e3afbfd16307035995893c5359c9e45c3db916ea96.

Finding requiring pre-experiment correction

P2, bounded experiment contract — compact-grid scoring includes unused slots. condensed.rs:59 scores every nominal rows×columns perimeter envelope, then returns only its first n slots. For a two-node component, the nominal2×2 grid includes an unoccupied second row in its aspect ratio, while actual output places both nodes in a single horizontal strip. Consequently the advertised physical aspect≤2 preference does not describe the occupied cell envelope. This can affect the small cycle fixtures independently of the larger diagnosed SCCs.

Parent accepted a pre-execution correction: include valid single-row/single-column grids with unique slots, score the actual first n occupied cell slots, preserve the predeclared aspect/area/tie order, and document the maximum-member-cell approximation for heterogeneous sizes. Add the two-node compactness witness. This is a correction to the chosen rule before results, not permission for a later rotation/packing parameter search. No overlap or model corruption was identified in the old slots; the defect concerns the implementation's selection criterion. Closure requires inspection of the resulting patch and its eventual parent-owned gate result.

Source findings without a blocker

Graph identity is explicit and coherent. lift maps an endpoint to the immediate child-subtree representative of the current planning parent. components computes mutual reachability and partitions canonical sibling indices; condensation removes internal edges and longest-path ranks are propagated in a real topological order. No arbitrary vertex breaks a still-cyclic component. On flat graphs this is the actual visible directed graph; on compounds it is the documented sibling-subtree quotient, which may differ from leaf semantic SCCs. Diagnostics retain parent, membership, rank, walk and lifted arcs. No semantic reparenting or endpoint rewriting occurs.

Undirected policy is explicit. Undirected links create no SCC/rank arcs, but remain in local gaps and deterministic neighbor proximity. Same-rank BFS reads all links; directed inter-component links cannot connect equal ranks, so this does not quietly assign a direction to an undirected edge. Relation-ID permutation does not change the alias/placement-based SCC traversal, although released routing order can still affect final paths.

Boundary-neighbor influence is incomplete by design. If either endpoint cannot be lifted into a sibling group, that edge is skipped at that group. It may affect an ancestor's block order but not the child's internal ordering relative to external neighbors. In particular, the two-container reversed-child witness need not improve simply because the parent-level condensation is coherent. Parent acknowledged this limit and chose to preserve failures/no-change results rather than append a new heuristic before the fixed experiment. Report it rather than claiming general cross-boundary ordering.

Local bounds and container geometry are consistent in source. Descendant groups are measured before their parents; block cells use maximum member dimensions, slots are disjoint, same-rank blocks are vertically separated, and ranks are horizontally separated. Expanded containers enclose their child blocks with32-unit side/bottom padding and header+32 at top. State projections use the core State header height; ordinary header64 agrees with the current architecture projection. Current core port footer is24, within the32 bottom padding. Original projected minima are retained; no shrink is introduced. Repeated calls must still check that saved container sizes and final reprojection do not ratchet or oscillate.

Folded and stored metadata are delegated correctly. A folded node is an opaque visible leaf with original projected compact size; a folded node unexpectedly having visible children errors. Final import_placement checks exact collapsed compact size while preserving stored expanded size, moves latent descendants under the nearest visible collapsed ancestor, retains unrelated omitted nodes, and performs original-to-final route reset/translation once. The candidate does not overwrite authored anchors or generated routes during intermediate packing. Other views remain untouched. The external result audit must compare full records; emitted broad conservation booleans alone do not establish hidden-route preservation.

Final geometry is authoritative. Accumulated offsets convert each nested position to diagram coordinates once. Import validates complete intended versus actual projected node geometry. The final lead diagnostic is run on that final projection and rejects a blocked endpoint pair; no iterative repair, lead shortening or port rewrite is introduced. An empty report still does not prove full-route success, node/header penetration absence, or label readability. The observer correctly emits final metrics and ten-call outcomes instead of a quality-pass Boolean.

Association-role sizing was corrected before this review pin. The initial handoff used only center-label dimensions. At condensed.rs:231 the formatted candidate now takes maximum center and association_end_geometry dimensions, matching the earlier native policy. This sizes gaps conservatively by estimates; it does not independently measure or certify association-end label collisions. Existing main-label metric counts must not be presented as all-label native acceptance.

Boundedness is adequate for this isolated test. Stored nodes≤256, visible edges≤1024, finite positive minima,100000-unit final extent and a20-million weighted-work allowance bound candidate scope. Reachability, grid enumeration and parent walks have bounded domains; hierarchy cycles/missing parents error. The work count is not an exact CPU/projection/router-operation bound and original label estimation invokes the bounded existing router before much of this accounting. Parent process timeout remains separate. Failure drops the private candidate.

Tests and interpretation

Current tests independently verify two directed cycles remain distinct across a one-way bridge and that ten perimeter slots are unique/disjoint. They do not establish full SCC placement, header/child enclosure, folded metadata, actual port feasibility or ID-permutation quality. The new two-node test should target the identified scoring defect rather than restate an implementation loop. The frozen five realistic plus nine small scenes, same-input duplication and ten repeated calls are the appropriate next evidence.

On candidate error, the CLI reports unsupported/error and original metrics; it does not retain the partial planning diagnostics or identify each final lead blocker in the error. That is an acknowledged diagnostic limitation, not evidence the input model was changed. Do not infer which SCC order or port caused a rejected result solely from the generic error text.

No further material source defect was identified in the reviewed pin. Keep production Arrange/router unchanged, preserve every unsupported/error case, and judge the full output vector. Source correctness does not establish the proposed compact-block hypothesis or engineer traceability.

Perimeter finding closed in source

Independently inspected ea18adc061f3bf8bb448b34e28be4266ffde1aa3 against5300a8c8 before any SCC diagram experiment output. perimeter_slots now handles single rows/columns without duplicate corners; enumeration includes those choices. Every score derives width/height from the maximum x/y of the actual first n occupied slots, with maximum-member cell sizes and the same aspect≤2/area/tie priority. The documentation accurately qualifies this as a cell-envelope heuristic; heterogeneous actual node envelopes can differ.

The added two-node witness distinguishes the defect: cells224×160 with gaps250×56 select2×1 and positions(0,0),(0,216), whose occupied envelope224×376 is compact; the competing horizontal envelope698×160 is not. The capacity/work charge includes generated perimeter slots. No production routing, metadata or import policy changes accompany this correction. The P2 source finding is closed; no remaining material source blocker for the fixed experiment was found. Parent gate19 is in progress at review time, so this closes static correctness only, not test execution or layout quality. A redundant constant assertion in the test is nonessential and can be removed if strict Clippy requires it without changing the meaningful witness.

Exact follow-up through4dd764fa

Reviewed the complete ea18adc061f3bf8bb448b34e28be4266ffde1aa3→4dd764fa6cfc6920350383e523ba5a597412ddf4 diff: one file, four insertions/five deletions. In components, for start in 0..n becomes reach.iter_mut().enumerate(), and reads/writes of reach[start][...] become accesses through that same mutable row. Every row is still visited once in ascending start order; start reachability, DFS stack behavior, adjacency iteration, charge calls and visited tests are unchanged. SCC membership/order and all planning policy are therefore unchanged in source. Removing the constant ratio assertion leaves the meaningful expected2×1 grid and exact two positions asserted.

Read gate20's retained receipt/log: strict Clippy at ea18adc0 exits101 with unchanged inputs because of clippy::needless_range_loop in that loop; it is not a passing gate. The4dd764fa change addresses the reported idiom without adding an allow attribute or weakening the diagnostic policy. Current condensed.rs SHA256 is ef8050019ad4b436d28a8bbd83ba3addf0315ba021e2e6fe453b96aeb299e739.

No new material source finding. Perimeter P2 remains closed through4dd764fa. Parent gate21 and later Clippy/build/diagram outcomes are pending for this review; no runtime, performance, geometric-quality or native acceptance is inferred from this static equivalence check.