GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — mcpx: Phase 1 of #2386 — completion rate limit at the /v1 choke point (limiter + completion.* settings, before the pool) · Issue #2387 · developing-today/code

mcpx: Phase 1 of #2386 — completion rate limit at the /v1 choke point (limiter + completion.* settings, before the pool) #2387

New issue
Copy link
New issue
Copy link
Closed
Closed
mcpx: Phase 1 of #2386 — completion rate limit at the /v1 choke point (limiter + completion.* settings, before the pool)#2387
Copy link
Assignees
dezren39
Labels
app/mcpxPackage/app: mcpx (pkgs/ or apps/ in this repo)effort/mMedium: expected under 1 day of workkind/enhancementmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/normalOrdinary priority (the default)source/design-architectFiled by the repo design architect jobstatus:donetask/triageQueue packet kind: verify, reproduce, and route this item

Description

@dezren39
dezren39
opened on Oct 29, 2026
Issue body actions

Phase 1 of design #2386 (mcpx completion, finished). Design doc: files/designs/code-mcpx-completion-rate-limit-ranking.md in the keep-the-four-repos-healthy goal workspace. The decision is recorded on #2386; this phase implements its first slice.

Scope

One fixed-window, in-memory rate limiter for completion/complete, consulted in the daemon's handleComplete (pkgs/mcpx/internal/daemon/ops.go:333) after shape validation and before any pool lookup/acquisition — a refused request must never acquire a pool lease or wake an upstream.

  • Keys: per (caller, server) and per server. Caller = the identity handleComplete already resolves (callContext(r, req.Context, req.Session), internal/daemon/server.go:836); server = the configured name in req.Server, never anything self-reported.
  • Hot settings in the existing completion.* namespace (beside completion.maxValues, internal/settings/wire.go:185): completion.perMinute default 120 (per caller per server), completion.serverPerMinute default 600 (per server, all callers — the backstop that does not depend on caller honesty, since caller identity is pre-principals). 0 disables that window.
  • Count-on-admission: refusals do not consume quota (design Design: mcpx upstream question rate limits — one limiter at the client choke point, keyed by the configured server #2333's recorded rule for the sibling limiter).
  • Refusal: /v1/complete answers HTTP 429 with an error naming the limit; the MCP surface inherits it through mcpBackend.Complete → Server.complete as a named -32603. No new error code.
  • The limiter is a small daemon-internal type, NOT completion-shaped in its interface (key + limit in, verdict out), so design design(mcpx): tasks, finished — one task store for MCP and /v1, and a client that can call task-required tools #1554's tasks-rate-limit question can reuse it later. No new dependency (no limiter exists in-tree; fixed windows per Design: mcpx upstream question rate limits — one limiter at the client choke point, keyed by the configured server #2333's precedent).

Acceptance

  • A completion flood from one caller against one server is refused with 429 (named limit) once completion.perMinute is exceeded in a window, while a second caller against the same server is still served until the per-server window trips
  • Handler test proves a refused request never reaches the pool (no lease, no upstream call)
  • Both settings are hot (change takes effect without restart) and 0 disables
  • The MCP surface shows the refusal as a named -32603 mentioning the completion rate limit
  • Limiter unit tests cover window rollover, count-on-admission (refusals don't consume), and per-key independence
  • Tests run via CI per fleet policy (no builds on the sandbox)

Out of scope: ranking (Phase 2), register changes (Phase 3), any change to upstream pass-through or to completion.maxValues semantics.

Activity

Next
  1. dezren39
    added
    task/triageQueue packet kind: verify, reproduce, and route this item
    priority/normalOrdinary priority (the default)
    queue/queuedHas a queued queue task
    app/mcpxPackage/app: mcpx (pkgs/ or apps/ in this repo)
    effort/mMedium: expected under 1 day of work
    kind/enhancement
    on Oct 29, 2026
  2. developing-today commented on Oct 29, 2026

    @developing-today
    developing-todayBot
    on Oct 29, 2026 – with developing.today
    Contributor
    More actions

    CODE-1214

  3. dezren39
    added
    source/design-architectFiled by the repo design architect job
    on Oct 29, 2026
  4. dezren39
    added a parent issue on Oct 29, 2026
    • design(mcpx): completion, finished — one rate limit at the /v1 choke point, relevance-ranked local answers #2386
  5. dezren39 commented on Oct 29, 2026

    @dezren39
    dezren39
    on Oct 29, 2026
    MemberAuthor
    More actions

    🤖 Agent note · filed by design architect

    • Agent: design architect (repo-design-architect-code), pass 15, 2026-10-29
    • Task: Phase 1 of design design(mcpx): completion, finished — one rate limit at the /v1 choke point, relevance-ranked local answers #2386 — completion rate limit at the /v1 choke point
    • Expectation: Triage confirms the scope against current main and enqueues the implementation follow-up; the decision (choke point = daemon handleComplete before pool acquisition, fixed windows, completion.perMinute 120 / completion.serverPerMinute 600, count-on-admission, 429 / named -32603) is recorded on design(mcpx): completion, finished — one rate limit at the /v1 choke point, relevance-ranked local answers #2386 and in the design doc — do not re-litigate it in triage; flag genuine blockers on design(mcpx): completion, finished — one rate limit at the /v1 choke point, relevance-ranked local answers #2386 instead. This phase's triage packet is enqueued in repo-health-code-pilot by the architect.
  6. dezren39
    added
    meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added
    on Oct 29, 2026
  7. dezren39 commented on Oct 29, 2026

    @dezren39
    dezren39
    on Oct 29, 2026
    MemberAuthor
    More actions

    Intake review

    Related: #2386 (design), #2388 (Phase 2, independent), #2389 (Phase 3), #2333 (sibling limiter — count-on-admission rule)

    Notes: Phase 1 of the #2386 design: one fixed-window in-memory limiter for completion/complete at the /v1 choke point (handleComplete, ops.go:333), consulted before any pool acquisition. The body carries a full ## Acceptance checklist, so this pass is labels-only.

    Risks: A limiter consulted after pool acquisition would not bound the cost it exists to bound (upstream wakeups); caller identity is pre-principals, so the per-server backstop window is the honest bound.

    Suggested approach: Add the limiter + completion.* hot settings (wire.go:185 namespace), wire it into handleComplete after shape validation, and pin the 429 / count-on-admission behaviour in tests via CI.

    🤖 Agent note · filed

    • Agent: fleet monitor (repo-fleet-monitor)
    • Session / ID: repo-fleet-monitor run 2026-10-29T18:12Z (13:12 CDT)
    • Found via: monitor reconciliation
    • Task: Duty 2 intake enrichment — labels normalized and meta/enriched applied; acceptance criteria appended to the body only where no acceptance section existed (original body preserved verbatim above it). Still-live check this pass: no merged PR or fix commit explicitly resolving this issue was found in this pass's search.
    • Expectation: see the effort label; done = the acceptance criteria are met.
    • Links: this issue
  8. github-actions
    assigned
    dezren39
    on Oct 29, 2026
  9. dezren39
    added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    on Oct 30, 2026
  10. 40 remaining items

  11. dezren39
    added
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    status/in-progressQueue worker lifecycle state
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Nov 1, 2026
  12. dezren39 commented on Nov 1, 2026

    @dezren39
    dezren39
    on Nov 1, 2026
    MemberAuthor
    More actions

    🤖 Agent note · picked up

    • Agent: queue worker lane A (repo-worker-code)
    • Session / ID: queue task 5604, lane A shift 2026-11-01
    • Found via: queue claim (resume of awaiting_ci shepherd)
    • Task: PR 3730 disposition: Codex round on head a406c49 reports has_unresolved_findings=false (the canonicalization P2 was fixed by lane B with a regression test; I have resolved the thread). CI failures (lint/stress/docs-history) trace to pre-existing main breakage — the mcpx workflow is failing on main itself (runs 41313636478, 41313220574, 41313041297) since the mcpx(daemon): /v1/complete never applies the 100-value spec cap — local fallback honors an unclamped completion.maxValues (0 = unlimited), upstream replies pass through verbatim #2878 Complete-signature change (6cba232) left the conformance fake stale; PR 3730's diff touches none of those files. Plan: merge current main into the branch, run the daemon package tests targeted on the laptop, and merge if the change itself is sound.
    • Expectation: effort s; done = PR 3730 merged, mcpx: Phase 1 of #2386 — completion rate limit at the /v1 choke point (limiter + completion.* settings, before the pool) #2387 closed, task completed fixed_merged — or parked with the exact blocker.
    • Links: PR feat(mcpx): completion rate limit at the /v1 choke point (#2387) #3730
  13. dezren39
    added 2 commits that reference this issue on Nov 1, 2026

    mcpx/settings: deliberate EffectExemptionPin raise 188 -> 190 for com…

    7b30a33

    Merge pull request #3730 from developing-today/queue/5604-2387-comple…

    e49c0be
  14. dezren39 commented on Nov 1, 2026

    @dezren39
    dezren39
    on Nov 1, 2026
    MemberAuthor
    More actions

    🤖 Agent note · done

    • Agent: queue worker lane A (repo-worker-code)
    • Session / ID: queue task 5604, lane A shift 2026-11-01
    • Found via: queue claim (resume of awaiting_ci shepherd)
    • Task: PR 3730 MERGED (merge commit e49c0be). Disposition this shift: Codex canonicalization P2 verified fixed by lane B's follow-up (Codex state on the head: has_unresolved_findings=false; thread resolved); branch brought current with main (4d8e228); the one PR-caused CI-side failure — TestEffectExemptionsOnlyShrink, exemptions 190 > pin 188 from this PR's two completion.* settings — fixed by the sanctioned deliberate pin raise to 190 with the reason recorded on the PR and in effect.go (7b30a33). Verified on the laptop: daemon rate-limit + canonicalization tests pass, TestEffectExemptionsOnlyShrink passes. The remaining red (lint vet conformance fake, stress, docs-history, five settings doc/env tests) fails identically on clean main — the mcpx workflow is red on main itself since the mcpx(daemon): /v1/complete never applies the 100-value spec cap — local fallback honors an unclamped completion.maxValues (0 = unlimited), upstream replies pass through verbatim #2878 Complete-signature change (6cba232) — pre-existing breakage, not this PR; it needs its own fix on main.
    • Expectation: done — closing this issue as the implementation is merged.
    • Links: PR feat(mcpx): completion rate limit at the /v1 choke point (#2387) #3730 · merge e49c0be
  15. dezren39
    closed this as completedon Nov 1, 2026
  16. dezren39
    removed
    status:in-review
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 1, 2026
  17. developing-today
    added
    status:done
    on Nov 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @dezren39
    dezren39

Labels

app/mcpxPackage/app: mcpx (pkgs/ or apps/ in this repo)effort/mMedium: expected under 1 day of workkind/enhancementmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/normalOrdinary priority (the default)source/design-architectFiled by the repo design architect jobstatus:donetask/triageQueue packet kind: verify, reproduce, and route this item

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.