Skip to content

docs(engine): add a README section for tenant-quota.ts #5815

Description

@JSONbored

Context

packages/loopover-engine/src/tenant-quota.ts (landed via PR #5801, closing issue #4796) is a fully-implemented, pure per-tenant resource-quota evaluator — given a tenant's metered usage and allocation, it decides whether the tenant is within quota and, if not, which dimension (compute | time | concurrency) was exhausted plus a user-facing reason. It exports TenantQuota, TenantUsage, QuotaDimension, TenantQuotaDecision, and the evaluator function, all re-exported through src/index.ts, and it already has thorough module + per-field TSDoc.

packages/loopover-engine/README.md has zero mention of it — confirmed via grep -ic "tenant-quota\|TenantQuota" over the current README, both zero. Every other similarly-scoped pure module in the package (rate-limit, budget-cap, plan-status helpers, opportunity-competition, etc.) gets its own README section; this one doesn't, despite being the newest addition to the barrel as of this writing.

Requirements

  • Add a ## Tenant quota (or similarly-named) section to packages/loopover-engine/README.md, in the same style as neighboring sections: what the module decides (allowed/blocked + exhausted dimension + reason), the shape of TenantQuota/TenantUsage/TenantQuotaDecision, and a short usage snippet showing a passing and a blocked decision.
  • Note the module's own stated scope boundary (from its header comment): it computes a decision only — it does not store usage, meter compute, or stop a loop; that enforcement wiring is separate and maintainer-owned. This mirrors how the README already flags similar boundaries for other governor-adjacent modules (e.g. "Governor ledger" section's "does not wire into live governor enforcement yet").

Deliverables

  • New ## Tenant quota README section documenting TenantQuota, TenantUsage, QuotaDimension, TenantQuotaDecision, and the evaluator function, with a usage snippet

Test Coverage Requirements

Docs-only change to packages/loopover-engine/README.md — outside coverage.include per codecov.yml (coverage is collected over src/**, packages/loopover-engine/src/**, packages/loopover-miner/lib/**, not *.md). No Codecov gate; verify the usage snippet actually compiles/runs against the current exports.

Expected Outcome

A reader of the engine package's README can find and use the tenant-quota evaluator the same way they can the package's other pure decision modules, without reading src/tenant-quota.ts directly.

Links & Resources

Metadata

Metadata

Assignees

No one assigned

    Labels

    gittensor:featureGittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.help wantedExtra attention is needed

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions