Skip to content

Commit 1d48afa

Browse files
committed
docs(openspec): archive add-vale-binary-packages
1 parent d95f92c commit 1d48afa

10 files changed

Lines changed: 170 additions & 0 deletions

File tree

openspec/changes/add-vale-binary-packages/.openspec.yaml renamed to openspec/changes/archive/2026-08-07-add-vale-binary-packages/.openspec.yaml

File renamed without changes.

openspec/changes/add-vale-binary-packages/design.md renamed to openspec/changes/archive/2026-08-07-add-vale-binary-packages/design.md

File renamed without changes.

openspec/changes/add-vale-binary-packages/proposal.md renamed to openspec/changes/archive/2026-08-07-add-vale-binary-packages/proposal.md

File renamed without changes.

openspec/changes/add-vale-binary-packages/specs/cli/spec.md renamed to openspec/changes/archive/2026-08-07-add-vale-binary-packages/specs/cli/spec.md

File renamed without changes.

openspec/changes/add-vale-binary-packages/specs/infrastructure/spec.md renamed to openspec/changes/archive/2026-08-07-add-vale-binary-packages/specs/infrastructure/spec.md

File renamed without changes.

openspec/changes/add-vale-binary-packages/specs/vale-binary-packages/spec.md renamed to openspec/changes/archive/2026-08-07-add-vale-binary-packages/specs/vale-binary-packages/spec.md

File renamed without changes.

openspec/changes/add-vale-binary-packages/tasks.md renamed to openspec/changes/archive/2026-08-07-add-vale-binary-packages/tasks.md

File renamed without changes.

openspec/specs/cli/spec.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,3 +406,29 @@ When no candidate yields an executable, resolution SHALL fail with an error nami
406406

407407
- **WHEN** no candidate location yields an executable
408408
- **THEN** resolution fails with an error naming the locations that were tried, rather than deferring to a spawn failure
409+
410+
### Requirement: The CLI declares Vale platform packages as optional dependencies
411+
412+
`packages/cli` SHALL declare every supported Vale platform package in `optionalDependencies`, so that installing the CLI also installs the Vale binary matching the host. Each SHALL be pinned to a literal exact version rather than a range or a workspace protocol, so that a newly published platform package reaches the CLI only through a deliberate change.
413+
414+
The declaration SHALL NOT be a `devDependency`, which would not be installed for consumers of the CLI. `optionalDependencies` is required so an unsupported host installs the CLI successfully with no platform package present.
415+
416+
#### Scenario: Installing the CLI brings the host's Vale binary
417+
418+
- **WHEN** the CLI is installed on a supported platform
419+
- **THEN** the matching Vale platform package is installed alongside it and the binary is resolvable from the CLI's module context
420+
421+
#### Scenario: Unsupported platform still installs
422+
423+
- **WHEN** the CLI is installed on a platform with no published Vale package
424+
- **THEN** the install succeeds with no platform package present, and no error is raised at install time
425+
426+
#### Scenario: Versions are pinned exactly
427+
428+
- **WHEN** the CLI's `optionalDependencies` are inspected in a published tarball
429+
- **THEN** each Vale platform package is pinned to a single exact version, not a range or workspace protocol
430+
431+
#### Scenario: A newer platform package does not change the CLI
432+
433+
- **WHEN** a platform package is published for a newer upstream Vale release and the CLI's pin is unchanged
434+
- **THEN** the CLI continues to resolve the pinned version

openspec/specs/infrastructure/spec.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,3 +246,24 @@ The workflow SHALL NOT include any publish, release, or npm registry push steps.
246246

