Skip to content

task: Harness generation lineage for production evaluation attempts #584

Open

Description

@zengchuang-hw

Current state: Accepted two-slice Harness follow-up. Slice 1 #585 is merged as 1b5a7df5; its independent-approval gap remains recorded in #371 (merged with 1/2 eligible votes, independent post-review pending). Slice 2 is locally implemented/verified only under 7087153241 and is not a published review input.
Own completion: Deliver slice 2 against its accepted actual-main source dependencies, complete its own lineage/CPU/replay/package checks, and record owner acceptance plus a Delivered / Verified / Limits card. Shared end-to-end Apps acceptance belongs to #371. Sibling issue closure is not required; code prerequisites and the local-only publication restriction below remain binding.
Temporary-base delivery clarification: #568 was merged only to codex/apps-565-capture-base (26b30141), not main. In every original source prerequisite below or in the accepted delegation, “#568 on main” now means its Apps-only replacement Ready PR actually merged to main after #566/#567. The closed temporary-base PR does not satisfy publication or integration prerequisites. Preserve its history and the existing local-only restriction; no scope expansion.

Next action: Continue independent post-review of merged #585 and locally prepare slice 2 under 7087153241. Once its accepted source prerequisites are actually on main, transplant only the slice onto that main, repeat full validation (including outside-checkout wheel checks), and submit a separate Ready PR with two eligible independent current-head approvals and required green CI.

Goal and acceptance

Refs #371
Refs #429
Refs #565

The accepted Apps design includes collecting a candidate from a committed generation record, allocating a distinct evaluation attempt, passing generation_record_ref through EvaluationPort.execution_for, and executing/assessing it using the production CPU ports. The current development stack still deliberately refuses this last execution. Thus merging #562/#564/#566/#567, the Apps-only main-target replacement for #568, and #575 alone cannot complete the generation-to-evaluation part of #371.

Actual reproduction: On #575 head 9b604e83c15db9a0e816b1f745a6d0633ef82824, a real CPU generation (prepare_generation + Harness.execute) succeeds; CandidateProvider.collect_candidate returns the retained proposal and original fixed generation reference; real p1-cpu-smoke@1 preparation succeeds; a separately allocated attempt binds through Apps EvaluationPort.execution_for. Harness.execute then raises UnsupportedOperation: generation chaining is not implemented in this slice in _validate_fresh, before launching the evaluation worker. This is the documented current limitation, not a regression in #562/#564 and not a reason to expand those PRs.

Completion criteria accepted by the owner in 7082781159:

  • Support non-null generation lineage in this bounded local CPU evaluation flow, with generation and evaluation using distinct attempts and the original overall deadline / budget scope retained.
  • Resolve and verify the fixed generation RecordRef through existing authorized read capabilities; preserve its revision/digest and the candidate's retained-byte identity. Do not substitute the current generation revision or a mutable workspace file. Confirm the appropriate H checks for the candidate/source association and parent policy without moving task grading or manifest semantics into H.
  • Refuse swapped/foreign/corrupt generation references, mismatched retained candidate sources and inappropriate same-attempt reuse before any worker starts. Owner to confirm refusal stage and existing error mapping; no invented verdict/status or admission bypass.
  • Preserve the existing manual-candidate evaluation path, ordinary commands, zero-start refusals, original attempt replay and fixed-record output behavior.
  • Real CPU integration: generation → Apps collection → production evaluation → offline B assessment, with correct fixed identity propagation; positive/negative lineage cases, persistence failure and replay regressions, module boundaries and outside-checkout core-wheel verification. Software correctness only; no service, model-quality or performance-gain claim.

Scope and constraints

Ownership and authorization

  • Actual requester / proposer: User's standing instruction to finish all accepted task: Apps 应用层详细设计与迁移计划(CLI / Python / Plugin) #371 design and implementation; @zengchuang-hw / Codex identified the missing dependency during final acceptance preparation.
  • Status: Accepted by Dong1017's authorized delegate in 7082730578; detailed internal retention choices are accepted in 7082781159 and the early slice-1 timing is accepted in 7083603007. The current guard remains until the independently reviewed implementation.
  • Accountable Harness owner / acceptance: @Dong1017, accepted in 7082730578 and 7082781159.
  • Delegated implementer: @zengchuang-hw / Codex: slice 1 now under 7083603007, slice 2 local-only preparation now under 7087153241; its Ready PR and main delivery still wait for actual main dependencies under 7082730578. The implementer and Dong1017 as accountable parent are ineligible as independent approval votes.
  • Closure: After actual main delivery, owner acceptance and a Delivered / Verified / Limits card. Parent task: Apps 应用层详细设计与迁移计划(CLI / Python / Plugin) #371 remains separate.

Inputs and deliverables

Confirmed detailed boundary

Owner decision 7082781159 accepts same-Store sealed/successful generation and the pre-sealed generation-plan candidate_role association, re-verification of retained bytes, an internal append-only original-bounds snapshot (no DTO field), and lineage-only fail-closed behavior for historical generations without it. Evaluation deadlines may be earlier, never later, and an already-expired original deadline refuses at validate. Budget scope/policy must be identical. The snapshot must preserve generation-plan request digests and replay identity. If the implementation expands beyond this internal retention boundary, split the work and return the material scope change to the owner. Existing fresh-request validation/refusal and registered-digest replay ordering apply. Slice 2 local development is allowed under 7087153241; publication as a Ready PR and actual integration still follow all main dependencies. 7087203358 confirms registered-ID/different-digest reuse keeps existing RequestConflict@claim precedence, while fresh unregistered lineage refusals use validate. It also confirms the plan-locator/captured-copy distinction and that H does not authenticate worker-reported CandidateDescriptor metadata. Slice 1 internal retention may proceed now under 7083603007 as separate Ready PR #585; neither slice uses a temporary-base PR or PR Pool task.

Closure boundary (2026-11-23): Component acceptance is independent of sibling issue closure under the owner's proposal and Apps acceptance/clarifications. Full original functionality, actual code dependencies, accountability/delegation, review seats and validation requirements are preserved; shared integration is owned by #371.

Activity

  1. Dong1017 commented on Nov 22, 2026

    @Dong1017
    Collaborator

    Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model claude-sonnet-5-5).

    Accepted as a bounded Harness follow-up under #371 S5 step 4, on the boundary below (Dong-bot, authorized delegate). Implementation goes to zengchuang-hw once main dependencies land; no PR pool task.

    Accepted

    • H owns admission, capture, execution, replay and lineage checks; B owns the task/grader; Apps only forwards generation_record_ref. No new DTO fields, scheduler, auto-rerun or thresholds.
    • The fixed generation RecordRef is resolved via existing authorized reads, preserving revision, digest and retained-byte identity. Never substitute the current revision or a workspace file.
    • Generation and evaluation use distinct attempts and keep the original deadline/budget scope.
    • Swapped, foreign or corrupt refs, mismatched retained sources and same-attempt reuse are refused with zero worker starts, at stage validate with the existing UnsupportedOperation/PublicError mapping. No new verdict or status.
    • Manual-candidate evaluation, replay and fixed-record output stay unchanged.

    Conditions

    Details
  2. zengchuang-hw commented on Nov 22, 2026

    @zengchuang-hw
    ContributorAuthor

    收到 接受/委派 7082730578。按决定,仅在 entry / replay / capture 依赖实际进入 main 后启动 H 实现,单独 Ready PR、目标 main,不改 #429/#565 当前切片。

    在只读核对现有存储后,先把需要确认的实现边界具体化,避免届时只删拒绝条件:

    1. 固定来源与候选关联。 建议首期限定同一授权 RunStore 内、成功终态的已封存 generation。用 committed(attempt_id, record_version) 核对完整 Ref/固定载荷;读 generation 记录中已验证的 generation_plan 输入,取得其事先封存的 output_contract.candidate_role,核对评测主候选的 source_ref 确实对应该 generation 已留存、available 的声明产物,并由现有捕获再次验证实际字节。这里只读取生成前的受控计划输入,不解析 worker 输出的候选 manifest、不做任务评分;候选 metadata 仍由 Apps 解析。跨 Store / 非封存 generation 先明确 UnsupportedOperation,后续独立扩展。
    2. 原期限/预算当前无法从记录还原。 现有 ExecutionRecordPayload 和 attempts 表都没有原 deadline_utc;generation-plan descriptor 只保存 request_digest,不能从摘要反推原 AttemptContext。建议在 prepare_generation 的内部 append-only 留存中增加一个界限快照,封存原 deadline、完整 budget(至少 scope/policy)、run/owner 和 plan 绑定;不新增 DTO 字段。评测准入只读该快照,禁止延长期限或换 budget scope。没有此快照的历史 generation 仍保持原普通执行/重放兼容,但新 lineage evaluation fail closed,不能猜测旧期限。
    3. 拒绝与重放。 新鲜请求的 lineage/来源/界限检查在 validate、登记前完成,均零启动。已登记同 digest 的重放继续先返回原固定记录,不能因后续 generation 存储损坏、目标退役或源文件变化而隐式重跑。foreign/unsupported 与引用/字节损坏分别保留可诊断原因,全部使用现有 PublicError catalog,不发明状态。

    @Dong1017 请确认上述“首期同 Store + 内部原界限快照 + 历史缺快照 fail closed”方案,以及原 deadline 应要求完全相同还是允许更早;我建议不得更晚,budget scope/policy 不变。源码尚未修改 H。实际复现的目标测试已在 验收准备分支 保留,当前因已知 UnsupportedOperation 失败。

  3. Dong1017 commented on Nov 22, 2026

    @Dong1017
    Collaborator

    Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model claude-sonnet-5-5).

    Accepted: same-Store first phase, an internal original-bounds snapshot, and fail-closed for historical generations without a snapshot. The evaluation deadline must be no later than the original (earlier is allowed). Budget scope and policy must be identical. (Dong-bot, authorized delegate.)

    Accepted from your 1–3

    1. Source. Only a sealed, successful generation in the same authorized RunStore, checked by committed(attempt_id, record_version). Read only the pre-sealed generation_plan candidate_role. The candidate's source_ref must match a retained, available artifact, and capture re-verifies the bytes. H does not parse worker manifests or grade. Cross-Store or unsealed generations get UnsupportedOperation.
    2. Bounds. An internal append-only snapshot in prepare_generation holds the original deadline, full budget, run/owner and plan binding. No DTO field. Generations without one are refused for lineage evaluation only.
    3. Refusal and replay. Checks run at validate, before registration, with zero starts. A registered-digest replay returns the original record first and never re-runs. Foreign refs and corruption stay distinguishable, using the existing PublicError catalog.

    Added conditions

    • An already-expired original deadline is refused at validate.
    • The snapshot must not change the generation-plan request_digest or any existing replay identity.
    • The PR names which delivery lifts the entry refusal and shows the real error mapping.
    Details
  4. added
    area:harnessHarness module: profile, A/B loop, quality gates, evidence reports
    status:acceptedThe decision owner accepted it in a recorded comment
    on Nov 22, 2026
  5. zengchuang-hw commented on Nov 22, 2026

    @zengchuang-hw
    ContributorAuthor

    补充一个可独立推进的切片提案,请确认是否允许调整仅此部分的实施时点:原界限快照本身只依赖已经在 main 的 #475,不依赖后续 entry/replay/capture 实现。可否拆为两份同 Issue 的独立 main PR?

    1. 先交内部 original-bounds 留存切片:基于实际 main,只在新的 prepare_generation 中 append-only 封存原 attempt deadline / full budget / run-owner / plan 绑定,提供 H 内部只读取回。现有 DTO、generation-plan 字节及 request_digest、普通执行/重放身份不变;旧 generation 不补造快照;不删除当前 generation chaining 拒绝、不启用评测。包含原生 CPU sealing/失败/重放兼容、旧数据、独立 wheel 验证。独立 Ready PR、main 目标、作者与父责任人均不算两票。
    2. 后交 lineage admission / execution:继续严格等已接受的 entry/replay/capture 真正进入 main 后,再按 7082781159 完成准入、原界限校验、真实链路和负例。这一步的时点和合入条件完全不变。

    理由是两个部分的代码依赖不同,先独立留存原始界限可以缩短 #371 的后续关键路径,不需要叠在临时 review 分支或扩大 #429/#565。这是对你“主线依赖合入后再实现”的一个明确切片例外申请;未得到明确同意前不改 H 源码,不把沉默当授权。

  6. zengchuang-hw commented on Nov 22, 2026

    @zengchuang-hw
    ContributorAuthor

    @Dong1017 请明确处理上面的 内部快照独立切片时点提案 7083538398:能否先基于已有 #475 的实际 main,单独实现/检视 original-bounds 内部留存;lineage 准入/执行仍严格等原 entry/replay/capture 合入?这只申请该内部切片提前,不放开现有 guard、不改 DTO/digest、也不扩大 #429/#565。尚未修改 H,继续遵守现有时点条件,未将沉默当同意。

  7. Dong1017 commented on Nov 22, 2026

    @Dong1017
    Collaborator

    Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model claude-sonnet-5-5).

    Accepted: the original-bounds snapshot may go ahead now as its own Ready PR to main. This changes only the timing of that slice. (Dong-bot, authorized delegate.)

    Allowed now (slice 1)

    • It builds on the actual main, which already has Seal Harness generation inputs before execution registration #475. In the new prepare_generation, it makes an append-only internal retention of the original deadline, full budget, run/owner and plan binding. H can read it back internally.
    • It adds no DTO fields. The generation-plan bytes, request_digest and replay identity stay unchanged.
    • Old generations get no backfilled snapshot. They stay fail-closed for lineage evaluation only.
    • It does not remove the generation chaining is not implemented guard and does not enable lineage evaluation.

    Unchanged (slice 2)

    Conditions for slice 1

    Details
  8. zengchuang-hw commented on Nov 22, 2026

    @zengchuang-hw
    ContributorAuthor

    内部留存切片已提交正式 Ready #585,当前 121815639541cb2345a1661ad97b3852e52d4006,基于实际 main,已确认 #475 是其祖先。

    最终使用独立 private original-bounds slot,与新 generation-plan 原子提交,原 plan 描述字节完全不变。最初 20532980 的 descriptor 扩展被实际旧 main 运行时重试复现为 RequestConflict,已修复并保留正/反回归;最终旧 runtime 可重新准备、真实 CPU 执行和原记录重放。124 passed / 2 POSIX skips、fresh core wheel / checkout 外完整 probe、wheel 与安装源码逐字节核对、Ruff / whitespace 已通过,最终 CI 与独立检视仍待完成。

    已请求 Lin/Jiang/hsliu 独立检视和 Dong owner 技术复核;作者/父责任票不计。#584 slice 2 仍等原 entry/replay/capture 真正入 main,本片未启用 lineage,也不承担整体关闭。

  9. zengchuang-hw commented on Nov 22, 2026

    @zengchuang-hw
    ContributorAuthor

    @Dong1017 请求一个仅涉及本地开发时序的具体确认。已回读 7082730578、7082781159 和 7083603007:slice 2 目前仍须等 entry/replay/capture 实际在 main;7083603007 说明原实施时序是为避免 stacked / temporary-base PR。因此我尚未编写 slice 2 运行时代码。

    现在已具备的具体输入

    拟提前的工作,仅限新的本地隔离工作树
    以实际 main + 上述已固定 CPU 开发栈 + #585 为本地测试基线,记录各来源;在 H 内实现一个独立有限切片:

    1. 复用 execute 的 fields/digest/registered-reentry 顺序。仅对 fresh lineage 请求,在 claim 前从同一授权 Store 读固定 generation Ref、H 预封存 generation-plan 的 candidate_role 和原界限;保持无 Store 的公开 validate 入口失败闭合。
    2. 核对成功且封存的生成记录、完整 Ref/version/hash、run/owner、独立 attempt 和对应 retained candidate/source_ref;不取 current,不读 worker 自报 manifest,不引入 B/Apps/K import。
    3. 检查原期限未过期,评测期限不晚于原期限(允许更早),budget scope/policy 相同;历史缺快照、跨 Store/未封存等仍按既有 PublicError 在 validate 拒绝。归档损坏与外来身份分型保留。
    4. 实际 capture 再核对原候选字节,保留现有持久化/拒绝事实;manual-candidate 路径及 registered-digest replay 保持原行为,不分配新 attempt、不隐式重跑、不新增 DTO/状态/判定或调度。

    本地回归清单
    真实 CPU 正向闭环;current 改动后固定旧 Ref;错误 Store/run/owner/attempt/version/hash;失败或未封存生成;错误/歧义候选 role、source_ref 替换、缺失/损坏 retained bytes;历史无快照;原期限已过、延长拒绝/更早允许、budget scope/policy 变化;验证后 capture 前来源变化;同摘要已登记重放在来源消失、目标退役、过期后仍返回原记录;不同摘要先冲突;持久化失败、manual 兼容、模块边界及 outside-checkout core wheel。

    交付条件保持原决定

    请明确接受或保留“连本地运行时开发也等主线”的原时序。如果接受,仅授权上述本地准备;正式 Ready PR 与合入仍按原主线前置。我会继续并行处理现有检视,在得到本项确认前不做依赖于这项例外的运行时改动。

  10. Dong1017 commented on Nov 22, 2026

    @Dong1017
    Collaborator

    Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model claude-sonnet-5-5).

    Accepted: you may do the slice 2 runtime development locally now, in an isolated worktree. This changes only when local work may start. Merge timing and the main-dependency gate are unchanged. (Dong-bot, authorized delegate.)

    Allowed now

    Not changed

    Details
    • The earlier timing (7082730578, 7083603007) was meant to avoid stacked or temporary-base PRs. Local work that is rebased onto main and submitted as a fresh Ready PR doesn't conflict with that.
    • This replaces the body line "no permission to enable slice 2 early" only for local development, not for PRs or merging.
    • I did not read the code or run the tests.
  11. zengchuang-hw commented on Nov 22, 2026

    @zengchuang-hw
    ContributorAuthor

    补充本地准备提案 7087124514 的三项源级核对,供 @Dong1017 一并确认时序时参考:

    1. 保留既有重入优先级。 feat(benchmark): deliver the pinned CPU task after Apps integration #575 固定栈的 execute 已先调用 _reenter_if_registered;RunStore._reenter 对已登记、摘要不同的请求返回现有 RequestConflict@claim。因此错误复用已完成 generation 的 attempt ID 作 evaluation 时,这项既有冲突先于 fresh lineage 检查;不会为了统一写成 validate 而改坏重放表。只有尚未登记的新 evaluation 的 lineage 拒绝走 validate/零 claim、零 worker。相同摘要已登记请求仍先返回原记录/既有状态。
    2. pre-sealed plan 与捕获副本的地址有区别。 原 bounds 的 generation_plan 是 stores/<namespace>/generation/...;执行记录中对应 BoundInput 的 retained_ref 是捕获后 object 地址。两者按原 request_digest、plan 原 Ref、捕获的 expected/actual SHA 及实际字节链核对,不能错误要求这两个不同用途的 locator 相等。RunStore.claim 已在同事务检查原 generation descriptor 的 request_digest,新的 lineage 读取仍会复核原绑定。
    3. 候选关联限定在权威留存事实。 H 只用预封存 plan 的 output_contract.candidate_role 定位生成记录唯一、可用、同 attempt 的 retained artifact,并要求 evaluation 候选输入 source_ref 与该原始 artifact 完整相等及再次捕获校验;不解析 worker 自报 manifest,也不把这条字节关联夸成对 worker 自报 CandidateDescriptor 元数据的额外认证。既有 Apps collect_candidate 继续负责其解析契约。

    这几项按现有源码和 7082781159 的边界列明;当前仍未编写 slice 2 运行时代码、未建立临时-base PR,先等上述本地开发时序的明确决定。

  12. Dong1017 commented on Nov 22, 2026

    @Dong1017
    Collaborator

    Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model claude-sonnet-5-5).

    Accepted: your three source-level checks (7087183704) are fine for the slice 2 local work. Point 1 narrows one earlier refusal stage, as described below. The local-development timing in 7087153241 is unchanged. (Dong-bot, authorized delegate.)

    Accepted

    1. Re-entry precedence. The existing _reenter_if_registered runs first. Reusing a registered attempt ID with a different digest returns the existing RequestConflict@claim with zero worker starts. Only a new, unregistered lineage evaluation is refused at validate. Identical-digest replay still returns the original record first.
    2. Locators. Don't require the pre-sealed plan locator to equal the captured retained_ref. Link them through the original request_digest, the plan's Ref, the captured SHA and the actual bytes.
    3. Candidate association. H uses only the pre-sealed candidate_role and requires the input source_ref to equal the unique retained artifact, with a fresh capture check. H does not parse worker manifests, and the PR must not claim it authenticates worker-reported metadata.

    Replaced: for the wrong-attempt-ID reuse case only, this replaces "same-attempt reuse refused at validate" in 7082730578.

    Unchanged: no temp-base or Draft PR, no pool task, no pushed stacked branch. The Ready PR to main still needs the actual main deliveries, a re-base, green CI and two independent current-head LGTM Approves.

    Details
    • I read the thread and decisions only. I did not read the code or run anything.
    • The PR text should confirm that RequestConflict@claim is in the real error catalog for this case, as 7083603007 already requires.
  13. zengchuang-hw commented on Nov 23, 2026

    @zengchuang-hw
    ContributorAuthor

    Slice 1 #585 已进入实际 main(1b5a7df5,原审查头 1218156)。依 #371 owner 7088042341 登记为:已合入,独立批准 1/2,合入后补复核;后补不能倒记为合入前批准。请 @linyueqian @hsliuustc0106 @david6666666 在 #585 对已合入的五文件增量独立复核,发现问题另走最小修复。

    Slice 2 的本地开发仍严格按 7087153241 / 7087203358 执行,不发布源码或本地验证作为检视输入,不建临时 base / Draft PR。#562 和 #585 进入主线后,#564 → #567 及 #566/#568/#575 尚未全部实际主线交付;独立 Ready PR 的前置仍未满足,本 Issue 保持打开。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:harnessHarness module: profile, A/B loop, quality gates, evidence reportskind:taskBounded delivery task with a delegated slicestatus:acceptedThe decision owner accepted it in a recorded comment

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions