Skip to content

Preserve execution context and verify approved custom Project roles - #2208

Merged
zy95-12 merged 14 commits into
delivery/ai-centric-development-servicefrom
feat/2184-execution-lifecycle
Nov 3, 2026
Merged

zy95-12 merged 14 commits into
delivery/ai-centric-development-servicefrom
feat/2184-execution-lifecycle

Conversation

@zy95-12

@zy95-12 zy95-12 commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

Written-by: Codex

Preserve exact Task-role context across Attempts and stop execution when current authority is revoked. Stable role snapshots retain persona/Skills/model while committed catalog, human delegation, Harness and Resource permissions constrain use. The latest SDK/native binding is authoritative; incompatible or unknown recovery fails visibly instead of selecting an older thread or silently starting fresh. Approved custom logical roles inherit their pinned capability conventions and artifact responsibilities.

Native execution uses committed activation, exact physical Session/parts, current carrier/host-epoch gates and registered-work quiescence. The pool adapter and Resource service share exit proof: Bot/PID absence is insufficient. Prior-host recovery reuses verified systemd invocation/control-group facts with binding checks before/after inspection; unmanaged exit remains held. Context recovery and capacity release remain separate.

In-flight checks reuse native pre-step, SDK start/input and the existing scheduler. The original pool stop fences the exact revoked claim before release; current role/resource grants, operator disable and removed Harness support stop execution cooperatively. Retired roles can finish only their retained active claim. SDK stop requires acknowledgement plus process exit; native stop drains known parts/subagent work. No new executor/timer or public identity system.

Refs #2184. Base: updated #2183 branch. Remain Draft while descendant parent-Task/API integration and real-provider full custom-role acceptance are completed. No main merge, deployment, control-plane/frontend change or independent Reviewer verdict.

Validation at 29f0e02:

  • Full TZ=UTC npm run verify: 4,588 passed, 0 failed/skipped; includes five actual DSH runtime cases with deterministic inference. Only test-child DAC capabilities are dropped for existing chmod tests under root.
  • Authority selection: 85 passed; new shared helper 100% executable lines, 87.10% branches, 100% functions. Alternate error combinations remain uncovered. Earlier exit selection31 passed at3f7fe22eb: exit helper100% lines/88.24% branches, native99.50% lines/88.74% branches; pure metadata callback not unit-covered.
  • Real subprocess fixtures prove revoked prepared SDK work receives no start; live role-grant and operator revocation wait for actual stop acknowledgement/process exit before releasing resources. These are deterministic worker fixtures, not vendor inference.
  • Actual DSH single-resource Dev → Tester return → original Dev → Tester → Chief inbox preserves prior-only conversation, physical Session/cwd, fresh carriers, two actual code revisions, host tests and nonoverlapping leases. This probe does not claim Review/forge publication or Chief closure. The separate delivery probe covers Reviewer artifacts and missing GitHub credential refusal.
  • Failed adapter/binding/authority/scheduler regressions retained. Composition self-check caught historical-carrier lookup and sender-after-await defects; the actual DSH return test also reproduced the former before correction. Existing tests and timeouts were preserved.
  • Separate earlier real Codex two-worker continuation probe at context-runtime a9ff63b passed nine checks; it is not a real-provider full workflow validation of this head.
  • Long-term memory, architecture/subsystem ownership, original changelog and canonical mirrors updated. Completed historical memory archived verbatim; mandatory 384k policy budget unchanged. Pairing self-check complete; no independent Review PASS.

Not run: production restart/rollout, real manager restart acceptance (manager observations are injected), real-provider complete native/custom-role Task loop. Unknown exit remains visible held state.

zy95-12 commented Nov 2, 2026

Copy link
Copy Markdown
Collaborator Author

Written-by: Codex

补充真实 SDK 验证(区别于单测替身):在后续 #2177 runtime a9ff63b 上,用当前机器已选择的 Codex gpt-6.1-sol profile,在隔离样例仓库完成两轮真实代码修复。第二轮新 worker 在 caller prompt 已变化、注入自己持久化工作摘要的条件下,恢复与首轮完全相同的 backend Session,并找回只在首轮对话出现、没有写入仓库的随机标记;两轮独立 host Node 测试均通过,两轮均确认 stop 与进程退出后才释放 lease。共9项断言通过,报告按 runtime source hash 归档。

该验证覆盖本 PR 的真实 SDK 续接基础及 #2177 摘要配合;不是整个 Chief/角色池自动化验收,也不是 native Harness 物理 Session 恢复。原生恢复与其他剩余验收仍开放。没有重启生产服务或修改前端任务。

