Skip to content

Classify main pushes and reviewed contributor prose in the fast docs lane - #214

Merged
jimhoyd merged 1 commit into
mainfrom
claude/ci-docs-lane-207
Sep 20, 2026
Merged

jimhoyd merged 1 commit into
mainfrom
claude/ci-docs-lane-207

Conversation

@jimhoyd

@jimhoyd jimhoyd commented Sep 20, 2026

Copy link
Copy Markdown
Collaborator

Closes #207.

The two gaps

  1. The plan job received only github.event.pull_request.base.sha/head.sha, which are empty on a push, so a prose-only push to main always selected full verification.
  2. PR Repoint archived NEXT-STEPS references at their archived path #205 changed only benchmarks/agent/README.md and docs/SPIKE-CORE-LAYERING.md; the benchmark README was outside the allowlist, so the whole change was classified as code.

What changed

Event-aware classification (scripts/ci-plan.ts, new diffRange and classify):

  • Pull request: base...head, its merge base, so commits that landed on main meanwhile are not counted as part of it.
  • Push: before..after, tip to tip, which is what the push moved. A merge base would understate a force-push or a rewritten history.
  • Anything else — schedule, workflow_dispatch, an absent event name inside Actions — is never classified from paths and stays FULL, so exact-SHA release coverage cannot silently become a docs-only run. release.ts independently still refuses a push/pull_request run as release verification.
  • Fails closed: missing, malformed or all-zero SHAs (branch creation/deletion — note 0×40 matches a naive 40-hex test, so it is rejected explicitly) and history git cannot read both select FULL.

.github/workflows/ci.yml now passes github.event.pull_request.base.sha || github.event.before and the matching after. Both are empty for schedule/dispatch, and the classifier refuses those regardless.

Allowlist, expanded by exactly five patterns:

  • benchmarks/agent/README.md, benchmarks/results/README.md
  • packages/*/CONTRIBUTING.md, CODE_OF_CONDUCT.md, GOVERNANCE.md — none appears in any package's published files, and no generator or runtime module reads them.

Still code lane: benchmark prompts, tasks, answers and nested acceptance READMEs (a run reads them); skills, starters, recipes, examples, schemas, manifests, workflows; and package README/SECURITY/CONTRACT/THREAT-MODEL/IMPLEMENTATION-STATUS/AGENTS/CHANGELOG, which ship in a tarball or are agent-facing. Anything feeding a generator stays in the code lane. Every prose path is still walked by the always-run docs job (check:docs scans all authored Markdown).

container, docs, audit and verify-complete remain unconditional; no platform check was weakened or removed. docs/DEVELOPMENT-PIPELINE.md is updated in this change.

Verified

npm ci, then npm run lint, npm run typecheck, npm run check, and full npm test — 528 tests, 0 failures, 1 pre-existing skip.

New tests cover renames (both paths, no rename detection), deletions of prose and of code, mixed code+docs, unknown paths, main pushes spanning several commits, scheduled/manual events, invalid/truncated/uppercase/absent SHAs, and unreadable history — the diff cases against a real temporary git repository rather than a stub. A workflow test asserts the plan step feeds the push SHAs, that the plan checkout keeps fetch-depth: 0, and that docs/audit/container carry no if:.

Manual CLI spot checks against this repository's own history: a prose-only push → docs; the same SHAs under schedule → full; workflow_dispatch with empty SHAs → full; a zero base SHA → full.

Not established

🤖 Generated with Claude Code

…lane

The plan job received only pull-request base/head SHAs, which are empty on a
push, so every prose-only push to main selected full verification. It now also
reads the push event's before/after SHAs and picks the range per event: a pull
request against its merge base (`...`), a push tip to tip (`..`), so a
force-push or rewritten history is measured by what actually moved rather than
by a merge base that would understate it.

Classification fails closed. A missing, malformed or all-zero SHA (branch
creation or deletion) and history this checkout cannot read both select full.
Scheduled and workflow_dispatch runs are never classified from paths at all, so
exact-SHA release coverage cannot become a docs-only run; `release.ts` also
still refuses a push or pull_request run as release verification.

The prose allowlist gains only benchmarks/agent/README.md,
benchmarks/results/README.md and each package's CONTRIBUTING.md,
CODE_OF_CONDUCT.md and GOVERNANCE.md. PR #205's two files now classify as
prose. Benchmark prompts, tasks, answers and acceptance notes stay in the code
lane because a run reads them, as do package documents that ship inside a
published tarball or are read by an agent surface. Every prose path is still
walked by the always-run docs job; container, audit, docs and verify-complete
remain unconditional.

Verified locally with npm run lint, npm run typecheck, npm run check and the
full npm test (528 tests, 1 pre-existing skip) after npm ci. New tests cover
renames, deletions, mixed and unknown paths, main pushes, scheduled/manual
events, invalid and absent SHAs, and unreadable history, using a real temporary
git repository for the diff cases. Not verified: no CI run has exercised these
paths on GitHub yet, so the resulting docs-main lane timing is unmeasured, and
the workflow expression `github.event.pull_request.base.sha ||
github.event.before` is asserted only by a test reading ci.yml, not by an
actual push event.

Refs #207.

Co-Authored-By: Claude Opus 5 <[email protected]>
@jimhoyd
jimhoyd force-pushed the claude/ci-docs-lane-207 branch from 2681178 to 44dec05 Compare September 20, 2026 03:27
@jimhoyd
jimhoyd merged commit c23c662 into main Sep 20, 2026
20 checks passed
@jimhoyd
jimhoyd deleted the claude/ci-docs-lane-207 branch September 20, 2026 03:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Request]: Extend fast docs CI to main pushes and maintained contributor prose

1 participant