Skip to content

test(explore): reconcile the archive linkage guard with the capped sqlite projection - #8136

Merged
huangruiteng merged 1 commit into
loopx-project:mainfrom
Weimr2627:weimr/explore-archive-linkage-consumer
Nov 5, 2026
Merged

huangruiteng merged 1 commit into
loopx-project:mainfrom
Weimr2627:weimr/explore-archive-linkage-consumer

Conversation

@Weimr2627

Copy link
Copy Markdown
Contributor

Goal And Delivered Outcome

Onset evidence, not guesswork

Reading Result
nightly run 41356265689 (2026-11-01T22:16:06Z) smoke absent from the failed log (log retrieved: 1,097,104 bytes / 9,555 lines, 0 mentions) → green
nightly run 41557935873 (2026-11-03T01:10:15Z) and 41740364791 smoke present 11 times in each failed log → red
commits touching the projection in that window all from #7834; this smoke got no commit in the window
local reruns on 4d8b79692d13ea17a43d2369d35282b023be311e failed twice at the same assertion

Author Declaration

  • Written by: model_agent — Qoder AI assistant, at the contributor's direction; no human review has occurred.

Implemented against

Criterion (spec clause) Disposition Symbol / path Test or command
Archived linkage survives todo archive-completed under file authority implemented examples/explore-todo-result-node-linkage-smoke.py:189 the smoke
Archived linkage survives under sqlite_v0 through the pointer the projection emits implemented same file, :172-187 the smoke
The pointer names the readback that returns the record implemented :185 the smoke
The archived record still carries explore_result_node_refs implemented (unchanged) :193-194 the smoke
Projection production code changed out_of_scope loopx/control_plane/todos/machine_section_projection.py N/A — consumer-side reconciliation only
  • Self-check before submission: read the pointer builder, confirmed #7834 is the only in-window change to the projection, confirmed #8013's diff on that file is typing/cast only (+4/−3) so it is not already repairing this, and left the assertion order untouched elsewhere. Each new guard was poisoned once and every poison was caught (rows below); the file was restored byte-identical after each run. No production behavior, fixture data or provider semantics were changed.

Scope And Continuation

Validation

  • Tested revision: 24ccac82d00ced2bedb53e72236f2b2aac091713
  • Run state: finished
  • Input classes: synthetic
Check kind Result Public-safe evidence / limitation
integration passed PYTHONUTF8=1 python examples/explore-todo-result-node-linkage-smoke.py → explore-todo-result-node-linkage-smoke ok, both file and sqlite arms.
regression_parity passed On base 4d8b79692d1 the same command fails at the inline-token assertion (two local reruns, same line) and nightly records show green 2026-11-01, red from 2026-11-03; the file arm passes on base, which is the positive control that the drop is sqlite_v0-specific.
regression_parity passed Mutation control, one poison per new guard, each caught at its own line: archived_count=1→7 (line 183), len(pointer)==1→5 (182), the readback query token (185), and the file arm inline token (189). No poison survived, so no guard here is vacuous.
static passed python -m py_compile; git diff --check.
unit not_run No unit test covers a shipped smoke's prose assertions; the smoke is its own harness.
  • Coverage and gaps: the diff is a test-only reconciliation, so the covered surface is exactly this smoke's lifecycle path (add → complete → archive-completed → readback). Not covered: the rest of the nightly fleet, and the #8134 question of whether the projection should cap those rows. This workflow is intentionally not PR-required, so no hosted run is attached to this head.

Frontend / Visual Evidence

  • UI impact: none
  • Before: N/A
  • After: N/A
  • First viewport and preview: N/A
  • States and viewports shown: N/A
  • Source data: synthetic
  • Attention review: N/A
  • Craft review: N/A

Type of Change

  • Bug fix
  • Test update

LoopX Area

  • Control plane (goals, todos, quota, scheduler, registry, runtime)

Technical Direction

Shared-authority RFC fixture impact

  • Production-scale fixture schema: N/A
  • Semantic dimensions changed, or reviewed no-impact rationale: N/A — no fixture dimension, provider arm or schema changed; one shipped smoke's archive assertion was aligned to the projection already on main.
  • Provider conformance arms run: N/A — the smoke's existing file and sqlite arms both run; neither was added or removed.
  • Read-only legacy/file/PostgreSQL three-arm rehearsal (required for promotion, runtime-routing, or compatibility-projection changes): N/A — no compatibility projection is introduced by this diff.

Boundary Checklist

  • Neither the diff nor this PR body/comments/attachments disclose private state, credentials, raw traces or verifier output, internal links, or local machine paths (including .loopx/, .codex/goals/, and live ACTIVE_GOAL_STATE.md). Fixture digests and temporary paths are omitted from the evidence above.
  • I did not duplicate maintainer-owned benchmark work unless a maintainer split out a public issue for it.
  • I kept the change scoped to the linked issue/task.
  • Existing English/Chinese RFC pairs both have a diff, and the local premerge check passes, or no paired RFC changed (no RFC changed here).
  • I completed the visual evidence section for UI changes, or marked UI impact none.
  • Every commit includes a DCO Signed-off-by trailer (git commit -s).

…lite projection

Signed-off-by: Weimr2627 <134630546+Weimr2627@users.noreply.github.com>

@loopx-agent loopx-agent left a comment

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.

Reviewer: actor_kind=model_agent; model=gpt-6.1-sol; provider=OpenAI; declaration_source=runtime_reported; reasoning_effort=max.

动机 / Motivation

维护 Explore 证据关联的贡献者会遇到一个重复失败的公共验证。

SQLite 已采用有界归档投影,正文留下查询指针;旧 smoke 却仍要求内联重复证据引用,导致真实数据仍可读时验证提前失败。

这次修复使既有 File 与 SQLite 两条归档验证都能完成,同时继续核实归档后的原始证据引用。

边界是修复一个现有验证消费者,不改生产投影、不恢复大块内联归档,也不证明整套 nightly 或长期收益。

改动思路 / Approach

没有阻塞问题,另有一项可直接收紧的 P3 断言建议。先读了原始 #1819 的关联保持契约、#8134 的问题与补充,以及不可变基线上的投影 owner,再判断补丁。源码明确把 SQLite 归档显示与 canonical record 分开:有界显示只留指针,完整记录仍由正常 Todo 读回提供;File 保持原内联断言。因此,仅调整这个既有 smoke 比扩大生产投影或删除归档检查更合适。

独立执行了指针中给出的 todo list --goal-id … --include-archived 查询,真实 SQLite 返回一个归档记录和原来的两项 Explore 引用。这里的断言不是用 pointer 存在代替数据存续,也没有把显示文件变成权威。现有 provider 投影、完整归档读取和 durable-link 测试分别保护相邻边界,未发现需要新增另一个 smoke 的理由。

具体改动 / Changes

准确 head 为 24ccac82d00ced2bedb53e72236f2b2aac091713,完整 diff 仅 examples/explore-todo-result-node-linkage-smoke.py +18/-1;没有生产或 fixture 改动。

spec_ref 为 https://github.com/loopx-project/loopx/issues/1819,spec_revision 为 a4370d644af3932b8c6aef62f8d161aed709dfc9,表示本次判断所核对的既有实现基线。原 issue 无条款编号,以下仅作映射:LINK-PRESERVE 保留 add、complete、archive、update/clear 后的显式引用;LINK-EXPLICIT 保留未知/反驳节点诊断和无关联任务原行为;LINK-NO-EFFECT 保留 diagnostic-only、零分数调整及不启动 Agent、不取得 claim/lease、不改 quota。这三项均由完整 smoke 的真实 CLI 生命周期和末尾 planner 断言通过。

关键内容讲解

SQLite 分支在 check_todo_lifecycle 中找到带当前 Goal 的唯一指针,核对计数和完整查询文本;File 分支继续要求内联 token。后面的 canonical Todo 读回仍要求 archive 状态和完整原引用,原有 clear 与 planner 诊断也继续执行。对已有 smoke 的这一个消费者做修复,保留了可单独回退和复现的边界。

对主干的风险 / Risks

P3:计数应匹配完整 token。 第 183 行用 "archived_count=1" in pointer[0],也会接受 archived_count=10。我在真实 CLI 完成归档后,只改动其临时显示文件的计数,整条 SQLite smoke 仍通过;改成 7 则被拒绝。建议匹配带字段边界的 token 或解析属性,并加入 10 的反例。这是新增的次要计数保护不够精确,不是已发现的 canonical 数据损坏;实际指针查询和引用保持均独立通过,故不作为本次合并阻塞。

PASS:准确基线的完整 smoke 在旧 SQLite 内联断言失败,当前 head 的 File/SQLite 全流程通过;独立跟随真实指针查询成功。临时投影中的缺失当前 Goal 指针、错误查询、File 引用缺失和计数 7 四个反例均被相应断言拒绝,未修改生产或活动 Goal。编译、diff hygiene、scoped CQR 与 quick premerge 通过。

原始 maintainability 检查仍 FAIL,完整 base/head JSON 仅去掉 checkout 路径后相同,保留既有 62/60 decision-points 失败;没有放宽阈值。没有查询、轮询或等待 CI。作者的历史 nightly 数字没有作为本次独立验收证据。

我的整体评价 / Verdict

goal_achieved 仅指这个可复现的 smoke 消费者漂移;long_horizon 为 preserved,现有证据关联、诊断与权限边界保留;user_experience 为 improved,贡献者可以完成原有验证,无新增配置或人工交互。P3 计数前缀漏检明确保留,推荐顺手收紧,未把它写成完整的计数敏感性通过。

这是对已有 322 行 smoke 的局部更新,没有新建临时 builder 或重复生命周期测试。视觉检查不适用:没有页面、布局或产品显示改动;未验证范围是其余 nightly、线上宿主采用和完整长期成本。批准与合并、安装、发布权限分开。

English verdict: APPROVE — 24ccac8 repairs a reproduced smoke-consumer mismatch while preserving File/SQLite linkage and diagnostics. Real pointer readback and negative controls pass. Tighten the nonblocking P3 count-prefix assertion; the independently matched ratchet failure remains failed.

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 引用与指针查询均已独立通过,此项是非阻塞的测试敏感性建议。

@huangruiteng
huangruiteng merged commit f133dc1 into loopx-project:main Nov 5, 2026
1 check passed
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.

3 participants