boatyard 0.9.0.dev247__tar.gz → 0.9.1.dev250__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 (83) hide show
  1. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/AGENTS.md +7 -0
  2. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/PKG-INFO +1 -1
  3. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/pyproject.toml +1 -1
  4. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/src/boatyard/score_compose.py +18 -11
  5. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/tests/test_score_generate.py +52 -0
  6. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/.gitattributes +0 -0
  7. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/.github/workflows/cleanup-pr-releases.yml +0 -0
  8. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/.github/workflows/integrate.yml +0 -0
  9. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/.github/workflows/merge-gate.yml +0 -0
  10. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/.github/workflows/release.yml +0 -0
  11. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/.gitignore +0 -0
  12. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/.python-version +0 -0
  13. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/CLAUDE.md +0 -0
  14. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/LICENSE +0 -0
  15. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/NOTICE +0 -0
  16. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/README.md +0 -0
  17. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/design/AGENTS.md +0 -0
  18. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/design/CLAUDE.md +0 -0
  19. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/design/apt-hermeticity.md +0 -0
  20. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/design/mirror-digest-retention.md +0 -0
  21. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/design/precision-attribution.md +0 -0
  22. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/design/semver-image-bundle-lines.md +0 -0
  23. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/publish.yml +0 -0
  24. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/ruff.base.toml +0 -0
  25. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/ruff.toml +0 -0
  26. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/scripts/preflight.py +0 -0
  27. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/src/boatyard/__init__.py +0 -0
  28. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/src/boatyard/build.py +0 -0
  29. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/src/boatyard/cli.py +0 -0
  30. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/src/boatyard/crane.py +0 -0
  31. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/src/boatyard/lock.py +0 -0
  32. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/src/boatyard/markers.py +0 -0
  33. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/src/boatyard/models/__init__.py +0 -0
  34. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/src/boatyard/models/config_file.py +0 -0
  35. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/src/boatyard/models/image.py +0 -0
  36. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/src/boatyard/models/k8s_pins.py +0 -0
  37. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/src/boatyard/models/lock_file.py +0 -0
  38. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/src/boatyard/models/pyproject.py +0 -0
  39. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/src/boatyard/models/values_file.py +0 -0
  40. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/src/boatyard/models/workload.py +0 -0
  41. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/src/boatyard/paths.py +0 -0
  42. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/src/boatyard/publish.py +0 -0
  43. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/src/boatyard/py.typed +0 -0
  44. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/src/boatyard/resolve.py +0 -0
  45. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/src/boatyard/score.py +0 -0
  46. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/src/boatyard/score_generate.py +0 -0
  47. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/src/boatyard/score_k8s.py +0 -0
  48. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/src/boatyard/score_patch_templates/gpu-cuda.tpl +0 -0
  49. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/src/boatyard/score_patch_templates/gpu-pod.tpl +0 -0
  50. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/src/boatyard/score_patch_templates/gpu-rocm.tpl +0 -0
  51. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/src/boatyard/score_patch_templates/probe-adapter-healthchecks.tpl +0 -0
  52. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/src/boatyard/score_patch_templates/restart.tpl +0 -0
  53. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/src/boatyard/score_patch_templates/scale-to-zero.tpl +0 -0
  54. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/src/boatyard/temp.py +0 -0
  55. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/src/boatyard/verbs/__init__.py +0 -0
  56. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/src/boatyard/verbs/build.py +0 -0
  57. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/src/boatyard/verbs/bump.py +0 -0
  58. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/src/boatyard/verbs/down.py +0 -0
  59. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/src/boatyard/verbs/lock.py +0 -0
  60. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/src/boatyard/verbs/matrix.py +0 -0
  61. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/src/boatyard/verbs/mirror.py +0 -0
  62. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/src/boatyard/verbs/publish.py +0 -0
  63. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/src/boatyard/verbs/score.py +0 -0
  64. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/src/boatyard/verbs/tree_tags.py +0 -0
  65. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/src/boatyard/verbs/up.py +0 -0
  66. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/src/boatyard/yaml.py +0 -0
  67. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/tests/conftest.py +0 -0
  68. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/tests/test_assembly.py +0 -0
  69. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/tests/test_build_docker.py +0 -0
  70. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/tests/test_bump.py +0 -0
  71. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/tests/test_compose.py +0 -0
  72. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/tests/test_config.py +0 -0
  73. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/tests/test_daemon_gc.py +0 -0
  74. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/tests/test_image_builds.py +0 -0
  75. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/tests/test_lock.py +0 -0
  76. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/tests/test_markers.py +0 -0
  77. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/tests/test_matrix.py +0 -0
  78. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/tests/test_mirror.py +0 -0
  79. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/tests/test_provisioners.py +0 -0
  80. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/tests/test_publish_compose.py +0 -0
  81. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/tests/test_tree_tags.py +0 -0
  82. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/tests/test_values.py +0 -0
  83. {boatyard-0.9.0.dev247 → boatyard-0.9.1.dev250}/uv.lock +0 -0
