Skip to content
This repository was archived by the owner on Aug 18, 2026. It is now read-only.

Commit 2f88321

Browse files
committed
Add release candidate artifact verification
1 parent 2a8b7d7 commit 2f88321

12 files changed

Lines changed: 682 additions & 54 deletions

.github/workflows/release-candidate.yml

Lines changed: 9 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -34,36 +34,9 @@ jobs:
3434
mkdir -p release-candidate
3535
npm pack --json --pack-destination release-candidate > release-candidate/npm-pack.json
3636
node -e "const fs = require('node:fs'); const data = JSON.parse(fs.readFileSync('release-candidate/npm-pack.json', 'utf8')); for (const entry of data) { for (const file of entry.files) console.log(file.path); }" > release-candidate/package-files.txt
37+
npm run release:verify -- --dir release-candidate --output release-candidate/release-verification.json
3738
node -e "const fs = require('node:fs'); const data = JSON.parse(fs.readFileSync('release-candidate/npm-pack.json', 'utf8')); process.stdout.write('tarball=' + data[0].filename + '\n');" >> "$GITHUB_OUTPUT"
3839
39-
- name: Validate package file list
40-
run: |
41-
set -euo pipefail
42-
node -e '
43-
const fs = require("node:fs");
44-
const files = fs.readFileSync("release-candidate/package-files.txt", "utf8").split(/\r?\n/u).filter(Boolean);
45-
const disallowed = [
46-
/^\.reference(?:\/|$)/u,
47-
/^tests(?:\/|$)/u,
48-
/(?:^|\/)fixtures(?:\/|$)/u,
49-
/(?:^|\/)fault-fixtures(?:\/|$)/u,
50-
/(?:^|\/)repair-backups(?:\/|$)/u,
51-
/(?:^|\/)raw-corrupt-samples(?:\/|$)/u,
52-
/(?:^|\/)raw-real-cli-output(?:\/|$)/u,
53-
/\/Users\//u,
54-
/\/home\/[^/\s]+/u,
55-
/[A-Z]:\\Users\\/u,
56-
/sk-[A-Za-z0-9_-]{20,}/u,
57-
/\bBearer\b/u,
58-
];
59-
for (const file of files) {
60-
for (const pattern of disallowed) {
61-
if (pattern.test(file)) throw new Error(`disallowed package artifact path: ${file}`);
62-
}
63-
}
64-
console.log(`package file list ok: ${files.length} files`);
65-
'
66-
6740
- name: Upload tarball
6841
uses: actions/upload-artifact@v4
6942
with:
@@ -87,3 +60,11 @@ jobs:
8760
path: release-candidate/package-files.txt
8861
if-no-files-found: error
8962
retention-days: 14
63+
64+
- name: Upload release verification
65+
uses: actions/upload-artifact@v4
66+
with:
67+
name: agent-cli-runtime-release-verification
68+
path: release-candidate/release-verification.json
69+
if-no-files-found: error
70+
retention-days: 14

README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ Modern local coding agents already know how to plan, edit files, run tools, ask
2323
This repository is in **pre-alpha / developer preview**.
2424

2525
Release boundary:
26-
- This is a P2-10 release-candidate artifact and remote CI audit track, not a stable API release.
26+
- This is a P2-11 release-candidate artifact verification and remote evidence intake track, not a stable API release.
2727
- `createAgentRuntime` is the only runtime value export.
2828
- No background daemon, no WAL, and no remote runtime mode are included in this pre-alpha track.
2929
- The package is intended for local adapter orchestration on the user machine, not a hosted control plane.
3030

31-
The SSOT is available in [docs/ssot.md](./docs/ssot.md), and the release-candidate evidence entrypoint is [docs/release-report.md](./docs/release-report.md). The current implementation is a release-candidate-hardening library-first Node.js/TypeScript implementation with memory-only default run and goal scheduling, optional durable local replay storage with crash/recovery health reporting, fault-injected consistency coverage, package-root API contract tests, tarball TypeScript consumer smoke, compatibility profiles for the built-in CLIs, hardened planner/task-graph validation, versioned event/diagnostics/conformance contracts, redacted diagnostics, parser fixtures, remote CI/artifact audit checks, and thin local smoke/query CLI commands.
31+
The SSOT is available in [docs/ssot.md](./docs/ssot.md), and the release-candidate evidence entrypoint is [docs/release-report.md](./docs/release-report.md). The current implementation is a release-candidate-hardening library-first Node.js/TypeScript implementation with memory-only default run and goal scheduling, optional durable local replay storage with crash/recovery health reporting, fault-injected consistency coverage, package-root API contract tests, tarball TypeScript consumer smoke, compatibility profiles for the built-in CLIs, hardened planner/task-graph validation, versioned event/diagnostics/conformance contracts, redacted diagnostics, parser fixtures, local/remote release artifact verification, remote CI/artifact audit checks, and thin local smoke/query CLI commands.
3232

3333
## Why
3434

@@ -335,6 +335,15 @@ CI uses a Node.js 20/22/24 matrix for typecheck, lint, tests, build, production
335335

336336
For local release-candidate confidence, run `npm run prepublish:check`. It combines typecheck, lint, tests, build, dogfood, production audit, package boundary checks, and a pack dry-run. The GitHub Actions `Release Candidate` workflow is manually triggered with `workflow_dispatch`, runs `npm ci`, `npm run ci`, and `npm run dogfood`, then creates and uploads the npm tarball plus pack metadata and package file list. It does not publish and does not require an npm token.
337337

338+
To create a local release-candidate artifact set without publishing, run:
339+
340+
```bash
341+
npm run release:candidate -- --out-dir release-candidate
342+
npm run release:verify -- --dir release-candidate
343+
```
344+
345+
`release:candidate` writes `npm-pack.json`, `package-files.txt`, the tarball, and `release-verification.json` to the output directory. `release:verify` can also validate the same files after downloading GitHub Actions artifacts.
346+
338347
The release evidence summary is [docs/release-report.md](./docs/release-report.md). `npm publish --dry-run --ignore-scripts --tag alpha` is documented there as a local manual dry-run check; it must not publish and is not required as a remote CI gate.
339348

340349
Runnable examples are in [examples/library-run.js](./examples/library-run.js), [examples/library-goal.js](./examples/library-goal.js), and [examples/cli-dogfood.md](./examples/cli-dogfood.md). The JavaScript examples create local fake CLIs and do not require real provider secrets.

README.zh-CN.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ Agent CLI Runtime 是一个 adapter layer。它适合你在不想重新造一个
2323
本仓库目前处于 **pre-alpha / developer preview**
2424

2525
发布边界说明:
26-
- 这是 P2-10 release-candidate artifact 与 remote CI audit 阶段,不承诺稳定 API。
26+
- 这是 P2-11 release-candidate artifact verification 与 remote evidence intake 阶段,不承诺稳定 API。
2727
- `createAgentRuntime` 是当前公开的主要 value 入口,其他 adapter/parser/store 内部实现不对外承诺。
2828
- 这版不包含后台 daemon、WAL 或 remote runtime 模式承诺。
2929
- 运行时仍以本机本地编排为目标,不替代托管平台服务。
3030

