Skip to content

Bound Chief and Task-role context, preserve scoped memory and work summaries - #2225

Merged
zy95-12 merged 20 commits into
delivery/ai-centric-development-servicefrom
feat/2177-bounded-role-context
Nov 3, 2026
Merged

zy95-12 merged 20 commits into
delivery/ai-centric-development-servicefrom
feat/2177-bounded-role-context

Conversation

@zy95-12

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

Copy link
Copy Markdown
Collaborator

Written-by: Codex

Latest composition at c16a25e: Merged current #2175/#2184 into the original branch. Current composition: 130 initial targeted tests; after integration fixes,33 policy-budget/harness checks, core lint and actual DSH native return probe pass. Current full verify NOT rerun. Actual runtime reproduced logical Bot vs physical worker conflation in input budget fencing; regression/fix retained. Complete mandatory rules remain under the unchanged384k cap after completed service narratives are archived verbatim behind active memory links. No instruction source removal or silent truncation. 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.

Refs #2177; stacked on #2210. Current head: 4101275.

Bound Project/Chief/Task-role context through model/Harness budgets, full-input checks and scoped source pages with hashes/cursors. Reuse existing memory, archives, participation and Task-role Session records for relevant retrieval, versioned working summaries, bounded history views and unverified execution experience. Failed consolidation preserves the last valid summary; model experience cannot overwrite human-controlled facts or role policy. Structured native handoff input is JSON and passes current claim/resource/input-authority checks. Codex has a host-selected tool history output cap while SDK compaction defaults remain runtime-managed.

Sequential native Chief intake testing in dependent #2179 exposed a real stale-context problem: changing Bot system-prompt metadata did not guarantee an already resident Session received current job facts. This PR now delivers the current protocol and scoped facts in the actual turn input, checks its complete budget, revalidates actor/delegation before dispatch, and restores only its own prompt metadata. The same resident Session remains in use. A baseline-red/two-job regression protects this behavior; no fresh Session hides the failure.

Validation at current head: full TZ=UTC npm run verify passed 4560 tests, 0 failures, 0 skips, including four actual DSH runtime checks with deterministic inference. Agent suite43/43. Before the native follow-up, selected context/delivery/pool/Harness suites176/176 and the four unchanged context modules measured100% line coverage, branch73.47–91.54%; not complete branch coverage. Updated architecture/subsystem docs, PROJECT/ROADMAP/LESSONS, changelog and generated patches.

Separately, actual Codex gpt-6.1-sol validation used the existing operator profile and runtime source a9ff63b: two fresh workers fixed fixture code, passed independent host tests, resumed the identical backend Session after a changed caller prompt, read their own work summary and recovered a conversation-only marker absent from repository files. Both confirmed stop/exit before release;9 checks passed. That proof names its source revision; it is not a new current-head full Chief/pool workflow, observed SDK compaction event, actual provider-window measurement or native Task-role physical restoration.

Remaining acceptance: native physical restoration #2184, storage normalization #2182, public protocol integration #2185 and full task-flow acceptance in #2179. Unknown capacity remains explicit. No production deploy/restart, control-plane/UI edits or frontend task interruption. Draft; author self-review is not an independent Reviewer PASS. README rewrite remains last in #2189.

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.
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

Merged current #2175/#2184 into the original branch. Current composition: 130 initial targeted tests; after integration fixes,33 policy-budget/harness checks, core lint and actual DSH native return probe pass. Current full verify NOT rerun. Actual runtime reproduced logical Bot vs physical worker conflation in input budget fencing; regression/fix retained. Complete mandatory rules remain under the unchanged384k cap after completed service narratives are archived verbatim behind active memory links. No instruction source removal or silent truncation.

Current head: c16a25e. Remaining composed-stack validation stays tracked under the original issue/PR. No main merge/deployment/control-plane/frontend changes.

Based on c16a25e; delivery equals preceding integrated tree. Historical checkpoint archive backported where needed; policy cap and all rules retained. Stage-only integration authorized by Owner. Residual scope: #2292.

zy95-12 commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator Author

Owner 授权阶段合入 delivery,剩余范围转 #2292。当前 2ad0254 基于已通过 tests-ok 的原源码 c16a25e,同步集成祖先并提前带入最终版本已有的 M7 历史原文归档;仅文档归档,不改变运行代码、规则来源、容量上限或测试断言。最终组合源码 d720f8c 已完整验证 4726 pass / 0 fail / 0 skip。正式签名 Reviewer 门禁留待正式合入,不伪造 PASS、不修改仓库规则、不声称 enqueue-guard 通过;新 SHA CI 状态另计。#2177 按 Owner 要求阶段归档,余项保留 #2292。不发布、不部署。

