boatyard 0.6.0.dev170__tar.gz → 0.6.1__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.0.dev170 → boatyard-0.6.1}/AGENTS.md +2 -2
  2. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/PKG-INFO +1 -1
  3. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/closeout.md +118 -39
  4. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/pyproject.toml +1 -1
  5. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/src/boatyard/verbs/score.py +35 -20
  6. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/tests/test_score_generate.py +112 -4
  7. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/.gitattributes +0 -0
  8. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/.github/workflows/cleanup-pr-releases.yml +0 -0
  9. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/.github/workflows/integrate.yml +0 -0
  10. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/.github/workflows/merge-gate.yml +0 -0
  11. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/.github/workflows/release.yml +0 -0
  12. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/.gitignore +0 -0
  13. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/.python-version +0 -0
  14. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/CLAUDE.md +0 -0
  15. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/LICENSE +0 -0
  16. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/NOTICE +0 -0
  17. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/README.md +0 -0
  18. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/design/AGENTS.md +0 -0
  19. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/design/CLAUDE.md +0 -0
  20. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/design/adoption-semver-wave.md +0 -0
  21. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/design/apt-hermeticity.md +0 -0
  22. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/design/dev-overlay.md +0 -0
  23. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/design/gpu-template-collapse.md +0 -0
  24. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/design/mirror-digest-retention.md +0 -0
  25. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/design/precision-attribution.md +0 -0
  26. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/design/semver-image-bundle-lines.md +0 -0
  27. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/publish.yml +0 -0
  28. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/ruff.base.toml +0 -0
  29. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/ruff.toml +0 -0
  30. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/scripts/preflight.py +0 -0
  31. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/src/boatyard/__init__.py +0 -0
  32. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/src/boatyard/build.py +0 -0
  33. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/src/boatyard/cli.py +0 -0
  34. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/src/boatyard/compose.py +0 -0
  35. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/src/boatyard/config/__init__.py +0 -0
  36. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/src/boatyard/config/config.py +0 -0
  37. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/src/boatyard/config/lock.py +0 -0
  38. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/src/boatyard/config/values.py +0 -0
  39. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/src/boatyard/crane.py +0 -0
  40. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/src/boatyard/dockerfiles.py +0 -0
  41. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/src/boatyard/lock.py +0 -0
  42. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/src/boatyard/markers.py +0 -0
  43. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/src/boatyard/paths.py +0 -0
  44. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/src/boatyard/publish.py +0 -0
  45. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/src/boatyard/py.typed +0 -0
  46. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/src/boatyard/score.py +0 -0
  47. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/src/boatyard/score_compose.py +0 -0
  48. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/src/boatyard/score_k8s.py +0 -0
  49. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/src/boatyard/score_patch_templates/gpu-cuda.tpl +0 -0
  50. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/src/boatyard/score_patch_templates/gpu-pod.tpl +0 -0
  51. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/src/boatyard/score_patch_templates/gpu-rocm.tpl +0 -0
  52. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/src/boatyard/score_patch_templates/probe-adapter-healthchecks.tpl +0 -0
  53. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/src/boatyard/score_patch_templates/restart.tpl +0 -0
  54. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/src/boatyard/score_patch_templates/scale-to-zero.tpl +0 -0
  55. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/src/boatyard/temp.py +0 -0
  56. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/src/boatyard/verbs/__init__.py +0 -0
  57. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/src/boatyard/verbs/build.py +0 -0
  58. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/src/boatyard/verbs/down.py +0 -0
  59. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/src/boatyard/verbs/lock.py +0 -0
  60. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/src/boatyard/verbs/matrix.py +0 -0
  61. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/src/boatyard/verbs/mirror.py +0 -0
  62. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/src/boatyard/verbs/publish.py +0 -0
  63. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/src/boatyard/verbs/tree_tags.py +0 -0
  64. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/src/boatyard/verbs/up.py +0 -0
  65. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/src/boatyard/yaml.py +0 -0
  66. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/tests/conftest.py +0 -0
  67. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/tests/test_assembly.py +0 -0
  68. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/tests/test_build_docker.py +0 -0
  69. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/tests/test_compose.py +0 -0
  70. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/tests/test_config.py +0 -0
  71. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/tests/test_daemon_gc.py +0 -0
  72. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/tests/test_lock.py +0 -0
  73. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/tests/test_markers.py +0 -0
  74. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/tests/test_matrix.py +0 -0
  75. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/tests/test_mirror.py +0 -0
  76. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/tests/test_provisioners.py +0 -0
  77. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/tests/test_publish_compose.py +0 -0
  78. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/tests/test_secrets.py +0 -0
  79. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/tests/test_service_builds.py +0 -0
  80. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/tests/test_tree_tags.py +0 -0
  81. {boatyard-0.6.0.dev170 → boatyard-0.6.1}/uv.lock +0 -0