31-
SSOT 在 [docs/ssot.md](./docs/ssot.md),release-candidate 证据入口在 [docs/release-report.md](./docs/release-report.md)。当前实现是 release-candidate-hardening 的 library-first Node.js/TypeScript 版本,默认 memory-only run / goal 调度,可选 durable local replay storage 及 crash/recovery health reporting,并补充 fault-injected consistency coverage、package-root API contract tests 和 tarball TypeScript consumer smoke;包含内置 CLI compatibility profiles、强化后的 planner/task-graph validation、版本化 event/diagnostics/conformance 契约、parser fixtures、remote CI/artifact audit checks,以及本地 smoke/query 薄 CLI。
31+
SSOT 在 [docs/ssot.md](./docs/ssot.md),release-candidate 证据入口在 [docs/release-report.md](./docs/release-report.md)。当前实现是 release-candidate-hardening 的 library-first Node.js/TypeScript 版本,默认 memory-only run / goal 调度,可选 durable local replay storage 及 crash/recovery health reporting,并补充 fault-injected consistency coverage、package-root API contract tests 和 tarball TypeScript consumer smoke;包含内置 CLI compatibility profiles、强化后的 planner/task-graph validation、版本化 event/diagnostics/conformance 契约、parser fixtures、本地/远端 release artifact verification、remote CI/artifact audit checks,以及本地 smoke/query 薄 CLI。
3232

3333
## 为什么需要它
3434

@@ -333,6 +333,15 @@ CI 使用 Node.js 20/22/24 matrix 跑 typecheck、lint、tests、build、product
333333

334334
本地 release-candidate 置信门禁使用 `npm run prepublish:check`。它会组合 typecheck、lint、tests、build、dogfood、production audit、package boundary check 和 pack dry-run。GitHub Actions 的 `Release Candidate` workflow 通过 `workflow_dispatch` 手动触发,执行 `npm ci``npm run ci``npm run dogfood`,随后生成并上传 npm tarball、pack metadata 和 package file list。它不执行 publish,也不需要 npm token。
335335

336+
如需在本地生成可审查的 release-candidate artifact set:
337+
338+
```bash
339+
npm run release:candidate -- --out-dir release-candidate
340+
npm run release:verify -- --dir release-candidate
341+
```
342+
343+
`release:candidate` 会在输出目录写入 `npm-pack.json``package-files.txt`、tarball 和 `release-verification.json``release:verify` 也可用于下载 GitHub Actions artifacts 后复核同一组文件。
344+
336345
Release evidence summary 见 [docs/release-report.md](./docs/release-report.md)`npm publish --dry-run --ignore-scripts --tag alpha` 只作为本地手动 dry-run check 记录在该文档中;它不得真的 publish,也不作为远端 CI 必选 gate。
337346

338347
可运行示例见 [examples/library-run.js](./examples/library-run.js)[examples/library-goal.js](./examples/library-goal.js)[examples/cli-dogfood.md](./examples/cli-dogfood.md)。两个 JavaScript 示例会创建本地 fake CLI,不需要真实 provider secret。

docs/compatibility.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
# Agent CLI Compatibility Matrix
22

3-
Status: P2-10 Release Candidate Artifact & Remote CI Audit
3+
Status: P2-11 Release Candidate Artifact Verification & Remote Evidence Intake
44
Last updated: 2026-06-20
55

6-
This matrix records the CLI versions and behaviors that have been verified with the current runtime. Real agent CLIs change quickly; treat this file as dated compatibility evidence, not a permanent guarantee. P2-10 adds remote CI and release-candidate artifact audit evidence on top of the P2-9 package-root API and consumer compatibility gate. Raw CLI output, tokens, full prompts, auth env values, and private paths are not committed.
6+
This matrix records the CLI versions and behaviors that have been verified with the current runtime. Real agent CLIs change quickly; treat this file as dated compatibility evidence, not a permanent guarantee. P2-11 adds reusable release-candidate artifact verification and remote evidence intake on top of the P2-10 artifact workflow shape and P2-9 package-root API/consumer compatibility gate. Raw CLI output, tokens, full prompts, auth env values, and private paths are not committed.
77

88
## Evidence policy
99

10-
Current status is P2-10 pre-alpha release-candidate evidence, which is intended to be the default interpretation for this matrix.
10+
Current status is P2-11 pre-alpha release-candidate evidence, which is intended to be the default interpretation for this matrix.
1111

1212
- Current behavior is what is validated by `npm test` / typecheck / lint / build plus the current `npm pack`, package boundary, CLI JSON contract, and TypeScript consumer install-smoke checks.
1313
- CI behavior is matrixed for Node.js 20/22/24 except dogfood, which runs once on Node.js 22 to avoid duplicating the slower install smoke.
1414
- `npm test` uses Vitest's verbose reporter to keep long contract/install-smoke files chatty enough for CI and local watchdogs.
1515
- `npm run prepublish:check` is the local guard that combines typecheck, lint, tests, build, dogfood, production audit, package boundary checks, and pack dry-run.
16+
- `npm run release:candidate` creates local release-candidate artifacts, and `npm run release:verify -- --dir <path>` validates local or downloaded artifacts with stable redacted JSON.
1617
- `npm publish --dry-run --ignore-scripts --tag alpha` is a documented manual local dry-run check; it is not a remote CI gate.
1718
- `npm run dogfood` installs the tarball into a temporary consumer project, runs `tsc --noEmit`, then executes fake-CLI library run/goal/replay/diagnostics smoke through the installed package.
1819
- Evidence modes are intentionally separate:
@@ -24,7 +25,7 @@ Current status is P2-10 pre-alpha release-candidate evidence, which is intended
2425
- When using this file as runtime contract input, prioritize the `Status` section, explicit "Runtime notes" in each adapter, and the most recent command evidence.
2526
- For changed behavior, add a new evidence row at the top of the section rather than keeping the old row as authoritative.
2627

27-
## P2-10 Release Candidate Artifact And Remote CI Audit
28+
## P2-11 Release Candidate Artifact Verification And Remote Evidence Intake
2829

2930
Release-candidate audit evidence:
3031

@@ -36,18 +37,20 @@ npm run build
3637
npm run package:check
3738
npm run dogfood
3839
npm run prepublish:check
40+
npm run release:candidate -- --out-dir release-candidate
41+
npm run release:verify -- --dir release-candidate
3942
npm pack --dry-run
4043
npm publish --dry-run --ignore-scripts --tag alpha
4144
node ./dist/cli/main.js conformance --mode real --agent all --json
4245
```
4346

44-
P2-10 release-candidate semantics:
47+
P2-11 release-candidate semantics:
4548

4649
- `.github/workflows/ci.yml` keeps the Node.js 20/22/24 matrix for typecheck, lint, tests, build, production dependency audit, package boundary checks, and pack dry-run.
4750
- The CI dogfood gate runs `npm run dogfood` once on Node.js 22 and does not pass `--allow-real-run`.
48-
- `.github/workflows/release-candidate.yml` remains `workflow_dispatch` only. It runs `npm ci`, `npm run ci`, and `npm run dogfood`, then creates `npm pack --json` output, validates the package file list, and uploads the tarball, pack metadata, and package file list artifacts.
51+
- `.github/workflows/release-candidate.yml` remains `workflow_dispatch` only. It runs `npm ci`, `npm run ci`, and `npm run dogfood`, then creates `npm pack --json` output, runs `npm run release:verify`, and uploads the tarball, pack metadata, package file list, and release verification artifacts.
4952
- No workflow step runs `npm publish`, sets `NODE_AUTH_TOKEN`, or requires real Codex/Claude/OpenCode installation.
50-
- [docs/release-report.md](./release-report.md) is the release-candidate evidence entrypoint for local commands, remote workflow expectations, artifact review, package boundary, real CLI evidence boundaries, known risks, and non-goals.
53+
- [docs/release-report.md](./release-report.md) is the release-candidate evidence entrypoint for local commands, local generation, downloaded artifact verification, remote workflow expectations, package boundary, real CLI evidence boundaries, known risks, and non-goals.
5154
- Remote GitHub Actions evidence must be manually triggered and reviewed; it is not treated as passed merely because workflow files exist locally.
5255

5356
## P2-9 Release Candidate API And Consumer Compatibility Evidence

0 commit comments

Comments
 (0)