@github-actions github-actions Bot added the risk:T3 Risk tier T3 (needs a human approval), set by the controller from the diff label Nov 2, 2026
Keep Chief proposals separate from Maintainer and Owner approval. Preserve retired role context and room history without reassigning existing Tasks or inferring worker exit.
Keep exact latest Task-role native bindings and context parts, refuse unknown exit and missing handles, and use committed role catalogs when pinning execution rights. Preserve original Workflow lifecycle and legacy DAG workspace behavior.
Keep logical identity separate from artifact responsibility and SDK read-only policy. Preserve retired active claims while blocking new work until Chief selects an active target.

zy95-12 commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator Author

Written-by: Codex

原分支已推进到 f404153:新增自定义角色的实际产物控制链路,logical role 保持 Session/Workspace/lease 身份,policyRole 决定完整约定、产物职责和 SDK readOnly。implementer/validator/auditor 回归实际修改 Git、宿主跑测试并形成候选 Review(发布器为明确标注的fixture);SDK子进程验证自定义Developer可写、Reviewer只读。退役角色可完成已有冻结claim,新派活退役角色会阻塞并明确交Chief选目标。新版本v7/pools-v4,旧记录默认行为保留,失败准备不覆盖产物责任人。

当前全量4558通过/0失败/0跳过(实际DSH4项使用确定性模型),覆盖率所选124项通过,触及模块行87.70–100%、分支78.76–97.83%;不宣称全模块100%。长期记忆/子系统文档/原changelog/生成补丁同步。先前native停止证明修复也已包含。

继续同一PR补实际native池内打回续接、在途撤权和未知旧宿主恢复验收;保持Draft,无主仓合并/部署,不把contract fixture说成真实供应商全闭环。

@zy95-12 zy95-12 changed the title Preserve Task-role definitions and latest SDK context across retries Preserve execution context and verify approved custom Project roles Nov 3, 2026
Preserve structured handoff identity through native delivery and restore archived context only after committed activation. Guard the actual DSH single-resource return path and keep historical implementation evidence outside the bounded active policy.

zy95-12 commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator Author

Written-by: Codex

已推送32f7941575aa11d7828026c56887f5d716781787,全量4562通过/0失败/0跳过,实际DSH运行时回归增至5项(确定性模型)。新增一条真实池内Dev→Tester打回→原Dev→Tester→Chief收件池:新载体恢复同一物理Session/cwd、只来自旧对话的上下文标记、两次实际代码修改、宿主测试及单资源无重叠释放均验证通过;不冒充Chief关闭/真实供应商/forge发布。

该探针重现并修复了对象输入变成[object Object]导致消息去重吞回合、以及已归档Session被DSH步前门禁拦截两个真实缺口。另补native.activate Effects持久化确认,普通投递与DSH步前/启动收件箱门禁均阻止未提交、旧宿主代次、停止/只读状态下的新执行。无提交的save返回不能解锁Session,已有失败回归。

长期记忆/架构/子系统/原changelog/补丁同步。完整角色规则预算测试曾因文档增长失败,现将已完成实施详情全文归档并在PROJECT保留当前规则和链接;未提高384k上限、排除必读文档或截断规则。Native模块单位覆盖100%行/87.84%分支/95%函数,纯元数据Effects回调及部分失败组合不计为100%覆盖。

继续原issue/PR收尾旧宿主退出核对与在途撤权,保持Draft,不合并/部署、不动现有前端流程。

zy95-12 commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator Author

Written-by: Codex

原PR已推送3f7fe22eb:统一任务池与资源层的退出证明;native v2停止核对覆盖上下文分段及子代理后台工作;旧宿主恢复复用精确systemd调用代次,并校验异步核对前后的绑定。缺失Bot不能推断退出,未知作用域仍保持占用,释放旧资源不伪造可恢复上下文。实际适配器回归与异步换绑回归均保留修复前失败证据。

当前全量4572通过/0失败/0跳过,包含5项实际DSH确定性模型运行时验证。所选31项覆盖退出helper100%行/88.24%分支,native99.50%行/88.74%分支;未把管理器替身当成真实重启验收。长期记忆、子系统/架构说明、原changelog和镜像补丁同步。

继续同一分支补在途角色/资源撤权核对;成员撤权已有链路会复用,不另建执行器或定时器。仍为Draft,无主仓合并/部署。

zy95-12 commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator Author

Written-by: Codex

已推送29f0e0245,在途撤权补丁收敛到原PR:native/SDK共用当前执行授权核对;成员/角色资源授权撤销、operator禁用及Harness支持撤销都复用原pool停止与退出确认。现有调度器负责持续核对,未增加计时器/执行器。新旧载体共用物理Session时选择当前活跃载体,SDK追加输入在await后再次核对发送者;对应失败回归已保留。

