Skip to content

fix(mcp): recheck current theme authorization for workspace snapshots - #66

Closed
BigDataDZ wants to merge 12 commits into
xiaour:mainfrom
BigDataDZ:codex/oct25-mcp-snapshot-authorization
Closed

BigDataDZ wants to merge 12 commits into
xiaour:mainfrom
BigDataDZ:codex/oct25-mcp-snapshot-authorization

Conversation

@BigDataDZ

@BigDataDZ BigDataDZ commented Oct 25, 2026 •

Copy link
Copy Markdown
Collaborator

本PR的原始功能修复已进入最新main87c2966:原始修复提交已通过git merge-base --is-ancestor验证,相关核心文件及回归测试已核对。后续MCP运行时调整保留了配置缓存及Origin校验。当前PR头多出的上游同步/基线冲突处理不构成尚未合入的独立功能,因此关闭,避免重复审阅;分支与提交保留。


原始说明:
MCP get_snapshot checked artifact ownership but did not reapply the current theme grant or tenantScope. It could return a persisted preview after a user's theme query grant was revoked or when that theme was outside the current request's scope. Before projecting a snapshot, load its persisted parent workspace with the requesting user filter, require its theme, apply current tenantScope and resolve current user/theme permission. Fail closed for missing parents, invalid user IDs or resolver failures. Keep the existing owner check, preview projection and audit handling. Extract authorization/projection into snapshotAccess.js; get_snapshot shrinks to 33 lines, below its 49-line baseline. Four regressions failed before the fix. Tests use real file-backed SQLite, WorkspaceService artifacts, persisted grants, resolveAccessScope and actual SDK handlers on synchronous and async-only paths. They cover narrowed scope, revoked grants, restored authorized preview, different owners, zero user IDs and missing parents; existing preview caps remain intact. Focused 18/18; full suite 744 passed, 15 skipped, 0 failed; eval fixtures 14/14 (two judge results pending). Independent review approved. Architecture errors reduced 32 to 31; no upward baselines. Includes validated prerequisites through #64. 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. Combined with #65: 748 passed, 15 skipped, 0 failed; architecture errors reduced to 30. 本次邮件/审阅反馈核查后的更新:已合入当前main e19d784,解决上游合并#49–#54后产生的config/size-baseline.json冲突。冲突处理逐项取较低值,未提高任何已有基线;业务代码由Git自动合入。 当前head:db3f7729fab29fb10a73bfa8227a1aea223a7b44。本地定向验证:ℹ tests 51; ℹ pass 49; ℹ fail 0; ℹ skipped 2。跳过项未计为通过。远端CI已重新触发,结果以最新Checks为准,规模门禁尚未宣称全绿。 已再次对齐新发布的main5385ed3(V1.2.0/#76)。逐项保留较低基线,并修复上游基线JSON漏逗号(独立修复#77);未提高已有数值。当前head:68f7d85f8d9754eea72bc9169251dc68f2ba42bf。本地定向验证:ℹ tests 34; ℹ pass 33; ℹ 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
@BigDataDZ BigDataDZ closed this Oct 27, 2026
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