Repository navigation
Conversation
doctor is init --dry-run but exposed only --framework and --exclude, so no doctor run could validate the configuration that lets init succeed on a pnpm/turbo monorepo member. - doctor takes --package-manager, --test-command-json and --adapter-config, also through AssertLedger.doctor options. - A package with no manager of its own and no override inherits it from the nearest workspace that selects it, never above a .git; reported as PACKAGE_MANAGER_FROM_WORKSPACE_ROOT. - A bun:test/node:test command that goes through an orchestrator and names no test path is BLOCKED with TEST_COMMAND_INDIRECT instead of BASE_TEST_FILES_UNAVAILABLE. Status and exit code are unchanged. Schemas, digest projections and accepted inputs are unchanged. Closes #72 Co-Authored-By: Claude Sonnet 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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f034b6f723
ℹ️ 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".
- Read pnpm-workspace.yaml alone once it exists; package.json workspaces applies only without it, as in pnpm. - Settle usage errors before reading flag values, so a flag with no value exits 64 instead of 4. - Treat a command that invokes node --test or bun test behind a launcher as a runner: its path operands keep BASE_TEST_FILES_UNAVAILABLE instead of TEST_COMMAND_INDIRECT. - Read the inherited workspace facts again before writing and return REPOSITORY_CHANGED_DURING_INIT when they changed. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c70d0c9877
ℹ️ 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".
- Decide that a command is indirect before its operands are read as
path filters, so a task name that matches a directory no longer
selects a partial inventory.
- Inherit a workspace manager only for a directory with a package.json.
- Read workspace patterns in the subset the managers share (*, **, ?,
{a,b}, [a-z]); other syntax infers nothing instead of matching as
literal characters.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4bab2a5600
ℹ️ 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".
- Return PACKAGE_MANIFEST_INVALID when a workspace root package.json exists but is not valid JSON. - Recognize Bun .spec and .tsx test file names as path operands, so a wrapper that names one keeps selecting it. - Let a manager inherit only a declaration it owns: pnpm the yaml, npm the array form of workspaces, Yarn and Bun both forms. A lone Python manager selects nothing. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e4974063c4
ℹ️ 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".
- Accept the values init accepts for --package-manager,
--test-command-json and --adapter-config: only a value starting
with -- is refused, so - and -file.json stay valid.
- Split a YAML flow list on the commas outside quotes and braces, so
['{apps,packages}/*'] stays one pattern.
- Treat a pnpm-workspace.yaml that exists but cannot be read (larger
than 1 MiB, a link) as pnpm's declaration: infer nothing instead of
falling back to package.json workspaces.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 368a5acfd3
ℹ️ 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".
- Treat node as Node's test runner only with --test: a bare node script is an indirect command and is BLOCKED. - Read a multiline YAML flow list through its closing bracket; a list that never closes declares nothing. - Bound workspace patterns before compiling them (256 characters, 4 nested braces, 16 wildcards, 4,096 patterns) so a repository cannot make the compiler or the matcher run away; beyond that nothing is inferred. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The security review of the previous commits found two denial-of- service paths in the workspace detection. - Match workspace patterns segment by segment instead of compiling a regular expression from the repository: wildcard runs such as *a*a*a*a*a*a*a*a*b against a long directory name no longer backtrack, and brace alternations spend a shared budget. - Parse pnpm-workspace.yaml in one linear pass: a multiline flow list keeps its scanner state instead of being rescanned per line, and comment, key and item handling no longer use expressions that backtrack on long whitespace runs. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6b421f3a7a
ℹ️ 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".
- Require --test before a program's entry point: node script and node script --test are not Node's runner, while launchers and option values (--import tsx) still are. - Count brace nesting separately from sibling groups, so nine sibling groups within the expansion budget stay readable. - Give package.json its own 16 MiB read bound and treat a manifest that cannot be read as unread, not as invalid JSON. - Keep a # inside quoted patterns and reject anything but whitespace after the closing bracket of a flow list. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b356d89c23
ℹ️ 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".
Reduce the workspace detection to the case of the issue: a package inherits pnpm from the pnpm-workspace.yaml that selects it. The npm, Yarn and Bun workspaces field is no longer read, which removes the per-manager shape, ownership and ordering rules it needed. Review follow-ups: - Read the package list only as a flat sequence under packages; a mapping or a nested sequence declares nothing. - Do not take bun test as the runner after another runtime's program entry point. - Treat Node's own test options that take a value (--test-name-pattern, --test-reporter, ...) as option values when locating --test. - Build path matchers with the framework's test-file predicate, so an unmatched Bun .spec file stays a filter. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1f9ea40cd5
ℹ️ 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".
- Stop at the nearest pnpm-workspace.yaml: when it does not select the package, nothing is inherited from a workspace further out, as pnpm finds its root once. - Decode quoted YAML scalars: a doubled single quote is one quote and keeps the scanners inside the scalar, and a double-quoted escape a pattern cannot hold makes the file declare nothing. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cb6af904c0
ℹ️ 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".
Address the ninth review round of the doctor workspace change: - keep `bun test` out of the path filters behind a launcher (`pnpm exec bun test missing.spec.ts` is no partial inventory) - treat every `--test-*` Node option as valued except the known switches, so `--test-rerun-failures state.json --test` stays a runner - a wildcard does not select a dot-prefixed directory, as in pnpm - a `packages` entry that is not a string (number, boolean, null, empty item, mapping) makes the file declare nothing Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e84ae45b61
ℹ️ 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".
Address the tenth review round of the doctor workspace change: - a quoted `packages` key (`'packages':`, `"packages":`) is the same key as the plain one, so its members are inherited - a pnpm-workspace.yaml that repeats a top-level key declares nothing, as pnpm refuses it, instead of merging both lists - a plain key now ends at a colon followed by whitespace, as in YAML Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f9e80ff9d9
ℹ️ 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".
Address the eleventh review round of the doctor workspace change: - a lone quote inside a quoted scalar is invalid YAML: refuse it - a top-level line that is not a mapping entry, a comment or a document marker makes the file declare nothing - skip a leading byte-order mark before scanning - normalize redundant separators and `.` segments in patterns - never select a directory below node_modules or bower_components - `--experimental-test-isolation` takes a value, so the entry point after it is not mistaken for the program Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bbd6a89b6d
ℹ️ 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".
Address the twelfth review round of the doctor workspace change: - a quoted scalar or flow collection under a key that is not read must be closed with nothing after it, else the file declares nothing (`catalog: [` no longer keeps the packages patterns) - `bun test` counts only when the command is Bun or one of its launchers, so `echo bun test` is an indirect command - a manager lockfile at the workspace root that is not a regular file is an unresolved fact, not an absent lockfile Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 613164b972
ℹ️ 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".
Address the thirteenth review round of the doctor workspace change: - `bun test` is Bun's only behind a launcher's executing subcommand (`pnpm exec`, `npm exec`, `npx`, `env`, ...): `npm run bun test`, `pnpm bun test` and `pnpm exec echo bun test` are indirect - behind Node's `--test`, only the words after it are path filters, so `pnpm exec node --test` no longer filters on a `node` directory - the executable slot (`./node --test`) is not a script for Node - flow brackets must match their opener (`[}` is invalid) - a `-` at column 0 must continue a block sequence value Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0f750a6547
ℹ️ 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".
| function initYamlOpenValue(value: string): InitOpenValue | "INVALID" | undefined { | ||
| const first = value[0]; | ||
| if (first !== "'" && first !== '"' && first !== "[" && first !== "{") return undefined; |
There was a problem hiding this comment.
Reject invalid plain YAML values
Fresh evidence after the prior non-packages value-scanner fix is packages: ['domains/*']\ncatalog: a: b: because a value not beginning with a quote or flow bracket is accepted without validation, the selecting patterns remain and doctor can inherit pnpm and return WOULD_CREATE. Checked with pnpm 10.28.1 using pnpm list -r --depth -1; pnpm rejects this manifest with bad indentation of a mapping entry, so malformed plain scalars must also invalidate the workspace declaration.
AGENTS.md reference: AGENTS.md:L3-L4
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Not changed, by design: this is a malformed-YAML case (a file pnpm itself rejects). The PR description sets the boundary: the scanner declares nothing for what it does not understand, and inputs that pnpm refuses are out of scope; the structural closure is a real YAML parser (a new dependency, an owner decision). Leaving this thread open for the owner.
🤖 Addressed by Claude Code
🤖 Addressed by Claude Code
Address the fourteenth review round of the doctor workspace change: - `--test` after Node's `--` is a script name, not the runner flag - skip the valued options of npx and bunx before locating Bun (`npx --package bun bun test`) - a workspace root `packageManager` that is not a string is PACKAGE_MANAGER_INVALID, not an absent field - a glob class opening with `!` or `^` is not understood, as dialects disagree on whether it negates Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bf869ef124
ℹ️ 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".
Address the fifteenth review round of the doctor workspace change: - a runtime given as a path (`./node runner --test`) is still the runtime that was handed a script - skip `env` valued options (`-u NAME`, `-C DIR`) and Bun's global flags (`bun --smol test`) before locating Bun's `test` - read a root mapping that is indented equally from its column; any content left of it makes the file declare nothing Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 05c3848544
ℹ️ 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".
Address the sixteenth review round of the doctor workspace change: - from a package script, the program that owns `--test` must be a Node runtime, so `echo --test` is no runner; a command declared with --test-command-json stays the direct runner (the existing contract test is untouched) - a `--` before the runtime belongs to its launcher - Bun's global options take `--cwd=dir`, not a separate value; the values of `bun test` options are not path filters - split workspace YAML on bare CR; any Unicode whitespace other than space and tab makes the file unread instead of trimmed Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1567b140de
ℹ️ 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".
Address the seventeenth review round of the doctor workspace change:
- `npm run node --test` runs a package script: a runtime counts only
after a manager's exec, dlx or x, never after `run`
- normalize `..` segments in workspace patterns; a pattern that
climbs out of the root is ignored
- the class `[.]` spells a leading dot
- a comma or brace inside a class is not a brace-alternative
separator (`{[a,b],x}`)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ff3ea54351
ℹ️ 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".
Address the eighteenth review round of the doctor workspace change: - a member whose packageManager field is present and not a string is PACKAGE_MANAGER_INVALID instead of inheriting its workspace's - skip the valued options of npx before locating the Node runtime (`npx --package tsx tsx --test`) - a workspace YAML line indented with a tab is invalid: the file is not read Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 433ec096ee
ℹ️ 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".
Address the nineteenth review round of the doctor workspace change: - Node's runner needs the command itself to be a runtime or a known launcher (`echo node --test` only prints its words) - `corepack` is a prefix only before a manager it dispatches, so `corepack bun test` is not Bun - a Bun global option that is neither a known switch nor an `--opt=value` form leaves the subcommand unknown (`bun -e test`) - results that stop early after inheriting a manager carry the PACKAGE_MANAGER_FROM_WORKSPACE_ROOT notice too Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d94fe320ab
ℹ️ 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".
Address the twentieth review round of the doctor workspace change: - Node's runner needs the program the command dispatches to be the runtime that owns `--test`: `npm exec -- echo node --test` runs echo; the launcher grammar is shared with the Bun detection - `doctor --framework` accepts the same values as `init --framework` (a single dash included) and returns the structured conflict Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 42216f827f
ℹ️ 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".
Address the twenty-first review round of the doctor workspace
change:
- a nested sequence item (`- - x`), a complex key and reserved
indicators are not patterns
- `pnpx` is a direct launcher, like `pnpm dlx`
- accept more of Bun's documented value-free global switches
(`--expose-gc`, `--inspect`, ...)
- braces inside a character class are characters, also when they
come first (`domains/[{}]/api`)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 80f508134b
ℹ️ 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".
Address the twenty-second review round of the doctor workspace change: - a package manager's subcommand is the first word that is not an option or an option's value: `npm --workspace exec node` has none - braces held in a character class do not count towards the nesting bound - any leading class that can match a dot selects hidden members (`[.a]hidden`) - more of Bun's documented global value options (`--conditions=`) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 54f7f49276
ℹ️ 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".
Address the twenty-third review round of the doctor workspace change: - a line break inside a scalar of a flow list is folded by YAML and not by the scanner: it is only read between two items, otherwise the file declares nothing - only `-` followed by white space is a sequence marker, so a root key such as `-foo: bar` is parsed as a mapping entry Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3756337a8c
ℹ️ 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".
| "-i", | ||
| ]); |
There was a problem hiding this comment.
Recognize Bun's
--redis-preconnect switch
Fresh evidence beyond the previously added Bun switches is bun --redis-preconnect test: Bun 1.2.14's bun --help documents --redis-preconnect as a value-free global switch, and the exact command successfully runs the test suite, but it is absent from this allowlist. Consequently initBunTestPair rejects a valid direct runner and doctor reports TEST_COMMAND_INDIRECT instead of inventorying its tests.
AGENTS.md reference: AGENTS.md:L3-L4
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Not changed, by design. bun --redis-preconnect test is a valid command that is read as indirect: the direction is fail-closed (TEST_COMMAND_INDIRECT, with --test-command-json as the declared way out), and the allowlist of Bun global switches is explicit because Bun has no closed list to match against, so each documented switch is one more entry and each push starts another review round. Following the scope boundary in the PR description, launcher-syntax coverage beyond the current allowlist is left to a follow-up decision; this thread stays open for the owner.
🤖 Addressed by Claude Code
Summary
Closes #72.
doctorisinit --dry-run, but its facade passed only--frameworkand--exclude. Nodoctorrun could therefore validate the configuration that letsinitsucceed on a pnpm/turbo monorepo member. Three changes, one per problem of the issue:doctoraccepts--package-manager,--test-command-json(-reads stdin) and--adapter-config, also throughAssertLedger.doctoroptions, with the valuesinitaccepts. Each may be given once and none is accepted with--runtime. A value flag without its value exits 64. The MCPassertledger_doctorinput is unchanged.package.jsonthat declares no manager and receives no override inherits pnpm from the nearestpnpm-workspace.yaml, when it selects it (the search stops there, as pnpm does). The search starts in the parent directory, never reads above the first.git, and does not run when no.gitbounds the package. The result carries the informationalPACKAGE_MANAGER_FROM_WORKSPACE_ROOT, and the inherited facts are read again before anything is written. Scope is deliberately pnpm only: the npm, Yarn and Bunworkspacesfield is not read (use--package-managerthere).node:testorbun:testcommand that does not invoke the runner (node --test,bun test, also behind a launcher such aspnpm execortsx;--testmust come before a program's entry point;bun testcounts only when the command is Bun or a launcher that runs it, soecho bun testandnpm run bun testare not Bun; behind--test, only the words after it are path filters) and spells no test path (glob, nested path, test file name) now returnsBLOCKEDwith the newTEST_COMMAND_INDIRECT. Its operands were read as path filters:turbo testselected the tests undertest/or none, andnpm run test:unitselected every test.How
pnpm-workspace.yamlis readpackages(plain or quoted key; a file that repeats a top-level key declares nothing, as pnpm refuses it) as a block list or a flow list (also across lines), with!exclusions (position-independent, as in pnpm),*,**,?,{a,b}and[a-z]; a#inside a quoted pattern is kept. A wildcard does not select a dot-prefixed directory (packages/.hidden); only a pattern that spells the dot does, as in pnpm. Redundant separators and.segments are normalized,node_modulesandbower_componentsare never selected, and a leading byte-order mark is skipped.PACKAGE_MANAGER_UNDETECTED): other glob syntax, another shape underpackages, an entry that is not a string (42,true,null,~, an empty item, a mapping), a lone quote inside a quoted scalar, a top-level line that is not akey: valueentry, a comment or a document marker, an unclosed or mismatched ([}) quoted scalar or flow collection under any key, a-item at column 0 that does not continue a block sequence, text after a flow list, a pattern beyond 256 characters or 8 nested braces, more than 1,024 patterns and alternations, a package path over 1,024 characters, a file that exists but cannot be read (over 1 MiB, not a regular file), or a manager lockfile at the workspace root that is not a regular file.domains/*a*a*a*a*a*a*a*a*b/apiagainst a 120-character directory, and a new test witnesses it.package.jsonmust be valid JSON (PACKAGE_MANIFEST_INVALID) and within 16 MiB; itspackageManagerfield and the JavaScript lockfiles must converge on pnpm.Contract impact
CHANGELOG.mdanddocs/repository-init.mddescribe them.PACKAGE_MANAGER_UNDETECTEDbecomes a success for a package that apnpm-workspace.yamlselects.BASE_TEST_FILES_UNAVAILABLEbecomesTEST_COMMAND_INDIRECT(status and exit code unchanged) for an indirect command with no match.WOULD_CREATEorCREATED, e.g.turbo testwith atest/directory,npm run test:unit) is nowBLOCKED; declare the direct runner with--test-command-json.doctor --frameworkwithout a value exits 64 instead of 4, as--excludealready did.Limits and one open decision
initafter such a change.--testbefore the program entry point, with an explicit table of Node options that take a value; an unknown valued option is read as a positional word.pnpm-workspace.yamlis read by a small scanner, because this package has no YAML dependency. Its contract is one-sided: whatever it does not understand declares nothing and infers nothing. The residual is the other direction: a file that pnpm itself rejects (invalid YAML) can still be read as a workspace when the part the scanner understands selects the package. Successive review rounds kept finding such inputs (repeated keys, unbalanced brackets, stray sequence items, ...) and each was closed one by one with a witness. The structural closure is a real YAML parser, which is a new dependency and an owner decision; until then, further findings of that class (invalid YAML that still yieldsWOULD_CREATE) are treated as out of scope for this PR, since pnpm refuses such a workspace beforedoctoris useful. Valid YAML read wrongly stays in scope.--testand recognized runtimes: from a package script, the program that owns--testmust be a Node runtime (node,tsx,ts-node,babel-node,nodemon), soecho --testis not Node's runner. A command declared with--test-command-jsonis taken for the direct runner whatever its executable, which keeps the existing contract test (definitely-impossible-executable --testexpectsCREATEDintests/repository-init.test.ts, with that command declared) unchanged: no existing test was modified.Verification
tests/init-doctor-workspace.test.ts(125 tests). Each review-round group of tests failed on the source it targeted and passes with the change; the remaining tests are controls that must stay green.pnpm teston0f750a6(13th review round): 963/963 passed, 0 failed, 0 skipped, in 7 min 20 s (build included;tsx --test --test-concurrency=2 tests/*.test.ts).pnpm testonff3ea54(17th review round): 978/987, 9 failures, none in init/doctor. All 9 are in other areas (Git regression qualification, native adapter attribution, campaign orchestration, designated campaigns, MCP preflight) and are timeouts (TIMEOUT,INCONCLUSIVE) or WindowsEBUSYonrmdirof a temp directory, on a run that took 9 min 52 s instead of 7 min 20 s. The four files that hold them (bun-designated,bun-native-file-attribution,engine,git-regression) pass alone and sequentially: 106/106. They were not run on the base branch, so "flaky under load" is an inference, not a measurement.biome format,biome linton touched files,tsc --noEmit,check:schemasandcheck:conformancepass.proof-integrity-review(only tests and allow-list entries were added, no existing test changed), and a manual run ofdist/cli.json a real monorepo.🤖 Generated with Claude Code