本提交完整检查4588通过/0失败/0跳过,含5项实际DSH确定性模型运行时。85项针对性检查通过,新增授权helper100%行/87.10%分支;实际子进程覆盖准备后禁止启动、运行中撤权和确认退出后释放。真实供应商全角色闭环不冒充完成。

正在顺序合成后续原PR:#2175已本地合入并通过123项针对性检查,新增‘核对旧执行退出期间角色退役,不得拿到新claim’失败回归;#2177组合后130项通过。它们的当前组合完整检查尚未声称通过,继续保持Draft,不合并部署。

Base automatically changed from feat/2183-agent-auth to delivery/ai-centric-development-service November 3, 2026 09:11
Content unchanged from 29f0e02; delivery tree equals the preceding source tree. Stage-only integration authorized by Owner. Residual scope: #2292.

zy95-12 commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator Author

Owner 授权仅阶段合入 delivery/ai-centric-development-service,剩余范围转 #2292。同步祖先后的 cac1195 与原已通过 tests-ok 的源码 29f0e02 文件树完全相同。最终组合源码 d720f8c 已完整验证 4726 pass / 0 fail / 0 skip。本次不要求正式签名 Reviewer 门禁,不伪造 PASS、不修改仓库规则、不声称 enqueue-guard 通过;新 SHA CI 状态另计。#2184 将阶段归档,余项保留 #2292。不发布、不部署。

@zy95-12
zy95-12 marked this pull request as ready for review November 3, 2026 09:11
@zy95-12
zy95-12 merged commit e5146f0 into delivery/ai-centric-development-service Nov 3, 2026
1 of 5 checks passed
@zy95-12
zy95-12 deleted the feat/2184-execution-lifecycle branch November 3, 2026 09:11
zy95-12 added a commit that referenced this pull request Nov 3, 2026
…2210)

Written-by: Codex

Latest composition at 36210b9: Merged
current #2184 execution/governance into the original branch. Current
composition: 123 targeted tests + core lint passed; current full verify
NOT rerun. Added red/green regression for role retirement during
source-exit inspection, revalidating the committed target before
claiming. Original consultation/handoff semantics, pinned role context
and shared exit proof are preserved. Prior full-check counts below
belong to their explicitly named older heads, not this updated tip.
Still Draft; composed Task/state/API acceptance remains in progress. No
deployment, merge or independent Review.

Expose scoped handoff get/list views over the original Task
collaboration history, with acceptance receipts, source/target context
references, actual worker binding, initiative fences and
predecessor/successor links. Trusted offer/accept ports reuse existing
pools; replay cannot reactivate completed execution. A Chief reroute
cannot bypass an earlier writer whose exit remains unknown.

Ordinary consultation is a separate private protocol with native/v1
ask/get/list/reply APIs. Keep legacy conversation-handoff records and
Chief-question alias readable. Chief first contacts the initiating
user's active personal agent; safe answers remain private until user
publication, while watch replies use current original delegation and
Task inbox/Effects. Notifications run after commit, cancel ended
questions and defer busy native watches. External agents have isolated
mailboxes without a native personal Bot or invented provider transport.

Refs #2175; stacked on #2208. Architecture/subsystem docs, long-term
project memory, changelog and canonical source mirrors included. This
Draft keeps native Task-role restoration and real long-task/provider
acceptance on #2184/#2177; transactional storage #2182, public
events/provenance #2185 and role governance #2171 remain integration
dependencies. Do not close these issues from the scoped foundation.

Validation at439a41c0ede34f4be08b96bac0500c7c71d6d298:
- Full TZ=UTC npm run verify passed4,537 tests, zero failures/skips,
including four actual DSH runtime checks with deterministic inference.
Test child drops DAC override/read-search capabilities for existing root
permission assertions.
-168 selected tests passed under coverage. Includes actual channel HTTP
safe/watch/private-scope checks, lost accept-response replay,
source-exit fence, legacy queries, no Task creation for ordinary
questions, postcommit notification and busy/cancel cases. Initial
pool/consultation tests failed on missing APIs at the parent.
- New consultation module100% lines/functions,91.22% branches. Existing
pool module91.01% lines,84.63% branches,93% functions in measured
suites; some old Effects rollback/result-error/recovery paths are
outside this selected measurement. No100% branch claim.
- Multi-pass pairing self-review cleared for this diff; independent
Reviewer verdict not run.

Not run: new real Codex/Claude task, official grok/dots provider
integration, browser/deployment or frontend changes. Safe/external
mailboxes require their clients; send/dispatch is not a read/handling
receipt. Generic public input provenance is completed with #2185.
README/API rewrite remains last in #2189.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:T3 Risk tier T3 (needs a human approval), set by the controller from the diff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant