Skip to content

ci(plan): PLAN-GATE run the plan check as a gate - #1625

Merged
mergify[bot] merged 3 commits into
mainfrom
claude/plan-gate
Oct 16, 2026
Merged

mergify[bot] merged 3 commits into
mainfrom
claude/plan-gate

Conversation

@Cuarroc

@Cuarroc Cuarroc commented Oct 16, 2026 •

Copy link
Copy Markdown
Owner

Die Plan-Prüfung läuft jetzt bei jedem Commit, vor jedem Push und in der Linux-Prüfung von GitHub mit. Hat docs/PLAN.md einen Befund (zum Beispiel eine unbekannte Abhängigkeit oder eine Entscheidung ohne Planzeile), wird die Prüfung rot und der PR kann nicht gemergt werden. Was GitHub oder das Server-Ereignislog bräuchte, wird nur als „NICHT GEPRÜFT“ gemeldet und blockiert nichts.

Plan-ID: PLAN-GATE

Report

Base: main @ 5667eea8 (HEAD at start). Head: 068f9a73. Diff: 6 files, +61/−9 (≤ 300).

What changed

  • scripts/ci/gates.sh: new gate plan-check = node scripts/plan-check.mjs --offline, lanes precommit, prepush, branchpush, linux, linux_1. Not in windows*/release (dev tooling, platform-neutral; the Linux lane proves it). It rides inside the existing required gates (linux) job; no YAML, branch-protection or .mergify.yml change.
  • scripts/plan-check.mjs: unchanged. The existing --offline flag already does what the gate needs.
  • scripts/ci/lane-plan.sh: removed the two NOT_A_READ entries docs/decisions.md|scripts/plan-check.mjs / …|scripts/lib/plan-model.mjs (their comment said "remove at gate wiring (then heavy)"). A gate now reads docs/decisions.md, so a decisions-only PR runs the Linux lane instead of being green by absence. docs/PLAN.md was already heavy (HEAVY_DOCS); docs/plan/v2.0/plan.md is heavy via include_str!.
  • scripts/test-lane-plan.sh: docs/decisions.md moved from real_light to real_heavy (comment updated); .pa/report_ci-01.md, KNOWN_ISSUES.md, docs/ci-lokal.md remain the light canaries.
  • scripts/lib/plan-gate.test.mjs (new, runs in gate hq-test): copies gates.sh + plan-check.mjs + its two libs into a temp tree and runs the real runner gates.sh run plan-check on a PLAN fixture with a known finding (unknown-dependency, expect exit 1) and on a clean one (expect exit 0, NICHT GEPRÜFT line names GitHub/--offline and the events log), with empty GH_TOKEN/GITHUB_TOKEN. Second test: gates.sh --list <lane> contains plan-check for all five lanes.
  • docs/ci-lokal.md: lane table names the gate.
  • docs/PLAN.md: row PLAN-GATE → Erledigt: #1625 …; one decision row next to the 16.10. decisions (quota up to 99 % for Claude only, server Claude Code 2.1.287 → 2.1.301; source Root-Chat 16.10.). Written as "Nutzer", not by name: the repo is public and PLAN.md uses no personal names anywhere. The DS-T-01/DS-T-03 rows were not touched.

Offline / no-token behaviour

--offline never calls gh; GitHub PR state, plan-age comparison and running jobs (no --events) are printed as NICHT GEPRÜFT: … and do not affect the exit code (no --strict). Why offline even when a token exists: online, a PR's own row Erledigt: #<n> contradicts its still-open PR (status-contradicts-github), and pr-without-plan-row depends on other people's open PRs – the gate would be non-deterministic per commit. Without git history (fixture) the last-plan-commit lookup is also listed as not checked. Online npm run plan:check stays the report-only tool.

Evidence

Command Exit
node --test scripts/lib/plan-gate.test.mjs at 4507c1ad (test only, no gate) 1 (Unbekanntes Gate: plan-check)
BASE_SHA=$(git merge-base origin/main HEAD) HEAD_SHA=$(git rev-parse HEAD) bash scripts/ci/red-first.sh at 5cb45b3a 0 (both tests red/missing at merge base, green at head)
node --test scripts/lib/plan-gate.test.mjs scripts/lib/plan-model.test.mjs 0 (17 pass)
npm run plan:check -- --offline at head (= the gate) 0 (Plan-Prüfung: 0 Befunde)
npm run plan:check online at head 1: only PLAN-GATE #1625: done / GitHub OPEN – the own row, by design until merge
bash scripts/ci/gates.sh --list 0, shows plan-check precommit,prepush,branchpush,linux,linux_1
bash scripts/test-lane-plan.sh, bash scripts/ci/ci-shape.sh, bash scripts/test-ci-shape.sh, bash scripts/test-precommit-lane.sh, bash scripts/test-prepush-lane.sh, bash scripts/test-gates.sh, node --test scripts/ci/linux-split.test.mjs 0 each
bash scripts/ci/gates.sh lane prepush at 5cb45b3a and at 068f9a73 0 / 0 (plan-check green 1 s)
npm run dev:start-check 0 (RAM 10.7 GB free, 0 cargo builds; limit not checked: no --usage file)
git ls-remote origin claude/plan-gate 068f9a735d9ab9f262facc1ff154b88eb85ee901

Red-first trailers (commit 5cb45b3a):
Test-First: scripts/lib/plan-gate.test.mjs::plan-check gate fails on a plan finding and passes on a clean plan
Test-First: scripts/lib/plan-gate.test.mjs::plan-check gate runs in the local and the linux CI lanes

NICHT ABGEDECKT

  • Windows half: the #[cfg(windows)] tests and the Windows arms of clippy did not run (Linux server); the Windows lane runs in the merge queue. plan-check itself is not in a Windows lane; plan-gate.test.mjs runs only in hq-test (not on Windows).
  • The linux lane itself (hq-visual, fe-build, e2e, workflow gates) did not run locally; CI runs it on this PR.
  • Online checks (GitHub state, plan age, running jobs) are not part of the gate verdict by design.
  • decision-without-plan-row uses the wall clock (14-day window over docs/decisions.md headings): a future-dated heading could turn a later run red without a commit. Not changed (non-goal); worth noting for Root.
  • Cost: a decisions.md-only PR now runs the full Linux lane (~7 min) instead of skipping it.

Review

Review: ausstehend (Stufe A-equivalent: scripts/ci/ is user area). Two reviewers from two different non-Anthropic families; Root commissions. No self-review counted.

🤖 Generated with Claude Code on the ProjectA server worker

Root acceptance (16.10.2026 ~11:15 MESZ)

