Skip to content

feat: complete Ling App Server and Agent Operating Model - #761

Merged
tianxiaochannel-oss88 merged 202 commits into
mainfrom
codex/ling-app-server-completion
Nov 30, 2026
Merged

tianxiaochannel-oss88 merged 202 commits into
mainfrom
codex/ling-app-server-completion

Conversation

@tianxiaochannel-oss88

@tianxiaochannel-oss88 tianxiaochannel-oss88 commented Nov 22, 2026 •

Copy link
Copy Markdown
Collaborator

结论

这是基于 origin/main@39349bea055103318757be73c8841d179c158052 的 Ling App Server 与 Agent Operating Model 完整实现 PR。当前 head 为 00d9c3e1ec41d5462c27217090fa12a8e2aea976,PR 保持 OPEN,未合并;本地分支和远端分支均已收口到该 head。代码、设计、回归和可执行的本地验收已交付,外部环境条件仍按下文明确区分。

已交付

  • 开发工作流:项目规则/AGENTS.md 与 Claude 规则加载、托管 worktree、Verify/Review/Simplify、Goal evidence、handoff、恢复和 unknown-effect 语义。
  • App Server:stdio JSONL、私有 Unix socket、loopback WS/WSS、Thread/Turn 控制、审批/用户输入、双向事件、游标回放、断线/重启恢复、权限 grant、MCP/CLI/TypeScript client。
  • Codex Host:Ling 与 Codex 双端控制视图、持续事件投影、在途 steer/interrupt/approval、重连与 delivery receipt。
  • 团队协作:Work Item、Workflow/Plan 绑定与变更、阶段简报、消息/问答/交接、审议/投票/调度、自治 intake、预算/重试/暂停/恢复闸门。
  • GitHub 交付:签名 webhook/轮询去重、候选与检查证据、queue admission、delivery/reconcile、merge-group 约束、确认离队后的安全 requeue 和回退日志;GitHub 仓库匹配按规范大小写不敏感。
  • Device Work Item Bridge:graph/node、owner host、WorkUnit/Attempt、receipt 与 unknown 阻塞的持久映射。
  • Contracts 详细设计:143-method registry 摘要;packages/contracts/src/app-server.ts 与 app-server-schema.ts 是完整参数、结果、权限和 error schema 的权威来源。

已执行验证

  • 依赖安装:corepack pnpm@10.23.0 install --frozen-lockfile --ignore-scripts 成功。
  • App Server release acceptance:75 tests,75 passed,0 failed,0 skipped(包含 v0.6.1 与 main@05cb86a41 兼容构建,以及已安装 Codex CLI)。
  • Framework Assurance:133 passed,0 failed。
  • GitHub webhook ingress:4/4;queue departure/requeue acceptance:1/1。
  • Codex host + TLS + native CLI targeted tests:3/3;另以本机已安装 Codex CLI 补跑两个原先因环境变量缺失而跳过的发行用例,2/2 通过。
  • Daemon typecheck:ci、Contracts/API Client/Core/Runner-Pi typecheck:通过。
  • check:docs:597 个 Markdown 链接通过;check:licenses:1287 个依赖版本通过;check:public:7891 个文件无高置信 secrets/本机路径;git diff --check:通过。
  • CPA gpt-5.6-terra 完成一次真实只读 Ling App Server Turn,确认规则来源、事件终态、Run/Turn succeeded 及 Daemon 重启后的 replay;没有执行真实写入任务。
  • 当前 head 的远端 CI 为 32/32 success(含 Required CI lanes、Core/Daemon/Linux 分片、CodeQL、macOS/Windows 与离线 assurance)。现有 review threads 已全部 resolved。

GitHub 外部验收边界

测试仓库:ling-stack-org/ling-delivery-acceptance-20261123

  • PR Add media job execution interface #3 已合并,合并组对账通过。
  • PR Add media job foundation #2 仍 OPEN、未合并。此前一轮 merge-group check 曾成功,但队列条目在 Gate Check 写入前被移出。
  • 2026-11-29 的授权 GitHub App 重入队尝试返回 unknown;Daemon 重启后仍为 unknown,provider 观察到未入队、无 queue entry、无新的 merge-group 事件。GraphQL mutation 返回 FORBIDDEN / Resource not accessible by integration。因此不能标记 enqueued 或 delivered,也没有调用 merge。
  • 当前 App 权限为 checks:write、metadata:read、pull_requests:write。若要继续主动入队,需要用户另行授权仅限测试仓库的 Contents: write(必要时再评估 Merge queues: write),并重新安装/批准 App;本 PR 不把权限阻断伪装成代码成功。

仍需外部环境证据

  • 签名安装包,以及干净主机安装/升级/回滚。
  • 独立物理主机 remote WSS/TLS。
  • 三类真实 Provider 写入 Ling 自研任务;F2 真实 Provider + 隔离 worktree + 其他 Runner 矩阵。
  • PR Add media job foundation #2 最终 merge observation,以及部署/升级/回退后的生产式验收。
  • Device Fabric owner-host/跨主机/硬件联合验收(依赖 PR feat(device): implement Ling Device Support Platform D1-D22 #798)。
  • Office/Electron/OS/gstack 平台资源预检。

这些是发布/现场条件,不是本地代码失败;对应状态已写入实施计划和治理状态。

tianxiaochannel-oss88 and others added 27 commits November 22, 2026 12:10
@tianxiaochannel-oss88
tianxiaochannel-oss88 marked this pull request as ready for review November 22, 2026 14:05
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-30T22:59:40.879923Z d193aa4 New commits
🔒 Security Review ✅ Completed 2026-11-30T23:43:58.381174Z e1f47df New commits
ℹ️ 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: 6a492db714

ℹ️ 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".

@tianxiaochannel-oss88

Copy link
Copy Markdown
Collaborator Author

追加验证与审查收口(2026-11-28)

  • 当前 head 05bf4c64cc93d7c8d94fb8315c850c1a5b303464 的 app-server-release-acceptance.test.ts 完整套件:71 passed、4 skipped(既有环境条件)、0 failed。
  • 覆盖协调检查点关闭后重启只评估一次、发布新协调轮次重新唤醒 decision worker、native intake workspace 隔离、设备回执投影修复、stage grant 传递和 Codex turn/steer retryable replay。
  • 复核线程中指出的三项问题均已在当前 head 修复,并已在 GitHub 标记 resolved;没有新增代码改动。
  • PR 的 32 项 GitHub checks 仍全部通过,工作树保持干净。PR 保持 open,等待仓库要求的正式 review。

真实 Provider、GitHub App private key/check-run 写回、Device Fabric owner-host、独立物理主机 WSS、Developer ID clean-machine 安装和正式发布入口仍属于环境验收,未用本地 fixture 冒充完成。

@tianxiaochannel-oss88

Copy link
Copy Markdown
Collaborator Author

GitHub App 状态核对

  • Ling Delivery Acceptance Gate 已存在,App ID 5938749。
  • 当前公开 App 元数据显示权限为 checks: write、metadata: read,未声明额外事件订阅。
  • 组织安装记录存在:安装 ID 186171483,repository_selection=selected。
  • 当前 GitHub 安装管理页要求 sudo 一次性验证码;完成后再核对 selected repository 是否仅为 ling-delivery-acceptance-20261123,并执行主动入队写回验收。

@tianxiaochannel-oss88

Copy link
Copy Markdown
Collaborator Author

T01 试点前置预检更新

在当前候选工作树用独立外部资源根重新运行 scripts/framework-assurance/index.mjs trial-preflight:

  • 状态:ready-for-review
  • 任务:f3b-t01-review,T01 v5,manifest digest e018146a53e185acca5bc23ff58a671887d80508e2ba6324b98c976c1a8333b4
  • 资源根、LING_STACK_HOME、workspace、output、loopback 39123/39124 和容量检查全部通过
  • blockers:空
  • externalProviderCalls=0、ordinaryRunsDispatched=0、taskCodeExecuted=false
  • executionAuthorized=false 仍保持 fail-closed;这只是试点前置准备证据,不代表真实 Provider 已运行

@tianxiaochannel-oss88

Copy link
Copy Markdown
Collaborator Author

协议合同核对

补充核对当前 head 的 Contracts:

  • LING_APP_SERVER_METHODS 共 143 个方法,LING_APP_SERVER_METHOD_SCHEMAS 同样 143 个,缺失 0。
  • Contracts App Server schema 测试 7/7 通过,覆盖方法/通知/服务端请求校验、非法参数、恢复证据、Verify、审议和 GitHub Delivery 结果。
  • Contracts build 通过。

@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: 6a39b5c808

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread packages/cli/src/main.ts Resolved
@tianxiaochannel-oss88

Copy link
Copy Markdown
Collaborator Author

主线同步与最终 CI(2026-11-29)

  • 当前 head:6a39b5c8086fce53ae69894d1c1d2f8ba177e13d
  • 已同步 origin/main@d1c84a501c109c154a717bbf48629218eb9809e8。
  • 主线新增的 3 个 Core 测试迁移已通过本地 Core 构建、源码/测试类型检查和 13 项定向回归。
  • 同一 head 的 GitHub checks 全部通过,包括 Core 5 分片、Daemon 4 分片、Linux Daemon 6 分片、CodeQL、JavaScript/TypeScript、macOS、Windows、离线 assurance、依赖安全、Required CI lanes 和 CI timing telemetry。
  • PR 当前 open、非 draft、mergeable=true,仍等待仓库正式 review。

Copy link
Copy Markdown
Collaborator Author

当前分支复验(2026-11-29)

  • 当前 head 6a39b5c8086fce53ae69894d1c1d2f8ba177e13d 的完整 packages/daemon/test/app-server-release-acceptance.test.ts:71 passed, 4 skipped, 0 failed。
  • 覆盖 App Server 传输、Turn/审批/提问恢复、项目规则、Verify/Review、工作树与候选转移、Codex 宿主、External Agent、GitHub Intake/Delivery、Work Item 协作、审议投票、阶段交接、预算、授权边界、Unix socket、MCP、回退和重启。
  • Contracts schema 测试 7/7 通过。Contracts build、Contracts typecheck 和 Daemon 源码/测试 typecheck 通过。
  • Framework Assurance T01 当前 v5 预检为 ready-for-review,manifest digest e018146a53e185acca5bc23ff58a671887d80508e2ba6324b98c976c1a8333b4,executionAuthorized=false、externalProviderCalls=0、ordinaryRunsDispatched=0、taskCodeExecuted=false。该结果是试点前置证据,真实 Provider 仍需单独授权和 Host 运行证据。
  • 工作树保持干净。外部发布条件仍单独记录,包括 GitHub App private-key/check-run 写回、Device Fabric owner-host、独立物理主机 WSS、签名安装和真实 Provider 试点。

Copy link
Copy Markdown
Collaborator Author

Framework Assurance 离线复验(2026-11-29)

当前 head 的 node --test scripts/framework-assurance/*.test.mjs scripts/framework-assurance/*.test.ts 为 133 passed、0 failed。覆盖 Host readiness、来源和运行身份绑定、预算与取消边界、隔离资源、冻结输入、校准控制、SDK 外部消费者和 T01 trial-preflight。该套件不启动 Provider、模型、Daemon 或真实任务。

…-completion

# Conflicts:
#	docs/design/agents/ling-agent-operating-model-detailed-design.md
#	docs/design/agents/ling-agent-operating-model.md
#	docs/design/platform/ling-app-server-detailed-design.md
#	docs/design/platform/ling-app-server.md
#	docs/design/platform/plans/ling-app-server-implementation-plan.md
@tianxiaochannel-oss88 tianxiaochannel-oss88 changed the title feat: extend Ling App Server and Agent Operating Model workflows feat: complete Ling App Server and Agent Operating Model Nov 29, 2026

@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: c2285cf400

ℹ️ 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".

@tianxiaochannel-oss88
tianxiaochannel-oss88 merged commit 15ae544 into main Nov 30, 2026
56 of 58 checks passed
@tianxiaochannel-oss88
tianxiaochannel-oss88 deleted the codex/ling-app-server-completion branch November 30, 2026 23:55
tianxiaochannel-oss88 added a commit that referenced this pull request Dec 1, 2026
Record PR #761 merge status, current App Server acceptance evidence, and remaining external gates.
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