Skip to content

chore(just): thin justfiles with one impact map - #4058

Merged
kixelated merged 5 commits into
quest/m1/tooling/READMEfrom
quest/m1/tooling/justfiles
Sep 25, 2026
Merged

kixelated merged 5 commits into
quest/m1/tooling/READMEfrom
quest/m1/tooling/justfiles

Conversation

@kixelated

Copy link
Copy Markdown
Collaborator

Completes the Thin justfiles quest (quest/m1/tooling/justfiles.md, deleted here) in the tooling line (#4038). It also drops the stale Required entries that pointed at it and fixes the rs/scripts/bench.sh paths in three quests (the script has been bench/run.sh for a while).

What changed

  • One impact map. just check|fix [BASE] and just 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-language scope regexes, the _tools preflight, and the $FILES parameters are gone. Only rs still gets the list, as a path: just rs check-changed <listfile> hands it to sh/rs/select.sh, which absorbs _select, _names, and the _wants-* gates. changed_max, _changed-cap, _changed-test, and _echo go with the argv budget.
  • Scripts under sh/. rs/scripts, .github/scripts, go/scripts, kt/scripts, swift/scripts, and dart/scripts moved to sh/<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.yml sh/swift/**, obs.yml sh/obs/**, wasm.yml js/justfile.
  • Deleted self-tests: _changed-test, _markdown-test, _select-test, _doc-names-test, _publish-test, package-nfpm.test.sh, package-binary.test.sh, and js/common/workers.test.ts, which tested the just js check FILES scoping that no longer exists.
  • Deleted guards: _doc-names with doc-names.jq, and the publish lower-bound check.
  • Other deletions:
    • worktree and the Worktrees section of test/README.md.
    • rs bump and rs semver.
    • The duplicate mod lines in demo/justfile.
    • bench/justfile. Root bench and bench-runtime call bench/run.sh, and the bench compile gate is a line in the map.
    • Recipes nothing invokes: root doc and update, 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), and drafts clean.
    • The per-language clean recipes. They are folded into sh/clean.sh, which also fixes the stale kt paths (kt/moq/src/... should be kt/moq-ffi/src/...).
  • Renamed: root just wasm is now just js wasm. Updated in root build, test/wasm/run.sh, and the doc and comment references.
  • just test interop --all moved into interop.sh as an --all flag, 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, and test all keep their names.

Decisions made without the maintainer (please review)

  1. Plain multi-command recipes stay. A recipe body has no shell control flow; anything with logic moved to 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.
  2. The unlisted tooling tests run nightly. install-formula.test.py, release.test.sh, package-rename.test.py, and publish-wrapper.test.sh also tested tooling on every PR (through gh check and go 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 to just gh test in the nightly matrix. Alternative: delete them like the listed ones.
  3. A module with missing tools is skipped locally, in every language. kt used to fail on a missing JDK or gradle; now it skips like py, go, and dart. MOQ_STRICT (CI) still fails up front. Alternative: keep kt's hard failure as a special case in the map.
  4. check --all runs every rs gate that a whole-workspace diff runs. That adds rs capture and rs uring-check, which cache.yml now also warms.
  5. Left in place: .claude/hooks/direnv.test.sh stays in check.yml, because it tests the agent hook, not the justfiles. The drafts recipes moved to sh/drafts/ even though the quest did not name them, because the goal excludes only demo and infra.

Verification

  • MOQ_STRICT=1 just check passes. It runs everything, because the root justfile changed.
  • just test passes.
  • just gh test and just gh check pass.
  • A stubbed run of sh/dispatch.sh against 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.sh against 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 under rs/ selects nothing.
  • Every recipe that check.yml, cache.yml, nightly.yml, interop.yml, wasm.yml, obs.yml, swift.yml, android.yml, and the release workflows invoke resolves under just -n.

🤖 Generated with Claude Code

(Written by Claude Opus 5.5)

kixelated and others added 4 commits September 24, 2026 11:29
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>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-25T00:14:39.034402Z 078a06c New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@kixelated

Copy link
Copy Markdown
Collaborator Author

Automated review — MERGE

Head: 13203cdd6c8b18a0b2b51b20f475dfb72af10296

Positive improvement?

Yes. This finishes the Thin justfiles quest cleanly: one impact map in sh/dispatch.sh, recipes as one-liners or sh/ scripts, scripts consolidated under sh/<area>/, and a large cut of duplicated scope/_tools/changed_max machinery (about 1.4k net lines gone). Root check/fix, test/’s default → dispatch, and sh/rs/select.sh for crate selection are the right shape. CI path updates and the just wasm → just js wasm rename look mechanically complete.

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 just gh test / nightly (decision 2) matches the quest’s “no tooling self-tests on PRs” goal without throwing away recent coverage.

Different approach better?

Not as a blocker. Reasonable alternatives are already called out:

  • Strict one-line-per-recipe would add noise for little gain.
  • Keeping kt’s hard-fail-on-missing-JDK locally is a taste call; uniform skip + MOQ_STRICT in CI is consistent.
  • Deleting the map’s own self-tests (_changed-test, _select-test, …) is what the quest asked for; the cost is that map regressions rely on review, stubbed checks, and CI rather than a fast unit suite. Acceptable for this quest; a tiny synthetic harness later would be nice, not required to land.

Verdict: MERGE

Ship it. The five “decisions without the maintainer” look sound; no public API/wire impact. Minor UX note only (not blocking): with mod test, a custom BASE is just test default <BASE> rather than just test <BASE> — already documented in test/justfile, and CI’s bare just test is fine via GITHUB_BASE_REF inside dispatch.

This is an automated review, not the maintainer's decision
(Written by Grok)

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 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".

Comment thread drafts/justfile Outdated
# 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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

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.

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>
@kixelated
kixelated merged commit 5dda936 into quest/m1/tooling/README Sep 25, 2026
14 checks passed
@kixelated
kixelated deleted the quest/m1/tooling/justfiles branch September 25, 2026 00:09
@kixelated

Copy link
Copy Markdown
Collaborator Author

Merged into quest/m1/tooling/README with 078a06c on top:

  • Interop fix. python -> js-native-node failed with RESET_STREAM: 52 (0x34, Old). The relay dropped a superseded group, which is normal at the live edge, but test/interop/clients/js-native/subscribe.ts treated any group reset as fatal. It now skips Old/Evicted/TooFarBehind resets and reads the next group, like the @moq/json consumers do. Locally, rust,python -> js-native-node,js-native-bun passes.
  • Codex review. just drafts prints extensionless names again.

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:

  • sh/dispatch.sh patterns: doc/lib/{py,kt,swift}/ and doc/lib/samples\.sh$ for py/kt/swift.
  • py: the samples recipe. It needs shell logic, so it moves to sh/py/, and py check calls it.
  • sh/kt/check.sh and sh/swift/check.sh: the Samples generation.
  • sh/rs/c-tests.sh: the C sample compile and the moq.h name check.

(Written by Claude Opus 5.5)

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 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".

Comment thread sh/rs/select.sh

# 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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

kixelated added a commit that referenced this pull request Sep 25, 2026
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>
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