crucible depot: Increment 1 core (status/push/verify/get/pull + local/cdn/bunny backends) #30

Merged
archvillainette merged 11 commits from depot-core-increment-1 into main 2026-07-04 23:30:55 +00:00
Owner

Implements Increment 1 of docs/superpowers/specs/2026-07-04-crucible-depot-core-design.md: a new stdlib-only internal/depot package wired into the dispatcher.

  • crucible depot status|push|verify|get|pull with backends local/cdn/bunny; exit contract 0 clean / 1 drift / 2 unconfirmed-only / 64 usage / 70 internal.
  • Presence is always probed against the real target (IPv4 1-byte range GET; HEAD is banned with a regression-tripwire test). unconfirmed is a distinct state, never collapsed into missing.
  • No prompting anywhere: missing BUNNY_STORAGE_* env fails closed (read path included), enforced by a no-stdin test.
  • Uploads: probe-then-PUT with Checksum: <UPPER-sha>; read/write key split (BUNNY_STORAGE_READ_PASSWORD falls back to BUNNY_STORAGE_PASSWORD).
  • Field-driven fix included: per-probe transient retry (curl --retry 2 equivalent) — without it a real 1490-blob CDN sweep reported 1222 false-unconfirmed; with it, 1490/1490 present in 74s, exit 0.
  • Registry: depot Wired: true, joins the interactive menu; stale "(SeaweedFS)" wording removed.

Tests: unit + httptest fake-Bunny (probe sequence, Checksum header, key split, 428 throttling → exit 2) + local→bunny integration (drift → push → clean → idempotent no-second-PUT; incremental pull). make check green.

Merge ordering: this merges FIRST; the companion sow-assets-manifest#crucible-depot-cutover PR needs its flake input bumped to include this.

🤖 Generated with Claude Code

Implements Increment 1 of `docs/superpowers/specs/2026-07-04-crucible-depot-core-design.md`: a new stdlib-only `internal/depot` package wired into the dispatcher. - `crucible depot status|push|verify|get|pull` with backends `local`/`cdn`/`bunny`; exit contract `0` clean / `1` drift / `2` unconfirmed-only / `64` usage / `70` internal. - Presence is always probed against the real target (IPv4 1-byte range GET; HEAD is banned with a regression-tripwire test). `unconfirmed` is a distinct state, never collapsed into `missing`. - No prompting anywhere: missing `BUNNY_STORAGE_*` env fails closed (read path included), enforced by a no-stdin test. - Uploads: probe-then-PUT with `Checksum: <UPPER-sha>`; read/write key split (`BUNNY_STORAGE_READ_PASSWORD` falls back to `BUNNY_STORAGE_PASSWORD`). - Field-driven fix included: per-probe transient retry (curl `--retry 2` equivalent) — without it a real 1490-blob CDN sweep reported 1222 false-unconfirmed; with it, 1490/1490 present in 74s, exit 0. - Registry: depot `Wired: true`, joins the interactive menu; stale "(SeaweedFS)" wording removed. Tests: unit + httptest fake-Bunny (probe sequence, Checksum header, key split, 428 throttling → exit 2) + local→bunny integration (drift → push → clean → idempotent no-second-PUT; incremental pull). `make check` green. **Merge ordering:** this merges FIRST; the companion `sow-assets-manifest#crucible-depot-cutover` PR needs its flake input bumped to include this. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
archvillainette added 10 commits 2026-07-04 23:01:20 +00:00
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Implement Backend interface with Probe/Get/Put methods, ProbeState constants,
and LocalBackend using filesystem storage with atomic operations and hash
verification.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Adds internal/depot.Run, the stdlib-flag command surface for the five
depot subcommands (0/1/2/64/70 exit contract), plus a dispatch special
case that will route "crucible depot ..." and crucible-depot to it once
Task 6 flips Wired:true (inert for now since Wired stays false).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Flip the depot Registry entry to Wired: true with its command list
(status/push/verify/get/pull), so crucible depot/depot status/etc.
route to depot.Run instead of the fail-closed unwired path. Update
dispatch_test.go: the canonical command surface, command-metadata
completeness (depot has no AppCommand since it parses its own
subcommands), the menu-items test (depot now expected in the menu),
and a new test asserting depot's stderr never reaches the dispatcher's
"not wired yet" message. Drop the stale "(SeaweedFS)" summary wording.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
fix(depot): retry transient probe responses like curl --retry
build-binaries / build-binaries (pull_request) Successful in 2m24s
test-image / build-image (pull_request) Successful in 44s
test / test (pull_request) Failing after 1m33s
446d10925c
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
xtul approved these changes 2026-07-04 23:04:17 +00:00
Dismissed
archvillainette added 1 commit 2026-07-04 23:11:36 +00:00
fix broken smoke
build-binaries / build-binaries (pull_request) Successful in 2m22s
test-image / build-image (pull_request) Successful in 37s
test / test (pull_request) Successful in 1m29s
573ff8e114
archvillainette dismissed xtul's review 2026-07-04 23:11:36 +00:00
Reason:

New commits pushed, approval review dismissed automatically according to repository settings

archvillainette scheduled this pull request to auto merge when all checks succeed 2026-07-04 23:30:42 +00:00
xtul approved these changes 2026-07-04 23:30:53 +00:00
archvillainette merged commit 9357b30994 into main 2026-07-04 23:30:55 +00:00
archvillainette deleted branch depot-core-increment-1 2026-07-04 23:30:55 +00:00
Sign in to join this conversation.