Skip to content

Sync main into next: payload validation and MCP test stability - #167

Merged
krapnikkk merged 5 commits into
nextfrom
codex/sync-main-next-163-165
Oct 15, 2026
Merged

krapnikkk merged 5 commits into
nextfrom
codex/sync-main-next-163-165

Conversation

@krapnikkk

@krapnikkk krapnikkk commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary / 变更说明

同步 main 的 #163、#165 到 next:Core 按正式契约逐字段验证事务快照;MCP 设置回提测试只复制固定 fixture 的工程文件和 settings,并复用同 schema 的输出校验器,避免重复编译导致无进展超时。

  • Affected packages:Core、Backend/MCP tests、契约生成工具和文档。
  • Change type:fix / feat / test / tooling。
  • Compatibility:同步已合并的正式行为,不发布、不修改包版本。
  • 冲突处理:代码经格式统一后三方合并;保留 next 的正式模型、数值 operationIndex 和架构文档结构;同步新增载荷校验说明;从合并模型重新生成 Core payload schema。
  • 新增生成目录 packages/core/src/uam/generated 加入 Biome 生成物排除规则;不手改生成文件。

Contract impact / 契约影响

Surface Impact
Core UAM / transaction #163 的深层载荷结构校验,保留 next 模型和诊断位置
Backend methods / capabilities / diagnostics 方法和能力不变,诊断码不新增
MCP schema / annotations / budgets 正式传输契约与预算不变;测试复用相同 schema 的真实 SDK validator
CLI JSON / exit codes 不变
Package exports / installed docs / Skill 公开入口和版本不变;语料与生成表来自正式来源

Documentation / 文档联动

  • 同步中英文架构、契约、开发、诊断与任务指引。
  • 无版本或 Release 变化,不适用双语 Changelog。
  • Reviewed impact-map documents and repository rules.
  • Generated content from canonical sources; no manual snapshot/dist/API edits.
  • Release/version checklist not applicable.

Verification / 验证证据

  • Base:next 59ec7c2;同步 main fec3075。
  • pnpm contracts:generate:41 operations / 17 methods,通过。
  • 首次 check:ci 的格式检查指出新增 Core 生成目录缺少 Biome 排除;已修正配置并从头重新执行。
  • 最终 pnpm check:ci:通过,43 项仓库测试、700 项 AVA、11/11 reference、真实 Chromium 消费者、五包安装验证、API/文档构建。文档仅有非失败的 chunk-size 提示。
  • 按计划 test: wait for idle file-session expiry instead of a fixed delay #166 在本同步合并后再更新并验证;此 PR 不提前引入 test: wait for idle file-session expiry instead of a fixed delay #166。
  • Local check:ci and remote CI 8/8 passed (run 38724276216), including Windows Node 22 and coverage.
  • No publication; release-artifact verification not applicable.

krapnikkk and others added 5 commits October 15, 2026 16:49
…ntract structure

`pnpm contracts:generate` now also emits Core's payload table
(packages/core/src/uam/generated/operation-payload-schema.ts) from the same
contract snapshot MCP validates with, without MCP transport limits. The
operation shape gate checks every snapshot payload field by field against it:
JS types, required and undeclared fields, finite numbers, fixed-length arrays,
Uint8Array, circular references and discriminated unions.

Issues name the exact field path and keep the owning domain's code
(invalid_display_node_payload, invalid_component_payload, ...); an unknown
payload kind keeps unsupported_display_node_kind / unsupported_resource_kind
and an undeclared setDisplayNodeProps field keeps
unsupported_display_node_field. New messages describe only the schema and
path, never caller values. Object-valued pageController, controllerOverrides
and selectionController on list and tree nodes now fail at preflight instead
of passing through to apply.

Container guards and normalization probes that the gate makes unreachable are
removed; #161's non-empty id checks, literal selector rules and selectedIndex
integer check stay.

Refs #156

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The pinned-fixture settings tests copied, opened, saved and reread whole
real projects (507 and 754 files) to check settings sidecars, taking
16-23 s and tripping AVA's 10 s inactivity timeout on Windows. Copy only
the project file and settings directory instead.

Every MCP client in the file also recompiled all advertised output
schemas on listTools, about a second of synchronous CPU each, so results
of concurrent tests bunched up far apart. Share compiled validators per
worker; clients still validate tool output against the advertised schemas.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…st-timing

test: keep MCP settings round-trip tests inside AVA's inactivity window
…-c2640f

feat: validate transaction snapshot payloads against the generated contract structure
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-15T11:05:56.599853Z f9f1556 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f9f1556b0c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +71 to +72
case 'any':
return true;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reject uncloneable values hidden by any nodes

When addResource or addPackage contains a generic asset whose metadata: Record<string, unknown> holds an uncloneable value such as a function, this branch accepts that value as structurally valid. Because this commit also removes the normalization guards, the subsequent structuredClone(resource.metadata) throws, so validateTransactionSupport escapes instead of returning an invalid_resource_payload/invalid_package_payload diagnostic and apply paths surface an execution_failure. Validate any nodes as cloneable JSON-compatible values or retain the normalization exception guard.

AGENTS.md reference: packages/core/AGENTS.md:L7-L7

Useful? React with 👍 / 👎.

@krapnikkk
krapnikkk merged commit 9822624 into next Oct 15, 2026
8 checks passed
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