Skip to content

docs(engine): document the nine governor primitives in the package README - #5851

Merged
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
real-venus:feat/loopover-engine-governor-readme
Jul 14, 2026
Merged

docs(engine): document the nine governor primitives in the package README#5851
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
real-venus:feat/loopover-engine-governor-readme

Conversation

@real-venus

Copy link
Copy Markdown
Contributor

Summary

packages/loopover-engine/src/governor/ holds nine fully-implemented, pure, side-effect-free decision calculators (~70 exported symbols, wired wholesale through the barrel), but the README had no narrative for any of them — the only governor heading, ## Governor ledger, documents the append-only storage contract, not these decision modules (#5817).

This adds a ## Governor primitives section giving each of the nine modules a concise one-paragraph summary — what it decides, its key exported functions/types, and a pointer to the source file — mirroring the README's existing "Metadata opportunity signals" bullet-list style (discoverability, not per-function API docs):

  • rate-limit.ts, budget-cap.ts, self-plagiarism.ts, reputation-throttle.ts, write-rate-limit.ts, run-halt.ts, kill-switch.ts, action-mode.ts
  • chokepoint.ts — how it composes the other eight into one GovernorDecision under its "safest wins" precedence ladder (global kill-switch > per-repo pause > dry-run > rate-limit > budget/turn/termination cap > non-convergence > self-reputation throttle > self-plagiarism > allow), fail-closed on any throwing stage.

It cross-links the existing "Governor ledger" section so a reader sees how the decision calculators and the storage contract relate.

Scope

Validation

  • git diff --check
  • Accuracy verified: every one of the 44 functions/types/consts cited in the new section was confirmed to exist as an export in the corresponding src/governor/*.ts file, and the documented chokepoint precedence order matches chokepoint.ts's own header comment verbatim.
  • npm run docs:drift-check — passes (unaffected; the new section is additive narrative, not a flag/command/settings surface the drift check tracks).
  • Rebased onto the latest main immediately before pushing — no base conflict.

Docs-only change to packages/loopover-engine/README.md — outside codecov.yml's coverage.include (which measures src/**, packages/loopover-engine/src/**, packages/loopover-miner/lib/**, not *.md), so no Codecov patch gate applies. No src/** code changed, so nothing new to unit-test.

If any required check was skipped, explain why:

  • actionlint, typecheck, test:workers, ui:*, npm audit were not run — this changes only a Markdown file; there is no code, workflow, worker, UI, or dependency surface. The full npm run test:ci runs them on CI.

Safety

  • No secrets, wallet details, hotkeys, coldkeys, PATs, private keys, raw trust scores, private rankings, or private maintainer evidence exposed. This documents already-public exported symbols; it adds no new behavior and reveals nothing not already in the source and barrel exports.
  • Public GitHub text stays sanitized and low-noise.
  • Public docs updated; no changelog edited.

Auth/CORS/session, API/OpenAPI/MCP, and UI safety boxes are not applicable.

…ADME

Add a '## Governor primitives' section to packages/loopover-engine/README.md
covering the nine pure decision calculators in src/governor/ (rate-limit,
budget-cap, self-plagiarism, reputation-throttle, write-rate-limit, run-halt,
kill-switch, action-mode, chokepoint) — ~70 exported symbols that previously had
no README narrative. Each module gets a one-paragraph summary with its key
exported functions/types and a pointer to its source file, plus how chokepoint
composes the other eight under its 'safest wins' precedence ladder. Cross-links
the existing 'Governor ledger' section so a reader sees how the decision
calculators and the append-only storage contract relate.

Closes JSONbored#5817
@real-venus
real-venus requested a review from JSONbored as a code owner July 14, 2026 19:38
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@loopover-orb loopover-orb Bot added the gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. label Jul 14, 2026
@loopover-orb

loopover-orb Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Tip

🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩

✅ LoopOver review result - approve/merge recommended

Review updated: 2026-07-14 19:41:14 UTC

1 file · 1 AI reviewer · no blockers · readiness 100/100 · CI green · clean

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This is a pure documentation addition — a new "Governor primitives" section in the README summarizing nine decision-calculator modules in `src/governor/`, cross-linked to the existing "Governor ledger" section. The diff is additive (+48/-0), docs-only, and the PR author claims all 44 cited symbols and the chokepoint precedence order were verified against source, which I cannot independently confirm but has no red flags in the diff itself. It closes the linked issue #5817 and follows the README's existing bullet-list narrative style.

Nits — 5 non-blocking
  • The long-file size smell flagged (675 lines, threshold 400) is a pre-existing condition of the README, not something this diff should be expected to fix, but a future split into per-topic docs may be worth considering.
  • The claim that every cited function/type is a confirmed export and the precedence ladder matches `chokepoint.ts` verbatim is unverifiable from the diff alone — worth a spot-check by a maintainer with source access.
  • Consider adding a one-line table of contents entry or anchor link near the top of the README for the new "Governor primitives" section, consistent with how "Governor ledger" is presumably linked elsewhere.
  • If the README continues to grow, consider splitting governor-related docs into a `src/governor/README.md` and linking from the top-level README, especially given the flagged file length.
  • Diff looks like trivial or whitespace-only churn — Reduce whitespace-only or formatting-only churn and keep the diff focused on substantive changes.
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ Linked #5817
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (1 linked issue).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 112 registered-repo PR(s), 59 merged, 17 issue(s).
Contributor context ✅ Confirmed Gittensor contributor real-venus; Gittensor profile; 112 PR(s), 17 issue(s).
Gate result ✅ Passing No configured blocker found.
Improvement ⚠️ ℹ️ Insufficient signal risk: low · value: insufficient-signal — Nothing measurable for the structural-improvement analyzers on this PR (e.g. no code files changed). LLM value judgment: moderate — The change closes a documentation gap for nine previously-undocumented, non-trivial decision modules and is well-targeted, additive, and scoped strictly to narrative docs with no code touched.
Linked issue satisfaction

Addressed
The PR adds a '## Governor primitives' README section covering all nine governor/*.ts modules with per-module summaries, key exported types/functions, and file pointers, matching the requested bullet-list style; it also explains chokepoint.ts's 'safest wins' composition ladder and cross-references the existing 'Governor ledger' section as required.

Review context
  • Author: real-venus
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: TypeScript, JavaScript, Python, Rust, CSS, MDX, Svelte, Swift
  • Official Gittensor activity: 112 PR(s), 17 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Keep the PR focused and include validation evidence before maintainer review.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.
[BETA] Chat with Gittensory

Ask Gittensory a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.

  • @gittensory ask <question> answers contribution-quality Q&A with source citations and freshness.
  • @gittensory chat <question> answers in natural prose from cached decision-pack facts via local inference (maintainer/collaborator; read-only).
  • A plain-language @gittensory mention with a real question is routed to the closest matching read-only command automatically -- no exact syntax required.

Full command reference: https://gittensory.aethereal.dev/docs/gittensory-commands

🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed


💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →.

Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.

  • Re-run LoopOver review

@loopover-orb loopover-orb Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Gittensory approves — the gate is satisfied and CI is green.

@loopover-orb
loopover-orb Bot merged commit 08d7049 into JSONbored:main Jul 14, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs(engine): add a Governor primitives README section (9 undocumented modules)

1 participant