feat(upload): make --artifact optional on upload build - #52
Conversation
Omitting it registers the build and ships no bytes (`request_artifact_upload: false`). That mode already existed — `build::run` skips packing and never reads the artefact when the flag is false, and `xcode post-action` uses it — but no CLI caller could reach it: `--artifact` was required and the flag hard-coded `true`. It is the default path on Android and iOS, which ship bytes only when size analysis is opted into, and the only path a web build can express, having no single artefact. `--deps`/`--timings` still travel without an artefact (the build-info bundle is a separate upload). `--mapping`, `--chunked` and `--out` are rejected with exit 20 rather than ignored: dropping a `--mapping` silently would cost symbolication. Tests: 6 CLI-level, asserting both directions of the flag; 3 mutants caught; 1 e2e flow asserting the payload is intact and zero PUTs happen. First slice of web-build registration — docs/design/web-build-registration.md in the JS repo. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
a3ae829 to
c085f68
Compare
upload build
Code reviewMakes I checked validation ordering (the pre-existing mapping/deps/timings existence loop runs before the new "needs Findings: None. Merge as is. |
Code reviewThis PR makes I traced the new logic against Findings: None. One thing I noticed but don't consider blocking: the pre-existing "sidecar file must exist" check ( Recommend merging as is. |
Omitting
--artifactregisters the build and ships no bytes (request_artifact_upload: false).Why
build::runskips packing and never reads the artefact when the flag is false, andxcode post-actionuses it. No CLI caller could reach it —--artifactwas required and the flag hard-codedtrue.sizeAnalysis.enabled,BUGSEE_SIZE_ANALYSIS_ENABLED).Behaviour
upload build --payload-json pupload build --payload-json p --artifact app.aab--mapping/--chunked/--outwithout--artifact--artifact /nope--deps/--timingsstill travel without an artefact — the build-info bundle is a separate upload. The three rejected flags only describe how artefact bytes move; dropping a--mappingsilently would cost symbolication.Tests
6 CLI-level tests asserting both directions of the flag (with an artefact, the same log line says
trueand the ZIP is still packed), so "ships nothing" cannot pass on a run that never consulted it. They strip tracing's ANSI to assert the field's value rather than its name. 3 mutants caught (pinned true, pinned false, guard bypassed). 1 e2e flow: payload intact,request_artifact_upload: false, zero PUTs.Gates: fmt, clippy
-D warnings(0), all unit tests + suites,e2e_flows.pyALL PASS.Not here
format: "web"needs no CLI change — the payload passes through verbatim, so the producer writes it.format=ipa; web has no size-check in slice 1, so it is deferred.uuidderivation for web is blocked on what a build record is keyed by — bugsee/bugsee-javascript#8.First slice of web-build registration (audit §6). Design:
docs/design/web-build-registration.md.🤖 Generated with Claude Code