Repository navigation
fix(skills): read positionals declared with .addArgument() - #13009
Merged
diegosouzapw merged 1 commit intoSep 10, 2026
Merged
diegosouzapw merged 1 commit into
diegosouzapw merged 1 commit into
Conversation
`check:agent-skills-sync` fails on every branch, and regenerating with
--apply does not fix it -- it makes it worse:
-### `tunnel create [type]`
+### `tunnel create`
Commander takes a positional two ways: inline in `.command("stop <type>")`
or through `.addArgument(new Argument("[type]"))`. cliRegistryParser only
matched the first, so `tunnel create` came out bare, disagreed with the
committed page, and the gate reported drift it could only "fix" by
deleting a real argument.
Two commands are affected, and both are the .addArgument form:
`tunnel create [type]` and the resilience profile `set <name>`, whose
argument is required and carries four choices. The generated page for the
latter said `omniroute resilience set` with no argument at all.
After this, the generator reports `Generated: 0 · Unchanged: 46` and exits
0, with `tunnel create [type]` reproduced rather than removed.
Nesting is deliberately left alone. The parser flattens subcommands onto
the family name, so `resilience profile set` publishes as
`resilience set`. Resolving the receiver chain looked like a small
addition and is not: `cloud.mjs` builds its tasks under
`cloud.command(agent)` inside `for (const agent of AGENTS)`, so the real
path is `cloud codex task create` and no regex can reach it. A parent-
chain pass turned `cloud create` into `task create` across 12 files --
differently wrong, not less wrong -- so it is not in this change.
diegosouzapw
merged commit Sep 10, 2026
9a56147
into
cheaper-inference:release/v3.8.51
9 of 16 checks passed
diegosouzapw
added a commit
that referenced
this pull request
Sep 11, 2026
check:agent-skills-sync exits 2 on the clean tip (reproduced in a throwaway probe worktree cut from origin/release/v3.8.51, with none of this branch's commits): the generator wants to rewrite skills/cli-tunnel/SKILL.md. Cause: #13009 ('read positionals declared with .addArgument()') taught the generator to surface positional arguments, so the committed skill's 'tunnel create' heading and example went stale against 'tunnel create [type]'. Regenerated with the official generator (scripts/skills/generate-agent-skills.mjs --apply), never hand-edited. The gate now exits 0. Refs #12732
diegosouzapw
added a commit
that referenced
this pull request
Sep 11, 2026
…l-arg fix #13009 taught the CLI registry parser to read positionals declared with .addArgument() but did not re-run the generator, so check:agent-skills-sync has been red on the base tip ever since. Regenerated with the official generator (--apply --only=cli-tunnel); the only delta is 'tunnel create' gaining its [type] positional. Co-authored-by: diegosouzapw <[email protected]>
7 tasks done
muhamadgalihsaputra
pushed a commit
to niyatna/NiyatnaRoute
that referenced
this pull request
Sep 27, 2026
…nference#13009) Approved by the maintainer for the agent-instruction surface it touches: the SKILL.md change is regenerated output from the corrected parser (`resilience set` -> `resilience set <name>`), restoring the required argument the published page had been hiding. No hand-written directive was added. Boarded with 13 sibling PRs and validated as a set: 132 focused tests pass, typecheck:core clean, changelog integrity and file-size gates green. Thank you — the table contrasting the declared argument against the published page is what made the second case (an agent told to run `resilience set` with no argument) visible as more than cosmetic.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
check:agent-skills-syncfails on every branch, and regenerating with--applydoes not fix it — it makes it worse:Why
Commander takes a positional two ways: inline in
.command("stop <type>"), or through.addArgument(new Argument("[type]")).cliRegistryParsermatched only the first:So
tunnel createcame out bare, disagreed with the committed page, and the gate reported drift that it could only "resolve" by deleting a real argument.Two commands use that form, and the second is worse than cosmetic:
tunnel create+Argument("[type]")tunnel createcloudflareset+Argument("<name>")resilience setAn agent reading the second page was told to run
omniroute resilience setwith no argument.Result
Exit 0, with
tunnel create [type]reproduced rather than removed. The only regenerated content is the two resilience lines that gain<name>.What this deliberately does not do
The parser flattens subcommands onto the family name, so
resilience profile setstill publishes asresilience set. Resolving the receiver chain looks like a small addition. It is not — and I tried it before deciding:cloud.mjsbuilds its task commands undercloud.command(agent)insidefor (const agent of AGENTS), so the real path iscloud codex task createand no regex can reach a name held in a loop variable. A parent-chain pass rewrote 12 files and turnedcloud createintotask create— differently wrong rather than less wrong — so it is not in this change. The file's own header already records that limitation ("uses regex, not a full AST").Verification
tests/unit/agentSkills-cliRegistryParser.test.ts— 13 passed, including one fixture test and one that asserts against the realbin/cli/commands/tunnel.mjs.Reverting the change (
fullName = base) fails exactly those two new tests and puts the gate back to exit 2 — the same check both ways.