fix(cli): let push take the --fs the help offers and the code reads - #88
Merged
Merged
Conversation
`pushCommand` reads `args.bool('fs')` and `orca push --help` lists `--fs`,
but push's own entry in BY_COMMAND listed only `gateway` and `force`, so
`assertKnownFlags` refused the flag before the implementation ever saw it.
It did not degrade to ignoring the flag. `orca push --fs` failed outright,
and the error named only the two flags that were listed, so there was no way
to ship the workspace snapshots at all. Every run on a gateway therefore came
back with `blob_count: 0`, and forking a pulled run died inside git:
git read-tree failed (128): fatal: failed to unpack tree object f7aa6aa5…
which is the console's documented "fork it locally" path — `orca pull <run>`
then `orca compare last --from N`.
The union check in flags.test.ts could not see it: it flattens every command's
flags into one set, and `record` and `replay` both allow `fs`. `sync.test.ts`
could not see it either — it calls `pushCommand` with args it builds itself,
which never passes through the gate. So the new test holds the allowlist to the
help text per command, which is the contract the user actually reads.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
🐳 OrcaCode Review
✅ No findings — nothing to flag in this PR. Great work!
OrcaCode Review — Route Smarter. Ship Safer. Spend Less.
Engine-reported: 630 calls · 56.1M tokens · 99% cached
❤️ Share · Install OrcaCode Review
Free on GitHub — the review runs on your own OrcaRouter key. If it helped, a shout-out goes a long way.
Share: X · Reddit · LinkedIn
Follow: X · Discord · LinkedIn · OrcaRouter
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.
Orca-Code-Review — push 1
✅ no blocking findings
pushCommandreadsargs.bool('fs')(sync.ts:739) andorca push --helplists--fs(
main.ts:66), but push's entry inBY_COMMANDlisted onlygatewayandforce. SoassertKnownFlagsrefused the flag before the implementation ever saw it:It did not degrade to ignoring the flag — it made the command fail, and the error named only the
two flags that were listed, so nothing pointed at what had actually gone wrong.
What it cost
There was no way to ship the workspace snapshots. Every run on a gateway therefore came back with
integrity.blob_count: 0and an empty shadow store, and forking a pulled run died inside git:That is the path the OrcaRouter console documents on its "Compare from step" panel, under
"fork from this step with the same files and conversation prefix":
replay.ts:903already anticipated the failure mode — "Pointing a fresh store at the tree idfails to unpack it" — and guards against restoring from the wrong store. It could not guard
against a run whose own store is legitimately empty, because until now no invocation could fill it.
Verification
Against a spec-conformant receiver (
spec/orca-trace-v0.md§1 listsfs/as an optional archivemember), same run, same command, only the flag differs:
orca compare last --from 2--fsfiles=3 fs=withheldblob_count: 0git read-tree failed (128)--fsfiles=26 fs=includedFull suite on Windows: 10 failed / 2408 passed / 40 skipped — the same 10 pre-existing platform
failures as
main, and one more passing test, which is the one added here.Why the existing tests missed it
flags.test.tsalready reads the source and holds the allowlist to it, but the check flattensevery command's flags into one set and asks whether someone allows the name.
recordandreplayboth allowfs, so push's hole satisfied it.sync.test.ts:797covers--fsthoroughly — and callspushCommandwith aParsedArgsit buildsitself, which never passes through the gate that was rejecting it.
The test added here holds the allowlist to the help text, per command: a flag the help offers
under
orca <cmd>has to be accepted for that command. It fails without this change withexpected [ 'orca push --fs' ] to deeply equal [], and finds no other holes.This is necessary but not sufficient
With the flag reachable,
https://orcarouter.eape.mobithen refuses the archive:spec/orca-trace-v0.md§1 listsfs/as part of the layout, so that looks like a gap in thegateway's validator rather than something to fix here — but until it is resolved, the console's
"fork it locally" instructions still cannot work end to end. Filing this separately on the gateway
side; noting it here so this PR is not mistaken for closing that loop.
🤖 Generated with Claude Code