Skip to content

releases: implicit releases for projects with no components, and release export (#4046) - #4061

Merged
lex00 merged 1 commit into
mainfrom
feat/4046-implicit-releases
Oct 17, 2026
Merged

lex00 merged 1 commit into
mainfrom
feat/4046-implicit-releases

Conversation

@lex00

@lex00 lex00 commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

Closes #4046

A project with no components gets a release from each green commit: its build output per environment, as ws-104 question 5 describes.

  • For each environment, the child release compile builds the project as chant build <src> --env <env> -o <output> would. Every file the build writes becomes a template with component: null; params come from the build's buildParams; artifactDigests is empty.
  • buildCommand gains an optional writeFile hook, so the cut keeps the files in memory and writes nothing into the checkout. Plain chant build is unchanged.
  • release cut takes --src <dir> (default sourceDir, then .), -o <file> (default dist/build.yaml, since the k8s and helm serializers write YAML) and --lexicon. A project that declares stacks and no --src is refused. release-no-components now means components are declared but none is enabled anywhere and nothing compiled.
  • Deploying it: components promote works through components and their deploy records, so it refuses such a release and names chant release export <label|digest> --env <env> [-o <dir>] [--json]. Export writes the target's recorded files at their recorded paths after checking each digest, refusing missing or changed bytes and paths outside the project, and the project's own deploy (an Op or a CI job) reads them.
  • No nondeterminism found: besides the two-clone test, testing-harness-aws, cc-gcp-canonical, github-pr-preview and cockroachdb-multi-region-gke each built twice to identical output.

Level-0 output changes

On the exceptions page and #2525: release cut on a project with no components now cuts and writes _releases/ where it refused; release-no-components narrowed; promote refuses these releases and points to release export. No golden moved.

Acceptance

  • An implicit release for a project with no components, with a test (lifecycle/release-cut.test.ts "is cut with no artifacts and a target per environment holding the build output, and lists like any release"; implicit cases in components/release-promote.test.ts).
  • A test that cuts the same commit twice and compares the build output for each environment byte for byte (cli/handlers/release-implicit.e2e.test.ts: a copy of examples/getting-started with dev and prod and a per-environment build parameter, cut in two clones; equal releaseDigest; each environment's exported files compared with Buffer.equals; dev and prod differ; nothing written to disk by the cut).

Checks

  • npx tsx scripts/typecheck.ts: no regressions (26 baselined)
  • npx tsx scripts/check-lexicons.ts: no untracked tier-1 failures
  • lifecycle, release compile and promote, handlers, releases, read-contract, level-0 goldens, boundary roster: 1591 passed with GITHUB_SHA, GITHUB_RUN_ID and CI set, after rebasing on trust: signed green tags and run statements, a role for who may cut a release, signed release records #4031 (conflicts in release.ts, main.ts and cli/release.mdx merged so release cut takes both --sign and --src/-o/--lexicon)
  • Full vitest: only the 3 known local op/factory.e2e.test.ts failures and load timeouts that pass alone
  • lint-docs-sentences (no regressions), lint-prompts, check-docs-diataxis, ./scripts/build-docs.sh: pass

Findings posted on behold#680 and #4034: such a release has no "running in env" signal, since deploy records are per component.

A project with no *.component.ts file is now cut from its build output.
Each environment's child compile builds the project as
`chant build <src> --env <env> -o <output>` would and records every file
that build writes as a template with component null; params come from
the build's buildParams and artifactDigests is empty. buildCommand takes
a writeFile hook, so the cut records the files from memory and writes
nothing into the checkout.

`chant release export <label|digest> --env <env> [-o <dir>]` writes a
target's recorded files after checking each digest. A no-component
project's own deploy reads those files. `components promote --release`
refuses an implicit release and names the export command.

An e2e test cuts one commit of the getting-started example in two clones
and compares each environment's output byte for byte.
@lex00
lex00 merged commit 67ddb7e into main Oct 17, 2026
11 checks passed
@lex00
lex00 deleted the feat/4046-implicit-releases branch October 17, 2026 03:57
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.

releases: implicit releases for projects with no components

1 participant