Repository navigation
Classify main pushes and reviewed contributor prose in the fast docs lane - #214
Merged
Merged
Conversation
…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
force-pushed
the
claude/ci-docs-lane-207
branch
from
September 20, 2026 03:27
2681178 to
44dec05
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #207.
The two gaps
planjob received onlygithub.event.pull_request.base.sha/head.sha, which are empty on a push, so a prose-only push to main always selected full verification.benchmarks/agent/README.mdanddocs/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, newdiffRangeandclassify):base...head, its merge base, so commits that landed on main meanwhile are not counted as part of it.before..after, tip to tip, which is what the push moved. A merge base would understate a force-push or a rewritten history.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.tsindependently still refuses apush/pull_requestrun as release verification.0×40 matches a naive 40-hex test, so it is rejected explicitly) and history git cannot read both select FULL..github/workflows/ci.ymlnow passesgithub.event.pull_request.base.sha || github.event.beforeand the matchingafter. 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.mdpackages/*/CONTRIBUTING.md,CODE_OF_CONDUCT.md,GOVERNANCE.md— none appears in any package's publishedfiles, 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-rundocsjob (check:docsscans all authored Markdown).container,docs,auditandverify-completeremain unconditional; no platform check was weakened or removed.docs/DEVELOPMENT-PIPELINE.mdis updated in this change.Verified
npm ci, thennpm run lint,npm run typecheck,npm run check, and fullnpm 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 thatdocs/audit/containercarry noif:.Manual CLI spot checks against this repository's own history: a prose-only push →
docs; the same SHAs underschedule→full;workflow_dispatchwith empty SHAs →full; a zero base SHA →full.Not established
||fallback in the workflow expression is asserted only by a test that parsesci.yml; it has not been observed on a real push event.🤖 Generated with Claude Code