@@ -42,6 +42,13 @@ Design intent and silent-failure traps, one fact per bullet.
42
42
  file-sourced configs, score's bind inlining) is doubled via `double_dollars` in
43
43
  `models/config_file.py` — the one home. Text outside a compose document (k8s manifests) never
44
44
  doubles.
45
+ - Bind sources are namespaced, and the compose pass keys on the shape: a repo-relative source
46
+ is a repo file whose content is inlined as a `configs.content` entry, and an absolute source
47
+ is an authored host mount that rides through to the artifact untouched — compose's own
48
+ meaning of the two path forms (project-relative vs host), not a heuristic. The strip removes
49
+ exactly the inlinable set; blanket-stripping silently deletes authored host mounts. Artifact
50
+ hermeticity is therefore zero un-authored host references, not zero binds; consumers audit
51
+ the survivors.
45
52
  - Consumed facts are walked from generated output, never re-derived from sources: the mint
46
53
  list (`secrets.txt`) is the k8s rendering's consumed secret refs (no secret vocabulary is
47
54
  authored anywhere; a compose-only rendering mints an empty list), and a local entry's values
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: boatyard
3
- Version: 0.9.0.dev247
3
+ Version: 0.9.1.dev250
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
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "boatyard"
3
- version = "0.9.0.dev247"
3
+ version = "0.9.1.dev250"
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 = [
@@ -10,7 +10,6 @@ from pydantic import (
10
10
  BaseModel,
11
11
  ConfigDict,
12
12
  Field,
13
- field_validator,
14
13
  model_validator,
15
14
  )
16
15
 
@@ -75,11 +74,25 @@ class ComposeService(BaseModel):
75
74
 
76
75
  @property
77
76
  def bind_volumes(self) -> list[BindVolume]:
78
- return [volume for volume in self.volumes or [] if isinstance(volume, BindVolume)]
77
+ # Repo-relative sources name repo files the hermetic pass inlines as configs content
78
+ return [
79
+ volume
80
+ for volume in self.volumes or []
81
+ if isinstance(volume, BindVolume) and not Path(volume.source).is_absolute()
82
+ ]
83
+
84
+ @property
85
+ def host_bind_volumes(self) -> list[BindVolume]:
86
+ # Absolute sources name host paths — authored mounts that ride through untouched
87
+ return [
88
+ volume
89
+ for volume in self.volumes or []
90
+ if isinstance(volume, BindVolume) and Path(volume.source).is_absolute()
91
+ ]
79
92
 
80
93
  def strip_bind_volumes(self) -> list[BindVolume]:
81
94
  binds = self.bind_volumes
82
- self.volumes = [volume for volume in self.volumes or [] if not isinstance(volume, BindVolume)] or None
95
+ self.volumes = [volume for volume in self.volumes or [] if volume not in binds] or None
83
96
  return binds
84
97
 
85
98
 
@@ -97,13 +110,6 @@ class BindVolume(BaseModel):
97
110
  source: str
98
111
  target: str
99
112
 
100
- @field_validator("source")
101
- @classmethod
102
- def _require_relative(cls, value: str) -> str:
103
- if Path(value).is_absolute():
104
- raise ValueError(f"bind source {value} must be relative")
105
- return value
106
-
107
113
 
108
114
  class OtherVolume(BaseModel):
109
115
  model_config = ConfigDict(extra="allow")
@@ -217,7 +223,8 @@ def generate_compose(config: ConfigFile, lock: LockFile) -> list[Path]:
217
223
  claim_sites[collapsed_name] = site
218
224
  document.services[collapsed_name] = service
219
225
 
220
- # Inline every bind volume as a top-level configs entry
226
+ # Inline every repo-relative bind volume as a top-level configs entry;
227
+ # absolute-source binds are authored host mounts and stay in place
221
228
  bind_volumes = service.strip_bind_volumes()
222
229
  if not bind_volumes:
223
230
  continue
@@ -88,6 +88,16 @@ def test_non_bind_volume_kind_passes_through_untyped() -> None:
88
88
  assert not isinstance(volume.volumes[0], BindVolume)
89
89
 
90
90
 
91
+ def test_an_absolute_bind_source_parses_as_an_authored_host_mount() -> None:
92
+ volume = ComposeService.model_validate({
93
+ "volumes": [{"type": "bind", "source": "/var/run/docker.sock", "target": "/var/run/docker.sock"}]
94
+ })
95
+
96
+ assert volume.volumes is not None
97
+ assert volume.bind_volumes == []
98
+ assert volume.host_bind_volumes == volume.volumes
99
+
100
+
91
101
  def test_write_normalises_file_mode(tmp_path: Path) -> None:
92
102
  path = tmp_path / "state.yaml"
93
103
  path.write_text("placeholder", encoding="utf-8")
@@ -443,6 +453,25 @@ GENERATED_COMPOSE = (
443
453
  " image: pg:16\n"
444
454
  )
445
455
 
456
+ GENERATED_COMPOSE_WITH_HOST_BIND = (
457
+ "services:\n"
458
+ " api-api:\n"
459
+ " image: ghcr.io/org/api:1\n"
460
+ " volumes:\n"
461
+ " - type: bind\n"
462
+ " source: workloads/api/config.yaml\n"
463
+ " target: /etc/placeframe/config.yaml\n"
464
+ " - type: bind\n"
465
+ " source: /var/run/docker.sock\n"
466
+ " target: /var/run/docker.sock\n"
467
+ " pf-postgres:\n"
468
+ " image: pg:16\n"
469
+ " volumes:\n"
470
+ " - type: bind\n"
471
+ " source: /var/run/docker.sock\n"
472
+ " target: /var/run/docker.sock\n"
473
+ )
474
+
446
475
  API_SERVICE_RENDERING = "services:\n api-api:\n image: ghcr.io/org/api:1\n"
447
476
 
448
477
 
@@ -497,6 +526,29 @@ def test_generate_compose_collapses_doubled_names_and_inlines_binds(
497
526
  assert "networks" not in document
498
527
 
499
528
 
529
+ def test_generate_compose_passes_authored_host_binds_through_untouched(
530
+ tmp_path: Path, monkeypatch: pytest.MonkeyPatch
531
+ ) -> None:
532
+ output = _generate_compose(monkeypatch, tmp_path, GENERATED_COMPOSE_WITH_HOST_BIND)
533
+
534
+ document = yaml.safe_load(output.read_text(encoding="utf-8"))
535
+ postgres = document["services"]["pf-postgres"]
536
+ assert postgres["volumes"] == [{"type": "bind", "source": "/var/run/docker.sock", "target": "/var/run/docker.sock"}]
537
+ assert "configs" not in postgres
538
+
539
+
540
+ def test_a_service_with_both_bind_kinds_inlines_only_the_relative_one(
541
+ tmp_path: Path, monkeypatch: pytest.MonkeyPatch
542
+ ) -> None:
543
+ output = _generate_compose(monkeypatch, tmp_path, GENERATED_COMPOSE_WITH_HOST_BIND)
544
+
545
+ document = yaml.safe_load(output.read_text(encoding="utf-8"))
546
+ api = document["services"]["api"]
547
+ assert api["volumes"] == [{"type": "bind", "source": "/var/run/docker.sock", "target": "/var/run/docker.sock"}]
548
+ assert api["configs"] == [{"source": "config.yaml", "target": "/etc/placeframe/config.yaml"}]
549
+ assert document["configs"] == {"config.yaml": {"content": "key: $${FOO}\n"}}
550
+
551
+
500
552
  def test_generate_compose_collapses_doubled_names_with_no_binds(
501
553
  tmp_path: Path, monkeypatch: pytest.MonkeyPatch
502
554
  ) -> None:
File without changes
File without changes
File without changes