Expand description
Diagnostics-bundle capability (09-05, EXT-02; 09-07 Invalid
capture) — the support-bundle slice of
GET/POST /data/api/v1/diagnostics/bundle/*, wire-shaped STRICTLY
from the live captures (09-LIVE-CAPTURES §5 — the Pitfall-2
capture: observed, never guessed).
The state vocabulary is capture-locked — THREE states observed
across the 09-02 rigs and the 2026-09-07 UAT (09-UAT.md Gap 3):
Generating (mid-generation, both rigs), Valid (terminal/ready,
both rigs), and Invalid (TERMINAL steady state — the gateway’s
steady-state “no current bundle” answer). PascalCase throughout;
lowercase guesses would have shipped wrong. Invalid’s provenance
(8.3.6 rig ign-p9-836, 2026-09-07): a Valid bundle decays to
Invalid within ~2 minutes UNPROMPTED under passive status-only
polling (TTL-probe evidence: Valid at min 4-5, Invalid at min 6)
and STAYS Invalid — only a fresh generate changes it, so the
wait action exits immediately on it (BUNDLE_UNAVAILABLE_STATES,
exit 6 bundle_not_available). Any string OUTSIDE the captured
set is UNKNOWN: it rides passthrough, never refuses, and is
treated as NOT terminal by the wait action (honest unknowns —
keep polling to the deadline).
Gateway-side wire quirk (observation, NOT behavior): during
the same UAT the one Valid bundle reported fileSize 64708 on
one poll and 73889 on others — the bundle file appears non-static
while Valid. The CLI reports the value faithfully at every hop;
this is recorded as a gateway-side fact only, encoded nowhere as
behavior.
fileSize units (Decisions 2): ABSENT while generating (not
null, not 0 — the key is missing), present integer bytes when
Valid, equal to the download’s Content-Length exactly.
Structs§
- Bundle
Status Wire - One bundle status body (
POST …/generate’s 200 answer IS the same shape — live capture:{"state":"Generating"}).stateis a String BY DECISION (Pitfall 2: never an enum from guessed values — an unobserved future state must ride, never refuse the parse).
Constants§
- BUNDLE_
CAPTURED_ STATES - The full CAPTURED state vocabulary — every state the rigs ever answered (09-LIVE-CAPTURES §5 + the 2026-09-07 UAT, 09-UAT.md Gap 3). A string OUTSIDE this set is UNKNOWN: the wait action keeps polling (honest unknowns — a state the captures never saw must not be declared terminal). Unobserved members still round-trip through the wire model’s passthrough (version tolerance).
- BUNDLE_
DOWNLOAD_ TIMEOUT - Per-request timeout override for the bundle download (Pitfall 8):
the 30 s client default would TRUNCATE MB-sized bundles mid-stream.
Same class as the logs-download 120 s / project-export 120 s /
gwbk 300 s overrides — this ride goes through
download_to_file’sRequestBuilder::timeout, never a second client. Pinned at 300 s by the unit test below (the REQUIRED deterministic timeout-override check lives here, where the constant is born). - BUNDLE_
GENERATING_ STATES - The states that mean “still generating” — EXACTLY the captured mid-generation strings, one member on the captured evidence (09-LIVE-CAPTURES §5 Decisions 1). Case-SENSITIVE membership: the gateway owns the vocabulary (PascalCase); this CLI never guesses.
- BUNDLE_
UNAVAILABLE_ STATES - The captured states meaning “no bundle is available” — TERMINAL
steady states the wait action refuses on IMMEDIATELY (exit 6,
bundle_not_available): only a freshgeneratechanges them, polling cannot. Case-SENSITIVE membership, same shape asis_generating. A subset ofBUNDLE_CAPTURED_STATESby construction (unit-pinned below). - DIAGNOSTICS_
DOWNLOAD_ PATH - GET path of the bundle download (a ZIP, streamed).
- DIAGNOSTICS_
GENERATE_ PATH - POST path that starts bundle generation (no body).
- DIAGNOSTICS_
STATUS_ PATH - GET path of the bundle status poll.
Functions§
- is_
bundle_ unavailable truewhenstateis in the CAPTURED unavailable set — a case-sensitive exact match (BUNDLE_UNAVAILABLE_STATESmembership). Unknown states are deliberately NOT unavailable (they are not anything we have seen).- is_
generating truewhenstateis in the CAPTURED generating set — a case-sensitive exact match (BUNDLE_GENERATING_STATESmembership). Unknown states are deliberately NOT generating (they are not anything we have seen).