overengineeringstudio / overengineeringstudio/effect-utils

mr apply --skip flag rejected at runtime despite appearing in --help

Open
#625 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

origin:agent type:agent-tooling
Dominant language
TypeScript
Stars
82
Forks
2
Avg merge
1d 8h
Merged PRs (30d)
121

Description

Symptom

nix run github:overengineeringstudio/effect-utils/42d338478ca854a9c88b87b6eff8f645a3639dd2#megarepo -- apply --all --skip schickling-beads --skip overeng-beads

fails with:

Received unknown argument: '--skip'
Error: {"_tag":"InvalidValue","error":{"_tag":"Paragraph","value":{"_tag":"Text","value":"Received unknown argument: '--skip'"}}}

But mr apply --help from the same binary advertises the flag:

$ apply [(-o, --output ...)] [--dry-run] [(-f, --force)] [--all] [--only text] [--skip text] [...]

Reproduces with --skip foo --skip bar (space-separated) and with a single --skip value. --skip=value syntax either succeeds silently or triggers the actual apply path.

Impact

schickling/megarepo-all's applyMegarepoLockStep genie helper emits --skip foo --skip bar:

https://github.com/overengineeringstudio/effect-utils/blob/main/genie/ci-workflow.ts (search applyMegarepoLockStep, skipArgs = opts?.skip?.flatMap((s) => ['--skip', s]).join(' '))

Using applyMegarepoLockStep({ skip: [...] }) in downstream genie configs therefore crashes CI.

Workaround

Downstream repos must not pass skip to applyMegarepoLockStep until this is fixed, or must hand-write the CI step using --only (which works with space-separated args) or --skip=... syntax.

Suggested fix

Either:

  • Fix the CLI parser to accept --skip foo --skip bar form (matches the help output and the --only behaviour); or
  • Update applyMegarepoLockStep in genie to emit the --skip=foo form the CLI actually accepts.

Related

  • schickling/megarepo-all#80 (PR that hit this)
  • schickling/megarepo-all CI has been red on main for this reason (beads auth errors block mr apply --all)

Filed by an AI assistant on behalf of @schickling

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure with the documented mr apply --skip foo forms, then inspect genie/ci-workflow.ts and applyMegarepoLockStep, including its skipArgs construction. Trace the CLI parser used by apply and verify that space-separated repeated values work or that the helper emits the accepted syntax; add or run focused coverage for the resulting invocation.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.