@zy95-12
zy95-12 marked this pull request as ready for review November 3, 2026 09:14
@zy95-12
zy95-12 merged commit ecfd9b8 into delivery/ai-centric-development-service Nov 3, 2026
4 of 10 checks passed
@zy95-12
zy95-12 deleted the feat/2177-bounded-role-context branch November 3, 2026 09:15
zy95-12 added a commit that referenced this pull request Nov 3, 2026
Written-by: Codex

Latest composition at54a6bb5a8: current execution/governance/context
merged;175 targeted tests and core lint pass. Current full verify NOT
rerun; earlier full numbers below refer to their older named heads.
Actual DSH native return with real Chief intake passed before the final
stale-decision fence; final composed runtime validation remains pending.
Requirements version changes now stop an old Attempt through the
original pool lifecycle, and canonical claim revisions fence late
transfer/split decisions before/after awaited authority. Actual SDK
subprocess fixture covers version-change stop with
acknowledgement/process exit. Custom Developer-capability parent resumes
use child-source admission and producer Workspace mapping. Red
regressions and self-review recorded. Still Draft; no main
merge/deployment/frontend/control-plane change or independent Review.

Refs #2179; stacked on #2225 (4101275).
Head4826723ccf02b159ccdd7ca0cbbb27ebffe631d0. This is the original
implementation PR for this issue; remaining acceptance stays
here/dependent stages, not a replacement PR.

New canonical shared Project Tasks start as proposals. Chief verifies
goal, project impact and acceptance before a committed Effect can start
execution. Requirements are versioned; each Attempt pins the full
revision, so a scope-only change invalidates old evidence and creates a
fresh rework snapshot. Requirements changes enter the existing Task
inbox. A failed Attempt blocks the Task commitment instead of ending it.
Member change requests ask Chief to judge
revision/cancellation/reopening; public HTTP cannot submit Chief or role
authority. Generic board transitions, human completion and legacy
Workflow assign cannot bypass the new canonical contract. Persisted
pre-contract Task delivery behavior remains covered separately.

A role may split independent child proposals after confirmed source
exit. The parent retains its Task, logical Session and working summary;
an unsealed Attempt/workspace continues, while a sealed candidate
requires one successor Attempt, releases its execution claim/quota, then
waits for Chief-adjudicated child results. Failed/cancelled children do
not satisfy waits. One stable outbox/Handoff request resumes the
original parent role after all conditions are satisfied; children never
close the parent or prove integration. Existing Effects, pools and Task
construction are reused. Tests cover concurrent resume, restart replay,
unconfirmed exit, failed commits and preservation of previous summaries.

Actual DSH testing exposed two relevant defects: the resident native
Chief used stale facts between jobs (fixed in original #2225), and the
legacy Workflow gateway counted Chief intake as a development slot. The
quota guard now shares released-parent semantics and excludes Chief
control jobs. The runtime fixture exercises actual native Chief intake
and controls only disposable host-verification gates, so
queue/revocation checks do not depend on model timing or a framework
delay.

Validation at this head: full `TZ=UTC npm run verify` **4593 passed,0
failures,0 skips**, including4 real DSH runtime checks with
deterministic inference. Selected129 Task/Chief/pool/delivery tests
passed. Lifecycle coverage98.44%lines/77.97%branches; child-source
module97.56%lines/76.60%branches; merge-metadata
module100%lines/91.43%branches. Baseline-red evidence covers missing
lifecycle, complete requirement revision and Attempt-vs-Task failure.
Existing complete-role-policy budget guard caught growing PROJECT.md
history: current invariants remain, exact dated reports moved to linked
docs/history without raising the limit or truncating guidance.
Architecture/subsystem/API notes, PROJECT/ROADMAP/LESSONS, changelog and
generated patches are included. README rewrite remains last in #2189.

Chief dependency judgement now supports version-bound waivers and
accepted replacements with evidence; cancellation/reopening notifies
Chief, and stale replacements reblock integration. The private pre-input
port commits accepted child Git refs and source admissions through the
existing Effects before reserving parent execution. Only matching Chief
acceptance, candidate/test/Review evidence and current authority can
admit sources. Public configure permission remains unchanged; moved
refs, active writers, failed commits and invalidated results are
refused. Parent sealing requires every required source's actual
ancestry. Actual Git multi-source tests exposed first-only MERGE_HEAD
inspection; all pending parents are now bounded and verified for local
worktrees/resource clones. These tests use explicit deterministic
child-acceptance fixtures, not a provider-built full loop.

Remaining issue acceptance: full real-provider parallel collaboration,
post-resume dependency-plan interruption/reconciliation, native physical
Session restoration/inflight stop #2184, normalized atomic storage
#2182, complete public receipts/history queries #2185, and alternate
legacy creation/cutover compatibility #2186. Cancelled children remain
blocked safely until resolved; this PR does not claim those remaining
paths are complete. No new real-provider full Chief/child-development
acceptance is claimed. No merge/deploy/restart, control-plane/UI edit or
interruption of original frontend Task40/PR48. Draft; author self-review
is not an independent Reviewer PASS.
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