Repository navigation
fix(mcpx): docs-history unknown flags are a usage error, not file operands (#16402) - #16412
Merged
developing-today-fleet[bot] merged 1 commit intoNov 28, 2026
Merged
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
developing-today-fleet
Bot
deleted the
sweep/16402-docs-history-unknown-flag
branch
November 28, 2026 03:14
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.
Closes #16402
Defect
docs-historyfunneled every unrecognized argument into its file list in all three subcommands: a typo'd flag became a file operand and failed opaquely (open --agant: no such file, exit 1), violating the operator-script argument contract (#3352) and contradicting siblingdocs-twins, which rejects unknowns cleanly.Fix
In
pkgs/mcpx/tools/docs-history/main.go, a dash-led token that is not a known flag is now a usage error naming the subcommand and token (docs-history: render: unknown argument "--agant"+ usage, exit 2) via a sharedrejectUnknownFlaghelper, wired into the render/stamp/check parse loops. Bare positionals still flow to files (render's no-files stdin mode preserved); all valid invocations unchanged.Test
New
TestUnknownFlagsExitWithUsageinmain_test.goreuses #3312's re-exec pattern: one unknown flag per subcommand must exit 2, not panic, name the flag, and print usage. Full package suite passes; live probes confirm the issue's exact cases now exit 2 with usage, and valid render/check invocations behave as before.Lane sweep code 2026-11-28. Verification: gofmt/vet clean, go test ./tools/docs-history/ ok.
🤖 Generated with Muse Spark
{ "direct_parent": null, "links": [], "lineage": { "design": null, "roadmap_item": null, "priority": null }, "pm_meta": 1, "provenance": { "queue_id": null, "scheduled_start": null, "picked_up_at": null, "work_started_at": null, "created_at": "2026-11-28T03:12:04Z", "session_id": "ses_e5de0181bc3ffeyyDBtyr5DI1D", "lane": null, "host": "amd", "worktree": "/home/user/git/fleet/sweep-code-20261128", "model": null, "lane_start_issues": [], "workspace_ref": { "kind": "worktree", "id": "/home/user/git/fleet/sweep-code-20261128", "repo": "developing-today/code", "branch": "sweep/16402-docs-history-unknown-flag", "sha": "21eba3868f61f0d638a43cd522371e3eb9d0b5e5" }, "auth_subject": "oc-code-03", "stamped_by": "fleet 0.1.0 (native)" } }Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.