Skip to content

Stacks and environments, milestone 2: environments in the repo - #27

Merged
davidjalbers merged 16 commits into
mainfrom
stacks-2
Dec 6, 2026
Merged

davidjalbers merged 16 commits into
mainfrom
stacks-2

Conversation

@davidjalbers

@davidjalbers davidjalbers commented Dec 6, 2026 •

Copy link
Copy Markdown
Contributor

Milestone 2 of the project "Stacks and environments": the pages for environment files in the stack contract, the platform that prepares a host and knows no stack, and the deploy that reads only its own repo.
It goes with tooling#124, which holds the tools.

Important

What merging starts.
Nothing is published by the merge.
The next step is yours: mise ship, after both pull requests are merged, cuts the version that carries this.
It removes four standard requirements and rewords six; while the Plexus version is 0.x that needs no major.
The release notes are drafted in a comment on PLX-300.

What it holds

Issue Pull request What
PLX-295 #24 Environment files in the stack contract, PLX-Environment retired, the trade-offs in writing.
PLX-329 #26 The pages follow the tools: the stack playbook, the deploy verb, the platform playbook, the update's branch.

PLX-329 is still in Triage (attn 19c899): I filed it and had it done so that the pages do not go to main behind their tools; a decline means reverting 6f42a96.

Requirement names

Old New
– PLX-Stack/EnvironmentFile, PLX-Stack/EnvironmentParity, PLX-Stack/EnvironmentCoverage, PLX-Stack/HostnamePort, PLX-Stack/PreparedHost
PLX-Stack/NoCommittedValues PLX-Stack/NoCommittedSecrets
PLX-Ingress/OneStackPerPrefix PLX-Ingress/OneEnvironmentPerHostname
PLX-Stack/PathPrefix, PLX-Ingress/PrefixInRecord removed
PLX-Platform/StackRecord, PLX-Platform/RecordValues removed, their content in PLX-Stack/EnvironmentFile

Reworded under their names: PLX-Stack/EnvFiles, PLX-Stack/HostDirectory, PLX-Stack/SinglePort, PLX-Delivery/CIVault, PLX-Delivery/OperationsTrunk, PLX-Tenancy/OperationsRepo.

To know before merging

  • ship regenerates packages/lib/src/standard-index.json in tooling from these pages.
  • PLX-Delivery § 6 grew from 1405 to about 1562 words, past what PLX-308 called its limit; what was added is what a consumer meets and cannot read from the contract.

For the maintainer to decide

  • attn 79ac91: PLX-Stack/Deploy says the deployer MUST run migrate wherever the compose file declares one; the playbook runs it only where the compose file changed. The line is unchanged.
  • § 5.11 of the decisions changed the content of the standard requirement PLX-Delivery/CIVault, which no decision names.

Readings made without the maintainer, to confirm or correct

  1. Only host is required in an environment file; hostname, env and secrets may be left out.
  2. compose is no environment name, and a file <name>.yml is refused.
  3. A stack's environments either all have a hostname or none has; a stack without one binds no port.
  4. NoCommittedValues is renamed, because plain values are committed by design.
  5. The deploy key leaves the vault table of PLX-Delivery § 8: it is a repository secret.
  6. The page states the lock's five-minute wait, since a consumer sees the failure; the other time limits stay in the tools' headers.
  7. PLX-Stack/PreparedHost keeps its four things; the registry login is prose, not a requirement.
  8. The /healthz fence is described as the snippet's, and whoever can write a fragment is as trusted as the deploy key; prose, not a requirement.
  9. birth-only is introduced as a kind of born-once file.
  10. The pages say that a removed secret's last value stays in .env.secret.prev (0600) on the host until .env.secret changes again.
  11. The readings about the tools themselves are listed in tooling#124.

Known and recorded, not fixed

  • The last small round of The pages follow the tools of milestone 2 #26 (one full stop, one sentence) was read by the coordinator and not by the reviewer.
  • The Decisions document lacks the four decisions of 2026-12-06 (the form of host, secrets through env_file only, no path prefixes, the update's branch).

Verification

  • mise run test at a4112aa, run by the coordinator: exit 0. The head of stacks-2, 6f42a96, has the identical tree (0c11911).
  • The citation lint of tooling at 61d97da against these pages: citations resolve.
  • The push run on stacks-2 at 6f42a96 (run 47619045437): green.

🤖 Generated with Claude Code

davidjalbers and others added 16 commits December 6, 2026 01:43
… hostname alone

PLX-Stack states the environment file beside the stack with its four keys,
the checks it gets, what the platform owes a stack on a prepared host, and
that the deployer writes the environment's files. A hostname belongs to one
environment, so the path prefix and its record field go; PLX-Ingress states
the route as a fragment per environment (PLX-295).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…dentials reach

The stack playbook resolves an environment's pointers where it runs; the
deploy key and the read-only vault token are repository secrets; one token
reads the whole vault and whoever can push can read both, with the deferral
of a vault per product and its trigger (PLX-295).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…stack

The stack record and its requirements go: the platform playbook prepares
the deploy user, /opt/stacks, the fragment directory and the reload rule,
and the stack playbook lays out an environment, allocates its port under a
lock and claims its hostname. A deploy key is root on its host, written down
with rootless Docker as the deferral and its trigger (PLX-295).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The deploy finds a stack's environment by its file, reaches the host the
file names, and restores compose.yaml, .env and .env.secret together on
failure while the route stays. The inventory flag, the operations repo's
checkout, the GitHub App token for it and the deploy-ssh vault item go; the
deploy key and the vault token are repository secrets (PLX-295).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The environment record's contract goes with the record; the contracts index,
the approaches index and PLX-Tenancy no longer name it. The map's § 1.2,
§ 5.4, § 6.4 and § 7.3 to § 7.7 say an environment is a file beside its
stack, and the deferral in § 6.1 names environment files, without
renumbering (PLX-295).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…hey cover

.env holds the values under env, the project name and the port; a variable
the compose file interpolates is listed under env, and a secret reaches a
container through env_file alone. EnvironmentFile, EnvironmentCoverage,
SinglePort and HostnamePort read as the checks of tooling PR 116 do, and
the restore, the route and the removal of an environment are pointed at
their one home (PLX-295).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s more than the decisions

The hostname claim is PLX-Ingress's and binds the deployer as Decisions
§ 4.5 does; the removal of an environment is PLX-Platform's, the restore and
the route on failure PLX-Delivery's. The § 6.1 deferral keeps its trigger,
the operations repo's environments are no inventory groups, the deploy key
is no platform secret, and the sentences beyond § 5.12 and § 9.8 go
(PLX-295).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…he default branch

host takes an optional user@ and :port, as the maintainer decided on
2026-12-06; the check of HostnamePort says no more than its bullet, and
.env names the two bindings it holds. PLX-Updates says plx update lands a
version on the repo's default branch, which tooling's PLX-327 makes true
(PLX-295).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-environment-files-in-the

Environment files in the stack contract, PLX-Environment retired, the trade-offs in writing
…oxy's refusals and the stack playbook's interface

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… state the secret, wait and first-deploy rules

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…rigin names

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ait, removals, and the pull's condition

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…-the-pages-follow-the-tools

The pages follow the tools of milestone 2
@davidjalbers davidjalbers self-assigned this Dec 6, 2026
@davidjalbers
davidjalbers merged commit 6c005ba into main Dec 6, 2026
1 check passed
@davidjalbers
davidjalbers deleted the stacks-2 branch December 6, 2026 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant