Repository navigation
fix(solver): a thread's existing binding names the processor it resolves to, so spar allocate keeps a pre-bound thread on it (#498) - #509
Open
avrabe wants to merge 1 commit into
Conversation
Rivet verification gate✅ 20/20 passed
Filter: Failed artifacts(none) Updated automatically by |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
…ves to, so `spar allocate` keeps a pre-bound thread on it (#498) The solver named processors by their dot path (`Top.impl.cpu2`) and kept each thread's binding as its raw target (`cpu2`). allocate (ffd/bfd) and milp match the two by string, so they never matched. On the published v0.46.0 binary, `(reference (cpu2)) applies to app.t` gives: warning: Thread 'Top.impl.app.t' pre-bound to unknown processor 'cpu2' Unallocated threads: Top.impl.app.t ModelConstraints::from_instance now resolves the binding from the component that declared it (actual_processor_binding_with_overlay, REQ-AADL-REF-CONTEXT-001) and records that processor's dot path, which is how `processors` names it. An unresolved binding keeps its text, as before. The unit test that sets the binding directly on a thread still sees `cpu1`. Oracles: - CLI tests: the pre-bound thread stays on Top.impl.cpu2 with no "unknown processor" (red on v0.46.0: unallocated), and a binding to a missing `cpu9` is still reported as unknown; - `spar analyze` does not use the solver. Full-output corpus diff anyway: 462 runs, 451 instantiating, identical; - cargo-mutants (spar-solver, spar): 2 mutants, both unviable, since the change is a closure inside `map`. The hand mutant that matters, reverting to the raw binding text, IS v0.46.0's behaviour, and the CLI test fails on it. Refs #498, #508 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BnBWxgVEUPdsBTLNKtrA6Z
avrabe
force-pushed
the
fix/binding-consumers-solver
branch
from
October 21, 2026 12:31
36b1fde to
5e60824
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The solver named processors by their dot path (
Top.impl.cpu2) and kepteach thread's binding as its raw target (
cpu2). allocate (ffd/bfd) andmilp match the two by string, so they never matched. On the published
v0.46.0 binary,
(reference (cpu2)) applies to app.tgives:ModelConstraints::from_instance now resolves the binding from the
component that declared it (actual_processor_binding_with_overlay,
REQ-AADL-REF-CONTEXT-001) and records that processor's dot path, which is
how
processorsnames it. An unresolved binding keeps its text, asbefore. The unit test that sets the binding directly on a thread still
sees
cpu1.Oracles:
"unknown processor" (red on v0.46.0: unallocated), and a binding to a
missing
cpu9is still reported as unknown;spar analyzedoes not use the solver. Full-output corpus diffanyway: 462 runs, 451 instantiating, identical;
change is a closure inside
map. The hand mutant that matters,reverting to the raw binding text, IS v0.46.0's behaviour, and the CLI
test fails on it.
Refs #498, #508
🤖 Generated with Claude Code
https://claude.ai/code/session_01BnBWxgVEUPdsBTLNKtrA6Z