Skip to content

fix(mcp): apply live tool policy and rate limit changes - #68

Open
BigDataDZ wants to merge 16 commits into
xiaour:mainfrom
BigDataDZ:codex/oct25-mcp-runtime-policy
Open

BigDataDZ wants to merge 16 commits into
xiaour:mainfrom
BigDataDZ:codex/oct25-mcp-runtime-policy

Conversation

@BigDataDZ

@BigDataDZ BigDataDZ commented Oct 25, 2026 •

Copy link
Copy Markdown
Collaborator

MCP captured its tool registration config when creating a transport manager and only rebuilt it when sessionMode changed. Lowering mode or disabling a tool therefore left existing registrations active, even for new clients. The token bucket also retained its initial rate settings indefinitely.

Track manager policy by mode, sorted tool overrides and session mode; close old sessions and rebuild registration when that policy changes. Recreate the limiter when rpm/burst changes and preserve consumed tokens while its settings remain stable. Extract lifecycle management into runtimePolicy.js while preserving per-request authentication, Origin and theme scope checks; index shrinks from 93 to 56 lines.

Five HTTP regressions failed on the previous implementation. Actual SDK clients cover stateful/stateless mode and tool changes, denial for stale clients and restoration for new clients, including async-only storage. Additional authenticated HTTP tests cover burst tightening/expansion, stable consumed tokens and changed refill rate. Focused runtime 6/6; stacked full suite 757 passed, 15 skipped, 0 failed; eval fixtures 14/14 (two judge results pending). Architecture retains 30 existing errors; no upward baselines. Includes #67 and validated prerequisites. Policy changes invalidate existing MCP sessions; clients must reconnect. Independent review approved. Native MySQL persistence acceptance, PostgreSQL/browser acceptance and both Docker configurations passed in CI. The online unit step passed; the job remains red at the existing architecture guard and online eval is skipped.

本次邮件/审阅反馈核查后的更新:已合入当前main e19d784,解决上游合并#49–#54后产生的config/size-baseline.json冲突。冲突处理逐项取较低值,未提高任何已有基线;业务代码由Git自动合入。
当前head:bee2c440409dcef29807e63f4ece0dbd8c28dbbe。本地定向验证:ℹ tests 64; ℹ pass 62; ℹ fail 0; ℹ skipped 2。跳过项未计为通过。远端CI已重新触发,结果以最新Checks为准,规模门禁尚未宣称全绿。

已再次对齐新发布的main5385ed3(V1.2.0/#76)。逐项保留较低基线,并修复上游基线JSON漏逗号(独立修复#77);未提高已有数值。当前head:35b920cdb67765914e724c4fdbd8903063312b44。本地定向验证:ℹ tests 47; ℹ pass 46; ℹ fail 0; ℹ skipped 1。跳过项未计为通过。
新主分支全量诊断本身有5个失败;此前零失败结果不再代表当前上游。完整CI以最新Checks为准,未宣称全绿。

BigDataDZ added a commit to BigDataDZ/yolo-data that referenced this pull request Oct 26, 2026
BigDataDZ added a commit to BigDataDZ/yolo-data that referenced this pull request Oct 26, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant