boatyard 0.6.4.dev184__tar.gz → 0.6.5.dev190__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/AGENTS.md +4 -4
  2. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/PKG-INFO +2 -1
  3. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/closeout.md +104 -28
  4. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/pyproject.toml +2 -1
  5. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/src/boatyard/build.py +34 -1
  6. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/tests/test_build_docker.py +91 -0
  7. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/uv.lock +40 -0
  8. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/.gitattributes +0 -0
  9. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/.github/workflows/cleanup-pr-releases.yml +0 -0
  10. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/.github/workflows/integrate.yml +0 -0
  11. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/.github/workflows/merge-gate.yml +0 -0
  12. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/.github/workflows/release.yml +0 -0
  13. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/.gitignore +0 -0
  14. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/.python-version +0 -0
  15. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/CLAUDE.md +0 -0
  16. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/LICENSE +0 -0
  17. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/NOTICE +0 -0
  18. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/README.md +0 -0
  19. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/design/AGENTS.md +0 -0
  20. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/design/CLAUDE.md +0 -0
  21. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/design/adoption-semver-wave.md +0 -0
  22. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/design/apt-hermeticity.md +0 -0
  23. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/design/dev-overlay.md +0 -0
  24. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/design/gpu-template-collapse.md +0 -0
  25. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/design/mirror-digest-retention.md +0 -0
  26. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/design/precision-attribution.md +0 -0
  27. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/design/semver-image-bundle-lines.md +0 -0
  28. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/publish.yml +0 -0
  29. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/ruff.base.toml +0 -0
  30. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/ruff.toml +0 -0
  31. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/scripts/preflight.py +0 -0
  32. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/src/boatyard/__init__.py +0 -0
  33. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/src/boatyard/cli.py +0 -0
  34. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/src/boatyard/compose.py +0 -0
  35. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/src/boatyard/config/__init__.py +0 -0
  36. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/src/boatyard/config/config.py +0 -0
  37. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/src/boatyard/config/lock.py +0 -0
  38. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/src/boatyard/config/values.py +0 -0
  39. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/src/boatyard/crane.py +0 -0
  40. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/src/boatyard/dockerfiles.py +0 -0
  41. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/src/boatyard/lock.py +0 -0
  42. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/src/boatyard/markers.py +0 -0
  43. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/src/boatyard/paths.py +0 -0
  44. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/src/boatyard/publish.py +0 -0
  45. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/src/boatyard/py.typed +0 -0
  46. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/src/boatyard/score.py +0 -0
  47. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/src/boatyard/score_compose.py +0 -0
  48. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/src/boatyard/score_k8s.py +0 -0
  49. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/src/boatyard/score_patch_templates/gpu-cuda.tpl +0 -0
  50. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/src/boatyard/score_patch_templates/gpu-pod.tpl +0 -0
  51. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/src/boatyard/score_patch_templates/gpu-rocm.tpl +0 -0
  52. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/src/boatyard/score_patch_templates/probe-adapter-healthchecks.tpl +0 -0
  53. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/src/boatyard/score_patch_templates/restart.tpl +0 -0
  54. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/src/boatyard/score_patch_templates/scale-to-zero.tpl +0 -0
  55. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/src/boatyard/temp.py +0 -0
  56. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/src/boatyard/verbs/__init__.py +0 -0
  57. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/src/boatyard/verbs/build.py +0 -0
  58. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/src/boatyard/verbs/down.py +0 -0
  59. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/src/boatyard/verbs/lock.py +0 -0
  60. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/src/boatyard/verbs/matrix.py +0 -0
  61. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/src/boatyard/verbs/mirror.py +0 -0
  62. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/src/boatyard/verbs/publish.py +0 -0
  63. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/src/boatyard/verbs/score.py +0 -0
  64. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/src/boatyard/verbs/tree_tags.py +0 -0
  65. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/src/boatyard/verbs/up.py +0 -0
  66. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/src/boatyard/yaml.py +0 -0
  67. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/tests/conftest.py +0 -0
  68. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/tests/test_assembly.py +0 -0
  69. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/tests/test_compose.py +0 -0
  70. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/tests/test_config.py +0 -0
  71. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/tests/test_daemon_gc.py +0 -0
  72. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/tests/test_lock.py +0 -0
  73. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/tests/test_markers.py +0 -0
  74. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/tests/test_matrix.py +0 -0
  75. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/tests/test_mirror.py +0 -0
  76. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/tests/test_provisioners.py +0 -0
  77. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/tests/test_publish_compose.py +0 -0
  78. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/tests/test_score_generate.py +0 -0
  79. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/tests/test_secrets.py +0 -0
  80. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/tests/test_service_builds.py +0 -0
  81. {boatyard-0.6.4.dev184 → boatyard-0.6.5.dev190}/tests/test_tree_tags.py +0 -0
