Repository navigation
feat(OMN-16589): org-wide KB doc gate — block new/regrown non-KB markdown - #2047
Conversation
…down Adds scripts/kb_doc_gate.py (stdlib-only, evaluated against the diff, no repo inventory needed): FAILs on a changed .md file that is (a) new and not exempt, or (b) modified in place, not exempt, not the repo-root README.md, and past the STUB_LINE_CAP (strict mode only). Renames/deletions always allowed. Per-repo exemptions/mode via .kb-doc-gate.yaml (additive globs + optional mode; config-file mode wins over --mode). Ships as: - .pre-commit-hooks.yaml — exports the `kb-doc-gate` hook (language: script, same idiom as omnibase_core/onex_change_control's exported hooks) for consuming repos to reference via `repo: .../omniclaude`. - .github/workflows/kb-doc-gate-reusable.yml — workflow_call reusable, mirrors deploy-gate-reusable.yml's checkout + sparse-checkout-validator pattern; NOT wired as required anywhere by this change. Supersedes wiring the knowledge-base-hosted, manifest-driven docs-drift-guard-reusable.yml into product repos per operator direction (2026-08-26): that guard depends on a live manifest fetch from knowledge-base@main at run time and only covers repos with existing migrated-doc rows; this gate needs neither. 41 new tests (unit evaluate()/load_config()/glob-matcher coverage + 12 e2e tests against real tmp git repos proving --staged and --base-ref/--head-ref git plumbing, rename detection, and config-vs-CLI mode precedence). OMN-16589 Evidence-Ticket: OMN-16589
|
Warning Review limit reachedNext included review available in 13 minutes. View limit detailsLimit details: You’ve used the included review currently available. Your 124 included PR review attempts over the past 7 days set your current allowance at 1 review per hour. Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. Review configuration: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
Comment |
…iclaude#2047 (#7178) * evidence(OMN-16589): author OCC companion for OmniNode-ai/omniclaude#2047 OCC companion by node_pr_lifecycle_fix_effect (OMN-13317 F1 / OMN-13990 / OMN-14285). Product PR head 796c7e97b283c974b55051d4fd9916e06bb7672f. * fix(OMN-16589): add OCC self-bind receipt --------- Co-authored-by: omnimarket-bot <bot@omninode.ai> Co-authored-by: jonahgabriel <jonah@omninode.ai>
|
| Verdict | Meaning | Blocks merge? |
|---|---|---|
passed |
No critical/error findings | No |
blocked |
CRITICAL or ERROR findings found | Yes |
degraded |
Reviewer ran but every model failed mid-run | No (pilot) |
infra_error |
cli_review failed to run at all (install/crash) after 2 attempts | Yes |
Powered by omniintelligence.review_pairing.cli_review — node-based adversarial review via HandlerLlmCliSubprocess (OMN-8524)
What
Adds
scripts/kb_doc_gate.py(stdlib-only, evaluated against the diff — no repo inventory needed): FAILs on a changed.mdfile that is (a) new and not exempt, or (b) modified in place, not exempt, not the repo-rootREADME.md, and past the stub-size cap (30 lines, strict mode only). Renames/deletions always allowed. Per-repo exemptions/mode via.kb-doc-gate.yaml(additive globs + optionalmode; config-file mode wins over--mode).Ships as:
.pre-commit-hooks.yaml— exports thekb-doc-gatehook (language: script, same idiom as omnibase_core/onex_change_control's exported hooks) for consuming repos to reference viarepo: https://github.com/OmniNode-ai/omniclaude..github/workflows/kb-doc-gate-reusable.yml—workflow_callreusable, mirrorsdeploy-gate-reusable.yml's checkout + sparse-checkout-validator pattern. Not wired as required anywhere by this change.Why
Operator direction (2026-08-26), verbatim: "all we need is a hook that stops new MD docs from getting created in non kb repos" + two ratified amendments: (1) non-README
.mdmust also stay stub-sized (blocks regrowth-by-edit of an existing pointer stub); (2) functional markdown (plugin skills/agents/commands/rules, CLAUDE.md, README.md, community-health files,.github/templates, test fixtures) is exempt.This supersedes wiring the knowledge-base-hosted, manifest-driven
docs-drift-guard-reusable.ymlinto product repos: that guard depends on a live manifest fetch fromknowledge-base@mainat run time (single point of failure fanning out to every wired repo) and only covers repos with existing migrated-doc rows. This gate needs neither — it evaluates the diff directly.Testing
41 new tests (
tests/scripts/test_kb_doc_gate.py): unit coverage ofevaluate()/load_config()/ the glob matcher, plus 12 end-to-end tests against real tmp git repos proving--stagedand--base-ref/--head-refgit plumbing, rename detection, and config-vs-CLI mode precedence.uv run pytest tests/scripts/test_kb_doc_gate.py -v→ 41 passed.ruff format --check,ruff check, andmypy --strictall clean on the new script. Full local pre-commit hook chain green; governed pre-push impacted-test selector green.OMN-16589
Evidence-Ticket: OMN-16589
Evidence-Source: OCC#7178