@@ -14,7 +14,7 @@ Quick loop: `uv run pytest`, `uv run ruff check`; full gate: `uv run --locked sc
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
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
17
- `--push`/`--push-to` refuse together; `generate-score --target both` refuses (BadParameter) a one-substrate repo naming the matching narrower `--target` (the rendering pipelines carry no substrate-presence checks); `docker-build-matrix` answers a bare JSON array.
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
@@ -134,7 +134,7 @@ owns the CLI-flag layer; `raise SystemExit` only in `verbs/publish.py` (registry
134
134
  and generate (state-format coupling bounded by the pinned tool version); `--local` writes the gitignored local output with the local storage class; charts render through `helm template` against the
135
135
  lock's `{NAME}_CHART` entry (a chart without its lock entry refuses naming the lock verb; helm is a renderer, never a deployer); `stack/score/` stays read-only; output reproduces from a fresh clone.
136
136
  - Substrate law: compose renderings consume the lock's platform manifests (the artifact records the exact bytes one machine runs); k8s renderings consume the index form (kubelet resolves per node).
137
- - `ensure_tools` installs the three pinned tools into `/usr/local/bin`: version-probe each, fetch on absence or pin mismatch.
137
+ - `ensure_tools` installs the tools the target needs (score-compose wherever the compose side renders; score-k8s + helm only where k8s renders) into `/usr/local/bin`: presence-probe with `shutil.which` (a missing binary never reaches a subprocess), then version-probe, fetch on absence or pin mismatch.
138
138
  - `--check` = the CI staleness gate: self-skips (exit 0) where nothing generates; otherwise regenerates in-process; any `git status` change over the outputs exits 1 printing the diff; `--check` + `--local` are mutually
139
139
  exclusive.
140
140
  - Post-passes on compose output are typed transformations on `ComposeDocument`, dumped exactly once — pydantic's declared-fields-first order is the artifacts' deterministic key order: a workload-major pass collapses `{workload}-{container}` services to the container name and inlines every `type: bind` volume as a top-level
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: boatyard
3
- Version: 0.6.0.dev170
3
+ Version: 0.6.1
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
@@ -14,30 +14,68 @@ this file and the code disagree, reconcile this file before touching code
14
14
  verify with the target repo's battery; commit as you go, prose and code in
15
15
  separate commits.
16
16
 
17
- ## Snapshot (verified 2026-11-03)
18
-
19
- - boatyard branch `refactor`: all consumer-contract work, the module-tiers
20
- refactor, the score unification, the boatyard rename + CLI refactors, and
21
- Work 1 in full — the disk-state service-hash phase (design signed off,
22
- battery green, `pathspec` dropped), the qualified-selection-names phase
23
- (qualified selection grammar, flat vocabulary law repealed into a
24
- qualified-vocabulary collision check, options identified by qualified name
25
- in bundle outputs, publish legs, and selection), the ref-grammar phase
26
- (tag-only `ref:` grammar with digest/`latest`/range refusals;
27
- `{QUALIFIED_NAME}_BUNDLE` lock entries written by the lock verb, resolving
28
- direct via `crane digest`, declaration-incremental; cross-section collision
29
- refusal; missing-entry refusal naming the relock; bundle probes via crane
30
- under the stderr-classification law; includes carry the lock's digest ref),
31
- and the bundle-override phase (path overrides over the ref tag grammar,
32
- riding the values file's typed `path_overrides` map; probe and lock-entry skip;
33
- path-form teeth — exists, parses, `edge` refusal, service collisions;
34
- producer-lock attachment three parents up, its entries riding the one
35
- merged per-run env file under the entry prefix;
36
- `producer_env_entries` selects platforms
37
- from the producer lock's recorded platforms) — are landed locally, ahead
38
- of origin — unpushed. Work 1 is complete; the branch is ready for Work 2's
39
- operator handoff. `publish.yml` is wired (`packages.boatyard`,
40
- `major_minor: "0.6"`, `registry: pypi`).
17
+ ## Snapshot (verified 2026-11-06)
18
+
19
+ - Work 1 landed: the `refactor` branch was squashed to a four-commit structure
20
+ on `dev` (AGENTS.md prose; code; docs/design prose; closeout.md), pushed as
21
+ `big-refactor`, merged as PR #23. One CI sharp edge surfaced and closed:
22
+ typer force-enables its rich terminal whenever `GITHUB_ACTIONS` (or
23
+ `FORCE_COLOR`/`PY_COLORS`) is set, so CLI-error panels render ANSI-colored
24
+ and a styled token (`localizer/<variant>`) splits on an escape boundary —
25
+ `tests/conftest.py` sets `_TYPER_FORCE_DISABLE_TERMINAL=1` (typer's own
26
+ knob, honored before any typer import); `NO_COLOR` does not defeat it.
27
+ - Work 2 complete (2026-11-06): `boatyard 0.6.0` published on PyPI (wheel +
28
+ sdist; the `0.6.0.dev170` prerelease rode the PR channel); the GitHub repo
29
+ rename happened (`outernet-foundation/boatyard`, old docker-devkit URLs
30
+ redirect — consumers still fix links in Work 4); the optional final
31
+ docker-devkit signpost release was skipped; AGENTS.md matches the shipped
32
+ surface. `publish.yml` stays wired (`packages.boatyard`, `major_minor:
33
+ "0.6"`, `registry: pypi`).
34
+ - Work 3 landed (2026-11-06): toolkit `dev` advanced to
35
+ `f2d576acbceeca8afb324152aad8e4928d5a769b` (operator-direct push of the
36
+ `boatyard-cutover` branch, this repo's own landing mode; the pre-work tip
37
+ was an ancestor, so no history rewrite). That SHA is Work 4's `uses:` pin.
38
+ The landing carries the `BOATYARD_CONFIG_PATH` presence probe in
39
+ `config.py`, the docker workflows onto `uv run --locked boatyard <verb>`
40
+ spellings (`build --push` sans `--gpu`/`GPU:`, `mirror`, `publish-compose
41
+ --plan`/`--branch`, `generate-score --check`, `docker-build-matrix`, and
42
+ the lock-freshness gate as `boatyard lock --check`), the three test
43
+ fixtures writing `boatyard.yml`, and the AGENTS.md config-file law line +
44
+ verb spellings. Toolkit battery green at that SHA (pytest 199, ruff,
45
+ basedpyright, lint-workflows). `build-unity.yml` carries no docker-devkit
46
+ spellings (an earlier count said two; its verbs are unity-devkit's, outside
47
+ the cutover); the remote `boatyard-cutover` branch still points at the same
48
+ SHA and may be deleted.
49
+ - Work 4 opened (2026-11-06): the archaeology greps re-ran against the
50
+ `compose-bundles` tips — every consumer's sweep base is its `compose-bundles`
51
+ branch (in all five repos the conversion exists there; lbe-toolkit's and
52
+ infra-rathole's `origin/dev` carry no `docker-devkit.yaml` at all, and
53
+ Make-it-Sing's local checkout sits on a diverged feature branch — switch to
54
+ its `compose-bundles` before editing). The pins and import inventory below
55
+ re-verified true. Scope facts the steps don't carry: `merge=ours` exists only
56
+ in capture-tool's `.gitattributes`; `stack/secrets.yaml` exists only in
57
+ placeframe; capture-tool's config lacks `project_name` (0.6.0 requires it —
58
+ its sweep adds it); placeframe's real `--gpu` doc line is
59
+ `stack/AGENTS.md:116` (the rest is vendored dirtorch, not consumer prose);
60
+ PyPI and ghcr are reachable from the sandbox, so relocks run here. Next: the
61
+ per-repo sweeps; every consumer's toolkit `uses:` bumps to
62
+ `f2d576acbceeca8afb324152aad8e4928d5a769b`.
63
+ - infra-rathole swept (2026-11-06, five commits on its `compose-bundles`:
64
+ repin+rename+relock, the secrets contract, `Run generate-score`, the
65
+ toolkit SHA bump incl. its local setup-release-devkit composite, the docs
66
+ flip). Battery green locally (ruff, format, basedpyright, matrix `[]`,
67
+ plan, `lock --check`, lint-workflows at the new pin); zero
68
+ docker-devkit/`--lock-only`/`--gpu`/hole mentions remain. CI-green is
69
+ blocked on the two boatyard defects above — the branch awaits the fix
70
+ release and the operator push.
71
+ - Both boatyard defects fixed on `dev` (2026-11-06, `abd6236` prose +
72
+ `dde430a` code, full preflight green): `generate-score`'s `--target`
73
+ default now derives from the config (explicit misspellings still refuse),
74
+ and `ensure_tools` presence-probes with `shutil.which` plus installs only
75
+ the tools the target needs. Verified end-to-end: the dev verb, bare
76
+ invocation against swept infra-rathole, regenerates byte-identically.
77
+ Next: operator releases (0.6.1 expected) → repin infra-rathole → next
78
+ consumer sweep (lbe-toolkit or Make-it-Sing, one per session).
41
79
  - The values-file session (2026-11-04, battery green) landed atop Work 1 and
42
80
  rewrote the consumer surface: `.env` is dead — `boatyard.values.yaml`
43
81
  (gitignored, typed; `ConfigValues` in `values_file.py`) is the only
@@ -50,8 +88,6 @@ separate commits.
50
88
  refusing loudly (the lock is its only source); `lock_env_unwind` keeps
51
89
  the file with a path-line-only echo (contents may carry secrets); the
52
90
  open values map enforces ALL_CAPS env names.
53
- - PyPI: `boatyard` registered, nothing published. GitHub repo rename
54
- (docker-devkit → boatyard) is an operator item, status unverified.
55
91
  - No `lock-env` verb exists (a stale name in the absorbed ADR): lock env is
56
92
  synthesized per-run inside `compose.py`/`bake.py` at the compose/bake edges.
57
93
  - Consumers and toolkit, all verified still on docker-devkit spellings:
@@ -65,10 +101,10 @@ separate commits.
65
101
  | infra-rathole | dev group `==0.4.9.dev165` | none (CLI only) |
66
102
  | github-actions-toolkit | never a dependency (resolver-cycle law) | — |
67
103
 
68
- The five consumers sit on branch `compose-bundles` (the stale checkout state
69
- they were left on, not a deliverable); the toolkit on `dev`. Re-verify with
70
- grep at session open before editing — the import inventory maps each site to a
71
- dissolution below.
104
+ Every consumer's Work-4 sweep builds on its `compose-bundles` branch — the
105
+ correct base in all five repos (the wave's commits land there and ride its
106
+ merge to `dev`); the toolkit on `dev`. Re-verify with grep at session open
107
+ before editing — the import inventory maps each site to a dissolution below.
72
108
 
73
109
  ## Standing constraints
74
110
 
@@ -400,15 +436,52 @@ Verify: the toolkit's own suite green.
400
436
  ## Work 4 — Consumer sweep (one wave)
401
437
 
402
438
  Open by re-running the archaeology greps to re-derive the edit list against
403
- wherever the release actually landed. Common to all five, order within a repo
404
- code → lockfiles → prose:
439
+ wherever the release actually landed. Upstream defects the sweep surfaces in
440
+ github-actions-toolkit or boatyard itself are fixable mid-wave — surface, fix
441
+ the upstream, record here; the wave's pin target follows whatever release
442
+ carries the fixes. Found in infra-rathole (both boatyard 0.6.0, both blocked
443
+ the CI-green verify) and fixed on boatyard `dev` at `dde430a` — awaiting the
444
+ operator release (0.6.1 expected; every consumer pin — including swept
445
+ infra-rathole's — repins to it in a one-line + `uv lock` commit):
446
+ - `generate-score` defaults `--target both` and a one-substrate repo refuses
447
+ under that default — the toolkit getter hardcodes the bare
448
+ `generate-score --check`, so every compose-only repo (infra-rathole,
449
+ lbe-toolkit, Make-it-Sing) fails the gate. Correct fix is boatyard-side:
450
+ the default derives from the config (k8s present + local entries → both;
451
+ one substrate → that one), the explicit misspelling refusals stay, the
452
+ toolkit stays shape-blind.
453
+ - `ensure_tools` probes with `bash_check`, which raises FileNotFoundError on
454
+ a missing binary — the install path is unreachable on a fresh machine
455
+ (runner or sandbox); `generate-score` 0.6.0 has never run clean off a fresh
456
+ environment. Rider: compose-only runs still install score-k8s + helm.
457
+
458
+ Sweep mechanics discovered in infra-rathole, carried to the rest: the
459
+ score-tool trio (score-compose 0.42.0, score-k8s 0.15.0, helm 3.22.1) must
460
+ pre-exist in `/usr/local/bin` to run generate-score locally (the defect
461
+ above); local regeneration on compose-only repos spells `--target compose`;
462
+ the 0.6.0 rendering rewrites every bundle artifact (`{entry}-` namespaced
463
+ services and configs keys on a private `{entry}-net` with the bare name as
464
+ alias, `{ENTRY}__LOCK__KEY` image slots, `name:` last) — the diff is
465
+ expected, rides each repo's `Run generate-score` commit, and consumer AGENTS
466
+ prose claiming the workload-container name "collapses back" is stale
467
+ everywhere it appears; infra-rathole carries a third toolkit-SHA home (its
468
+ local `setup-release-devkit` composite, `RELEASE_DEVKIT_COMMIT`) — the only
469
+ repo with one. The Make-it-Sing phase must watch the rathole bundle's
470
+ default local addrs (`gateway:8443`, `livekit:6178`): they now sit on the
471
+ bundle's private network, where consumer service names may not resolve —
472
+ its `up` assembly (the path-override verify) surfaces whether the
473
+ `TUNNEL_*_ADDR` slots need explicit values.
474
+
475
+ Common to all five, order within a repo code → lockfiles → prose:
405
476
 
406
477
  1. Dependency: `docker-devkit…` → `boatyard==0.6.0` (or `>=`); `uv lock
