Skip to content

Remove the v7 GitHub-side knowledge gate machinery (design v8) - #231

Merged
tzhouam merged 2 commits into
mainfrom
kb/local-remove-v7
Sep 29, 2026
Merged

tzhouam merged 2 commits into
mainfrom
kb/local-remove-v7

Conversation

@tzhouam

@tzhouam tzhouam commented Sep 29, 2026

Copy link
Copy Markdown
Collaborator

Item 6 of the approved v8 plan: remove the GitHub-side machinery of v7. The publisher is now the only thing that merges knowledge PRs, and its local gate checks the exact merge result (#227). Provenance audit and revert catch anything that bypasses it (#230).

Removed

  • The kb-gate workflow, the .github/kb-gate/ verifier bundle, tools/build_kb_gate_bundle.py and its CI check.
  • .github/CODEOWNERS.
  • The hold list:
    • publish_holds, verify_holds, holds_server, kb holds-server;
    • the kb-holds signing purpose.
  • The human-approved path:
    • maintainer approvals, kb:human-approved, approval_withdrawn;
    • review_ids/reviewers in verdicts. Verdicts are always auto.
  • v7 outbox items post_verdict, enqueue, pause and update_branch, with their publisher actions.
  • Pause confirmation:
    • pause_open_prs, pause_unconfirmed, resume_paused_prs;
    • kb status → pause_unconfirmed.
  • States verdict_posted, queued and paused. v7 never auto-merged in production, so no records need migrating.

Behaviour now

  • A pause is the new generation alone.
    • The service signs no merge while a repository is paused.
    • The publisher refuses old-generation items both before running and right before merging.
    • While paused, the service still follows merges, closes and reverts.
    • After resume, the same head is signed again.
  • External PRs. One that changes paths outside the governed pages is never merged. Its author is asked to split it in the findings comment.
  • Publisher.
    • It refuses companion PRs before looking at the verdict.
    • It never readies or merges a draft PR (a transient refusal).

Tests

  • test_kb_local_gate_verifier.py replaces test_kb_gate_verifier.py and runs the same adversarial cases through the local gate.
  • New tests:
    • a pause stops merges without touching the PR;
    • a resumed PR is signed again and merged;
    • draft PRs are never merged;
    • a failed close is retried;
    • paths outside the governed pages are never merged, whatever the labels.
  • Full suite passes locally, except 3 test_mcp.py tests that fail the same way on origin/main (missing mcp module in this environment).
  • check_spec_freshness: clean.
  • Commit hook review (codex gpt-6-astra-high): APPROVE at iteration 1.

🤖 Generated with Claude Code

With the publisher as the only thing that merges knowledge PRs, and its
local gate checking the exact merge result, the repository-side machinery
of v7 has no job left. This removes it.

- Deleted: the kb-gate workflow, the .github/kb-gate/ verifier bundle and
  tools/build_kb_gate_bundle.py (plus its CI check), .github/CODEOWNERS,
  and the hold list (publish_holds, verify_holds, holds_server,
  `kb holds-server`, the kb-holds signing purpose).
- The human-approved path is gone. There are no maintainer approvals, no
  kb:human-approved label and no approval_withdrawn. Verdicts are always
  auto and no longer carry review_ids/reviewers. An external PR that
  changes paths outside the governed pages is never merged: its author is
  told in the findings comment to split it.
- Outbox kinds post_verdict, enqueue, pause and update_branch are removed,
  along with their publisher actions. So are pause confirmation
  (pause_open_prs, pause_unconfirmed, resume_paused_prs, and the
  pause_unconfirmed field of `kb status`) and the v7 states
  verdict_posted, queued and paused. v7 never auto-merged in production,
  so no records need migrating.
- A pause is the new generation alone. The service signs no merge while a
  repository is paused, and the publisher refuses old-generation items both
  before running and right before merging. While paused, the service still
  follows merges, closes and reverts; after resume, the same head is signed
  again. `kb pause`/`kb resume` only change the ledger and the signed
  control record.
- gate_verifier keeps only verify_change and the tree checks the local
  gate uses. The vendoring import fallbacks in l1/ops are removed.
- The publisher refuses a companion PR before looking at the verdict. It
  never readies or merges a draft PR (a transient refusal).

Docs: the feature doc and the kb_service/knowledge_service SPECs describe
v8 only, and a new SPEC section lists what was removed.

Tests: test_kb_local_gate_verifier.py replaces test_kb_gate_verifier.py
and runs the same adversarial cases through the local gate. A pause stops
merges without touching the PR, and a resumed PR is signed again and
merged. Draft PRs are never merged. A failed close is retried, not
acknowledged. Paths outside the governed pages are never merged, whatever
the labels. test_kb_pause_confirm.py and test_kb_holds_server.py are
removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 29, 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-09-29T07:07:15.326213Z 0f41854 PR opened
ℹ️ 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.

Their sources changed in the v7 removal (vendoring fallbacks and wording
only); the pages needed no content change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tzhouam
tzhouam merged commit a905d3e into main Sep 29, 2026
5 checks passed
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.

1 participant