Repository navigation
feat(adr-001 #4): extend MCP budget enforcement + phase-2 method coverage - #28
Merged
Merged
Conversation
…rage Phase-2 of item #4 promised "enforce max_complexity_class on solve handlers" — plural. handleSolve and handleSolveTrueSublinear were already wired; handleEstimateEntry was the missing peer. estimateEntry runs per-entry solver work via the same neumann/random-walk methods that handleSolve uses, so the same budget gate applies. Also extends METHOD_WORST_CASE with the phase-2A/2B primitives that landed in PRs #26 and #27, so the estimateComplexityClass tool surfaces them and budget-aware clients can refuse them at tool-list time: closure-indices SubLinear contrastive-solve-on-change Linear (Adaptive worst) solve-single-entry-neumann SubLinear contrastive-solve-on-change-sublinear SubLinear handleEstimateEntry now calls enforceComplexityBudget with the caller's `method` (default 'neumann') before any validation — matches handleSolve's gate ordering. The estimateEntry input schema gains `max_complexity_class` arg + a sibling `x-complexity` annotation so clients can see the class without making the call. Co-Authored-By: claude-flow <ruv@ruv.net>
2 of 3 tasks
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.
Summary
Phase-2 of ADR-001 item #4 promised "enforce `max_complexity_class` on solve handlers" — plural. `handleSolve` and `handleSolveTrueSublinear` were already wired; this lands the missing peer (`handleEstimateEntry`) + extends `METHOD_WORST_CASE` with the phase-2A/2B primitives shipped in PRs #26 and #27 so the `estimateComplexityClass` tool surfaces them.
What changes
Why
The "bounded-planning kernel" promise of ADR-001 phase-2 only holds if every solve handler honours the budget. estimateEntry was a hole in the gate.
Test plan
🤖 Generated with claude-flow