diff --git a/AGENTS.md b/AGENTS.md index 15c873a..1d619b3 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -57,4 +57,4 @@ Flag fail-open evaluation, invalid outcome/lineage handling, nondeterministic co ## Pull requests and release - Include the ticket (when applicable), requirement coverage, changes, tests and exact outstanding limitations in the PR. Do not mark work complete before required review, merge and acceptance evidence. -- Preserve Apache-2.0 licensing and copyright notices. The approved public `0.0.1` preparation is limited to metadata, documentation and verification. Follow the [release policy](docs/releasing.md); publishable metadata does not authorize publication. No publication, version tag, deployment, signing on behalf of the maintainer, merge, or repository ownership/visibility change without explicit authorization. +- Preserve Apache-2.0 licensing and copyright notices. Follow the [release policy](docs/releasing.md) for each new release. Publishable metadata does not authorize publication. No publication, version tag, deployment, signing on behalf of the maintainer, merge, or repository ownership/visibility change without explicit authorization. diff --git a/README.md b/README.md index 7658487..7a4c049 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,22 @@ # Assay -Assay compares technical evidence against explicit, versioned criteria and returns reproducible findings. Use it in assessment systems, engineering exercises and other tools that need to distinguish a correct result from an incorrect or unresolved one. +Assay compares technical evidence against explicit, versioned criteria and returns reproducible findings. Use it to check results in assessment systems, engineering exercises and other tools. The host supplies the evidence and authorizes the criteria. Assay does not execute submitted programs, authenticate observations, assign grades or issue credentials. The library runs offline and has no runtime dependencies. ## Installation -Requires Node.js 24 or later and ESM. Install version 0.0.1 from npm: +Requires Node.js 24 or later and ESM. ```sh -npm install @0xbuff/assay@0.0.1 +npm install @0xbuff/assay ``` -For an unreleased revision, [build from source](#development). +Pin the version you tested when reproducibility matters. ## Quick start -This example checks a measurement against an inclusive range. The caller supplies the measurement independently; no runner or service is needed. +This example checks a measurement supplied by the caller against an inclusive range. ```ts import { @@ -80,7 +80,7 @@ if (!view.ok) throw new Error("Projection rejected"); console.log(view.value.outcome); // pass ``` -A missing measurement is inconclusive. An out-of-range measurement fails; a mismatched unit makes the evidence invalid. +A missing measurement is inconclusive. An out-of-range measurement fails. A mismatched unit makes the evidence invalid. ## Features @@ -138,7 +138,7 @@ pnpm check Use Node.js 24+ and pnpm 11.2.2. The full check builds the package and verifies it with an isolated offline ESM and TypeScript consumer. -Read the [development guide](https://github.com/0xbuffdev/assay/blob/main/docs/development.md), [contribution guidelines](https://github.com/0xbuffdev/assay/blob/main/CONTRIBUTING.md) and [security policy](https://github.com/0xbuffdev/assay/blob/main/SECURITY.md). Release preparation follows the [release policy](https://github.com/0xbuffdev/assay/blob/main/docs/releasing.md). +Read the [development guide](https://github.com/0xbuffdev/assay/blob/main/docs/development.md), [contribution guidelines](https://github.com/0xbuffdev/assay/blob/main/CONTRIBUTING.md) and [security policy](https://github.com/0xbuffdev/assay/blob/main/SECURITY.md). For releases, see the [release policy](https://github.com/0xbuffdev/assay/blob/main/docs/releasing.md). ## License diff --git a/docs/releasing.md b/docs/releasing.md index 42b4e6f..6dd3d5e 100644 --- a/docs/releasing.md +++ b/docs/releasing.md @@ -1,8 +1,8 @@ # Release policy -Assay uses Apache-2.0 and Semantic Versioning. The package is configured for public npm access. Before 1.0.0, consumers should pin the version they tested. +Assay is published on npm as [`@0xbuff/assay`](https://www.npmjs.com/package/@0xbuff/assay) under Apache-2.0 and follows Semantic Versioning. Before 1.0.0, consumers should pin the version they tested. -The [release preparation decision](https://github.com/0xbuffdev/context/blob/main/repos/assay/reviews/2026-11-28-release-preparation.md) authorizes metadata and documentation changes. The [publication hold](https://github.com/0xbuffdev/context/blob/main/repos/assay/reviews/2026-11-22-release-decision.md) remains in force. +Each release requires its own maintainer approval. The [first publication decision](https://github.com/0xbuffdev/context/blob/main/repos/assay/reviews/2026-11-28-final-publication-decision.md) applies only to version 0.0.1. ## Candidate verification @@ -35,23 +35,25 @@ The verifier checks package metadata, licensing, no runtime dependencies, no lif - Confirm the npm scope `@0xbuff`, package name, version availability and publisher identity. - Confirm contributor rights, Apache-2.0 attribution and third-party notices. -- Review the exact candidate commit, tarball contents, source map, digest and CI results. A passing automated scan does not replace independent inspection. -- Approve a separate protected release workflow and verify the actual npm account configuration. +- Review the exact candidate commit, tarball contents, source map, digest and CI results. Inspect the archive independently of the automated checks. +- Review the protected release workflow and verify the npm account configuration. - Approve the exact release version and release date. Move the changelog's Unreleased changes to a dated version section before verifying the final archive. If the intended publication date changes, update the date and repeat verification and inspection. - Obtain explicit authorization before creating a tag, staging or publishing. -For a public package, prefer [npm trusted publishing](https://docs.npmjs.com/trusted-publishers/) with a protected GitHub environment and stage-only permission. A maintainer must approve the staged package through npm using its required authentication. Keep quality CI read-only; never introduce a long-lived npm token to it. +Use [npm trusted publishing](https://docs.npmjs.com/trusted-publishers/) with a protected GitHub environment and stage-only permission. A maintainer must approve the staged package through npm using its required authentication. Keep quality CI read-only and free of npm publishing tokens. ## Protected staging -The `Stage npm package` workflow (`.github/workflows/release.yml`) runs only by manual dispatch on `main`. It uses the existing successful main quality run and stages its verified archive without rebuilding it. The environment must be configured before use. The read-only preflight script checks the approved run, actual archive file list and regular-file types, metadata, digest and dated changelog. The protected workflow calls one staging script that validates the selected artifact and rechecks main and its digest immediately before staging. Quality CI exercises the same control path with synthetic inputs and stubbed GitHub/npm commands, including rejected candidates and late changes. It never requests real staging. +The `Stage npm package` workflow (`.github/workflows/release.yml`) runs only by manual dispatch on `main`. It uses the existing successful main quality run and stages its verified archive without rebuilding it. Verify the environment configuration before each use. The read-only preflight script checks the approved run, actual archive file list and regular-file types, metadata, digest and dated changelog. The protected workflow calls one staging script that validates the selected artifact and rechecks main and its digest immediately before staging. Quality CI exercises the same control path with synthetic inputs and stubbed GitHub/npm commands, including rejected candidates and late changes. It never requests real staging. -1. In repository Settings > Environments, create `npm-stage`. Restrict deployments to `main`, require reviewers and disallow administrator bypass. Enable prevention of self-review if another reviewer is available. +1. In repository Settings > Environments, verify `npm-stage` restricts deployments to `main`, requires reviewers and disallows administrator bypass. Prevent self-review if another reviewer is available. 2. After independent inspection and explicit release approval, set environment variables `ASSAY_STAGE_COMMIT`, `ASSAY_STAGE_RUN_ID` and `ASSAY_STAGE_SHA256` to the approved current main SHA, successful main quality run ID and tarball digest. Leave them unset until approval. Finalize dated release notes and reverify any resulting changes before setting these values. -3. When package settings are available and staging is authorized, configure a GitHub Actions trusted publisher for `0xbuffdev/assay`, workflow `release.yml`, environment `npm-stage`. Allow staging only; disable direct publish and dist-tag changes. Use a GitHub-hosted runner. No npm token is required in GitHub. Configure the publisher close to use; npm expires new configurations that are not validated within two days. +3. Before an authorized staging run, verify or configure the GitHub Actions trusted publisher for `0xbuffdev/assay`, workflow `release.yml`, environment `npm-stage`. Allow staging only; disable direct publish and dist-tag changes. Use a GitHub-hosted runner. No npm token is required in GitHub. Configure the publisher close to use; npm expires new configurations that are not validated within two days. 4. Dispatch the workflow with the approved quality run ID. Review and approve the environment job. The workflow checks the approved commit, successful quality run, archive metadata, actual digest and dated changelog before requesting staging. It does not publish or tag anything. 5. Inspect the staged package in npm and compare its tarball digest to the approved artifact. Approve the staged version using npm's required human 2FA only after separate publication authorization. Clear the environment approval variables when done. -For a new package, the owner may stage the first inspected tarball from an authenticated npm session before configuring package-level trusted publishing. npm creates a public `0.0.0-stage` placeholder automatically; the staged contents remain unavailable until approved. This registry change requires explicit authorization, too. Do not create a placeholder manually. Use npm CLI 11.15.0 or later and enable account 2FA. See [staged publishing](https://docs.npmjs.com/staged-publishing/) for details. +## After publication -Actual release execution requires a separate maintainer decision. Host authorization, execution isolation and formal grading remain outside Assay. +Retrieve the published tarball and compare its SHA-256 with the approved archive. Verify the package version, homepage and distribution tag, then install the exact version in an isolated ESM consumer with scripts disabled. Confirm the package can be downloaded without registry credentials. Record the results and any unverified checks before completing the release. A version tag or GitHub release requires explicit authorization. + +See [staged publishing](https://docs.npmjs.com/staged-publishing/) for npm's approval procedure. Host authorization, execution isolation and formal grading remain outside Assay.