Skip to content

fix(smoke): pin quota todo summaries to the complete contract - #9028

Open
Seyamalam wants to merge 1 commit into
loopx-project:mainfrom
Seyamalam:devin/fix-compaction-schema-smokes
Open

Seyamalam wants to merge 1 commit into
loopx-project:mainfrom
Seyamalam:devin/fix-compaction-schema-smokes

Conversation

@Seyamalam

Copy link
Copy Markdown
Contributor

Goal And Delivered Outcome

  • Outcome basis / optional anchor: Reproduced defect on main — two shipped public smokes fail deterministically.

Reproduction (before, on 4a0188c1c):

$ python3 examples/control_plane/todo-durability-fixture-smoke.py
AssertionError: {... 'payload_compaction': {'schema_version':
  'quota_todo_summary_payload_compaction_v0', ...} ...}

$ python3 examples/control_plane/control-plane-integrated-canary-smoke.py
AssertionError: {... 'payload_compaction': {'schema_version':
  'quota_todo_summary_payload_compaction_v0', ...} ...}
# then: "title" not in routed["agent_lane_next_action"]
# then: "active_state_next_action" not in routed

git bisect (script = the durability smoke) pins the drift to 37067bada ("feat: make the complete work contract the quota default", merged 2026-11-18): it replaced the progressive_enabled context gate with complete_context = not scheduler_observation, so the quota should-run hot path now emits the complete todo summary (first_executable_items, payload_compaction.schema_version = quota_todo_summary_payload_compaction_v0, complete routed records carrying title, and the durable active_state_next_action surfaced read-only) instead of the bounded CLI-compact projection stamped quota_cli_todo_summary_compaction_v0 (which remains for the separate TS diagnostic-projection lane). These smokes were last green on 225698b31; the issue reporter revalidated them there under #7653.

After:

$ python3 examples/control_plane/todo-durability-fixture-smoke.py
todo-durability-fixture-smoke ok

$ python3 examples/control_plane/control-plane-integrated-canary-smoke.py
control-plane-integrated-canary-smoke ok provider=file elapsed=10.85s
control-plane-integrated-canary-smoke ok provider=sqlite elapsed=10.73s
  • Goal/source and gap: three stale expectations tracing to the same reviewed change:
    1. payload_compaction.schema_version at todo-durability-fixture-smoke.py:170 and control-plane-integrated-canary-smoke.py:189 still expected quota_cli_todo_summary_compaction_v0. The hot path has stamped QUOTA_PAYLOAD_COMPACTION_SCHEMA_VERSION (quota_todo_summary_payload_compaction_v0, loopx/control_plane/todos/quota_summary.py:21) since July; 37067bada made that complete summary the default lane, so the emitted schema is the reviewed contract (tests/control_plane/test_quota_cli_projection.py:23, tests/control_plane/test_cli_output_budget.py:1479 already pin the new name; :1091 pins the old name for the diagnostic lane, untouched here).
    2. assert "title" not in routed["agent_lane_next_action"] expected the compact-lane shape; the complete contract retains title, so the assert now pins title == SUCCESSOR_TODO_TITLE instead of dropping coverage.
    3. assert "active_state_next_action" not in routed expected the durable field hidden; the complete context surfaces it read-only, so the assert now pins it to the fixture's durable text — while goal_route_hint (selected_action_differs_from_durable=True, goal_next_action_mutation="none") still proves routing ignores it.
  • Observable before → after, with the validation row that proves it: both smokes fail on 4a0188c1c with the above AssertionErrors and pass end to end on the head (canary on both providers).
  • Issue/task and intended base: Refreshes the smoke-red half of [Bug]: two shipped public smokes now contradict #7587's projection contract and fail on main (hot-path quota payload) #7653 (the payload-growth observation there is a separate design question, out of scope); base is main.

Author Declaration

  • Written by: Seyamalam

Implemented against

  • Specification and revision: The shipped complete-contract output at main 4a0188c1c — loopx/control_plane/todos/quota_summary.py:21,297, the complete_context default in loopx/cli_commands/quota_should_run.py post-37067bada, and the unit-test pins cited above.
  • Criteria:
Criterion (spec clause) Disposition Symbol / path Test or command
Hot-path payload_compaction carries the shipped schema name implemented payload_compaction.schema_version in both smokes both smoke commands above
Complete routed record retains title implemented routed["agent_lane_next_action"]["title"] control-plane-integrated-canary-smoke (file + sqlite)
Surfaced active_state_next_action is the durable fixture text; routing still differs and mutates nothing implemented routed["active_state_next_action"] + unchanged goal_route_hint asserts same
No not in assertions weakened to vacuous implemented replaced with positive value pins same
  • Self-check before submission: Reproduced both failures on unmodified main, bisected the drift to 37067bada, confirmed the smoke files are byte-identical between 225698b31 (passing) and 4a0188c1c (failing) so the producer side is the reviewed contract, iterated both smokes to green on both providers, ruff check and git diff --check clean.

Scope And Continuation

  • Completed scope and remaining work: Complete within this scope — both smokes pass against the complete contract.
  • Slice boundary / successor: N/A.

Validation

  • Tested revision: aa9f7b30d16223ca807dbf3287d57a776dcf59bb
  • Run state: finished
  • Input classes: synthetic (smokes construct fixture state; no project state or model calls)
Check kind Result Public-safe evidence / limitation
regression_parity passed python3 examples/control_plane/todo-durability-fixture-smoke.py and python3 examples/control_plane/control-plane-integrated-canary-smoke.py fail on 4a0188c1c (schema/title/active_state_next_action AssertionErrors above) and pass on the head; bisect script = durability smoke, 37067bada is first-bad.
static passed ruff check on both edited files; git diff --check clean.
unit not_run No runtime path changed — the diff touches only smoke expectations; the smokes exercise the real quota should-run CLI output.

Frontend / Visual Evidence

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

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Refactoring (no functional changes)
  • Documentation update
  • Test update

LoopX Area

  • Control plane (goals, todos, quota, scheduler, registry, runtime)
  • Benchmark boundary (adapters, runners, verifiers, scoring, evidence)
  • Capability or extension (providers, adapters, skills)
  • Public docs or presentation surface (README, protocols, dashboard)
  • Build, packaging, installer, or CI
  • Host or runtime integration

Technical Direction

  • Direction / acceptance reference, when applicable: N/A

Shared-authority RFC fixture impact

  • Production-scale fixture schema: N/A
  • Semantic dimensions changed, or reviewed no-impact rationale: N/A
  • Provider conformance arms run: N/A
  • Read-only legacy/file/PostgreSQL three-arm rehearsal (required for promotion, runtime-routing, or compatibility-projection changes): N/A

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).
  • 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 (including ledger entries) both have a diff, and the local premerge check python3 scripts/check_rfc_bilingual.py --base origin/main --head HEAD passes, or no paired RFC changed.
  • 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).

Signed-off-by: Seyamalam <seyamalam41@gmail.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: model_agent · gpt-6.2-sol · OpenAI (runtime_reported, max)

Exact head aa9f7b30d16223ca807dbf3287d57a776dcf59bb

动机 / Motivation

维护者通过两条公开 smoke 检查任务摘要和后继任务路由。 常规 quota 准入改为返回完整任务上下文后,旧 smoke 仍期望诊断视图的摘要标记,并要求省去两个已公开的字段。 这次修改让两条 smoke 检查当前输出。集成 smoke 同时校验后继任务的标题、原有 Next Action 的显示值,以及选择后继任务时没有改写这条建议。 两个存储后端的语义检查通过,本机仍未达到默认总时限。 本次变更限于两条现有 smoke 的断言。

改动思路 / Approach

沿用现有 smoke 和真实 CLI。常规 quota 读回依据主干已采用的完整上下文。后继任务的身份、标题与原 Next Action 的显示值各有断言,原有路由差异和不改写检查继续验证同一条完成路径。

具体改动 / Changes

范围为 2 个 smoke 文件,新增 6 行,删除 4 行。按 docs/quota-allocation.md 在 4a0188c1ca1b6e33a11a7e31ddb56315bc1cdd46 的规则核对了 selected-todo-route 和 durable-next-action-display。现在两处普通准入都校验完整摘要的版本标记,集成测试还校验后继任务的确切标题,以及原 Next Action 的确切内容。 Quota 约定 任务耐久性 smoke 集成 smoke

对主干的风险 / Risks

在同一份生产源码上运行两版 smoke。基线的两个脚本都因为旧摘要标记失败。当前任务耐久性 smoke 通过,集成 smoke 的 File 和 SQLite 两组语义检查也通过。 独立从真实 CLI 回包里删去后继标题,或把原 Next Action 替换为后继标题,两项变动各自触发修订后的断言。

本地标准 premerge 通过,5 项直接检查和 11 项所选检查中保留 1 项主干复杂度提示。另有 2 项诊断视图测试在基线和当前提交以相同断言失败。 本机三次执行均通过 File 和 SQLite 的语义断言,运行时间分别为 124.78、147.62 和 127.96 秒,均超过既有的 60 秒总时限。后两次分别用 Python 3.14 和 3.11 直接执行,主机仍有其他工作负载。作者报告两组共约 21.6 秒。限时失败的原因尚未查清,当前改动没有新增 CLI 调用。

我的整体评价 / Verdict

这两处断言与当前协议一致,两个故意改变结果的反例也都能捕获。当前主机的默认时限仍然失败,请补充按默认 60 秒运行的可复核环境和结果,区分加载或资源竞争与脚本自身耗时。沿用现有时限。

English verdict: REQUEST_CHANGES. The semantic assertions pass, but the existing end-to-end time limit remains unqualified on the reviewed source.

@mergify

mergify Bot commented Nov 19, 2026

Copy link
Copy Markdown

This pull request has merge conflicts with main and cannot be merged
until they are resolved. Please rebase or merge the base branch, @Seyamalam.

Choose the remote for the base repository, not an out-of-date fork.
For a fork clone, first inspect git remote -v; upstream must point
to https://github.com/loopx-project/loopx.git. If it is absent, add it
with git remote add upstream https://github.com/loopx-project/loopx.git.
Then run:

git fetch upstream
git rebase upstream/main
# Resolve each conflict, git add the resolved files, then git rebase --continue.
git push --force-with-lease origin HEAD

For a same-repository clone whose origin points to
https://github.com/loopx-project/loopx.git, use origin instead of
upstream for fetch/rebase. If you prefer merging the base, use
git merge <base-remote>/main and push normally.

Keep the DCO Signed-off-by trailer on every commit when you rebase.
https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify Bot added the needs-rebase Mergify: the pull request has merge conflicts with its base branch label Nov 19, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-rebase Mergify: the pull request has merge conflicts with its base branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants