Skip to content

pack_aod_rectangles lacks the chain closure, so Starlark policies still serialize packed chains #940

Description

@weinbe58

Part of #887 — the known limit documented (not fixed) in #919.

dsl::pipeline::pack_aod_rectangles is the fourth caller of BusGridContext::build_aod_grids, and the only one that does not call close_chain_entries first. The heuristic generator and both entropy candidate paths close their mover sets over conveyor chains before building grids; a Starlark policy's candidate pipeline does not.

Consequence: cause 3 of #910 persists for the DSL pipeline on a chain-capable spec. build_aod_grids derives movers from entries.keys(), and #896's repair closure can only pull in cells whose source is already an entry (it must never promote a stationary atom, or the plan and the hardware disagree). A follower already sitting on its target is never nominated by scoring, so a policy's chain assembles only when every follower happens to be selected on its own merit — on a packed block it isn't, and the policy serializes or deadlocks where the built-in generators now solve.

Fix shape

Mirror the entropy driver (drivers/entropy.rs): call close_chain_entries before build_aod_grids, and fold the returned ChainLinks into entry_by_lane so the co-selected follower moves are recorded in the emitted PackedCandidates — an emitted plan must record every atom it moves.

Tests

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    category: bugCategory: this is a bug or something isn't working as expected.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions