Collapse docs/adr/ and docs/rfc/ into a single docs/rfc/ with proposed/, implemented/, and rejected/ subfolders. Every file is renamed to yyyy-mm-dd-topic-title.md, where the date is when the topic was first proposed (from git history). ADRs and RFCs that covered exactly the same topic are merged (property-based testing, session persistence); the umbrella RFC 005 stays split across its three implemented decisions, and RFC 006's deferred part-3 (API extractor reports) splits into its own proposed RFC. All cross-references become machine-checkable relative links instead of bare "ADR NNNN" / "RFC NNN" prose. Add a verify-md-links doc-sync gate (scripts/verify-md-links.ts) that checks every relative Markdown cross-link resolves, wired into doc-sync alongside verify-md-wrap. This makes the reorganization self-verifying: the same change that rewrote ~forty inter-doc links adds the check that proves none dangle. Document the cross-link convention in a new docs/AGENTS.md and record the gate as an implemented RFC. doc-sync, typecheck, lint, and the full test suite (667) all pass.
82 lines
2.9 KiB
YAML
82 lines
2.9 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main, master]
|
|
pull_request:
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
checks:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
node: [24, 26]
|
|
name: node ${{ matrix.node }}
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- uses: actions/setup-node@v6
|
|
with:
|
|
node-version: ${{ matrix.node }}
|
|
|
|
- name: Enable corepack (pnpm)
|
|
run: corepack enable
|
|
|
|
- name: Install (immutable)
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Constraints
|
|
run: pnpm run constraints
|
|
|
|
# Before lint: the type-aware ESLint config resolves vendor packages via
|
|
# their built declarations (tsconfig.typecheck.json -> vendor/*/lib),
|
|
# which `pnpm run typecheck` emits. Lint on a fresh checkout would otherwise
|
|
# see unresolved types and erupt with no-unsafe-* errors.
|
|
- name: Typecheck (src + tests + examples)
|
|
run: pnpm run typecheck
|
|
|
|
- name: Lint
|
|
run: pnpm run lint
|
|
|
|
# Doc-sync gates (doc-sync-enforcement RFC). doc-typecheck compiles the fenced ts blocks in
|
|
# the docs and resolves vendor packages via their built declarations, which
|
|
# the typecheck step above emits — so it runs after typecheck. The event
|
|
# taxonomy check and the markdown wrap check only read source. Same
|
|
# `doc-sync` script the pre-push hook runs (quality-gates RFC: one source of truth).
|
|
- name: Doc-sync gates (doc code blocks + event taxonomy + markdown wrap)
|
|
run: pnpm run doc-sync
|
|
|
|
# Module-graph freshness: regenerate docs/module-graph.md from the
|
|
# packages' peerDependencies and fail if it differs from the committed
|
|
# file. Only reads source package.json — no build needed.
|
|
- name: Module-graph freshness
|
|
run: pnpm run verify-module-graph
|
|
|
|
- name: Tests with coverage gate (per-file 100%)
|
|
run: pnpm run test:coverage
|
|
|
|
# Before hygiene: publint validates the packed artifacts (lib/index.js),
|
|
# which only the tsdown bundling step emits.
|
|
- name: Build (tsc -b + tsdown bundles)
|
|
run: pnpm run build
|
|
|
|
- name: Hygiene (knip + publint)
|
|
run: pnpm run knip && pnpm run publint
|
|
|
|
- name: Demo smoke test
|
|
run: |
|
|
set -euo pipefail
|
|
out=$(printf 'echo ci smoke\n' | timeout 60 node --expose-internals --import tsx examples/echo-agent/start.ts 2>&1)
|
|
echo "$out"
|
|
echo "$out" | grep -q '\[tool call\] echo({"text":"ci smoke"})'
|
|
echo "$out" | grep -q '\[tool result\] ECHO: CI SMOKE'
|
|
# The JSONL backend (root ./.sessions, no cwd → _no-cwd bucket) writes a
|
|
# per-run session log named main-session-<uuid>.jsonl. Assert one exists.
|
|
ls .sessions/_no-cwd/main-session-*.jsonl >/dev/null
|
|
rm -rf .sessions
|