407
478
  --upgrade-package boatyard`. `requires:` floor → `>=0.6.0`.
408
479
  2. `git mv docker-devkit.yaml boatyard.yml`; `git mv docker-devkit.lock
409
- boatyard.lock.yml` (content unchanged — the `lock` verb's re-resolve
410
- rewrites the env format as structured YAML in one step; no per-entry
411
- migration exists).
480
+ boatyard.lock.yml`, then truncate the lock to the empty file before the
481
+ relock — the old env format never parses at relock's committed
482
+ schema-only read, and the empty lock bootstraps the structured YAML from
483
+ nothing (digests are content-stable: infra-rathole's RATHOLE index digest
484
+ carried forward identically; no per-entry migration exists).
412
485
  3. `.gitattributes`: `docker-devkit.lock merge=ours` → `boatyard.lock.yml
413
486
  merge=ours`.
414
487
  4. Relock completes `platforms` where the config refusal forces it (every
@@ -456,9 +529,13 @@ code → lockfiles → prose:
456
529
  `boatyard.values.yaml` — the file is plain YAML, so no consumer-local
457
530
  dotenv grammar module exists (the earlier plan for one dissolved with
458
531
  the typed values file).
459
- 10. `stack/secrets.yaml` is required from 0.6.0 — consumers lacking it add the
460
- file (an empty file is legal: the empty declaration, no keys consumable)
461
- and commit the mint artifact `stack/generated/secrets.txt` it generates.
532
+ 10. `stack/secrets.yaml` is required from 0.6.0 where generate-score runs —
533
+ and it is the env contract, not only secrets: every ALL_CAPS slot a
534
+ rendering consumes must be declared (mint: true only for real secrets;
535
+ values-file knobs declare plain). An empty file passes only a repo whose
536
+ renderings consume nothing; a self-skipping repo (placeframe-capture-tool
537
+ — the self-skip fires before the secrets read) needs no file at all.
538
+ infra-rathole's declares its six include-time slots, none minting.
462
539
 
463
540
  Per-repo:
464
541
 
@@ -496,7 +573,9 @@ Per-repo:
496
573
  executable images and the ZED-box AOA deployment unblocks
497
574
  (`zed-aoa-diagnosis-handoff.md` gates the deploy on exactly this; update
498
575
  only its still-live instructions). The repin touches both declarations (the
499
- root exact pin and the `scripts/` member floor).
576
+ root exact pin and the `scripts/` member floor); the config gains
577
+ `project_name` (required from 0.6.0 — the build-only repo never carried
578
+ one).
500
579
  - **Make-it-Sing, lbe-toolkit** — standard renames and the step-6/7 flips;
501
580
  Make-it-Sing's local (never committed) `BUNDLE_OVERRIDE_PLACEFRAME_CUDA`
502
581
  becomes the `path_overrides: {placeframe-cuda: …}` map entry; lbe-toolkit's
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "boatyard"
3
- version = "0.6.0.dev170"
3
+ version = "0.6.1"
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 = [
@@ -1,6 +1,7 @@
1
1
  from __future__ import annotations
2
2
 
3
3
  import os
4
+ import shutil
4
5
  from pathlib import Path
5
6
  from tempfile import TemporaryDirectory
6
7
  from typing import Annotated, NamedTuple
@@ -35,7 +36,10 @@ class ToolRequirement(NamedTuple):
35
36
 
36
37
  @app.command()
37
38
  def generate_score(
38
- target: Annotated[Target, typer.Option(help="Which Score artifact to generate.")] = "both",
39
+ target: Annotated[
40
+ Target | None,
41
+ typer.Option(help="Which Score artifact to generate; the default derives from the config."),
42
+ ] = None,
39
43
  local: Annotated[
40
44
  bool,
41
45
  typer.Option(
@@ -60,6 +64,9 @@ def generate_score(
60
64
  raise ValueError("boatyard.yml declares no local service entries and no k8s section")
61
65
  local_entries = config.local_service_entries()
62
66
 
67
+ if target is None:
68
+ target = "both" if (local_entries and config.k8s is not None) else ("compose" if local_entries else "k8s")
69
+
63
70
  if config.k8s is None and target in ("k8s", "both"):
64
71
  message = (
65
72
  "--target k8s: this config declares no k8s section (compose-only)"
@@ -94,33 +101,39 @@ def generate_score(
94
101
  raise ValueError(f"{secrets_path.as_posix()}: the secrets declaration is required")
95
102
  secrets = load_yaml_model(SecretsDeclaration, secrets_path)
96
103
 
97
- ensure_tools(
98
- [
104
+ requirements = [
105
+ ToolRequirement(
106
+ binary="score-compose",
107
+ version=config.score_compose_version,
108
+ probe=f"score-compose {config.score_compose_version}",
109
+ archive=(
110
+ f"https://github.com/score-spec/score-compose/releases/download/{config.score_compose_version}/"
111
+ f"score-compose_{config.score_compose_version}_linux_amd64.tar.gz"
112
+ ),
113
+ extract="score-compose",
114
+ )
115
+ ]
116
+ if target in ("both", "k8s"):
117
+ requirements += [
99
118
  ToolRequirement(
100
- binary=binary,
101
- version=version,
102
- probe=f"{binary} {version}",
119
+ binary="score-k8s",
120
+ version=config.score_k8s_version,
121
+ probe=f"score-k8s {config.score_k8s_version}",
103
122
  archive=(
104
- f"https://github.com/score-spec/{binary}/releases/download/{version}/"
105
- f"{binary}_{version}_linux_amd64.tar.gz"
123
+ f"https://github.com/score-spec/score-k8s/releases/download/{config.score_k8s_version}/"
124
+ f"score-k8s_{config.score_k8s_version}_linux_amd64.tar.gz"
106
125
  ),
107
- extract=binary,
108
- )
109
- for binary, version in (
110
- ("score-compose", config.score_compose_version),
111
- ("score-k8s", config.score_k8s_version),
112
- )
113
- ]
114
- + [
126
+ extract="score-k8s",
127
+ ),
115
128
  ToolRequirement(
116
129
  binary="helm",
117
130
  version=config.helm_version,
118
131
  probe=f'"v{config.helm_version}"',
119
132
  archive=f"https://get.helm.sh/helm-v{config.helm_version}-linux-amd64.tar.gz",
120
133
  extract="--strip-components=1 linux-amd64/helm",
121
- )
134
+ ),
122
135
  ]
123
- )
136
+ ensure_tools(requirements)
124
137
 
125
138
  outputs: list[Path] = []
126
139
  if target in ("both", "compose"):
@@ -149,8 +162,10 @@ def generate_score(
149
162
 
150
163
  def ensure_tools(requirements: list[ToolRequirement]) -> None:
151
164
  for requirement in requirements:
152
- if bash_check(f"{requirement.binary} version") and requirement.probe in bash_output(
153
- f"{requirement.binary} version"
165
+ if (
166
+ shutil.which(requirement.binary) is not None
167
+ and bash_check(f"{requirement.binary} version")
168
+ and requirement.probe in bash_output(f"{requirement.binary} version")
154
169
  ):
155
170
  continue
156
171
  print(f"Install {requirement.binary} {requirement.version}")
@@ -1350,24 +1350,132 @@ def _k8s_only_repo(tmp_path: Path) -> None:
1350
1350
  )
1351
1351
 
1352
1352
 
1353
- def test_generate_score_on_a_compose_only_repo_refuses_the_default_target(
1353
+ def test_generate_score_on_a_compose_only_repo_derives_compose_and_requests_only_the_compose_tool(
1354
1354
  tmp_path: Path, monkeypatch: pytest.MonkeyPatch
1355
1355
  ) -> None:
1356
1356
  _verb_repo(tmp_path)
1357
+ (tmp_path / "stack" / "secrets.yaml").write_text("PUBLIC_URL: the public address\n", encoding="utf-8")
1358
+ recorder = WorkloadContentsRecorder()
1359
+ requested: list[list[score_verb_module.ToolRequirement]] = []
1360
+
1361
+ def _capture_tools(requirements: list[score_verb_module.ToolRequirement]) -> None:
1362
+ requested.append(requirements)
1363
+
1364
+ monkeypatch.setattr(score_module, "bash", recorder.run)
1365
+ monkeypatch.setattr(score_verb_module, "ensure_tools", _capture_tools)
1357
1366
  monkeypatch.chdir(tmp_path)
1358
1367
 
1359
- with pytest.raises(typer.BadParameter, match="pass --target compose"):
1368
+ score_verb_module.generate_score()
1369
+
1370
+ assert [requirement.binary for requirement in requested[0]] == ["score-compose"]
1371
+ assert (tmp_path / "stack" / "generated" / "compose" / "compose.core.yaml").is_file()
1372
+
1373
+
1374
+ def test_generate_score_on_a_k8s_only_repo_derives_the_k8s_target(
1375
+ tmp_path: Path, monkeypatch: pytest.MonkeyPatch
1376
+ ) -> None:
1377
+ _k8s_only_repo(tmp_path)
1378
+ monkeypatch.chdir(tmp_path)
1379
+
1380
+ with pytest.raises(ValueError, match="the image lock is required"):
1360
1381
  score_verb_module.generate_score()
1361
1382
 
1362
1383
 
1363
- def test_generate_score_on_a_k8s_only_repo_refuses_the_default_target(
1384
+ def test_generate_score_on_a_compose_only_repo_refuses_an_explicit_both(
1385
+ tmp_path: Path, monkeypatch: pytest.MonkeyPatch
1386
+ ) -> None:
1387
+ _verb_repo(tmp_path)
1388
+ monkeypatch.chdir(tmp_path)
1389
+
1390
+ with pytest.raises(typer.BadParameter, match="pass --target compose"):
1391
+ score_verb_module.generate_score(target="both")
1392
+
1393
+
1394
+ def test_generate_score_on_a_k8s_only_repo_refuses_an_explicit_both(
1364
1395
  tmp_path: Path, monkeypatch: pytest.MonkeyPatch
1365
1396
  ) -> None:
1366
1397
  _k8s_only_repo(tmp_path)
1367
1398
  monkeypatch.chdir(tmp_path)
1368
1399
 
1369
1400
  with pytest.raises(typer.BadParameter, match="pass --target k8s"):
1370
- score_verb_module.generate_score()
1401
+ score_verb_module.generate_score(target="both")
1402
+
1403
+
1404
+ def test_ensure_tools_installs_a_binary_missing_from_path(tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -> None:
1405
+ bin_dir = tmp_path / "bin"
1406
+ bin_dir.mkdir()
1407
+ monkeypatch.setenv("PATH", str(bin_dir))
1408
+ commands: list[str] = []
1409
+
1410
+ def _record(command: str, *, cwd: Path | None = None, env: dict[str, str] | None = None) -> None:
1411
+ commands.append(command)
1412
+
1413
+ monkeypatch.setattr(score_verb_module, "bash", _record)
1414
+ requirement = score_verb_module.ToolRequirement(
1415
+ binary="score-compose",
1416
+ version="1.2.3",
1417
+ probe="score-compose 1.2.3",
1418
+ archive="https://example.com/score-compose_1.2.3_linux_amd64.tar.gz",
1419
+ extract="score-compose",
1420
+ )
1421
+
1422
+ score_verb_module.ensure_tools([requirement])
1423
+
1424
+ assert commands[0].startswith("curl -fsSL https://example.com/score-compose_1.2.3_linux_amd64.tar.gz")
1425
+
1426
+
1427
+ def test_ensure_tools_reinstalls_on_a_version_mismatch(tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -> None:
1428
+ bin_dir = tmp_path / "bin"
1429
+ bin_dir.mkdir()
1430
+ stub = bin_dir / "score-compose"
1431
+ stub.write_text('#!/bin/sh\necho "score-compose 0.0.0"\n', encoding="utf-8")
1432
+ stub.chmod(0o755)
1433
+ monkeypatch.setenv("PATH", str(bin_dir))
1434
+ commands: list[str] = []
1435
+
1436
+ def _record(command: str, *, cwd: Path | None = None, env: dict[str, str] | None = None) -> None:
1437
+ commands.append(command)
1438
+
1439
+ monkeypatch.setattr(score_verb_module, "bash", _record)
1440
+ requirement = score_verb_module.ToolRequirement(
1441
+ binary="score-compose",
1442
+ version="1.2.3",
1443
+ probe="score-compose 1.2.3",
1444
+ archive="https://example.com/score-compose_1.2.3_linux_amd64.tar.gz",
1445
+ extract="score-compose",
1446
+ )
1447
+
1448
+ score_verb_module.ensure_tools([requirement])
1449
+
1450
+ assert commands[0].startswith("curl -fsSL https://example.com/score-compose_1.2.3_linux_amd64.tar.gz")
1451
+
1452
+
1453
+ def test_ensure_tools_skips_install_when_the_pinned_version_is_present(
1454
+ tmp_path: Path, monkeypatch: pytest.MonkeyPatch
1455
+ ) -> None:
1456
+ bin_dir = tmp_path / "bin"
1457
+ bin_dir.mkdir()
1458
+ stub = bin_dir / "score-compose"
1459
+ stub.write_text('#!/bin/sh\necho "score-compose 1.2.3"\n', encoding="utf-8")
1460
+ stub.chmod(0o755)
1461
+ monkeypatch.setenv("PATH", str(bin_dir))
1462
+ commands: list[str] = []
1463
+
1464
+ def _record(command: str, *, cwd: Path | None = None, env: dict[str, str] | None = None) -> None:
1465
+ commands.append(command)
1466
+
1467
+ monkeypatch.setattr(score_verb_module, "bash", _record)
1468
+ requirement = score_verb_module.ToolRequirement(
1469
+ binary="score-compose",
1470
+ version="1.2.3",
1471
+ probe="score-compose 1.2.3",
1472
+ archive="https://example.com/score-compose_1.2.3_linux_amd64.tar.gz",
1473
+ extract="score-compose",
1474
+ )
1475
+
1476
+ score_verb_module.ensure_tools([requirement])
1477
+
1478
+ assert commands == []
1371
1479
 
1372
1480
 
1373
1481
  def test_generate_score_refuses_compose_on_a_k8s_only_repo(tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -> None:
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes