Skip to content

Distillation P2: lineage exclusion in the held-out gate - #50

Merged
Niraya666 merged 4 commits into
mainfrom
codex/distill-p2-lineage
Jul 17, 2026
Merged

Niraya666 merged 4 commits into
mainfrom
codex/distill-p2-lineage

Conversation

@Niraya666

Copy link
Copy Markdown
Owner

落地设计 §6.3 —— 修的是现有 holdout gate 的真实漏洞:今天一个 prompt edit 可以被"催生它的那个 session 蒸出来的任务"验证通过(拿作业题当期末考)。P0 已把 source_sessions 放上 EvalTaskSpec;本 PR 把排除端到端接通。纯确定性、零 API。

三步

  • 门机制(holdout_gate.py):make_eval_suite_runner(exclude_source_sessions=) 在装配时丢掉 lineage 相交的任务;全排完 → runner 返回 {} 不跑 EvalRunner;run_holdout_gate 此时返回 HoldoutVerdict(conclusive=False)。
  • edit 带 lineage + propose 侧:HarnessEdit.source_sessions(rule/LLM proposer 从 playbook entry 填);build_held_out_validator 按 edit 逐条排除;_process_edit 把 inconclusive 落 pending_unvalidated(不 pass 不 reject)。
  • revalidate 侧:source_sessions 经 accept ledger 存活到 active_edits → revalidate 重建 edit 时带上,逐条排除;inconclusive 落 skipped(stale edit 原样不动)。

守住

空 lineage = 不排除(向后兼容,手写任务/旧 edit 行为不变);现有 held-out 测试(fake validator,默认 conclusive=True)全绿;门仍在 loop 之外、不改任何 edit。

验证

  • 新增 7 测试:装配排除相交任务 / 全排空 → inconclusive 且不跑 runner / _process_edit inconclusive → pending_unvalidated / rule-based edit 带 lineage / lineage 经 accept 存活 / revalidate inconclusive → skipped 且 edit 不动 / parse_edits 盖 lineage。
  • 全量 558 passed(551 → 558)。

界限

只剩 P3(成功轨迹 + metrics 半);P1(LLM distiller,花预算)按需再做。

make_eval_suite_runner drops tasks whose source_sessions intersect the edit's
lineage; if nothing independent remains it returns {} without running, and
run_holdout_gate reports HoldoutVerdict(conclusive=False). Empty exclusion set =
today's behavior (no exclusion).
…ed [distill P2/2]

HarnessEdit gains source_sessions (populated from the playbook entry by the
rule-based and LLM proposers, survives to_dict). build_held_out_validator now
excludes that edit's sessions per-edit at suite assembly. _process_edit lands an
inconclusive verdict (no lineage-independent task) as pending_unvalidated rather
than pass/reject.
…d [distill P2/3]

accept_edit persists source_sessions into the ledger; active_edits surfaces it;
revalidation reconstructs the edit with lineage, excludes those sessions per-edit
at held-out suite assembly, and treats an inconclusive verdict as skipped
(leaving the stale edit untouched) instead of reactivate/retire.
@Niraya666
Niraya666 merged commit a6fc88c into main Jul 17, 2026
2 checks passed
@Niraya666
Niraya666 deleted the codex/distill-p2-lineage branch July 17, 2026 13:09
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