Repository navigation
test(intentions): no test reads the intentions chisel ships - #4
Merged
Merged
Conversation
The release scripts' tests ran on a copy of socle/intentions/, and three update tests compared against the shipped list: every release, emptying unreleased/, broke them. They now run on test intentions only, in a throwaway repo (intentionsRepo) or a package of fixtures alone (packageWith's only). The integrity tests still read the shipped files: checking them is their purpose. The guard that a released intention stays shipped moves there, naming released ids only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
RDeluxe
added a commit
that referenced
this pull request
Nov 3, 2026
## Why Preparing Release PR #2 (0.3.0), `deno task promote-intentions 0.3.0` emptied `socle/intentions/unreleased/`, and three tests broke: they read the intentions chisel ships. One named `unreleased/manifest-records-intentions`, one filtered on `release === "unreleased"`, and one needed `unreleased/` to hold something. In a fresh checkout after a promotion, git holds no `unreleased/` folder at all, so nine release-check tests failed too. Every release would have broken them again. ## What On the model of the boilerplate's promotion tests (`.boilerstone/cli/src/boilerplate-core.spec.ts`), **no test depends on the real content of `socle/intentions/` any more**. They run on test intentions only: - **`intentionsRepo`** (replaces `copyOfRepo`): a throwaway git repo holding fixture intentions, their shipped list and a `deno.json`. It is used by the `promote-intentions` and `release-check` tests. - **`packageWith(…, { only: true })`**: a package whose only intentions are the fixtures. It is used by the update tests that replay releases (from 0.1.1, before intentions existed, and the first version's layer). - The helpers no longer assume `unreleased/` exists. The integrity tests are the one exception. They still read the shipped files, because checking those files is their purpose. The guard "a released intention gone missing fails" moves into them and names released ids only, which never move. Test-only: nothing under `src/`, `scripts/` or `socle/` changes. ## Checked - `deno task check` and `deno task test` (76 passed) pass in three states: - `main` as it is, with two intentions in `unreleased/`; - after `promote-intentions 0.3.0`, with no `unreleased/` folder; - with an extra unreleased intention, such as a parallel branch adds. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Preparing Release PR #2 (0.3.0),
deno task promote-intentions 0.3.0emptiedsocle/intentions/unreleased/, and three tests broke: they read the intentions chisel ships. One namedunreleased/manifest-records-intentions, one filtered onrelease === "unreleased", and one neededunreleased/to hold something. In a fresh checkout after a promotion, git holds nounreleased/folder at all, so nine release-check tests failed too. Every release would have broken them again.What
On the model of the boilerplate's promotion tests (
.boilerstone/cli/src/boilerplate-core.spec.ts), no test depends on the real content ofsocle/intentions/any more. They run on test intentions only:intentionsRepo(replacescopyOfRepo): a throwaway git repo holding fixture intentions, their shipped list and adeno.json. It is used by thepromote-intentionsandrelease-checktests.packageWith(…, { only: true }): a package whose only intentions are the fixtures. It is used by the update tests that replay releases (from 0.1.1, before intentions existed, and the first version's layer).unreleased/exists.The integrity tests are the one exception. They still read the shipped files, because checking those files is their purpose. The guard "a released intention gone missing fails" moves into them and names released ids only, which never move.
Test-only: nothing under
src/,scripts/orsocle/changes.Checked
deno task checkanddeno task test(76 passed) pass in three states:mainas it is, with two intentions inunreleased/;promote-intentions 0.3.0, with nounreleased/folder;🤖 Generated with Claude Code