Skip to content

Commit ac7ab31

Browse files
authored
Close Public Preview review gaps (#11)
1 parent 27f12da commit ac7ab31

4 files changed

Lines changed: 59 additions & 38 deletions

File tree

AGENTS.md

Lines changed: 22 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -44,32 +44,28 @@ The unscoped `cometapi` package is the primary Node SDK. `@cometapi` is the
4444
standard scope for future official scoped packages; do not introduce new
4545
official packages under `@cometapi-dev`.
4646

47-
Before the first remote push:
48-
49-
1. Apply the accepted identity to package metadata and public documents. Make
50-
the Public Preview gate and publish validation require the same normalized
51-
`git+https://github.com/cometapi-dev/cometapi-node.git` repository value.
52-
2. Remove `.github/CODEOWNERS` and every check, fixture, test, or document that
53-
requires it. Do not replace it with an individual owner.
54-
3. Refactor `npm run check:public-preview` to collect and report all violations
55-
in one run while returning non-zero if any violation exists. Keep checks for
56-
canonical identity, contacts, repository metadata, public-safe language,
57-
and standalone content.
58-
4. Gate scheduled live smoke with a `LIVE_SMOKE_ENABLED` repository variable
59-
and gate Release Please with `RELEASE_PLEASE_ENABLED`. Unset or non-true
60-
values must prevent those workflows from running. Leave both disabled
61-
throughout Private Remote Validation and leave Release Please disabled
62-
through the initial manual alpha.
63-
5. Run every local offline, package, fixture, compatibility, self-containment,
64-
public-content, secret, and workflow-static-validation gate.
65-
66-
When authorized, create an empty private repository without generated files,
67-
make the sanitized repository content its first commit, push the default
68-
branch, and wait for credential-free CI. Do not configure branch or tag rules,
69-
Private Vulnerability Reporting, secrets, protected environments, Trusted
70-
Publishing, live smoke, tags, releases, or registry publication during the
71-
private stage. Record the real CI result and stop before any visibility change,
72-
even when all checks pass.
47+
Before requesting visibility-change authorization:
48+
49+
1. Confirm the current `main` includes every approved private closeout and that
50+
its blocking Node.js 22 and 24 CI checks pass.
51+
2. Run the complete local offline, package, fixture, compatibility,
52+
self-containment, public-content, secret, workflow-static-validation, and
53+
Public Preview gates from the final private `main`.
54+
3. Review open failing dependency-update pull requests before visibility
55+
changes and repair, close, or explicitly defer them with a recorded reason;
56+
do not treat their branch failures as evidence that the current `main`
57+
failed validation.
58+
4. Confirm the repository remains private and that public-only repository or
59+
tag rules, Private Vulnerability Reporting, secrets, protected environments,
60+
Trusted Publishing, live smoke, tags, releases, and registry publication
61+
have not been configured or exercised.
62+
5. Record the final private evidence and stop for explicit maintainer
63+
authorization before changing repository visibility.
64+
65+
Private repository creation, the sanitized first history, and the initial push
66+
are complete historical steps and must not be repeated. Their procedure and
67+
evidence belong in `RELEASING.md`. Keep Release Please disabled through the
68+
initial manual alpha.
7369

7470
## Product Contract
7571

RELEASING.md

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -218,11 +218,13 @@ The repository maintains four independently auditable workflows:
218218
`release.published` event can trigger publication.
219219
- `publish.yml`: rejects mutable releases and tag commits outside `main`, packs
220220
and tests one exact artifact, requires a protected live smoke for that release
221-
tag, publishes the same file through npm OIDC, and verifies the dist-tag,
222-
integrity, provenance attestation, signatures, deduplication, and public
223-
installation. A rerun resumes after an already accepted version only when its
224-
registry integrity matches the downloaded artifact, then repeats all bounded
225-
registry-state and signature checks.
221+
tag, and publishes the same file through npm OIDC by default. Only
222+
`0.1.0-alpha.1` may use the one-time protected-token bootstrap when npm does
223+
not permit Trusted Publisher configuration before the package exists. The
224+
workflow verifies the dist-tag, integrity, provenance attestation, signatures,
225+
deduplication, and public installation. A rerun resumes after an already
226+
accepted version only when its registry integrity matches the downloaded
227+
artifact, then repeats all bounded registry-state and signature checks.
226228

227229
Third-party actions are pinned to full commit SHAs. Workflow permissions remain
228230
read-only except where a documented job requires more; `id-token: write` belongs
@@ -307,12 +309,23 @@ one-time exception:
307309
`next` dist-tag, and fails if the token is absent when publication is needed.
308310
3. That run verifies and publishes the exact artifact with public access and
309311
provenance, then verifies registry installation.
310-
4. A maintainer immediately configures OIDC, removes the environment variable
312+
4. After the first publication, an authorized maintainer adds the
313+
company-controlled owner and verifies the resulting owner list:
314+
315+
```bash
316+
npm owner add cometapi-team cometapi
317+
npm owner ls cometapi
318+
```
319+
320+
Record evidence that the output lists `cometapi-team`; Registry Alpha owner
321+
setup is incomplete until it does.
322+
323+
5. A maintainer immediately configures OIDC, removes the environment variable
311324
and secret, revokes the token, and restricts token-based publishing.
312-
5. The project immediately prepares and publishes `0.1.0-alpha.2` through
325+
6. The project immediately prepares and publishes `0.1.0-alpha.2` through
313326
OIDC, verifies its provenance and public installation, and confirms that
314327
`next` resolves to `0.1.0-alpha.2`.
315-
6. The release record documents the exception and both public-install evidence
328+
7. The release record documents the exception and both public-install evidence
316329
layers.
317330

318331
This exception must never become a reusable source-controlled publishing path.

tests/standalone-content.test.mjs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,18 +73,23 @@ describe("standalone content", () => {
7373
});
7474
});
7575

76-
it("reports private artifacts and sibling workspaces", () => {
76+
it("reports private artifacts, reference directories, and sibling workspaces", () => {
7777
withTemporaryDirectory((root) => {
7878
const privateArtifact = ["SDK", "PRD.md"].join("_");
79+
const privateReference = ["references", "private.md"].join("/");
7980
const siblingWorkspace = `${["cometapi", "python"].join("-")}/README.md`;
8081
writeFileSync(
8182
join(root, "notes.md"),
82-
`See ${privateArtifact} and ${siblingWorkspace}.\n`,
83+
`See ${privateArtifact}, ${privateReference}, and ${siblingWorkspace}.\n`,
8384
);
8485

8586
const violations = collectStandaloneContentViolations(root);
86-
expect(violations).toHaveLength(2);
87-
expect(violations.join("\n")).toMatch(/private material/);
87+
expect(violations).toHaveLength(3);
88+
expect(
89+
violations.filter((violation) =>
90+
violation.includes("private material"),
91+
),
92+
).toHaveLength(2);
8893
expect(violations.join("\n")).toMatch(/sibling repository/);
8994
});
9095
});

tests/workflow-contract.test.mjs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,13 @@ describe("GitHub Actions workflow contract", () => {
8989
});
9090

9191
it("matches the required environment reviewer configuration", () => {
92+
const liveSmokeWorkflow = workflow("live-smoke.yml");
93+
const liveSmoke = job(liveSmokeWorkflow, "smoke").replace(
94+
/\n\s*#\s*/g,
95+
" ",
96+
);
97+
expect(liveSmoke).toContain("without required reviewers");
98+
9299
const publishWorkflow = workflow("publish.yml");
93100
expect(job(publishWorkflow, "live-smoke")).toContain(
94101
"without required reviewers",

0 commit comments

Comments
 (0)