Skip to content

Commit 631ba7b

Browse files
authored
Harden Public Preview pre-visibility gates (#13)
Harden Public Preview validation and repository-independence gates, add adversarial coverage, and repair CI dependency ordering while preserving release preflight boundaries.
1 parent 249b960 commit 631ba7b

21 files changed

Lines changed: 3293 additions & 143 deletions

.github/ACTIONLINT.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ directory and verifies it against `.github/actionlint-checksums.txt` before
1414
execution. Set `ACTIONLINT_BIN` to use a separately installed exact-version
1515
binary.
1616

17-
`actionlint` statically validates workflow syntax, expressions, and embedded
18-
shell. A passing local run does not emulate GitHub-hosted runners, exercise
19-
repository settings, prove secret or environment configuration, perform a live
20-
CometAPI request, or prove npm Trusted Publishing. Those remain separate remote
21-
evidence.
17+
`actionlint` statically validates workflow syntax and expressions. Its optional
18+
ShellCheck integration supplies additional embedded-shell diagnostics only when
19+
ShellCheck is available on the host. A passing local run does not emulate
20+
GitHub-hosted runners, exercise repository settings, prove secret or environment
21+
configuration, perform a live CometAPI request, or prove npm Trusted Publishing.
22+
Those remain separate remote evidence.

.github/workflows/ci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ jobs:
3030
uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6.5.0
3131
with:
3232
node-version: 24.x
33+
cache: npm
34+
- name: Install locked dependencies
35+
run: npm ci
3336
- name: Validate Public Preview content and identity
3437
run: npm run check:public-preview
3538
- name: Download the pinned actionlint release
@@ -69,6 +72,7 @@ jobs:
6972
- name: Check out the repository
7073
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
7174
with:
75+
fetch-depth: 0
7276
persist-credentials: false
7377
- name: Set up Node.js ${{ matrix.node-version }}
7478
uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6.5.0
@@ -87,6 +91,8 @@ jobs:
8791
run: npm test
8892
- name: Scan tracked material for secret patterns
8993
run: npm run test:secrets
94+
- name: Scan current and historical standalone content
95+
run: npm run check:standalone-content
9096
- name: Build ESM and CommonJS outputs
9197
run: npm run build
9298
- name: Validate the package shape

.github/workflows/publish.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,13 @@ jobs:
8080
EOF
8181
8282
echo "release-commit=${release_commit}" >> "$GITHUB_OUTPUT"
83+
- name: Set up Node.js 24
84+
uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6.5.0
85+
with:
86+
node-version: 24.x
87+
cache: npm
88+
- name: Install validation dependencies without lifecycle scripts
89+
run: npm ci --ignore-scripts
8390
- name: Verify release metadata and derive the npm dist-tag
8491
id: version
8592
env:
@@ -93,11 +100,6 @@ jobs:
93100
--release-prerelease "$RELEASE_IS_PRERELEASE" \
94101
--require-final \
95102
--require-releasable-docs >> "$GITHUB_OUTPUT"
96-
- name: Set up Node.js 24
97-
uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6.5.0
98-
with:
99-
node-version: 24.x
100-
cache: npm
101103
- name: Use a Trusted Publishing-capable npm CLI
102104
run: npm install --global npm@11.12.1
103105
- name: Install locked dependencies

AGENTS.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,11 +171,14 @@ npm test
171171
npm run typecheck
172172
npm run lint
173173
npm run format:check
174+
npm run test:secrets
174175
npm run test:package
176+
npm run test:live-contract
175177
npm run test:fixtures
176178
npm run test:compat
177179
npm run check:standalone-content
178180
npm run check:self-contained
181+
npm run check:public-preview
179182
npm run actionlint
180183
npm run verify
181184
```

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ No user-visible changes are currently recorded beyond the initial alpha scope.
3434
applicable gate.
3535
- Added standalone-content scanning to the aggregated Public Preview gate and
3636
encoded the protected, opt-in npm token bootstrap for `0.1.0-alpha.1` only.
37+
- Hardened pre-visibility evidence by scanning tracked files and reachable Git
38+
history for credential patterns, verifying an exact clean `HEAD` copy,
39+
requiring substantive public documentation, and exercising every documented
40+
live-smoke stream failure state with mocked transport.
3741
- Made the release workflow the sole npm dist-tag source: prereleases use
3842
`next`, stable releases use `latest`, and the package manifest has no static
3943
dist-tag.

CONTRIBUTING.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,14 @@ npm test
3636
npm run typecheck
3737
npm run lint
3838
npm run format:check
39+
npm run test:secrets
3940
npm run test:package
4041
npm run test:live-contract
4142
npm run test:fixtures
4243
npm run test:compat
44+
npm run check:standalone-content
4345
npm run check:self-contained
46+
npm run check:public-preview
4447
npm run actionlint
4548
npm run verify
4649
```
@@ -49,7 +52,9 @@ npm run verify
4952
transport and must not require `COMETAPI_KEY` or access the production API.
5053
`npm run actionlint` obtains the checksum-pinned tool when it is not already
5154
installed, then validates workflow syntax and static policy locally. It is not
52-
evidence that GitHub Actions ran the workflows.
55+
evidence that GitHub Actions ran the workflows. Run the self-containment gate
56+
from a clean tracked worktree; it materializes the exact `HEAD` tree and excludes
57+
untracked local files from the isolated verification copy.
5358

5459
## Tests and compatibility claims
5560

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,11 +183,14 @@ npm test
183183
npm run typecheck
184184
npm run lint
185185
npm run format:check
186+
npm run test:secrets
186187
npm run test:package
187188
npm run test:live-contract
188189
npm run test:fixtures
189190
npm run test:compat
191+
npm run check:standalone-content
190192
npm run check:self-contained
193+
npm run check:public-preview
191194
npm run actionlint
192195
npm run verify
193196
```
@@ -196,7 +199,11 @@ npm run verify
196199
use mocked transport and require no production credential. `npm run actionlint`
197200
downloads and checksum-verifies the repository-pinned version when needed, then
198201
performs static workflow validation. It does not prove that a workflow ran
199-
successfully on GitHub Actions.
202+
successfully on GitHub Actions. The secret gate scans the current tracked tree
203+
plus reachable Git blobs, commit and tag messages, and historical paths without
204+
printing matched values. The self-containment gate requires a clean tracked
205+
worktree and verifies an exact materialized copy of `HEAD` in an empty temporary
206+
parent.
200207
201208
## Project status
202209

RELEASING.md

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,14 @@ npm test
9999
npm run typecheck
100100
npm run lint
101101
npm run format:check
102+
npm run test:secrets
102103
npm run test:package
103104
npm run test:live-contract
104105
npm run test:fixtures
105106
npm run test:compat
106107
npm run check:standalone-content
107108
npm run check:self-contained
109+
npm run check:public-preview
108110
npm run actionlint
109111
npm run verify
110112
```
@@ -122,9 +124,22 @@ install the exact artifact, then upload that same file. `npm run test:compat`
122124
covers the minimum, locked, and applicable canary dependency lanes with ESM and
123125
CommonJS runtime checks plus `.mts` and `.cts` consumer type checks.
124126

125-
`npm run check:self-contained` copies repository files into an empty temporary
126-
parent, scans documentation and configuration for outside-root dependencies, and
127-
runs the documented offline setup and tests from the copied root.
127+
`npm run test:secrets` fails on a shallow Git clone and scans the current tracked
128+
tree plus reachable Git blobs, commit and tag messages, and historical paths.
129+
It reports only the rule and a safe object identifier or path hash rather than a
130+
matched value.
131+
132+
`npm run check:standalone-content` fails on a shallow Git clone, materializes
133+
every unique tracked tree reachable from all local refs and `HEAD` without
134+
honoring export exclusions, and reports the commit and tree for every
135+
outside-root or private-content violation. In the isolated self-containment copy
136+
it scans that exact file tree because Git metadata is intentionally absent.
137+
138+
`npm run check:self-contained` requires a clean tracked worktree, materializes
139+
the exact `HEAD` tree into an empty temporary parent, scans documentation and
140+
configuration for outside-root dependencies, and runs the documented offline
141+
setup and tests from the copied root. Untracked local files cannot satisfy a
142+
missing repository dependency.
128143

129144
`npm run test:live-contract` uses mocked transport to prove the bounded live
130145
runner rejects empty Chat results and failed, incomplete, or unterminated
@@ -366,4 +381,14 @@ Every release candidate records these evidence layers separately:
366381
- npm ownership and Trusted Publisher evidence
367382
- Tag, release, provenance, publication, and post-publication evidence
368383

384+
For a pre-visibility closeout, use the merged private pull request as the
385+
durable evidence record because a commit cannot contain its own final object
386+
ID. After merge, add one timeline comment that records the exact final `main`
387+
commit, the complete local gate results for that commit, pull-request and
388+
default-branch Node.js 22/24 CI URLs, failed dependency-update dispositions,
389+
the read-only private/public-only configuration audit, and every skipped or
390+
unknown boundary. The comment must explicitly confirm that no visibility,
391+
repository-rule, environment, secret, live API, tag, release, or registry state
392+
was changed.
393+
369394
Only a publicly installed and verified npm artifact may be called released.

0 commit comments

Comments
 (0)