Skip to content

test(intentions): no test reads the intentions chisel ships - #4

Merged
RDeluxe merged 1 commit into
mainfrom
test-intentions-release-agnostic
Nov 3, 2026
Merged

RDeluxe merged 1 commit into
mainfrom
test-intentions-release-agnostic

Conversation

@RDeluxe

@RDeluxe RDeluxe commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator

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

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
RDeluxe merged commit 1f86f0a into main Nov 3, 2026
6 checks passed
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>
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