ID Source Severity Finding Disposition
R1625-K1 OpenRouter moonshotai/kimi-k3 medium scripts/ci/gates.sh:159 gate in precommit blocks every local commit if main ever has a plan finding rejected as defect: the gate runs --offline (deterministic, no GitHub/time input) and the same gate keeps main at 0 findings, so main cannot drift through the queue; escape-hatch doc = follow-up
R1625-K2 kimi-k3 low gate listed for linux and linux_1 follow-up: check whether both run in one CI workflow; harmless
R1625-K3 kimi-k3 low docs/decisions.md now heavy in lane-plan intended (PLAN row says so)
R1625-K4/K5 kimi-k3 low fixtures with empty decisions.md / copy-list invariant follow-up test hardening
R1625-G1 google/gemini-3.8-flash low plan-gate.test.mjs:16 temp dirs not cleaned follow-up
Reviews on head 068f9a7: moonshotai/kimi-k3 APPROVE, google/gemini-3.8-flash APPROVE — two different non-author families (Elias' condition for scripts/ci; OpenRouter pair approved until 22.10.). The PLAN diff carries the PLAN-GATE row and the 16.10. ~10:20 decision line.
Root accepts head 068f9a7.

Cuarroc and others added 3 commits October 16, 2026 10:31
Drives gates.sh run plan-check on a fixture with a known finding and on a
clean plan; red until the gate exists.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Gate plan-check (node scripts/plan-check.mjs --offline) joins the lanes
precommit, prepush, branchpush, linux and linux_1. Offline keeps GitHub and
the events log out of the verdict (listed as NICHT GEPRUEFT). docs/decisions.md
is now read by a gate, so lane-plan classifies it heavy.

Test-First: scripts/lib/plan-gate.test.mjs::plan-check gate fails on a plan finding and passes on a clean plan
Test-First: scripts/lib/plan-gate.test.mjs::plan-check gate runs in the local and the linux CI lanes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Cuarroc
Cuarroc marked this pull request as ready for review October 16, 2026 09:07
@Cuarroc Cuarroc added the review-ok Pipeline: review disposition complete, no open high finding label Oct 16, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-16T09:11:33.306456Z 068f9a7 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 068f9a735d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/ci/gates.sh
# server events log are listed as NICHT GEPRUEFT, never a verdict - a PR's
# own "Erledigt: #<n>" row would contradict its still-open PR. Selftest:
# scripts/lib/plan-gate.test.mjs (hq-test).
"plan-check|precommit,prepush,branchpush,linux,linux_1|.|node scripts/plan-check.mjs --offline"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Aktiviere die GitHub-gestützten Planprüfungen im Pflicht-Gate

Mit --offline bleibt prs immer leer, sodass dieses Pflicht-Gate weder Paket-PRs ohne Plan-ID noch Statuswidersprüche oder einen nach mehreren Merges veralteten Plan erkennen kann. Ein Paket-PR kann daher ohne Planzeile beziehungsweise ohne Statusaktualisierung vollständig grün werden, obwohl PLAN-GATE laut eigener Planzeile genau das Veralten verhindern soll; die PR-eigene done / OPEN-Sonderlage sollte gezielt behandelt werden, statt sämtliche GitHub-Prüfungen abzuschalten.

AGENTS.md reference: AGENTS.md:L121-L121

Useful? React with 👍 / 👎.

@Cuarroc

Cuarroc commented Oct 16, 2026

Copy link
Copy Markdown
Owner Author

Root auto-queue: head 068f9a7 unchanged since review-ok, all checks green. @Mergifyio queue

@mergify mergify Bot added the queued label Oct 16, 2026
@mergify
mergify Bot merged commit 3d71918 into main Oct 16, 2026
25 checks passed
@mergify

mergify Bot commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Merge Queue Status

This pull request spent 13 minutes 7 seconds in the queue, including 12 minutes 49 seconds running CI.

Required conditions to merge
  • check-success = gates (linux)
  • check-success = gates (windows)
  • check-success = red-first
  • github-review-approved [🛡 GitHub repository ruleset rule main-pr-required-checks]
  • label != do-not-merge
  • any of [🛡 GitHub repository ruleset rule main-pr-required-checks]:
    • check-success = @github-actions/gates (linux)
    • check-neutral = @github-actions/gates (linux)
    • check-skipped = @github-actions/gates (linux)
  • any of [🛡 GitHub repository ruleset rule main-pr-required-checks]:
    • check-success = @github-actions/gates (windows)
    • check-neutral = @github-actions/gates (windows)
    • check-skipped = @github-actions/gates (windows)
  • any of [🛡 GitHub repository ruleset rule main-pr-required-checks]:
    • check-success = @github-actions/red-first
    • check-neutral = @github-actions/red-first
    • check-skipped = @github-actions/red-first
  • any of [🛡 GitHub repository ruleset rule main-pr-required-checks]:
    • check-neutral = @mergify/Mergify Merge Protections
    • check-skipped = @mergify/Mergify Merge Protections
    • check-success = @mergify/Mergify Merge Protections

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review-ok Pipeline: review disposition complete, no open high finding

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant