You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Carry a CLI-Usage Test Harness So Fleet Repos Stop Copying the Hub's #3502
CODESTYLE.md "Command-Line Arguments" binds every fleet repository, but the only test that holds a repository to it is the hub's own tests/test_cli_usage.py, which is hub-local and not carried. A downstream repository that wants the rule checked has to write its own copy.
ptr727/Blog did that in ptr727/Blog#542. Its checks/tests/test_cli_usage.py follows the hub's design. It discovers every tracked executable from git ls-files, then runs each with --help, -h, help after another argument, and --bogus-flag. It declares a script needing a positional in BEFORE_FLAG and every other in NO_REQUIRED_ARGUMENT, puts recording stubs ahead of the real commands on PATH, and requires the scratch home and working directories and the tree's status to stay unchanged. It is a trimmed copy: its tree check compares git status --porcelain --ignored text rather than per-path size and mtime, and it has no leftover-process check.
Two copies of one harness will drift, and every further repository that holds itself to the rule adds a third.
Proposal
Carry a CLI-usage harness to every repository that has command-line scripts, with the repository-specific parts, the BEFORE_FLAG and NO_REQUIRED_ARGUMENT declarations, read from a data file the repository owns. The hub's copy depends on hub-only modules (carry, host_capability, test_configure_archived), so carrying it means separating the engine from those.
Done
A fleet repository can hold its scripts to the rule by carrying the harness and declaring its own entry points, with no hand-written copy. Blog's copy is then replaced by the carried one.
Maintainer answer (backlog-burndown run, 2026-11-01): deferred until a third repository copies the CLI-usage harness. Until then, two copies do not justify extracting it.
Activity
ptr727 commentedon Nov 1, 2026
Maintainer answer (backlog-burndown run, 2026-11-01): deferred until a third repository copies the CLI-usage harness. Until then, two copies do not justify extracting it.