CR-LIC-03a: HARD node-cap enforcement — the wall now bites - #237
Merged
Merged
Conversation
Public cherry-pick of private-merged #313. This is the repo whose wheel ships to PyPI, so the hard cap only reaches users once it lands here. The node-cap goes from WARN-only to a HARD block: - meter.py: NodeCapExceeded + enforcement_enabled() (ON BY DEFAULT; GRAQLE_ENFORCE_CAPS is opt-OUT only) + UsageMeter.enforce() (blocks only enforced+capped+AT_CAP+grace- elapsed; unlimited exempt; record() never raises; _store preserves cap_first_hit_at). - scan.py: PRE-WRITE gate before _write_with_lock at both chokepoints — a real block PREVENTS growth past cap (not cosmetic). Reads never blocked. Sentinel APPROVE 88% 0-BLOCKER (pass 1 caught cosmetic-enforcement, fixed via pre-write gate). 277 licensing+scan tests pass. Own version lane — NOT the concurrent 0.81.0. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
🛡️ GraQle PR Guardian💥 Blast Radius: 3 modules affected
Total blast radius: 3 🏛️ Governance Verdict
|
| Metric | Value |
|---|---|
| Blast Radius | 3 |
| Files Analyzed | 3 |
| Blocked | 0 |
| SHACL Violations | 0 |
| Verdict | WARN |
🔬 Powered by GraQle PR Guardian v0.1.0 · Scan completed 2026-07-26T21:36:45.834304+00:00
harishquantamix
approved these changes
Jul 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Public cherry-pick of private-merged #313. This is the repo whose wheel ships to PyPI, so the hard cap only reaches users once it lands here.
What
The node-cap goes from WARN-only to a HARD block:
meter.py:NodeCapExceeded+enforcement_enabled()(ON BY DEFAULT;GRAQLE_ENFORCE_CAPSopt-OUT only) +UsageMeter.enforce()(blocks only enforced+capped+AT_CAP+grace-elapsed; unlimited exempt;record()never raises;_storepreservescap_first_hit_atacross HWM writes).scan.py: PRE-WRITE gate before_write_with_lockat both chokepoints — a real block PREVENTS growth past cap (not cosmetic). Reads never blocked.Invariants
Reads never blocked · unlimited tiers exempt · enforced ON by default · grace window · HWM + grace-stamp anti-dodge. Honest limit: local
.graqle/meter.jsonresettable by deletion (server-side accounting later).Verified
Diff vs public master is self-contained CR-LIC-03a (no unrelated drift). Both files parse; 48 enforcement + 277 licensing/scan tests pass on the public branch.
Sentinel
graq_reason pass 1 BLOCK (cosmetic-enforcement: graph written before the block) → pre-write gate fix → pass 2 APPROVE 88% 0-BLOCKER.
Scope
Own version lane — NOT the concurrent 0.81.0 release. No version/release files touched. ADR-245 records all decisions.
🤖 Generated with Claude Code