Skip to content

fix(solver): topology and move-ranking load resolve a binding to its component, by identity (#498) - #514

Open
avrabe wants to merge 1 commit into
mainfrom
fix/binding-consumers-solver-topology
Open

avrabe wants to merge 1 commit into
mainfrom
fix/binding-consumers-solver-topology

Conversation

@avrabe

@avrabe avrabe commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Two solver sites from the #498 audit that #509 did not cover:

  • TopologyGraph::from_instance looked each Actual_Connection_Binding
    target up in a bare-name map of buses, so reference (right.can) was
    dropped (no edge), and two buses named can collided. It now resolves
    from the component that declared the binding. A resolved non-bus adds
    no edge, and an unresolved reference falls back to the name map.
    TopologyGraph has no production caller today (only spar-solver's
    tests), so this changes no shipped output. It is fixed so that the
    library is not wrong for its first user.
  • compute_total_load (the moves-enumerate ranking) resolved each thread's
    binding, then compared processor NAMES. A thread on a different
    processor that shares the target's name was counted toward the
    target's load. It now compares the resolved processor with the
    overlay's targets by index.

Oracles (unit, red-checked):

  • topology: reference (right.can) declared at the top connects cpu to
    right/can and not left/can. RED with the old topology.rs restored. A
    binding that resolves to a processor adds no edge.
  • total load: with t1 moved to cpu_a and t2 bound to a different cpu
    (cpu_b), cpu_a's load is t1's 0.2 alone. RED with the old name
    comparison restored.
  • workspace: 3334 passed, 0 failed.

NOT CLAIMED: compute_max_response_ns. It still finds a target's threads
by matching "on processor ''" in RTA's message TEXT. That needs RTA
to expose structured results, not a better string match. Also not
claimed: bus_bandwidth reading per-connection (applies to <conn>)
bindings. Both are recorded on #498.

Refs #498

🤖 Generated with Claude Code

https://claude.ai/code/session_01BnBWxgVEUPdsBTLNKtrA6Z

…component, by identity, not by name (#498)

Two solver sites from the #498 audit that #509 did not cover:

- TopologyGraph::from_instance looked each Actual_Connection_Binding
  target up in a bare-name map of buses, so `reference (right.can)` was
  dropped (no edge), and two buses named `can` collided. It now resolves
  from the component that declared the binding. A resolved non-bus adds
  no edge, and an unresolved reference falls back to the name map.
  `TopologyGraph` has no production caller today (only spar-solver's
  tests), so this changes no shipped output. It is fixed so that the
  library is not wrong for its first user.
- compute_total_load (the moves-enumerate ranking) resolved each thread's
  binding, then compared processor NAMES. A thread on a different
  processor that shares the target's name was counted toward the
  target's load. It now compares the resolved processor with the
  overlay's targets by index.

Oracles (unit, red-checked):
- topology: `reference (right.can)` declared at the top connects cpu to
  right/can and not left/can. RED with the old topology.rs restored. A
  binding that resolves to a processor adds no edge.
- total load: with t1 moved to cpu_a and t2 bound to a different `cpu`
  (cpu_b), cpu_a's load is t1's 0.2 alone. RED with the old name
  comparison restored.
- workspace: 3334 passed, 0 failed.

NOT CLAIMED: compute_max_response_ns. It still finds a target's threads
by matching "on processor '<name>'" in RTA's message TEXT. That needs RTA
to expose structured results, not a better string match. Also not
claimed: bus_bandwidth reading per-connection (`applies to <conn>`)
bindings. Both are recorded on #498.

Refs #498

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BnBWxgVEUPdsBTLNKtrA6Z
@github-actions

Copy link
Copy Markdown

Rivet verification gate

✅ 20/20 passed

count
Passed 20
Failed 0
Skipped (no steps) 0

Filter: (and (= type "feature") (or (has-tag "v093") (has-tag "v0100")))

Failed artifacts

(none)

Updated automatically by tools/post_verification_comment.py. Source of truth: artifacts/verification.yaml.

@codecov

codecov Bot commented Oct 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant