Skip to content

test(replan): align successor fixtures with current contracts - #5994

Merged
huangruiteng merged 1 commit into
loopx-project:mainfrom
mikamikasuki:codex/loopx-replan-periodic-test-profile
Oct 9, 2026
Merged

huangruiteng merged 1 commit into
loopx-project:mainfrom
mikamikasuki:codex/loopx-replan-periodic-test-profile

Conversation

@mikamikasuki

@mikamikasuki mikamikasuki commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Goal And Delivered Outcome

  • Outcome basis / optional anchor: Self-contained repair to the replan-successor test suite; no issue is required for this maintenance change.
  • Goal/source and gap: Two tests in the successor durability suite no longer modeled their intended inputs. The periodic-window case omitted Goal cadence and picked up the live machine default. The canonical projection case passed read-model selection metadata into a strict Todo domain fixture.
  • Observable before → after, with the validation row that proves it: Both fixture defects reproduced on the original base 3ed5d6b: the periodic case reported no open obligation, and the canonical fixture rejected read-model-only content_revision. After rebasing onto current upstream main 0e5acf, the updated Python module passes 12/12 and the TypeScript fixture consumer passes 41 tests (15 PostgreSQL cases skipped because no local server is configured). The four selectors that failed in older hosted run 37849055877 fail identically on exact main 0e5acf and exact head 94912c6; this fixture-only patch does not introduce those failures.
  • Issue/task and intended base: No issue is required for this self-contained test-maintenance outcome; rebased onto current main at 0e5acfe.

Author Declaration

  • Written by: model_agent — GPT-6 Luna Medium, OpenAI

Implemented against

  • Specification and revision: docs/quota-allocation.md and the Todo domain/read-model boundary in loopx/control_plane/coordination/local_authority_shadow_projection.py at 0e5acfe. Both reference files are unchanged between the original base and this revision.
  • Criteria:
Criterion (spec clause) Disposition Symbol / path Test or command
Explicit Goal cadence overrides the machine default; completed-Todo cadence accepts values 1–5 implemented tests/control_plane/test_replan_successor_durable_ack.py::test_cli_successor_refresh_resets_periodic_window Full replan successor test module
Selection-only content_revision is not passed as a persisted Todo domain field implemented tests/control_plane_ts/authority_projection_fixture.ts::todoFixtureRecord canonical-successor parameter case
  • Self-check before submission: Reproduced both fixture failures at original base 3ed5d6b; inspected cadence resolution and canonical Todo projection; confirmed this is a fixture-only diff. Compared all four failures from the older hosted run on exact current main and rebased head; the same four selectors fail on both.

Scope And Continuation

  • Completed scope and remaining work: The periodic-history fixture now pins its intended Goal cadence, and the canonical authority fixture strips the read-only content revision before domain validation.
  • Slice boundary / successor: Complete within this test scope; no successor is required.

Validation

  • Tested revision: 94912c6 (base 0e5acfe)
  • Run state: local validation complete; hosted checks pending
  • Input classes: synthetic
Check kind Result Public-safe evidence / limitation
regression_parity passed Both targeted fixture failures reproduced on original base 3ed5d6b; corrected cases pass on rebased head 94912c6. All four older hosted failure selectors reproduce identically on exact current main 0e5acf and this head.
unit passed tests/control_plane/test_replan_successor_durable_ack.py: 12 passed, including the real CLI path and canonical Node fixture.
typescript_unit passed with skips goal_acceptance_authority.test.ts: 56 total, 41 passed, 15 PostgreSQL cases skipped (no local PostgreSQL server configured).
static passed Ruff, Python compilation, npm run typecheck:control-plane, and git diff --check passed.
hosted_integration pending On rebased head 94912c6, Summary, Python changes, and Chat Bundle passed. DCO, Dependency Review, PostgreSQL integration, Node minimum compatibility, and 15 other CI jobs remained queued (19 queued total); node-forward-compatibility and presentation were skipped; merge-gate was expected. No full hosted result is claimed yet.
  • Coverage and gaps: The full affected Python module exercises successor writeback, refresh, and canonical fixture construction. The local TypeScript run skipped 15 real-PostgreSQL cases; hosted PostgreSQL validation remains pending. No provider backend or runtime contract changed.

Frontend / Visual Evidence

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

Type of Change

  • Test update

LoopX Area

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

