feat: separate Task, Read, and Effect audit stages - #9
Conversation
yuezengwu
left a comment
There was a problem hiding this comment.
实现目标和核心改动已核对:这个 PR 将 schema-v3 的组合判断拆成 message-only Task 重建与冻结、Read attribution、Effect judgment 三个有 digest 约束的阶段,并支持一个 Task 上的多个独立 Effect。整体边界与计数模型是连贯的,但当前有一个必须修复的时序 blocker。
skills/context-tree-value-audit/scripts/context_tree_value_audit.py:6189
这里使用 read_started_at > read_completed_at,因此 timestamp == completed_at 的零时长 Read 会通过验证;只要它又严格早于 choice,就能进入 observed attribution 甚至 Effect。PR 描述和 fail-closed 规则要求 Read “complete after it starts”,应拒绝相等时间。请把边界改为拒绝 read_started_at >= read_completed_at(并同步错误文案),再补一个起止时间相等的回归用例。现有测试只覆盖了完成时间早于开始时间,以及完成时间等于 choice 的情况,没有覆盖这个边界。
|
Fixed in
Validation:
Please re-review the latest head. |
yuezengwu
left a comment
There was a problem hiding this comment.
已对 head 877b3de7 完成增量复审。
原 blocker 已正确修复:Read 起止时间相等现在会被 read_started_at >= read_completed_at 拒绝,错误文案同步为严格完成顺序,并新增零时长 Read 回归用例。增量未引入新的 blocker。
核心 schema-v4 数据结构变更与前次审查一致;未看到数据库变更。GitHub 上 Python 3.11/3.12 检查均通过。
Summary
Why
The combined schema-v3 judgment could let audit evidence shape Task identity and limited a continuous Task to one Effect. Task boundaries should instead be reconstructed from work dialogue and attribution evidence alone. Once frozen, Reads can be attributed without resizing the Task, and each later
Read → choice → outcomerelationship can be judged independently.The user-facing model remains Task, Read, and Effect. The inventory digest is an internal integrity fence, not a new evidence concept or authenticity claim.
Behavior
The workflow now has three ordered stages:
task-sourceprojects authorized work messages without collector-derived Reads, passages, receipts, choice projections, or Effect judgments.freeze-tasksvalidates pure Task rows, rejects unknown or derived fields, and writes one shared inventory digest.reportvalidates digest-bound Read attributions and zero-or-more Effect judgments.Additional fail-closed rules cover:
Real-data validation
The current authorized Chat was replayed over the previous seven days:
Running schema v3 against the same 95 messages produced the same Task, Read, and Effect counts. The zero-Effect result is therefore evidence-driven rather than caused by the new Task model: direct human instructions fully explained one outcome, two Reads were archive/supporting content, and one normal-content Read occurred after the human had already supplied the decision.
The multi-Effect behavior is covered independently by deterministic fixtures with one Task, two Effects, one shared Read, distinct choices, and separate conservation counts.
Validation
python3 -m unittest discover -s tests -v— 51 passedpython3 scripts/validate_skill.pypython3 -m compileall -q skills tests scriptsgit diff --checkContext Tree
Read against
agent-team-foundation/first-tree-context@e36f5c04b6a4af6f7a803c5303559b94877baf39. The existing contract that a decision receipt is Agent attribution and supporting evidence—not server-verified causal proof—remains unchanged.