Skip to content

test(ci): isolate dispatcher tools and complete selection metadata - #7621

Merged
kixelated merged 3 commits into
mainfrom
quest/m0/ci/dispatch-selection-gaps
Nov 2, 2026
Merged

kixelated merged 3 commits into
mainfrom
quest/m0/ci/dispatch-selection-gaps

Conversation

@kixelated

@kixelated kixelated commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

The dispatcher fixture appended the caller's PATH. When zizmor was added to the dispatcher without a stub, CI's installed zizmor hid the missing fixture command, while hosts without it failed. Separately, the io_uring selector fixture passed while emitting four jq errors because its Cargo metadata omitted workspace_root and package targets.

Approach

Keep the dispatcher fixture's PATH restricted to explicit stubs and required shell utilities. Clear BASH_ENV so shell startup cannot replace it. Add a regression where a tool exists on the caller's PATH but its fixture stub is missing: strict CI must refuse it.

Complete the io_uring metadata fields the selector reads, assert zero stderr, and include captured diagnostics in a nonzero-exit failure. Remove the completed quest and its index link.

Selection itself works in the current refactored dispatcher: dispatcher, recipe, and unrelated quest changes all select gh test, and its failure propagates as exit 3. .github/justfile runs the dispatcher suite, and the queue calls the same just ci entry point. Fix the fixture's host dependency rather than adding a path rule or changing workflows.

Impact

  • Public API: none.
  • Wire: none.
  • Production selection and metadata failure handling are unchanged.

Alternatives

Making the selector tolerate absent Cargo fields would mask malformed metadata. Additional selection rules would duplicate an unconditional test path. Deriving stubs automatically from the dispatcher would hide missing fixture support for new tools.

Decisions

Kept production selection unchanged after reproducing failure propagation. Isolated both fixtures from shell startup, following the existing Rust selector-test convention. PR Check workflow behavior remains with moq-dev/moq#7623; no Kotlin/JS or upstream mbx work is included.

Validation

  • Reproduced the tool gap against current dispatch: with the zizmor stub removed, the inherited host PATH lets CI pass; an isolated PATH makes CI_STRICT fail. The new regression fails when the old PATH assignment is restored.
  • Before: io_uring selection passed with four jq errors. Removing the new metadata fields after adding the stderr assertion produces four test failures.
  • After: all 31 dispatcher tests pass; io_uring selection passes without stderr, including with the caller's shell startup configured.
  • quest check --base origin/main: 604 documents pass.
  • Full gate on 86bf7cd9472199385bae8693df97ba37f1bacc37: quest gate nix develop --ignore-environment --keep HOME --keep USER --keep PATH --command python3 .tmp/run-ci.py passed in 39 s. The local launcher deduplicates PATH before executing just ci origin/main, avoiding the existing environment issue owned by moq-dev/moq#7594. All selected modules passed, including the complete gh tooling suite. No module filter was used.

Review

Claude Code, claude-opus-5-5, medium effort, round 2 reviewed 86bf7cd9472199385bae8693df97ba37f1bacc37 against origin/main (f8c608a24bbad5c51b1ffa2ad7a4996e9405ac0c): no findings.

Round 1 findings fixed:

  • Explained and reproduced the tool-list coverage gap, then isolated the dispatcher fixture from installed host tools.
  • Preserved stdout/stderr in the io_uring selector's nonzero-exit assertion.

Follow-ups

None new. moq-dev/moq#7598 also changes sh/dispatch-query.test.py setup and the CI quest index. A synthetic merge of its current branch with this head succeeded without conflicts; its KVM fix stays with its owner.

(Written by GPT-6.1 Sol)

kixelated and others added 3 commits November 2, 2026 03:27
Verify the fixture emits no selector diagnostics and isolate shell startup from its stub tools. Current dispatch already runs tooling tests on every diff and propagates their failures.

Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
The fixture inherited the caller PATH, so CI could use its installed zizmor when the stub was missing. Keep only explicit fixture commands and cover a host tool hiding a missing stub. Preserve selector diagnostics on failure.

Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
@kixelated kixelated changed the title Dispatcher tool changes run the dispatcher tests test(ci): isolate dispatcher tools and complete selection metadata Nov 2, 2026
@kixelated
kixelated marked this pull request as ready for review November 2, 2026 11:38

@kixelated kixelated left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Automated review by review (OpenAI)

Reviewed commit: 86bf7cd

No actionable bugs found. Restricting the dispatcher fixture to explicit tools addresses the host-dependent false pass without changing production selection. The missing-stub regression, BASH_ENV isolation, and complete io_uring metadata with stderr assertions are focused improvements; adding selection rules or weakening the metadata reader would be less direct.

Verification: static review of the changed tests and surrounding dispatcher, environment helper, selector, and CI recipe. I did not run tests or independently reproduce the reported validation.

(Written by OpenAI)

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes

  • Isolated dispatcher fixture PATH (sh/dispatch-query.test.py:260) — stub_ci no longer appends the caller's PATH, symlinks the shell utilities the dispatcher needs (cat sed tr xargs sleep), adds cc to the stub list, and sets BASH_ENV=/dev/null.
  • Host-tool regression test (sh/dispatch-query.test.py:276) — a missing zizmor stub must still fail strict CI, with the caller's PATH simulated during fixture setup so re-introducing host-PATH inheritance in stub_ci trips the test.
  • Completed io_uring metadata (sh/rs/uring.test.py:21) — fills workspace_root and package targets, asserts empty stderr, and preserves stdout/stderr on a nonzero exit.
  • Quest removal (quest/m0/ci/) — deletes the completed dispatch-selection-gaps.md and its README index line; no dangling references remain.

I ran both changed suites on the head (sh/dispatch-query.test.py: 31 tests OK, sh/rs/uring.test.py: 1 test OK) and confirmed .github/justfile's test recipe already wires both into CI, so the quest's wiring goal is met without workflow changes. No production, wire, or public API impact.

Pullfrog  | View workflow run | Using deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

@coderabbitai

coderabbitai Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 600e2021-91b4-414a-805d-0cff7b97fbc2
Commits

Reviewing files that changed from the base of the PR and between f8c608a and 86bf7cd.

Files selected for processing: 4
  • quest/m0/ci/README.md
  • quest/m0/ci/dispatch-selection-gaps.md
  • sh/dispatch-query.test.py
  • sh/rs/uring.test.py
Files with no reviewable changes: 2
  • quest/m0/ci/README.md
  • quest/m0/ci/dispatch-selection-gaps.md

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

Walkthrough

The dispatcher test now prevents stubbed CI from inheriting the host PATH and checks the missing-tool result. The Rust selector test adds Cargo metadata to its fixture and checks the command’s return code and standard error. The CI README entry and planning document were removed.

Merge Risk: Minimal · up to 86bf7

The test-only changes have no established merge-blocking risk and are ready to merge with normal checks.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title names the two changes in the PR: isolating the dispatcher tools (restricting the fixture PATH to explicit stubs and shell utilities) and completing the io_uring selection metadata. The raw s…
Description check Passed The description states the problem, approach, validation, and impact. It matches the changes in the raw summary: the PATH-restricted dispatcher fixture, the BASH_ENV clearing, the io_uring metadata fi…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the two changes in the PR: isolating the dispatcher tools (restricting the fixture PATH to explicit stubs and shell utilities) and completing the io_uring selection metadata. The raw summary confirms both, including the new zizmor regression test, the workspace_root and targets fields, and the stderr assertion. It does not cover the removed quest plan, but it does not need to. The title is specific and relevant.

Full details: Description check

Explanation

The description states the problem, approach, validation, and impact. It matches the changes in the raw summary: the PATH-restricted dispatcher fixture, the BASH_ENV clearing, the io_uring metadata fields, the stderr assertion, and the removed quest document and index link. The description is on-topic and detailed.

Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 3 functions across 2 files.

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches
Simplify code
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@kixelated
kixelated added this pull request to the merge queue Nov 2, 2026
Merged via the queue into main with commit 693a0ec Nov 2, 2026
10 checks passed
@kixelated
kixelated deleted the quest/m0/ci/dispatch-selection-gaps branch November 2, 2026 16:43
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.

1 participant