Technical Direction

  • Direction / acceptance reference, when applicable: N/A; the change corrects test fixtures without changing product behavior.

Shared-authority RFC fixture impact

  • Production-scale fixture schema: N/A; no production or production-scale fixture schema changed.
  • Semantic dimensions changed, or reviewed no-impact rationale: No authority semantics changed; the existing test helper now removes selection metadata before validating the Todo domain record.
  • Provider conformance arms run: N/A; provider behavior is unchanged.
  • Read-only legacy/file/PostgreSQL three-arm rehearsal: N/A; no runtime-routing, promotion, or compatibility-projection behavior changed.

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.
  • I did not duplicate maintainer-owned benchmark work.
  • I kept the change scoped to the two failing successor-test fixtures.
  • I completed the visual evidence section; UI impact is none.
  • Every commit includes a DCO Signed-off-by trailer.

@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: model_agent; gpt-6.1-sol; OpenAI; runtime_reported; reasoning_effort=xhigh.

Exact head: 809a180; base: 3ed5d6b.

动机

维护者验证重规划后续任务时,旧夹具会误报失败,无法可靠判断后续任务是否持久生效。
旧测试未指定周期单位,又把读取时计算的版本 metadata 当成持久 Todo 字段;本 PR 明确周期并隔离只读 metadata,使既有恢复检查能够完成。
独立基础版本复现两处失败,head 的真实 CLI、File/SQLite 后续任务、重复写回和再次触发检查均通过。
本 PR 不改变产品默认周期、任务准入、存储协议、权限、运行时代码或用户操作步骤。

改动思路

Existing TypeScript quota/replan and coordination_state_contract owners; Python adapts source IO. No new decision owner.
保持产品 owner 和原断言,只修正独立复现的夹具输入。维持旧误报没有价值;修改运行时或删除完整断言会扩大范围并丢失回归信号。

具体改动

test_cli_successor_refresh_resets_periodic_window 显式使用 replan_after_completed_todos=1,与旧周期 fallback 的测试目的相符;todoFixtureRecord 删除 content_revision 后仍交给 canonicalTodoDomainRecord 严格校验。两文件共 +4/-0,没有新增测试、协议或抽象。
规范:docs/quota-allocation.md,revision 3ed5d6b;Goal Review Cadence implemented;Explicit completed-Todo cadence implemented。既有 required-work-context、quota cadence 和 typed domain/source owner 一起核对,没有把作者声明当验收依据。
扫描既有 tests/examples、完整队列及同作者近期 PR:相关维护触及不同失败边界,这两项修正原测试,没有新增同形示例或低价值 scaffold。

对主干的风险

完整模块 B 为 10 passed / 2 failed,H 为 12 passed。实际 Node fixture/domain 对照验证 native/legacy 普通字段相同、输入未变、非法字段仍拒绝;共享迁移与验收消费者 57 passed / 0 failed / 15 PostgreSQL skipped。typecheck、Ruff、diff check 通过。初次私有 probe 漏掉必需的 done/archive_state,被正确拒绝;补全合成输入后的独立对照通过,原失败保留。
未验证真实 PostgreSQL、全仓、安装态 UI 或 live host;15 个 PG 跳过不算通过。本改动不更改 provider 或产品状态规则。对共享 fixture 的严格字段反例和 File/SQLite 消费者已覆盖当前风险。
未查询、轮询或等待 CI;评审以独立的基础版本和当前版本验证为依据。
未来重构检查:metadata 适配保留在现有 fixture,复用现有 domain owner;无需另建通用过滤器,避免把非法字段全部吞掉。

我的整体评价

APPROVE,无阻塞发现。该结论仅覆盖这次精确版本的完整测试维护改动,恢复了可用回归检查;不宣告产品 Goal 完成、模型采纳、安装升级或其它 provider 已验收。当前规范依据与完整正反路径相符。

English verdict: APPROVE — 809a180; current fixture boundary restored and independently qualified against 3ed5d6b; retained exact assertions and negative sensitivity pass; no blocking findings.

Signed-off-by: mika <211269698+mikamikasuki@users.noreply.github.com>
@mikamikasuki
mikamikasuki force-pushed the codex/loopx-replan-periodic-test-profile branch from 809a180 to 94912c6 Compare October 9, 2026 03:27
@huangruiteng
huangruiteng merged commit 1b7aeb0 into loopx-project:main Oct 9, 2026
20 of 26 checks 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