Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion examples/explore-todo-result-node-linkage-smoke.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,24 @@ def check_todo_lifecycle(provider: str) -> None:
)
archived = state_file.read_text(encoding="utf-8")
assert "Completed Work Archive" in archived, archived
assert "explore_result_node_refs=node_live%2Cnode_dead" in archived, archived
if provider == "sqlite":
# The sqlite_v0 archive projection caps inline rows and leaves a
# pointer naming the readback, so the archived linkage is guaranteed
# by that pointer plus the record read back below, not by repetition.
pointer = [
line
for line in archived.splitlines()
if "loopx:todo-archive-pointer" in line
and f"goal_id={GOAL_ID}" in line
]
assert len(pointer) == 1, archived
assert "archived_count=1" in pointer[0], pointer[0]

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P3] 请让归档计数匹配完整字段:"archived_count=1" 也会命中 archived_count=10。在真实 CLI 完成归档后,只将其临时投影中的计数从 1 改为 10,整条 SQLite smoke 仍通过;改为 7 则被此行拒绝。建议解析属性或匹配字段边界,并补充 10 的反例。实际 canonical 引用与指针查询均已独立通过,此项是非阻塞的测试敏感性建议。

assert (
f'query="loopx todo list --goal-id {GOAL_ID} --include-archived"'
in pointer[0]
), pointer[0]
else:
assert "explore_result_node_refs=node_live%2Cnode_dead" in archived, archived

archived_item = run_loopx(registry, "todo", "list", "--goal-id", GOAL_ID,
"--todo-id", todo_id)["todo"]
Expand Down
Loading