Repository navigation
feat(solver): report the resolved solver policy in final telemetry - #260
Merged
Merged
Conversation
The compiled runtime already resolved an exact phase plan at the end of every solve, but published it only into an enabled candidate trace. It now also lands in SolverTelemetry::resolved_phase_plan for every compiled solve, so the policy a solve actually ran is visible without tracing. The plan gains what #253 asks diagnostics to explain: - default construction steps carry the model declaration that selected them (reason = savings_hooks_declared, required_assignments_remain, ...); - the default local-search node carries its family weighting and the families each slot did not receive with the capabilities they lacked (excluded_families = family@slot:missing=...); - every local-search node carries its effective accepted-count horizon, which separates an omitted forager (the default policy's 256 on list models) from an explicit accepted_count without a limit (1); tabu without a forager and variable neighborhood descent report none. An explicit phase's horizon is resolved from the lowered phase when the plan is published, not while compiling the runner: an extra attribute built at compile time grew one cold allocation by 48 bytes, which moved the heap layout of the hot neighborhood loops (gate: scalar_change simulated D1 misses +10.8%, list_swap LL +5.9%, with equal instructions and allocation counts). Compiling a runner allocates exactly as before. docs/configuration.md documents the default construction choice, the acceptor and forager per model shape, and the omitted-versus-explicit component contract; tests pin each of them. Solver behaviour is unchanged. Refs #253
blackopsrepl
force-pushed
the
feat/resolved-policy-telemetry
branch
from
November 13, 2026 17:39
998966e to
82e0e04
Compare
Collaborator
Author
Zero-regression gate — first run failed; cause found and fixedThe run for
Cause: heap layout, not new work in the hot loop.
Fix (amended into this PR's single commit): an explicit phase's horizon is now worked out from the lowered phase when the plan is published (
Cachegrind smoke, main vs the fixed commit, at the gate's iteration counts:
The qualifying run on the amended commit follows below. Zero-regression gate —
|
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.
First of the four PRs for #253 (diagnostics before any policy change). Solver behaviour is unchanged.
What changes
SolverTelemetry::resolved_phase_plan(new public field). The compiled runtime already resolved the exact phase plan at solve end but only published it into an enabled candidate trace. Every compiled solve now reports it in final telemetry; it isNonebefore the solve ends.reason. Each default construction step names the model declaration that chose it:savings_hooks_declared,precedence_construction_order_and_ownership_declared,precedence_and_construction_order_declared,no_specialized_list_policy_declared,required_assignments_remain,only_optional_assignments_remain,scalar_slot_outside_assignment_groups,route_hooks_declared_and_route_non_empty.weighting(equal) andexcluded_families: each family a slot did not receive and the capabilities it was missing, e.g.nearby_list_change@...:missing=cross_position_distance.forager_accepted_count_limit, the effective horizon. An omitted forager on a list model reports 256; an explicitaccepted_countwith nolimitreports 1.docs/configuration.mdadds the default construction table, the acceptor/forager table per model shape, and the omitted-vs-explicit component contract.docs/running-solves.mddescribes the field. Solver wireframe andpublic-api.txtare updated.Verification
resolved_policy_telemetry.rs(facade integration, 3 tests):savings_hooks_declared, Late Acceptance, accepted count 256, equal weighting and stratified-random order.default:AcceptedCount { limit: 256 }and limit 256.accepted_countforager withoutlimitreports limit 1.missing=precedence); the reduced dynamic slot lists each missing capability.make pre-releaseandmake examplespass.main(6ffcacab): result posted below.Refs #253