Repository navigation
Cascading list shadows across owners (#268), grouped complement filter (#266), tracing test flake (#263) - #269
Merged
Conversation
Tracing caches callsite interest process-wide. A callsite another test thread registers while a scoped capture subscriber is being installed can keep the 'never' interest it computed without that subscriber, so the capturing test misses the event. Both capture helpers now rebuild the interest cache once their dispatcher is installed. Closes #263
GroupedConstraintStream::complement and complement_with_key built their ComplementedConstraintStream from the extractor, key and collector but dropped the stream's accumulated filter, so rows a .filter(..) before .group_by(..) rejected were grouped and scored, and a key closure relying on the filter could panic. The complemented stream now carries the filter (type parameter Fi) and groups through a FilterNode, like the plain grouped stream. Closes #266 BREAKING CHANGE: ComplementedConstraintStream and ComplementedConstraintBuilder gain a filter type parameter Fi after EA. Code naming these types spells the extra parameter.
A list shadow could only depend on the list holding its element. A start time that waits on a task in another owner's list (job shop, flow shop, transfers between vehicles) could not stay correct incrementally: the director refreshed only the changed owner's elements. #[shadow_variable_updates] gains `cascading_field` (an Option<_> element field), `cascading_compute` (a solution method computing it from the previous element and the dependencies) and `cascading_dependencies` (the elements an element waits on). SolverForge owns ordering, propagation, change reporting and undo: - CascadePropagation (solverforge-core) recomputes the downstream cone of the changed elements in dependency order: each element at most once, after its inputs, and only when an input changed, so propagation stops where a value is unchanged. Elements on a dependency cycle are unset. - The score director defers element rows to the end of the move when PlanningSolution::HAS_CASCADING_SHADOWS is true: owners refresh their list structure, the last owner of the move propagates, every written element is retracted before its write and inserted exactly once. - Solutions without a cascading shadow keep their path: the branch is on an associated constant, and the director carries one pointer for it. Tests: engine against a full refresh (cycles, pruning, 400 random moves), the director over random moves and undos, a planning_model! saw/mill model through the director and through a full_assert solve, a documented compiled example, and a compile-fail case. Closes #268
Collaborator
Author
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.
Closes #268, closes #266, closes #263. One branch, one gate, one release.
#268: cascading list shadows across list owners
#[shadow_variable_updates]gainscascading_field,cascading_computeandcascading_dependencies. A start time can depend on the previous task on its machine and on tasks of other machines; SolverForge owns ordering, propagation, change reporting and undo.CascadePropagation(core) recomputes the downstream cone of the changed elements in dependency order: each element at most once, after its inputs, only when an input changed, so propagation stops where a value is unchanged. Elements on a dependency cycle created by a move are unset (None).PlanningSolution::HAS_CASCADING_SHADOWSistrue: owners refresh their structure, the move's last owner propagates, each written element is retracted before its write and inserted exactly once (dedup across owners).Option<Box<_>>pointer in the director's list-shadow state (no allocation unless used).planning_model!saw/mill model through the director and afull_assertsolve; compileddocs/modeling.mdexample; compile-fail case for missing list-structure fields.#266: uni grouped complement drops the stream filter
complement/complement_with_keynow group through the stream's filter (FilterNode). Breaking:ComplementedConstraintStream/ComplementedConstraintBuildergain aFitype parameter. Regression tests fail on the old code and pass now.#263: flaky construction telemetry test
Tracing caches callsite interest process-wide; both capture helpers now rebuild the interest cache after installing their scoped subscriber.
Verification
cargo test --workspace --all-features --no-fail-fast: 70 suites, 0 failurescargo clippy --workspace --all-targets --all-features -- -D warnings: cleanmake pre-release,make examples, zero-regression gate vs v0.29.0: posted below