chore(just): thin justfiles with one impact map - #4058
Conversation
Recipe bodies move to scripts under sh/, and sh/dispatch.sh resolves the branch diff once for check, fix, and test. Tooling self-tests leave the pull-request path; the ones that remain run nightly as `just gh test`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Automated review — MERGEHead: Positive improvement?Yes. This finishes the Thin justfiles quest cleanly: one impact map in Worth the complexity?Yes. Complexity moves from many mirrored regex tables and argv-budget hacks into one ~200-line dispatcher plus a focused Rust selector. That is easier to reason about than the previous justfile shell. Keeping short multi-command recipes inline (decision 1) avoids a pile of trivial scripts. Moving unlisted tooling self-tests to Different approach better?Not as a blocker. Reasonable alternatives are already called out:
Verdict: MERGEShip it. The five “decisions without the maintainer” look sound; no public API/wire impact. Minor UX note only (not blocking): with This is an automated review, not the maintainer's decision |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 13203cdd6c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| # List the draft sources (their names are the argument to `build` / `publish`). | ||
| default: | ||
| @for f in draft-*.md; do echo "${f%.md}"; done | ||
| ls draft-*.md |
There was a problem hiding this comment.
List extensionless draft names
just drafts is documented as listing values that can be passed to build or publish, but ls draft-*.md now includes the .md suffix and also echoes the command itself. A user copying draft-lcurley-moq-lite.md into just drafts build reaches sh/drafts/build.sh, which appends another .md and fails looking for draft-lcurley-moq-lite.md.md; preserve the previous extensionless output.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Agreed. Fixed in 078a06c: just drafts prints extensionless names again (@ls draft-*.md | sed 's/\.md$//'), so they paste straight into build / publish.
(Written by Claude Opus 5.5)
A live subscriber can be handed a group the relay then drops as Old for a newer one. The js-native subscriber treated that reset as fatal, so the python -> js-native-node cell failed whenever the race landed. Move on to the next group instead, as @moq/json's consumers do. Also restore extensionless names from `just drafts`, which `build` and `publish` take. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Merged into
Before this line merges into main: it is based 34 commits behind main, including #4049 (doc-sample checks). The thinned tree has to carry #4049 forward:
(Written by Claude Opus 5.5) |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 078a06cdd1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| # Print `ALL`, nothing (no crate affected), or cargo package ids. | ||
| select_packages() { | ||
| if [[ "$list" == --all ]] || grep -qE '^(Cargo\.(toml|lock)|rust-toolchain\.toml|rs/justfile|sh/rs/select\.sh|\.config/nextest\.toml)$' "$list"; then |
There was a problem hiding this comment.
Run changed Rust gate scripts in CI
When a PR only edits a newly extracted Rust gate such as sh/rs/tokio-features.sh, dispatch selects the rs module, but this predicate does not widen that path to ALL; line 23 then returns because the list contains no rs/ path. As a result, check.yml's just check reports "no crates affected," and neither its separate media-features step nor the nightly matrix invokes tokio-features, so changes to that validation script are never exercised. Map each executable gate script to its owning recipe or otherwise invoke it from CI.
AGENTS.md reference: AGENTS.md:L23-L23
Useful? React with 👍 / 👎.
Ports main's changes to the recipes #4058 moved into sh/: - #4078: `check` runs the tests too, and `ci check|test` are CI's halves. sh/dispatch.sh gains `ci-check`/`ci-test`; `check` lints Rust through the new `rs check-test` (clippy-driver test build, build.warnings=deny) and then runs the js/py tests. - #4048: the media feature contracts run from sh/rs/select.sh when a media crate or the contract script changes; relay-minimal left the PR gate. - #4049: the C doc samples compile in sh/rs/c-tests.sh, the Python ones via sh/py/samples.sh, and doc/lib paths join the py/kt/swift impact map. - #4069: sh/drafts/check.sh refuses tabs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Completes the
Thin justfilesquest (quest/m1/tooling/justfiles.md, deleted here) in the tooling line (#4038). It also drops the staleRequiredentries that pointed at it and fixes thers/scripts/bench.shpaths in three quests (the script has beenbench/run.shfor a while).What changed
just check|fix [BASE]andjust test [BASE]are one line each:sh/dispatch.sh check|fix|test. The script resolves BASE, writes the branch diff to a temp file, and matches it against one table of module patterns plus one table of the tools each module needs. The per-languagescoperegexes, the_toolspreflight, and the$FILESparameters are gone. Only rs still gets the list, as a path:just rs check-changed <listfile>hands it tosh/rs/select.sh, which absorbs_select,_names, and the_wants-*gates.changed_max,_changed-cap,_changed-test, and_echogo with the argv budget.sh/.rs/scripts,.github/scripts,go/scripts,kt/scripts,swift/scripts, anddart/scriptsmoved tosh/<area>/. New:sh/{dispatch,markdown,shell,clean}.sh,sh/rs/{select,fuzz,package,c-tests,tokio-features,vulkan-cuda}.sh,sh/obs/*.sh,sh/drafts/*.sh,sh/js/workers.sh. Workflow, doc, and comment references were updated mechanically. Path filters were widened to match: swift.ymlsh/swift/**, obs.ymlsh/obs/**, wasm.ymljs/justfile._changed-test,_markdown-test,_select-test,_doc-names-test,_publish-test,package-nfpm.test.sh,package-binary.test.sh, andjs/common/workers.test.ts, which tested thejust js check FILESscoping that no longer exists._doc-nameswithdoc-names.jq, and the publish lower-bound check.worktreeand the Worktrees section of test/README.md.rs bumpandrs semver.modlines in demo/justfile.benchandbench-runtimecallbench/run.sh, and the bench compile gate is a line in the map.docandupdate,js install,js update,rs update,rs bench,rs bench-host,rs bench-udp-tokio,rs bench-udp-uring,obs run,obs preset(now a script), anddrafts clean.cleanrecipes. They are folded intosh/clean.sh, which also fixes the stale kt paths (kt/moq/src/...should bekt/moq-ffi/src/...).just wasmis nowjust js wasm. Updated in rootbuild, test/wasm/run.sh, and the doc and comment references.just test interop --allmoved intointerop.shas an--allflag, so the recipe is one line.Public API and wire impact
None. This changes tooling only. The command surface changes are the renames and deletions listed above.
check --all,fix --all, andtest allkeep their names.Decisions made without the maintainer (please review)
sh/. A short list of plain tool invocations (rs check,rs features,py check) stays inline rather than moving into a script per recipe. Alternative: strict one line per recipe, which adds about ten trivial scripts.install-formula.test.py,release.test.sh,package-rename.test.py, andpublish-wrapper.test.shalso tested tooling on every PR (throughgh checkandgo check). The quest's goal says nothing like that runs on a PR, but its delete list did not name them. They are recent coverage, so they moved tojust gh testin the nightly matrix. Alternative: delete them like the listed ones.check --allruns every rs gate that a whole-workspace diff runs. That addsrs captureandrs uring-check, which cache.yml now also warms..claude/hooks/direnv.test.shstays in check.yml, because it tests the agent hook, not the justfiles. The drafts recipes moved tosh/drafts/even though the quest did not name them, because the goal excludes only demo and infra.Verification
MOQ_STRICT=1 just checkpasses. It runs everything, because the root justfile changed.just testpasses.just gh testandjust gh checkpass.sh/dispatch.shagainst synthetic diffs confirms the module selection for docs, moq-ffi, OBS, flake.lock, sh/go, and mixed diffs. It also confirms that MOQ_STRICT reports missing tools up front.sh/rs/select.shagainst synthetic lists gives the same crate selection and gates as before: kio reaches wasm, moq-relay reaches uring-check, fuzz selects moq-net, and a non-crate path underrs/selects nothing.just -n.🤖 Generated with Claude Code
(Written by Claude Opus 5.5)