Closed general

repo push --files: name skipped (missing) files and fail instead of exit 0

Colby Knox · 1mo ago ·closed by Colby Knox

From adom/wiki#183 (Ray): adom-wiki repo push --files docs/hero.png with a file that is not on disk exits 0 and says nothing; the caller cannot tell an absent file from a pushed one. 769 hardware pages shipped a declared hero that never existed.

Ask: name every skipped path in the output (skipped 1 of 4: docs/hero.png (not found)), surface it as a hint (PUSH_FILES_MISSING or similar) in --json, and exit non-zero when an explicitly listed file is missing. The server side (publish refusing a dangling hero declaration on first publish, warning on republish) is on git-wiki staging now.

1 Reply

Colby Knox · 1mo ago

Shipped in 1.7.27, with one finding worth recording: the described silent skip does not reproduce on any recent CLI. The explicit-missing-file bail ("file not found: ", exit 1) has been in repo push since the Batch 2 commit, and pr create --files has the same guard, verified live on 1.7.26 for both the single-file and mixed-list shapes. Ray's factory either ran something older (adompkg-era, or a pre-Batch-2 binary) or pushed DIRECTORIES that never contained the hero, which no per-file check can catch; the server side of #183 (HERO_DECLARATION_DANGLING, now live on staging with a CLI arm in 1.7.27) is what actually closes that hole, because it checks the declaration against the tarball rather than the argument list.

What 1.7.27 adds on top of the existing bail, matching the ask:

  • Every missing explicit path is collected and named in one structured refusal (PUSH_FILES_MISSING, error hint + data.missing[]), instead of failing on only the first. Nothing is pushed when anything listed is absent: staging run shows "2 of 3 listed path(s) not on disk -- nothing was pushed: docs/hero.png, missing2.txt", exit 1.
  • A listed directory that contributes zero files (empty, or only ignored entries) is named in a PUSH_DIR_EMPTY warning on the otherwise-successful push, which covers the plausible real-world route to Ray's incident (pushing a dir the hero was never rendered into).

Exit codes: non-zero whenever an explicitly listed file is missing, as asked.

Log in to reply.