fix(planner): apply deterministic proposal ordering (#1399) - #1622
Open
DevChiniwala wants to merge 1 commit into
Open
DevChiniwala wants to merge 1 commit into
DevChiniwala wants to merge 1 commit into
Conversation
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.
Summary
Fixes #1399 by applying Decision 98 consistently to browser-local workflow
planning. Valid proposals are ordered shortest-chain-first, with ties broken
lexicographically by the ordered capability-id chain, before the five-proposal
limit is applied.
The TypeScript planner previously stopped after the sixth depth-first result.
That allowed an early longer chain to displace a shorter chain discovered
later. The Rust implementation already sorted the complete bounded result;
both implementations now consume one shared conformance fixture that captures
the mixed-length and tie-breaking case.
Governing Spec
1277-browser-local-workflow-composition004-spec-alignment-gateProject Item
What Changed
ordering, post-ordering candidate limit, and no-preference rule.
browserLocalPlancompletes its bounded search,globally orders and deduplicates valid chains, then returns the first five.
The 4,000-call and eight-node limits remain in force.
TypeScript results may now appear in the approved deterministic order.
browserLocalPlan/build_chains: no stated preference among multiple valid-length proposals #1399.
Validation
Validated locally:
cargo +stable fmt --all -- --checkcargo +stable test --locked -p traverse-embedder --lib browser_local_plan(24 passed)
cargo +stable clippy --locked -p traverse-embedder --lib --tests -- -D warningsnpm run buildnode --test tests/browserLocalPlan.test.mjs(28 passed)git diff --checkNotes
The full web package test command also requires the generated
packages/web/TraverseEmbedder/runtime/runtime.wasm, which is absent from afresh checkout. Its planner tests pass independently; CI remains authoritative
for the artifact-backed bundle suites.