Skip to content

[Bug]: two shipped public smokes now contradict #7587's projection contract and fail on main (hot-path quota payload) #7653

Open

Description

@JasonBuildAI

Preflight

  • I searched existing issues and discussions for this behavior.
  • This report is not an unpatched security vulnerability.
  • The report and attachments contain no credentials or private/internal material.

Issue origin

Reproduced in a real environment (native Windows source checkout).

LoopX version or commit

9dcdc0bacd455a8cf6f6146f052ffc4df0f5d04a (current main, LoopX 2.2.0).

Host or runtime surface

Not host-specific; reproduced on native Windows 11 / CPython 3.14.

LoopX area

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

Problem

Two shipped public smokes assert a hot-path shape that the current projection no longer produces, so both fail on a clean main checkout. The underlying cause is a narrower version of the behavior #7587 intentionally introduced.

loopx/control_plane/quota/diagnostic_projection.ts classifies each diagnostic row with knownItem():

const scalar = (value: unknown) => value === null || ["string", "number", "boolean"].includes(typeof value);
return item !== null && (...) && Object.entries(item).every(([key, field]) => ITEM_FIELDS.has(key) &&
  (scalar(field) || (Array.isArray(field) && field.every(scalar))));

ITEM_FIELDS is TODO_CANONICAL_READ_RECORD_FIELDS, and that contract declares structured fields — resume_condition, decision_scope, global_gate, required_decision_scopes, blocked_retry, completion_continuation. A row carrying any of them therefore fails the scalar test, is classified unfamiliar, and is preserved verbatim by #7587's rule. #7587 named exactly this case in its own description: "a task carrying a structured recovery condition".

Measured effect (bounded, not unbounded). The per-lane ceiling still applies: deferred_items keeps at most deferred_visibility_limit = 8 rows. What changed is that lanes previously omitted entirely are now emitted, and the retained rows keep a duplicated title and the full nested condition. Through the real project_asset_todo_summary builder plus the hot-path projection on 9dcdc0bac:

rows carry resume_condition hot agent_todo_summary bytes lanes emitted
no 1,999 first_executable_items: 3
yes 12,003 items, recent_completed_advancement_items, deferred_items: 8, deferred_resume_candidates: 8, first_executable_items: 3

That is a 6.0x (10,004-byte) increase for the ordinary shape of a Goal with parked work, re-sent on every automatic turn.

Minimal reproduction

From a clean source checkout of 9dcdc0bac:

python3 examples/control_plane/todo-durability-fixture-smoke.py
python3 examples/control_plane/control-plane-integrated-canary-smoke.py --max-seconds 400

Observed at 9dcdc0bac: the first exits 1 at assert "deferred_items" not in agent_todos; the second fails at assert "title" not in item. Both exit 0 at 97d38f9a8, immediately before #7557.

Expected behavior

This issue does not assert which side is correct; both are defensible and the maintainer decides:

  • If fix(quota): bound mixed diagnostic summaries without losing unfamiliar records #7587's preservation rule is authoritative, the two smokes encode the retired contract and should be updated to the accepted shape.
  • If the hot path must still omit these lanes, knownItem() should treat contract-declared structured fields as known rather than unfamiliar — the predicate currently conflates "field value is structured" with "field is not part of this build's contract".

Either way, main should not ship two smokes that disagree with the merged projection contract.

Why this matters

  1. The nightly full-public sweep has been red since 2026-10-28 (ccf6aacc, smoke-fleet-health failure) after passing on 2026-10-27 (98c4ba31); these two smokes are part of that sweep.
  2. The disagreement is silent: the projection reports omitted_lanes without these lanes, so a reader cannot tell the shape changed.
  3. The cost recurs per turn on the absolute_hot_path surface rather than once.

Additional context

Activity

  1. JasonBuildAI commented on Oct 29, 2026

    @JasonBuildAI
    ContributorAuthor

    Correction to the impact section

    My first draft called this "unbounded". That was wrong and I am correcting it: the per-lane ceiling still applies (deferred_items keeps at most deferred_visibility_limit = 8 rows). The real defect is narrower and still reproducible:

    1. The hot path stops omitting lanes it used to remove entirely. With a structured resume_condition on the rows, deferred_items, deferred_resume_candidates, items and recent_completed_advancement_items are now emitted where the pre-Preserve complete context in shared quota diagnostics #7557 projection emitted none of them.
    2. Each retained lane keeps all 8 rows verbatim, including the duplicated title and the full nested condition, instead of the previous bounded shape.

    Measured through the real project_asset_todo_summary builder and the hot-path projection on 9dcdc0bac:

    without resume_condition: 1,999 bytes, lanes={'first_executable_items': 3}
    with    resume_condition: 12,003 bytes, lanes={'items': 3, 'recent_completed_advancement_items': 3,
                                                   'deferred_items': 8, 'deferred_resume_candidates': 8,
                                                   'first_executable_items': 3}
    growth: 10,004 bytes (6.0x)
    

    Because resume_condition is a contract-declared field that the resume planner itself writes onto parked Todos, this shape is the normal case for a Goal with deferred work rather than an uncommon diagnostic.

    The two shipped smokes named above fail on current main because of exactly this: todo-durability-fixture-smoke.py asserts the hot path omits deferred_items, and control-plane-integrated-canary-smoke.py asserts the retained rows do not carry a duplicate title. Both are in the nightly full-public sweep. I am not claiming they are PR-required checks.

    I am also withdrawing the kernel-contracts claim from the first draft: that step passes on 9dcdc0bac, and the failure I saw came from comparing against a stale local base rather than from this defect.

  2. changed the title [-][Bug]: hot-path quota payload keeps every deferred Todo once a row carries a structured canonical field, breaking the bounded summary and two required smokes[/-] [+][Bug]: two shipped public smokes now contradict #7587's projection contract and fail on main (hot-path quota payload)[/+] on Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions