Refactor mise.toml to use native deps and hooks#846
Conversation
The mise.toml had grown to duplicate the root deno.json orchestration tasks and embedded non-portable Bash (find + jq, a deno-eval subshell, and several for-loops), so project setup relied on a hand-rolled `install` task and almost nothing was incrementally cached. Replace that `install` task with mise's native dependency providers for codegen, the Deno pre-cache, and pnpm. They run automatically before tasks and stay fresh via sources/outputs. A `postinstall` hook then makes a single `mise install` fully bootstrap a checkout, including the Git pre-commit hook when one is not already present. Move the data-processing checks into cross-platform Deno scripts (check_workspace_protocol.ts and check_types.ts) and rewrite the per-package loop and flag-conditional tasks in Nushell, so every task runs on Windows without Bash, find, or jq. Add sources/outputs caching to the codegen and build tasks. The codegen sources also track @fedify/vocab-tools, since changes to the generator itself change the generated code. Trim the root deno.json to just the `cli` task, realign the CI setup action and the devcontainer scripts to `mise deps`, and update the contributor docs (CONTRIBUTING.md, AGENTS.md, and several READMEs) to drive every development workflow through mise instead of pnpm. Assisted-by: Claude Code:claude-opus-4-8
❌ Deploy Preview for fedify-json-schema failed.
|
✅ Deploy Preview for fedify-json-schema canceled.
|
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThe PR replaces install-task-driven setup with ChangesDependency provisioning and command migration
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Code Review
This pull request refactors the project's development workflow and task orchestration by migrating tasks from deno.json to mise.toml, leveraging mise's experimental dependency providers and Nushell for cross-platform execution. It also replaces Bash-based scripts with portable Deno scripts for type-checking and workspace protocol validation. The review feedback highlights a critical syntax error on Windows within the new check_workspace_protocol.ts script due to backslash escaping in dynamic regular expressions, suggesting a platform-agnostic regex instead. Additionally, the feedback recommends making the postinstall hook in mise.toml more robust by verifying the presence of git before execution, and removing the unused SEPARATOR import.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
@codex review |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@deno.json`:
- Around line 119-121: The root `build` task reference is stale because
`deno.json` now only defines `cli`; update the remaining instructions in
`docs/manual/deploy.md` and `examples/fresh/README.md` to use the new root build
command, or restore a matching `build` task in `deno.json`. Use the `tasks`
entry in `deno.json` and the build-command text in those docs as the symbols to
locate and keep them consistent.
In `@scripts/check_workspace_protocol.ts`:
- Around line 24-29: Escape the path separator before interpolating it into the
regular expressions in check_workspace_protocol.ts, because SEPARATOR from
`@std/path` can be a backslash on Windows and break both the package.json match
and the node_modules skip pattern. Update the logic around walk(...) to use an
escaped separator (or a basename-based match) so the RegExp construction stays
valid across platforms.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 2a6a2e40-8eda-4cf9-a6ae-1e38088f4452
📒 Files selected for processing (17)
.agents/skills/create-integration-package/SKILL.md.devcontainer/bin/postCreateCommand.sh.github/actions/setup-mise/action.yaml.github/workflows/main.yamlAGENTS.mdCONTRIBUTING.mddeno.jsondocs/README.mdexamples/rfc-9421-test/README.mdmise.tomlpackages/fixture/README.mdpackages/init/README.mdpackages/lint/src/lib/oxlint.tsscripts/check_types.tsscripts/check_versions.tsscripts/check_workspace_protocol.tsscripts/install.ts
Codecov Report❌ Patch coverage is
... and 2 files with indirect coverage changes 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8fbdd26386
ℹ️ 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".
Netlify's build image bundles an older mise that reads the repository's root mise.toml during dependency installation. It cannot parse the `[hooks.postinstall]` table form (with `shell`) introduced by the recent tooling refactor and fails the build with a config error, which broke the static JSON Schema site (json-schema.fedify.dev) deploy. That site serves static files and needs none of the monorepo's tooling, so set MISE_IGNORED_CONFIG_PATHS in schema/netlify.toml to make Netlify's mise skip the root config entirely, turning its install step into a no-op. Also declare min_version in mise.toml so a too-old local mise reports a clear "update mise" message instead of a cryptic parse failure. Assisted-by: Claude Code:claude-opus-4-8
The mise refactor removed the root deno.json's pnpm:build-vocab task, but @fedify/fedify's own pnpm:build task still depended on it. As a result `deno task test:cfworkers` aborted during dependency resolution with "Task not found: pnpm:build-vocab", which broke the test-cfworkers CI job. Build @fedify/fedify and its workspace dependencies self-containedly via pnpm's topological filter instead -- the same thing packages/fedify's package.json `build` script does -- so the task no longer references any removed root task. Assisted-by: Claude Code:claude-opus-4-8
scripts/check_workspace_protocol.ts built its walk() match/skip patterns by interpolating @std/path's SEPARATOR into a RegExp. On Windows SEPARATOR is a backslash, which produces an invalid pattern like (?:^|\)package\.json$ and throws "Unterminated group" before the check can run, defeating the cross-platform goal. Use static regexes with a [/\\] character class to match either separator, which also removes the dynamic RegExp construction and the SEPARATOR import. fedify-dev#846 (comment) fedify-dev#846 (comment) fedify-dev#846 (comment) fedify-dev#846 (comment) Assisted-by: Claude Code:claude-opus-4-8
The build, test:node, and test:bun tasks run a pnpm command with a single-quoted `--filter` selector. With mise's default shell, Windows `cmd` does not strip single quotes, so pnpm receives the literal selector (e.g. `'!./examples/**'`), matches no projects, and exits successfully. `mise run build` then becomes a silent no-op that leaves dist/ missing or stale. Run these tasks through Nushell (`shell = "nu -c"`), which parses the quotes identically on every platform, matching how the other cross-platform tasks already work. fedify-dev#846 (comment) Assisted-by: Claude Code:claude-opus-4-8
The mise deps provider now lists @fedify/vocab-tools in its sources, but the codegen script's own up-to-date check only compared the YAML schema mtimes against vocab.ts, so when only the generator changed mise re-ran the provider, yet the script skipped regeneration and recorded the stale vocab.ts as fresh. Have isUpToDate() also account for the generator's mtime (the @fedify/vocab-tools sources and this codegen script), so a generator-only change regenerates vocab.ts. fedify-dev#846 (comment) Assisted-by: Claude Code:claude-opus-4-8
The postinstall hook runs `git rev-parse` to decide whether to install the Git pre-commit hook. In a minimal environment without git on PATH (some containers, CI images), that call would error and fail the whole hook, and with it `mise install`. Guard the git logic behind `which git`, so the pre-commit step is simply skipped when git is unavailable (there is nothing to install anyway). fedify-dev#846 (comment) Assisted-by: Claude Code:claude-opus-4-8
The example's setup told contributors to run `deno task build` from the repository root to build the packages, but the mise refactor removed the root `build` task. Use `mise install` instead, which installs the tools and builds all packages. (The `deno task build` in docs/manual/deploy.md is a user application's own Dockerfile, not the monorepo root task, so it is left as is.) fedify-dev#846 (comment) Assisted-by: Claude Code:claude-opus-4-8
|
@codex review |
|
/gemini review |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/vocab/scripts/codegen.ts`:
- Around line 146-160: The generator timestamp snapshot in codegen.ts is taken
before acquireLock(), so edits to the generator while waiting on the lock can
make isUpToDate() compare against stale inputs. Move the generatorMtime
calculation inside the locked section in the codegen flow (around acquireLock(),
isUpToDate(), and the regeneration check) so the freshness check uses the latest
generator state before deciding to skip regeneration.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 5327e18d-0fb0-4038-8aef-8aa1ad43d0a5
📒 Files selected for processing (6)
examples/fresh/README.mdmise.tomlpackages/fedify/deno.jsonpackages/vocab/scripts/codegen.tsschema/netlify.tomlscripts/check_workspace_protocol.ts
There was a problem hiding this comment.
Code Review
This pull request refactors the repository's task runner and dependency management by leveraging mise's experimental dependency providers and hooks, replacing old hand-rolled installation tasks. It migrates several tasks from deno.json to mise.toml, introduces portable Deno scripts to replace platform-dependent shell commands, and adopts Nushell for cross-platform task orchestration. The review feedback suggests two improvements: validating that parsed JSON files are actual objects in the workspace protocol check script to avoid runtime errors, and ensuring deno check is only invoked when TypeScript files are found during package-specific checks to prevent an unintended full-workspace type-check.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 087509849a
ℹ️ 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".
generatorMtime was computed before acquiring the codegen lock, so a generator edit made while a process waited for the lock could be missed, leaving vocab.ts stale while isUpToDate() reported it fresh. Move the snapshot inside the locked section. fedify-dev#846 (comment) Assisted-by: Claude Code:claude-opus-4-8
scripts/check_workspace_protocol.ts assumed every parsed package.json was an object. A file whose JSON is null (or a string, number, or array) parses without error and would then throw a TypeError on the dependency-field lookups. Skip any manifest that is not a plain object. fedify-dev#846 (comment) Assisted-by: Claude Code:claude-opus-4-8
The root mise.toml requires mise 2026.6.12, but the devcontainer pinned the mise feature to 2025.12.12, so postCreateCommand.sh's `mise trust` would reject the config and abort container setup. Bump the feature to 2026.6.12. fedify-dev#846 (comment) Assisted-by: Claude Code:claude-opus-4-8
The build task's `sources` only matched *.ts, but some packages build from .tsx (e.g. packages/cli/src/inbox.tsx and packages/debugger/src/mod.tsx). Editing a .tsx file after a build left the outputs newer than the listed sources, so mise skipped the rebuild and tests ran against stale dist. Add *.tsx to the source globs. fedify-dev#846 (comment) Assisted-by: Claude Code:claude-opus-4-8
check-each ran `deno check` with the result of a glob; if a package had no matching files, `deno check` ran with no arguments and fell back to type-checking the whole workspace. Collect the files (now .ts and .tsx) and only invoke `deno check` when the list is non-empty. fedify-dev#846 (comment) Assisted-by: Claude Code:claude-opus-4-8
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 99c39feabc
ℹ️ 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".
mise's built-in `pnpm` deps provider only watches the root package.json and pnpm-lock.yaml for freshness, so editing a packages/*/package.json or pnpm-workspace.yaml (before the lockfile is regenerated) left `mise deps` reporting fresh and skipping pnpm install, breaking the documented dependency-update flow. Replace it with a custom provider (named pnpm-install, since `pnpm` is a reserved built-in name that ignores custom sources) whose sources list every workspace manifest plus pnpm-workspace.yaml. fedify-dev#846 (comment) Assisted-by: Claude Code:claude-opus-4-8
|
@codex review |
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request modernizes the repository's task orchestration and dependency management by leveraging newer mise features, specifically experimental dependency providers and post-install hooks. It replaces the old hand-rolled install task with declarative dependency tracking and migrates several complex shell-based tasks to Nushell and portable Deno scripts to ensure cross-platform compatibility. The review feedback suggests expanding the tracked sources for the deps.deno-cache provider in mise.toml to include deno.json files from examples and tests to prevent potential stale cache issues.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e3531e1898
ℹ️ 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".
The deno-cache provider only listed packages/*/deno.json as sources, but the root deno.json workspace also includes examples and the smoke-test harness. Track their deno.json files too so the Deno pre-cache stamp is invalidated if any of them change. fedify-dev#846 (comment) Assisted-by: Claude Code:claude-opus-4-8
|
@codex review |
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request overhauls the project's build, dependency management, and task orchestration system by transitioning to mise's experimental dependency providers and post-install hooks. It replaces hand-rolled installation tasks with automated dependency providers for code generation, Deno caching, and pnpm installation. Additionally, shell-dependent tasks and Bash scripts have been replaced with Nushell-powered commands and portable Deno scripts (such as check_types.ts and check_workspace_protocol.ts) to ensure consistent cross-platform execution across Windows, macOS, and Linux. Documentation, devcontainer configurations, and examples have been updated to reflect the new mise install and mise deps workflows. No review comments were provided, so there is no feedback to address.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 26747e8b79
ℹ️ 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".
2chanhaeng
left a comment
There was a problem hiding this comment.
I found some points that may need to be revised. Could you check them?
The root deno.json `codegen` task was removed in this refactor, but the actor-lookup-cli and custom-collections example READMEs still told readers to run `deno task codegen` as their first-time setup step. That task no longer resolves (neither example has its own deno.json), so the instruction was broken. Point both at `mise run codegen` instead. fedify-dev#846 (comment) Assisted-by: Claude Code:claude-opus-4-8
The `[tasks.codegen]` block duplicated the `sources`/`outputs` already declared on the `[deps.codegen]` provider, so the freshness inputs had to be kept in sync in two places. Replace the task body with `mise deps --force codegen`, which delegates to the provider. --force re-runs it even when mise considers it fresh, while the codegen script still self-skips when vocab.ts is up to date, so an explicit `mise run codegen` stays fast. fedify-dev#846 (comment) Assisted-by: Claude Code:claude-opus-4-8
getLatestSourceMtime walked only the top level of the schema directory for YAML files, which getLatestMtimeUnder already does, and recursively. Calling getLatestMtimeUnder(schemaDir, [".yaml"]) instead drops the bespoke helper and matches the packages/vocab/src/**/*.yaml glob that the [deps.codegen] provider uses for its own freshness, so the two freshness checks stay consistent. fedify-dev#846 (comment) Assisted-by: Claude Code:claude-opus-4-8
|
@codex review |
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request modernizes the repository's task orchestration and dependency management by migrating from deno.json tasks and Bash scripts to mise's experimental dependency providers and hooks in mise.toml. It introduces Nushell for cross-platform task execution and replaces platform-specific shell commands with portable Deno scripts for type-checking and workspace validation. Additionally, documentation and CI workflows are updated to reflect the new mise commands. Feedback on the changes highlights a potential issue in the check-each task, where Nushell's glob command could throw an error and fail the task if no matching .ts or .tsx files are found; wrapping these calls in try/catch blocks is recommended to ensure robustness.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2c21242592
ℹ️ 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".
loadSchemaFiles() consumes any file matching /\.ya?ml$/i, so a vocabulary schema added or renamed with the .yml spelling is a real codegen input. The freshness tracking only watched *.yaml, though: the [deps.codegen] provider's sources glob and the getLatestMtimeUnder() check in the codegen script both ignored *.yml, so adding such a file could leave both mise and `mise run codegen` reporting vocab.ts as up to date while the loader would have consumed it. Track *.yml alongside *.yaml in the provider sources and in both freshness checks (the schema directory and the vocab-tools generator) so all three stay consistent with the loader. fedify-dev#846 (comment) Assisted-by: Claude Code:claude-opus-4-8
|
@codex review |
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request migrates the project's setup, task orchestration, and dependency management to modern mise features, introducing [deps] dependency providers and [hooks.postinstall] to automate bootstrapping. It also replaces platform-specific shell scripts with portable Deno scripts and Nushell orchestration. One critical issue was identified in packages/fedify/deno.json where the pnpm filter @fedify/fedify... was used incorrectly instead of ...@fedify/fedify, which would fail to build the package's dependencies first.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
The mise.toml had grown to duplicate the root deno.json orchestration tasks and embedded non-portable Bash (
find+jq, adeno evalsubshell, and severalfor-loops), so project setup relied on a hand-rolledinstalltask and almost nothing was incrementally cached.Replace that
installtask with mise's native dependency providers forcodegen, the Deno pre-cache, and pnpm. They run automatically before tasks and stay fresh viasources/outputs. Apostinstallhook then makes a singlemise installfully bootstrap a checkout, including the Git pre-commit hook when one is not already present.Move the data-processing checks into cross-platform Deno scripts (check_workspace_protocol.ts and check_types.ts) and rewrite the per-package loop and flag-conditional tasks in Nushell, so every task runs on Windows without Bash,
find, orjq.Add
sources/outputscaching to thecodegenandbuildtasks. Thecodegensourcesalso track @fedify/vocab-tools, since changes to the generator itself change the generated code.Trim the root deno.json to just the
clitask, realign the CI setup action and the devcontainer scripts tomise deps, and update the contributor docs (CONTRIBUTING.md, AGENTS.md, and several READMEs) to drive every development workflow through mise instead of pnpm.