@@ -13,14 +13,14 @@ Quick loop: `uv run pytest`, `uv run ruff check`; full gate: `uv run --locked sc
13
13
 
14
14
  One module per command under `verbs/`, each with its local bare `app = typer.Typer()` + `@app.command()` on the function; `cli.py` composes them with nameless `app.add_typer(...)` — flat top-level verbs (a named `add_typer` nests a group); one `boatyard`
15
15
  console script. Exception law: nothing is ever caught only to be re-raised as a different exception with added information — hand-raised guards and third-party exceptions surface raw, uncaught, with full traceback; `typer.BadParameter`
16
- owns the CLI-flag layer; `raise SystemExit` only in `verbs/publish.py` (registry credentials), `verbs/score.py` (stale artifacts), and `lock.py` (stale lock). Flags live in the typer signatures in `verbs/*.py`; the flag laws: `build`'s
16
+ owns the CLI-flag layer; `raise SystemExit` only in `verbs/publish.py` (registry credentials), `verbs/score.py` (stale artifacts), `lock.py` (stale lock), and `build.py` (the shelving `REGISTRY` env). Flags live in the typer signatures in `verbs/*.py`; the flag laws: `build`'s
17
17
  `--push`/`--push-to` refuse together; `generate-score`'s `--target` default derives from the config (`both` where both substrates are declared, else the one present), and an explicitly spelled target naming an absent substrate refuses (BadParameter) naming the matching narrower spelling (the rendering pipelines carry no substrate-presence checks); `docker-build-matrix` answers a bare JSON array.
18
18
  `--lock-only`/`--check`/`--upgrade` belong to `lock`, never `build`; no `--gpu`, no `--compose-file` (the verbs own the compose invocation); `tree-tags` answers a bare string — no JSON, no `{SERVICE}_SHA` names.
19
19
 
20
20
  ## Modules
21
21
 
22
22
  `config/config.py` schema + load; `ConfigFile.resolve_services(choices)` folds a selection into leaf services; `dockerfiles.py` Dockerfile declarations + sha machinery (`ServiceBuild`, `derive_services`); `config/lock.py` lock schema + paired `LockFile.load(path, config)` + the projection members; `yaml.py` `load_yaml_model` + its duplicate-key walk (the YAML→pydantic parse boundary); `config/values.py` the typed values file; `paths.py` the consumer-repo document paths (`DEFAULT_CONFIG_PATH`/`VALUES_FILE`/`LOCK_PATH`); `temp.py` the shared digest/platform regex spellings
23
- (`ValuesFile.load`, `PublicUrl`); `lock.py` relock engine + crane resolution; `compose.py` the compose invocation spelling `compose_command` (both verbs); `build.py` build pipeline; `markers.py` marker resolution; `score.py` score shared base; `score_compose.py`/`score_k8s.py` rendering pipelines; `verbs/score.py` the score verb + `ensure_tools`;
23
+ (`ValuesFile.load`, `PublicUrl`); `lock.py` relock engine + crane resolution; `compose.py` the compose invocation spelling `compose_command` (both verbs); `build.py` build pipeline + the digest-shard shelving; `markers.py` marker resolution; `score.py` score shared base; `score_compose.py`/`score_k8s.py` rendering pipelines; `verbs/score.py` the score verb + `ensure_tools`;
24
24
  `publish.py` publish preparation; `crane.py` pinned crane installer; `verbs/up.py` selection + rendering inlined in `up` + the up-only `render_env_entries`/`lock_env_unwind`; `verbs/*` one module per command. Model modules run root → leaves: root record first
25
25
  (`RootModel` subscripts quote forward refs; the one inversion is a parent whose field default constructs the child), functions callers-before-callees; imports absolute; `dockerfiles` ← `config/config` ← `config/lock` ← `lock` one-way. Also in `config/config.py` (the shared leaf): `Yaml`,
26
26
  `is_mapping`/`is_list`, `double_dollars` (the one `$`-doubling home), `PLACEHOLDER`/`COMPOSE_SLOT`/`ENV_NAME_PATTERN`, `EDGE_SERVICE_NAME`, `lock_key_prefix`, `chart_lock_key`, `bundle_lock_key`, `env_lock_slot`/`LOCK_SLOT_MARKER`,
@@ -77,7 +77,7 @@ owns the CLI-flag layer; `raise SystemExit` only in `verbs/publish.py` (registry
77
77
  - The `mirror` verb probes presence per reference over every recorded digest (`crane digest`; partially mirrored still triggers the copy; probe failure falls through to `crane copy`, the loud gate — probe errors never classified); one
78
78
  `crane copy {ref} {prefix}/{ref}` per lacking reference copies the whole index; every declared `base_images`/charts reference is a target — nothing filtered; zero declared targets = a loud error; the
79
79
  footer splits copied/present; crane's installer always runs so the pin, not a preexisting binary, decides the version.
80
- - `build --push` leaves bake's `metadata.json` in the working directory — the handoff the toolkit's builds_ref step reads; boatyard reads no `REGISTRY` facts.
80
+ - `build --push` (repository mode) shelves one digest-manifest shard per matrix leg on the builds shelf: `sha-{HEAD}-{sha256-8 of the leg's sorted baked targets}` over `{REGISTRY}/builds/images-digests-all`, manifest `{target: {ref, digest, tags}}`; the toolkit's release verb enumerates a SHA's shards and merges. `--push-to` never shelves (ad-hoc destination, capture-tool's flow); a repository push without `REGISTRY` env refuses naming it.
81
81
 
82
82
  ## Compose assembly and selection
83
83
 
@@ -124,7 +124,7 @@ owns the CLI-flag layer; `raise SystemExit` only in `verbs/publish.py` (registry
124
124
  ARG at its variant value, `{SERVICE}_SHA` as `${…:?err}`; tags `{namespace}/{target}:latest` + `:${SERVICE_SHA}`; `target:`-prefixed `additional_contexts`; registry cache refs under `{namespace}/build-cache:{target}` in push mode.
125
125
  - The incremental lock write rides every building run (the `uv sync` shape — anyone who builds also locks), landing only after target selection + its refusals; bake reads the fresh entries as environment (index form); a building run with
126
126
  zero derived services refuses naming the lock verb.
127
- - `metadata.json`: cwd-stable, unlinked before the run, coverage-checked against the requested targets after; local default-target builds run the daemon
127
+ - `metadata.json`: cwd-stable, unlinked before the run, coverage-checked against the requested targets after; a repository push distills it into the shelved shard (Mirror namespace); local default-target builds run the daemon
128
128
  GC-limit check (`MIN_KEEP_STORAGE_GB` = 60; absent/null `defaultKeepStorage` refuses with a sample snippet, an explicit zero is a set value refusing below the floor; no readable daemon.json warns and continues).
129
129
 
130
130
  ## Score generation
@@ -1,11 +1,12 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: boatyard
3
- Version: 0.6.4.dev184
3
+ Version: 0.6.5.dev190
4
4
  Summary: Deploy-files definition language and compiler, plus a runtime for the compose target
5
5
  License-File: LICENSE
6
6
  License-File: NOTICE
7
7
  Requires-Python: >=3.13
8
8
  Requires-Dist: bashrun>=0.1.0
9
+ Requires-Dist: build-artifact-registry>=0.2.2
9
10
  Requires-Dist: packaging>=24.1
10
11
  Requires-Dist: pydantic>=2.11.7
11
12
  Requires-Dist: pyyaml>=6.0
@@ -99,22 +99,35 @@ separate commits.
99
99
  five (cutover, toolkit bump, docs flip, one `Run generate-score`, tests), the
100
100
  pre-sweep old-basis `301b8f09 Run generate-score` dropped (artifacts-only), a
101
101
  `sweep-backup` branch held the pre-rebase chain during the rework and may be
102
- deleted; final tree byte-identical to the pre-rebase tip, and the clean-clone
103
- `generate-score --check` passes at the new tip. Verified locally: ruff,
102
+ deleted; final tree byte-identical to the pre-rebase tip; the session's
103
+ "clean-clone `--check` passes" claim was false — no 0.6.3 checkout passes
104
+ it (CI self-contaminates; see the 0.6.4 entry under Work 4). Verified
105
+ locally: ruff,
104
106
  format, basedpyright (the only errors are pre-existing torch-resolution gaps —
105
107
  the venv lacks the cuda extra and the sync was deliberately skipped), scripts
106
108
  pytest 17, `lock --check`, matrix (three partitions incl. the TORCH_DEVICE
107
109
  fans), `publish-compose --plan` (four qualified bundles), lint-workflows at
108
- `f2d576a`. First Integrate run (42203772626, 2026-11-06): the docker-build leg
109
- FAILED — operator canceled the run; the failure is undiagnosed. NEXT SESSION
110
- OPENS HERE: pull the failed docker-build job's log from that run first thing,
111
- root-cause before touching anything (the regen's tree tags name images CI must
112
- build; candidates: the variant-fanned build args, the `{uv}`/`{python}`
113
- templates, the postgres-wrapper preflight leg — but read the log, don't
114
- guess), fix under direction, re-run CI, and only then continue the sweep —
115
- placeframe-capture-tool, then lbe-toolkit, then Make-it-Sing (`git switch
116
- compose-bundles` first). Also unverified locally (needs the cuda sync / CI):
117
- the full preflight sidecar end-to-end and generate-clients.
110
+ `f2d576a`. First Integrate run (42203772626, 2026-11-06): the docker-build
111
+ leg FAILED at `generate-score --check`; root-caused next session (the
112
+ 0.6.4 entry under Work 4 — 0.6.3's walk hashed the check's own uv-sync
113
+ byproducts; the committed tags were correct). The 0.6.4 repin went up as
114
+ `a5430b3b` (a literal `fixup!` subject — folding it into `e2819c07` needs
115
+ a force-push + CI rerun; left as-is deliberately); the regen correctly
116
+ no-ops under 0.6.4. Second Integrate run (42212833180):
117
+ plan-docker-builds green including the staleness check, build legs
118
+ running on the committed tags; unity legs in flight at session close.
119
+ The run completed: every leg green except `release-pr-builds`, which
120
+ failed pulling `images-digests-all:sha-a5430b3b…` — the digest-shard
121
+ shelving gap (entry under Work 4): it returns to boatyard's build
122
+ verb as `0.6.5`; placeframe repins once that publishes.
123
+ NEXT SESSION OPENS HERE: the placeframe-capture-tool sweep on its
124
+ `compose-bundles` — the repin adds `project_name` (required from 0.6.0),
125
+ install-zed rewrites onto `yaml.safe_load` + `tree-tags` + `build
126
+ --push-to`, and the arm64 platform-manifest relock gating the ZED-box AOA
127
+ deploy (`zed-aoa-diagnosis-handoff.md` gates on exactly this); then
128
+ lbe-toolkit, then Make-it-Sing (`git switch compose-bundles` first).
129
+ Also unverified locally for placeframe (needs the cuda sync / CI): the
130
+ full preflight sidecar end-to-end and generate-clients.
118
131
  - The values-file session (2026-11-04, battery green) landed atop Work 1 and
119
132
  rewrote the consumer surface: `.env` is dead — `boatyard.values.yaml`
120
133
  (gitignored, typed; `ConfigValues` in `values_file.py`) is the only
@@ -154,12 +167,15 @@ These rulings bind every work unit below.
154
167
  artifact formats (`stack/generated/**`). Nothing lands that a consumer could
155
168
  only use by importing `boatyard`; every consumer touch is CLI, declarations,
156
169
  or artifacts.
157
- - Content identity hashes the working tree, never git state: the hash reads
158
- the same source the build compiles (the `.dockerignore` allowlist, one
159
- shared matcher), so dirt is content and a lying tag is unrepresentable.
160
- "The tag of commit X" means "the tag of a clean checkout of X";
161
- clean-checkout reproducibility is the CI-side invariant — no workflow step
162
- writes into a hashed path before `build` / `generate-score --check`.
170
+ - Content identity hashes git-visible state: the `.dockerignore` allowlist
171
+ walk intersects `git ls-files --cached --others --exclude-standard`
172
+ (system and global excludes blanked) at raw on-disk bytes — tracked and
173
+ untracked-not-ignored files hash, ignored files never do. The tag is an
174
+ input name reproducing from any tree of the same git-visible state; the
175
+ registry digest in the lock is the content address. "The tag of commit X"
176
+ means "the tag of any checkout of X" — reproducibility holds by
177
+ construction (flipped 2026-11-06 in 0.6.4; the prior disk-walk basis
178
+ hashed the checker's own uv-sync byproducts, recorded under Work 4).
163
179
  - Three-class principle: authored facts in the config, registry-resolved facts
164
180
  in the lock, tree-derived facts computed on demand and never committed.
165
181
  - Fail closed: unknown name, missing lock entry, template composing a
@@ -230,6 +246,9 @@ flip are atomic per repo, riding Work 4's wave.
230
246
 
231
247
  ### Disk-state service hashes
232
248
 
249
+ (The hashing basis flipped to git-visible in 0.6.4 — see the Work 4 entry;
250
+ the allowlist grammar and git-index staging below stand unchanged.)
251
+
233
252
  The old hash read git objects while the build compiled the disk; every
234
253
  lying-tag vector (a dirty build under a stale tag, an untracked file entering
235
254
  image bits the hash never saw) flowed from that mismatch, and the dirty-tree
@@ -469,6 +488,17 @@ Verify: the release published; `AGENTS.md` matches the shipped surface.
469
488
  builds_ref naming stays `builds_ref` throughout.
470
489
  - Tests: the three fixtures writing `docker-devkit.yaml` (test_prerelease,
471
490
  test_run_releases, test_config) → `boatyard.yml`.
491
+ - The docker digest-manifest shelving stays a boatyard build-verb behavior — never
492
+ this unit's to carry: docker-devkit's `build --push` pushed one shard per leg to
493
+ the builds shelf from inception (boatyard history `820915a`), the Nov 1 refactor
494
+ dropped it (`79a7087`, no recorded replacement), and a first re-draft of this item
495
+ wrongly moved it onto the toolkit — reversed 2026-11-06: the parse types
496
+ (`BakeMetadata`/`BakedImage`) and the authenticated registry surface
497
+ (`publish-compose`'s crane pushes) already live in boatyard, and a toolkit home
498
+ would duplicate the parse layer in a second repo and force `uses:` SHA bumps in
499
+ every consumer where a boatyard release rides the wave's existing repin. Restored
500
+ inside `build --push` (0.6.5); the toolkit keeps only the pull side
501
+ (`pull_digest_manifest`).
472
502
  - AGENTS.md: the config-file law line and the verb invocation spellings.
473
503
 
474
504
  Verify: the toolkit's own suite green.
@@ -516,6 +546,52 @@ target and `requires:` floor are `0.6.3` from here (infra-rathole's landed
516
546
  environment; the old devkit's os.environ export was the channel 0.4.9
517
547
  consumers depended on.
518
548
 
549
+ Found in the placeframe sweep's failed Integrate run (42203772626,
550
+ 2026-11-06 — `plan-docker-builds`' `generate-score --check` exited 1),
551
+ fixed on `dev`, released as `0.6.4`; the wave's pin target and
552
+ `requires:` floor are `0.6.4` from here:
553
+ - The 0.6.3 disk walk hashed gitignored files under the allowlist — the
554
+ check's own `uv run --locked` sync writes them
555
+ (`packages/generated/python/*/…egg-info/`, `build/`) before the walk
556
+ runs, so CI's checkout contaminated itself and minted tags (`c51eb…`
557
+ set) no committed mint could match; the committed placeframe tags
558
+ (`f2bb…` set) were correct all along (first diagnosed as a dirty-tree
559
+ mint — wrong; the mint was clean). The walk now intersects the
560
+ allowlist with git-visible files at raw on-disk bytes: tracked and
561
+ untracked-not-ignored files hash, ignored files never do, and
562
+ `generate-score` mints identically from any tree — the clean-clone
563
+ mint discipline dies. Accepted residual, ruled deliberately: a local
564
+ build with ignored dirt under the allowlist shares its tag with the
565
+ clean image (ignored bytes bake unnamed); no push guard (YAGNI).
566
+ Verified by the second Integrate run (42212833180) — the staleness
567
+ check green on the committed tags.
568
+
569
+ Found in the placeframe sweep's second Integrate run (42212833180,
570
+ 2026-11-06 — `release-pr-builds` died pulling
571
+ `images-digests-all:sha-a5430b3b…`, not found; every other job green):
572
+ the Work-3 toolkit cutover dropped the docker digest-manifest shelving.
573
+ docker-devkit's build verb had pushed one shard per leg
574
+ (`sha-{full}-{sha256(sorted targets)[:8]}` over bake's `metadata.json`,
575
+ boatyard history `9ab7c09`/`79a7087`); boatyard deliberately shed the
576
+ shelf, and the ruling that the toolkit picks the push up was lost with an
577
+ absorbed plan — both AGENTS files already described the intended state
578
+ (boatyard: `metadata.json` is "the handoff the toolkit's builds_ref step
579
+ reads"; toolkit: "the docker build legs push digest-manifest shards
580
+ there"). Fix (ruled after re-investigation the same day): the shelving
581
+ returns to boatyard's `build --push` — its home from inception
582
+ (`820915a`: "a `build --push` run distills bake's `--metadata-file` …
583
+ and pushes it through build-artifact-registry's `push_build`"), dropped
584
+ by the Nov 1 refactor with no replacement; a toolkit home was drafted
585
+ and rejected — it duplicates the `BakeMetadata` parse boatyard already
586
+ runs for its coverage check and rides the wrong pin surface. Gating:
587
+ repository-push mode only (`--push-to` never shelves — ad-hoc
588
+ destination, capture-tool's flow), `REGISTRY` env required (the shelf
589
+ root), shard key the sha256-8 of the leg's sorted baked targets.
590
+ Released as `0.6.5`; the wave's pin target and `requires:` floor are
591
+ `0.6.5` from here; the toolkit `uses:` pins stay at `f2d576a…`, and the
592
+ two AGENTS lines describing the unbuilt toolkit step correct with the
593
+ landing.
594
+
519
595
  Sweep mechanics discovered in infra-rathole, carried to the rest: the
520
596
  score-tool trio (score-compose 0.42.0, score-k8s 0.15.0, helm 3.22.1) must
521
597
  pre-exist in `/usr/local/bin` to run generate-score locally (the defect
@@ -531,19 +607,19 @@ repo with one. The Make-it-Sing phase must watch the rathole bundle's
531
607
  default local addrs (`gateway:8443`, `livekit:6178`): they now sit on the
532
608
  bundle's private network, where consumer service names may not resolve —
533
609
  its `up` assembly (the path-override verify) surfaces whether the
534
- `TUNNEL_*_ADDR` slots need explicit values. Placeframe added: its checkout
535
- carries ignored dirt under the `.dockerignore` allowlist (`__pycache__`,
536
- `egg-info/`, the vendored deep-image-retrieval `.venv`) and dirt hashes, so
537
- committed regenerations must mint from a clean clone of the branch tip — a
538
- dirty-tree regen commits machine-local tags and fails CI's
539
- `generate-score --check` (recorded in placeframe's `stack/AGENTS.md`).
610
+ `TUNNEL_*_ADDR` slots need explicit values. Placeframe added: its checkout
611
+ carries ignored dirt under the `.dockerignore` allowlist (`__pycache__`,
612
+ `egg-info/`, the vendored deep-image-retrieval `.venv`) — inert for
613
+ hashing since the 0.6.4 git-visible flip (regen mints from any tree);
614
+ placeframe's `stack/AGENTS.md` clean-clone regen line rides its next
615
+ touch.
540
616
 
541
617
  Common to all five, order within a repo code → lockfiles → prose:
542
618
 
543
- 1. Dependency: `docker-devkit…` → `boatyard==0.6.1` (or `>=`); `uv lock
544
- --upgrade-package boatyard`. `requires:` floor → `>=0.6.1` (0.6.0 carries
545
- the two sweep defects; infra-rathole landed `>=0.6.0` before this ruling —
546
- bump it in passing when next touched).
619
+ 1. Dependency: `docker-devkit…` → `boatyard==0.6.4` (or `>=`); `uv lock
620
+ --upgrade-package boatyard`. `requires:` floor → `>=0.6.4` (0.6.4
621
+ carries the git-visible hashing flip; placeframe landed at 0.6.4 via its
622
+ repin; infra-rathole's older floor bumps in passing when next touched).
547
623
  2. `git mv docker-devkit.yaml boatyard.yml`; `git mv docker-devkit.lock
