Skip to content

fix(planner): apply deterministic proposal ordering (#1399) - #1622

Open
DevChiniwala wants to merge 1 commit into
traverse-framework:mainfrom
DevChiniwala:codex/issue-1399-deterministic-plan-order
Open

DevChiniwala wants to merge 1 commit into
traverse-framework:mainfrom
DevChiniwala:codex/issue-1399-deterministic-plan-order

Conversation

@DevChiniwala

Copy link
Copy Markdown
Contributor

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-composition
  • 004-spec-alignment-gate

Project Item

What Changed

  • Contracts changed: Spec 1277 is amended to v0.2.0 with Decision 98's total
    ordering, post-ordering candidate limit, and no-preference rule.
  • Runtime behavior changed: browserLocalPlan completes 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.
  • Compatibility impact: response schemas and limits are unchanged; ambiguous
    TypeScript results may now appear in the approved deterministic order.
  • ADR needed or linked: no new ADR; this implements Decision 98 recorded on
    browserLocalPlan/build_chains: no stated preference among multiple valid-length proposals #1399.

Validation

  • Spec alignment checked
  • Contract alignment checked
  • Tests updated and passing
  • Core coverage preserved
  • Required validation gates passing

Validated locally:

  • cargo +stable fmt --all -- --check
  • cargo +stable test --locked -p traverse-embedder --lib browser_local_plan
    (24 passed)
  • cargo +stable clippy --locked -p traverse-embedder --lib --tests -- -D warnings
  • npm run build
  • node --test tests/browserLocalPlan.test.mjs (28 passed)
  • git diff --check

Notes

The full web package test command also requires the generated
packages/web/TraverseEmbedder/runtime/runtime.wasm, which is absent from a
fresh checkout. Its planner tests pass independently; CI remains authoritative
for the artifact-backed bundle suites.

Copilot AI balanced review requested due to automatic review settings October 3, 2026 12:51

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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.

browserLocalPlan/build_chains: no stated preference among multiple valid-length proposals

2 participants