247247
- **WHEN** inspecting the workflow file
248248
- **THEN** there SHALL be no steps that run `pnpm publish`, `npm publish`, or interact with an npm registry
249+
250+
## Requirements
251+
252+
### Requirement: Script-versioned packages are excluded from changesets
253+
254+
Workspace packages whose versions are assigned by a release workflow SHALL be listed in the changesets `ignore` configuration, so that changesets neither versions nor publishes them and no changeset is required for them.
255+
256+
#### Scenario: Changesets does not version the platform packages
257+
258+
- **WHEN** `changeset version` runs
259+
- **THEN** the workflow-versioned platform packages are left at their current versions
260+
261+
#### Scenario: Changesets does not publish the platform packages
262+
263+
- **WHEN** the release flow publishes on the default branch
264+
- **THEN** it publishes only the packages changesets manages, and the platform packages are untouched
265+
266+
#### Scenario: A platform-package change needs no changeset
267+
268+
- **WHEN** a pull request modifies only workflow-versioned platform packages
269+
- **THEN** the changeset requirement check does not fail for the absence of a changeset
Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
# vale-binary-packages Specification
2+
3+
## Purpose
4+
5+
TBD - created by archiving change add-vale-binary-packages. Update Purpose after archive.
6+
7+
## Requirements
8+
9+
### Requirement: A Vale binary package is published per supported platform
10+
11+
The repository SHALL publish one npm package per supported platform, each carrying the Vale executable for that platform in its published tarball. Each package SHALL declare `os` and `cpu` matching the binary it carries, so that a consumer installs only the package matching its host.
12+
13+
#### Scenario: Only the host-matching package installs
14+
15+
- **WHEN** a consumer installs a package that declares every platform package as an optional dependency
16+
- **THEN** only the package matching the host's `os` and `cpu` is installed, and the remainder are skipped without failing the install
17+
18+
#### Scenario: The binary is executable as published
19+
20+
- **WHEN** a published platform package is extracted
21+
- **THEN** the Vale executable is present with its executable permission bit intact, requiring no permission change by the consumer
22+
23+
### Requirement: Platform packages contain no code and no install scripts
24+
25+
A platform package SHALL contain only the Vale executable and package metadata — `package.json`, a `README`, and the upstream `LICENSE`. It SHALL NOT declare a `bin` entry, SHALL NOT contain executable JavaScript, and SHALL NOT define any lifecycle script.
26+
27+
Consumers locate the binary by resolving the package and executing it by path, so nothing needs to be linked or copied into place at install time. Availability of the binary SHALL NOT depend on a consumer's package manager permitting dependency lifecycle scripts to run.
28+
29+
#### Scenario: No lifecycle script is required for the binary to be usable
30+
31+
- **WHEN** a consumer installs a platform package with dependency lifecycle scripts disabled
32+
- **THEN** the Vale executable is present and usable, because no install-time step was needed to place it
33+
34+
#### Scenario: Package declares no bin entry
35+
36+
- **WHEN** a published platform package's `package.json` is inspected
37+
- **THEN** it declares no `bin` entry and no `scripts` entry
38+
39+
### Requirement: Platform packages are versioned as timestamped prereleases
40+
41+
Every platform package SHALL be versioned `<valeVersion>-<yyyymmddhhmmss>`, where `<valeVersion>` is the upstream Vale release it carries and the prerelease identifier is the UTC release timestamp. A plain `<valeVersion>` SHALL NOT be published.
42+
43+
#### Scenario: Version names its upstream Vale release
44+
45+
- **WHEN** a platform package version is read
46+
- **THEN** its `major.minor.patch` component is the upstream Vale version the package carries
47+
48+
#### Scenario: Republishing the same Vale version is always possible
49+
50+
- **WHEN** a packaging fix is needed for a Vale version that has already been published
51+
- **THEN** a new package is published with the same `major.minor.patch` and a later timestamp, without requiring the Vale version component to change
52+
53+
#### Scenario: A caret range cannot resolve a platform package
54+
55+
- **WHEN** a consumer declares a dependency on a platform package using a caret or tilde range over the Vale version
56+
- **THEN** no published version satisfies it, because every published version is a prerelease
57+
58+
#### Scenario: Timestamps order monotonically
59+
60+
- **WHEN** two platform package versions share a Vale version and differ by timestamp
61+
- **THEN** the later timestamp is ordered as the greater version
62+
63+
### Requirement: Fetched binaries are verified against committed checksums
64+
65+
The repository SHALL commit a SHA256 checksum for each platform's upstream Vale release asset. The release pipeline SHALL verify every fetched binary against its committed checksum and SHALL refuse to publish on a mismatch.
66+
67+
Verification SHALL occur before any step holding publish credentials handles the binary, so that a credentialed step only ever processes bytes matching a reviewed digest.
68+
69+
#### Scenario: Checksum mismatch aborts the release
70+
71+
- **WHEN** a fetched binary's SHA256 does not match the committed checksum for that platform
72+
- **THEN** the release fails and nothing is published
73+
74+
#### Scenario: Changing an expected binary requires review
75+
76+
- **WHEN** the Vale version or a platform's release asset changes
77+
- **THEN** the corresponding committed checksum must change in the repository, passing through code review before any publish can succeed
78+
79+
### Requirement: Binaries are absent from version control
80+
81+
The repository SHALL NOT store Vale executables in version control. A platform package directory SHALL contain only its source-controlled metadata, and the executable SHALL be placed into the package by the release pipeline before packing.
82+
83+
#### Scenario: A clean checkout contains no binaries
84+
85+
- **WHEN** the repository is cloned
86+
- **THEN** no Vale executable is present in any platform package directory, and the working tree is clean
87+
88+
### Requirement: Platform packages are released by their own workflow, tracking upstream
89+
90+
Platform packages SHALL be versioned and published by a workflow dedicated to them, independent of the workflow that releases packages managed by changesets. That workflow SHALL compare the latest upstream Vale release against what the repository has already published, and SHALL publish only when upstream is ahead.
91+
92+
A published-version check cannot bound these runs — every run stamps a previously unused timestamp — so the upstream comparison SHALL be what prevents redundant publishing.
93+
94+
#### Scenario: Upstream unchanged publishes nothing
95+
96+
- **WHEN** the workflow runs and the latest upstream Vale release is already published as a platform package
97+
- **THEN** no package is versioned or published
98+
99+
#### Scenario: A new upstream release opens a pull request rather than publishing
100+
101+
- **WHEN** the workflow runs and upstream Vale is ahead of what the repository has published
102+
- **THEN** it opens a pull request updating the pinned Vale version and the committed checksums, and publishes nothing
103+
104+
#### Scenario: Merging the update publishes the set
105+
106+
- **WHEN** that pull request is merged
107+
- **THEN** every supported platform package is stamped with the same version and published together, verified against the checksums that were just reviewed
108+
109+
#### Scenario: Ordinary pushes do not publish platform packages
110+
111+
- **WHEN** a commit is pushed to the default branch
112+
- **THEN** the changeset-managed release flow publishes no platform package
113+
114+
### Requirement: Publishing a platform package changes no consumer
115+
116+
Publishing a platform package SHALL NOT alter the behavior of any already-published consumer. A consumer SHALL reach a newly published platform package only by a deliberate, reviewed change to the version it pins.
117+
118+
This is what allows the release workflow to run unattended.
119+
120+
#### Scenario: A new platform package is inert until pinned
121+
122+
- **WHEN** a platform package is published for a newer upstream Vale release
123+
- **THEN** consumers continue to resolve the version they pin, and none resolves the new package until its pin is changed

0 commit comments

Comments
 (0)