548
624
  boatyard.lock.yml`, then truncate the lock to the empty file before the
549
625
  relock — the old env format never parses at relock's committed
@@ -1,10 +1,11 @@
1
1
  [project]
2
2
  name = "boatyard"
3
- version = "0.6.4.dev184"
3
+ version = "0.6.5.dev190"
4
4
  description = "Deploy-files definition language and compiler, plus a runtime for the compose target"
5
5
  requires-python = ">=3.13"
6
6
  dependencies = [
7
7
  "bashrun>=0.1.0",
8
+ "build-artifact-registry>=0.2.2",
8
9
  "packaging>=24.1",
9
10
  "pydantic>=2.11.7",
10
11
  "pyyaml>=6.0",
@@ -1,5 +1,6 @@
1
1
  from __future__ import annotations
2
2
 
3
+ import hashlib
3
4
  import json
4
5
  import os
5
6
  import platform
@@ -12,6 +13,8 @@ from typing import Self
12
13
  import typer
13
14
  import yaml
14
15
  from bashrun.bash import bash, bash_check, bash_output
16
+ from build_artifact_registry.builds import push_build
17
+ from build_artifact_registry.setup_oras import install_oras
15
18
  from pydantic import BaseModel, ConfigDict, Field, RootModel, field_validator, model_validator
16
19
 
17
20
  from boatyard import dockerfiles
@@ -22,6 +25,10 @@ from boatyard.lock import relock
22
25
 
23
26
  METADATA_PATH = Path("metadata.json")
24
27
 
28
+ DIGEST_PROJECT = "images-digests"
29
+ DIGEST_PLATFORM = "all"
30
+ DIGEST_FILE_NAME = "images-digests.json"
31
+
25
32
  MIN_KEEP_STORAGE_GB = 60
26
33
 
27
34
  type BakeValue = str | list[str] | dict[str, str]
@@ -40,6 +47,8 @@ class BakedImage(BaseModel):
40
47
  model_config = ConfigDict(extra="ignore")
41
48
 
42
49
  image_name: str = Field(default="", alias="image.name")
50
+ digest: str = Field(default="", alias="containerimage.digest")
51
+ ref: str = ""
43
52
  tags: list[str] = Field(default_factory=list)
44
53
 
45
54
  @model_validator(mode="after")
@@ -48,8 +57,9 @@ class BakedImage(BaseModel):
48
57
  reference = reference.strip()
49
58
  if not reference:
50
59
  continue
51
- _repository, separator, tag = reference.split("@", 1)[0].rpartition(":")
60
+ repository, separator, tag = reference.split("@", 1)[0].rpartition(":")
52
61
  if separator:
62
+ self.ref = repository
53
63
  self.tags.append(tag)
54
64
  return self
55
65
 
@@ -222,6 +232,29 @@ def run_build(
222
232
  if not set(resolved_targets) <= baked.root.keys():
223
233
  raise ValueError("Bake output does not cover the requested targets")
224
234
 
235
+ if push:
236
+ # Shard one manifest per leg so parallel builds cannot collide on a shared tag
237
+ registry = os.environ.get("REGISTRY", "")
238
+ if not registry:
239
+ raise SystemExit("REGISTRY not set — a repository push shelves the digest manifest under it")
240
+ install_oras()
241
+ manifest = {
242
+ target: {"ref": image.ref, "digest": image.digest, "tags": image.tags}
243
+ for target, image in baked.root.items()
244
+ }
245
+ key = hashlib.sha256(",".join(sorted(baked.root)).encode("utf-8")).hexdigest()[:8]
246
+ sha = bash_output("git rev-parse HEAD").strip()
247
+ with TemporaryDirectory(prefix="digest-manifest-") as staging:
248
+ (Path(staging) / DIGEST_FILE_NAME).write_text(json.dumps(manifest, indent=2), encoding="utf-8")
249
+ push_build(
250
+ f"{registry}/builds",
251
+ DIGEST_PROJECT,
252
+ DIGEST_PLATFORM,
253
+ f"sha-{sha}-{key}",
254
+ Path(staging),
255
+ [DIGEST_FILE_NAME],
256
+ )
257
+
225
258
 
226
259
  def check_gc_limits(candidates: list[Path] | None = None) -> None:
227
260
  # Probe the system file, the user file, then the Windows home under WSL.
@@ -1,4 +1,5 @@
1
1
  import json
2
+ import hashlib
2
3
  import os
3
4
  import platform
4
5
  from pathlib import Path
@@ -17,6 +18,7 @@ from boatyard import lock as lock_module
17
18
  from boatyard.config.lock import LOCK_PATH
18
19
 
19
20
  DIGEST_A = "sha256:" + "a" * 64
21
+ HEAD_SHA = "1111111111111111111111111111111111111111"
20
22
  MIRROR_PREFIX = "ghcr.io/outernet-foundation/mirror"
21
23
  REPOSITORY = "ghcr.io/example"
22
24
  LOCAL_REGISTRY = "localhost:5000"
@@ -123,11 +125,41 @@ def _fixed_registry(monkeypatch: pytest.MonkeyPatch) -> None:
123
125
  monkeypatch.setattr(lock_module, "install_crane", _no_gc_limits)
124
126
 
125
127
 
128
+ class ShelveRecorder:
129
+ def __init__(self) -> None:
130
+ self.calls: list[dict[str, object]] = []
131
+
132
+ def __call__(
133
+ self,
134
+ registry: str,
135
+ project: str,
136
+ platform: str,
137
+ tag: str,
138
+ source_directory: Path,
139
+ paths: list[str],
140
+ **kwargs: object,
141
+ ) -> None:
142
+ manifest = json.loads((source_directory / paths[0]).read_text(encoding="utf-8"))
143
+ self.calls.append({
144
+ "registry": registry,
145
+ "project": project,
146
+ "platform": platform,
147
+ "tag": tag,
148
+ "manifest": manifest,
149
+ })
150
+
151
+
152
+ def _head_sha(command: str) -> str:
153
+ assert command == "git rev-parse HEAD"
154
+ return HEAD_SHA
155
+
156
+
126
157
  class BakeRunner:
127
158
  def __init__(self, entries: dict[str, dict[str, str]] | None = None) -> None:
128
159
  self.entries = entries or {}
129
160
  self.commands: list[str] = []
130
161
  self.rendered = ""
162
+ self.shelve = ShelveRecorder()
131
163
 
132
164
  def run(self, command: str) -> None:
133
165
  self.commands.append(command)
@@ -175,6 +207,10 @@ def _prepare(
175
207
  monkeypatch.setattr(build_module, "check_gc_limits", _no_gc_limits)
176
208
  monkeypatch.setattr(build_module, "host_platform", _amd64_host)
177
209
  monkeypatch.setattr(lock_module, "install_crane", _no_gc_limits)
210
+ monkeypatch.setattr(build_module, "push_build", recorder.shelve)
211
+ monkeypatch.setattr(build_module, "install_oras", lambda: None)
212
+ monkeypatch.setattr(build_module, "bash_output", _head_sha)
213
+ monkeypatch.setenv("REGISTRY", REPOSITORY)
178
214
  monkeypatch.chdir(tmp_path)
179
215
  _write_repo(
180
216
  tmp_path,
@@ -479,6 +515,61 @@ class TestPushDestination:
479
515
  assert "no scheme" in " ".join(result.output.split())
480
516
 
481
517
 
518
+ class TestDigestShelving:
519
+ def test_a_repository_push_shelves_one_shard(self, tmp_path: Path, monkeypatch: pytest.MonkeyPatch):
520
+ recorder = _prepare(
521
+ monkeypatch,
522
+ tmp_path,
523
+ ["--push", "--targets", "zed-capture"],
524
+ dockerfiles={"zed-capture": EXTERNAL},
525
+ )
526
+
527
+ assert len(recorder.shelve.calls) == 1
528
+ call = recorder.shelve.calls[0]
529
+ assert call["registry"] == f"{REPOSITORY}/builds"
530
+ assert call["project"] == "images-digests"
531
+ assert call["platform"] == "all"
532
+ assert call["tag"] == f"sha-{HEAD_SHA}-{hashlib.sha256(b'zed-capture').hexdigest()[:8]}"
533
+ assert call["manifest"] == {"zed-capture": {"ref": "registry/api", "digest": DIGEST_A, "tags": ["tree-abc"]}}
534
+
535
+ def test_the_shard_key_covers_every_leg_target(self, tmp_path: Path, monkeypatch: pytest.MonkeyPatch):
536
+ recorder = _prepare(
537
+ monkeypatch,
538
+ tmp_path,
539
+ ["--push", "--targets", "api postgres"],
540
+ dockerfiles={"api": EXTERNAL, "postgres": EXTERNAL},
541
+ )
542
+
543
+ expected_entry = {"ref": "registry/api", "digest": DIGEST_A, "tags": ["tree-abc"]}
544
+ assert recorder.shelve.calls[0]["tag"] == f"sha-{HEAD_SHA}-{hashlib.sha256(b'api,postgres').hexdigest()[:8]}"
545
+ assert recorder.shelve.calls[0]["manifest"] == {"api": expected_entry, "postgres": expected_entry}
546
+
547
+ def test_a_repository_push_without_registry_env_refuses(self, tmp_path: Path, monkeypatch: pytest.MonkeyPatch):
548
+ monkeypatch.setattr(build_module, "bash", BakeRunner().run)
549
+ monkeypatch.setattr(dockerfiles_module, "compute_service_shas", _no_service_shas)
550
+ monkeypatch.setattr(build_module, "check_gc_limits", _no_gc_limits)
551
+ monkeypatch.setattr(build_module, "host_platform", _amd64_host)
552
+ monkeypatch.setattr(lock_module, "install_crane", _no_gc_limits)
553
+ monkeypatch.delenv("REGISTRY", raising=False)
554
+ monkeypatch.chdir(tmp_path)
555
+ _write_repo(tmp_path, dockerfiles={"zed-capture": EXTERNAL})
556
+
557
+ result = runner.invoke(app, ["build", "--push", "--targets", "zed-capture"])
558
+
559
+ assert result.exit_code != 0
560
+ assert isinstance(result.exception, SystemExit)
561
+
562
+ def test_an_address_push_never_shelves(self, tmp_path: Path, monkeypatch: pytest.MonkeyPatch):
563
+ recorder = _prepare(
564
+ monkeypatch,
565
+ tmp_path,
566
+ ["--push-to", LOCAL_REGISTRY, "--targets", "zed-capture"],
567
+ dockerfiles={"zed-capture": EXTERNAL},
568
+ )
569
+
570
+ assert recorder.shelve.calls == []
571
+
572
+
482
573
  class TestGoneFlags:
483
574
  def test_the_gpu_flag_refuses(self, tmp_path: Path, monkeypatch: pytest.MonkeyPatch):
484
575
  monkeypatch.chdir(tmp_path)
@@ -47,6 +47,7 @@ version = "0.6.0"
47
47
  source = { editable = "." }
48
48
  dependencies = [
49
49
  { name = "bashrun" },
50
+ { name = "build-artifact-registry" },
50
51
  { name = "packaging" },
51
52
  { name = "pydantic" },
52
53
  { name = "pyyaml" },
@@ -65,6 +66,7 @@ dev = [
65
66
  [package.metadata]
66
67
  requires-dist = [
67
68
  { name = "bashrun", specifier = ">=0.1.0" },
69
+ { name = "build-artifact-registry", specifier = ">=0.2.2" },
68
70
  { name = "packaging", specifier = ">=24.1" },
69
71
  { name = "pydantic", specifier = ">=2.11.7" },
70
72
  { name = "pyyaml", specifier = ">=6.0" },
@@ -80,6 +82,20 @@ dev = [
80
82
  { name = "types-pyyaml", specifier = ">=6.0.12.20260906" },
81
83
  ]
82
84
 
85
+ [[package]]
86
+ name = "build-artifact-registry"
87
+ version = "0.2.2"
88
+ source = { registry = "https://pypi.org/simple" }
89
+ dependencies = [
90
+ { name = "bashrun" },
91
+ { name = "pydantic" },
92
+ { name = "pydantic-settings" },
93
+ ]
94
+ sdist = { url = "https://files.pythonhosted.org/packages/50/5f/c976fa05bab9e534c771cc8d847f7c86c58d75f18b2f8559cc9f70e4cf54/build_artifact_registry-0.2.2.tar.gz", hash = "sha256:1ffcc011e41629b74f1d470e7db3c435d161b5d03753f6ca2f1820802e8a870a", size = 38707, upload-time = "2026-10-15T22:18:28.164Z" }
95
+ wheels = [
96
+ { url = "https://files.pythonhosted.org/packages/f9/8f/acdc636d3a30b1ba1f045c1b04cd7d187097bdc38d0b625c98c6e68927aa/build_artifact_registry-0.2.2-py3-none-any.whl", hash = "sha256:a8c59694268b2d9a8e6303d43d494d18a83e1ddbba23b18ca4bb245477b12138", size = 10811, upload-time = "2026-10-15T22:18:27.174Z" },
97
+ ]
98
+
83
99
  [[package]]
84
100
  name = "colorama"
85
101
  version = "0.4.6"
@@ -255,6 +271,21 @@ wheels = [
255
271
  { url = "https://files.pythonhosted.org/packages/48/15/213d6fe84816e8a5ed7b7539ecebb3f14c20739c2469f4e372f0f15bb042/pydantic_core-2.50.0-cp315-cp315t-win_arm64.whl", hash = "sha256:f3abcabb04503023e1053add24472e78878de0bfd5c8a93686be01f4032c363c", size = 2175368, upload-time = "2026-10-08T14:30:08.989Z" },
256
272
  ]
257
273
 
274
+ [[package]]
275
+ name = "pydantic-settings"
276
+ version = "2.16.2"
277
+ source = { registry = "https://pypi.org/simple" }
278
+ dependencies = [
279
+ { name = "pydantic" },
280
+ { name = "python-dotenv" },
281
+ { name = "typing-extensions" },
282
+ { name = "typing-inspection" },
283
+ ]
284
+ sdist = { url = "https://files.pythonhosted.org/packages/d0/31/21d21e0e38a8f5f7a7f0cde22820117b6d17d6bc36f348129527f915d7f4/pydantic_settings-2.16.2.tar.gz", hash = "sha256:3dc08ffabed2bbd5dc2dd55ead7b78b4e4c5cd776aecd04310db5f1224caaf46", size = 309225, upload-time = "2026-10-28T11:14:28.066Z" }
285
+ wheels = [
286
+ { url = "https://files.pythonhosted.org/packages/39/88/4131c51ff87b7cd7f82a1194d0c0a2b7ca68c72d9da04c3b7e69ab91a79f/pydantic_settings-2.16.2-py3-none-any.whl", hash = "sha256:8d523e5c129b097686bde019bd6109bff53f4c8c3f63f1ddf9933ffa42e5ab4f", size = 81994, upload-time = "2026-10-28T11:14:26.716Z" },
287
+ ]
288
+
258
289
  [[package]]
259
290
  name = "pygments"
260
291
  version = "2.21.0"
@@ -294,6 +325,15 @@ wheels = [
294
325
  { url = "https://files.pythonhosted.org/packages/4b/5c/eaf3ed4fa8990a7dd39f558dd701c3ec486a492c25ca0f68173394b341ed/python_devkit-0.3.0-py3-none-any.whl", hash = "sha256:822e59323ec343258dde1dfefb75159f87cd64987285b823a1f0c3e0340b9c4a", size = 14431, upload-time = "2026-10-11T04:03:00.428Z" },
295
326
  ]
296
327
 
328
+ [[package]]
329
+ name = "python-dotenv"
330
+ version = "1.2.4"
331
+ source = { registry = "https://pypi.org/simple" }
332
+ sdist = { url = "https://files.pythonhosted.org/packages/74/26/2fbeedb218a787a5eea551c7532cac4e009f83d689dd2faa0d0353473f86/python_dotenv-1.2.4.tar.gz", hash = "sha256:f0d53e69935a851c0dcc78f3ab7aaccd8cabef0b92382b576b824212902873c0", size = 60824, upload-time = "2026-10-01T05:36:10Z" }
333
+ wheels = [
334
+ { url = "https://files.pythonhosted.org/packages/60/d1/38f3a3405989a89ac18390803e70c6ad7c7760da4f9b83cbeca0c44a0c72/python_dotenv-1.2.4-py3-none-any.whl", hash = "sha256:42269a8a5b3fd54ffa6f3d84b18abed50064717576b4ecf03dc4a55d8aa04fdc", size = 23266, upload-time = "2026-10-01T05:36:08.633Z" },
335
+ ]
336
+
297
337
  [[package]]
298
338
  name = "pyyaml"
299
339
  version = "6.0.3"
File without changes
File without changes