Skip to content

fix(smokes): restore the public smoke fleet and the capability roster regression - #4359

Closed
songoow wants to merge 5 commits into
loopx-project:mainfrom
songoow:codex/public-smoke-fleet-repair
Closed

songoow wants to merge 5 commits into
loopx-project:mainfrom
songoow:codex/public-smoke-fleet-repair

Conversation

@songoow

@songoow songoow commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Behavior

Full Public Smokes has been red on main for two days (no successful run in the last ~100), with 20+ scripts failing per shard sweep. This restores the fleet by fixing one production regression and realigning the smoke contracts that drifted behind merged behavior changes. Locally 9 of the 12 first-failing scripts pass after this PR; the remaining three are listed under Boundaries.

Production fix

resolve_agent_capabilities re-read the goal registry file to obtain the registered-agent roster before the capability-memory observation. A relative or unreadable registry path silently emptied that roster, the typed handler rejected the read-only observation as an unregistered agent, and quota should-run failed with EffectRuntimeInternalError instead of returning a projection. The resolved identity already carries the authoritative roster, so it is passed through; roster entries keep agent-id normalization (they are not capability tokens).

Contract realignments

Module budgets and classification

agent-capabilities and handoff were registered without a manual/help-only classification; both are command-specific surfaces and join the help-only set. Three cohesive owners are extracted to return their modules under the 1000-line budget: quota_failure_report.py (honest failure/validation payloads, moved verbatim), support_control_chat.py (chat + dashboard registration), project_lifecycle_reward.py (reward overlay registration). quota.py 1118→928, support_control.py 1015→889, project_lifecycle.py 1014→963.

Validation

  • Focused suites: test_quota_settlement_cli 57 passed, heartbeat prompt suites 44 passed, capability-memory CLI tests 3 passed (run via importlib against the repo checkout), shadow/lease suites unaffected.
  • Full TypeScript control-plane suite: 1,490 passed (the PostgreSQL integration test requires a local service and fails identically on an unmodified checkout).
  • Ruff on all touched files; the extractions also remove the imports that only the moved code used (33→17 pre-existing warnings on those modules; the remainder are pre-existing broad-exception handlers).

Boundaries

  • turn.py (1,114 lines) exceeds the budget on main before this PR; it is a single large handler and pin-vs-extract is a maintainer decision this PR does not take.
  • configure-goal-smoke needs a complete reward_memory_experiment_config_v1 fixture since the enablement preflight landed; that is a corpus-contract decision, not an assertion drift.
  • monitor-poll-writeback's capability-declaration parity case fails identically on unmodified main and is not addressed here.

Restore four public smokes that drifted from shipped behavior:

- install-local and blocker-push asserted the pre-loopx-project#4302 closeout line; the
  task body now says `guard; 2 stalls->replan`.
- heartbeat-prompt measured the full prompt against the bare interface budget,
  ignoring the Reward Memory headroom loopx-project#4333 reserves, and asserted closeout,
  brief and documentation wording that loopx-project#4296 replaced.
- capability-gate-projection imported three private helpers that loopx-project#4254 moved
  into the typed TypeScript rule owner; it now reads the public gate.

The Reward Memory contract is an opt-in Goal policy derived from the goal
registry, so the smoke's in-process comparisons opt out explicitly instead of
relying on the builder default that in-process callers share.

Signed-off-by: song <liusongstep@gmail.com>
resolve_agent_capabilities re-read the goal registry file to obtain the
registered-agent roster, so a relative or unreadable registry path silently
emptied it and the typed handler rejected the read-only observation as an
unregistered agent. quota should-run then failed with an internal runtime
error instead of returning a capability projection.

The resolved identity already carries the authoritative roster; pass it
through. Roster entries are agent ids, not capability tokens, so they keep
agent-id normalization.

Signed-off-by: song <liusongstep@gmail.com>
…lign monitor identity

Restore the remaining public smoke contracts that depend on module budgets,
command classification and monitor-poll identity reporting:

- agent-capabilities and handoff are registered but unclassified; both are
  command-specific help surfaces, so they join the existing help-only set.
- project_lifecycle, quota and support_control each grew past the 1000-line
  budget. Extract three cohesive owners: the reward overlay registration, the
  honest quota failure/validation payloads, and the chat/dashboard pair.
- todo-user-gate readmodel and monitor-poll writeback assertions predate the
  native presentation ordering and the identity-preserving rejection report.

quota-plan, status-markdown and capability-gate also pass now that the
capability observation no longer fails on an unresolved roster.

Signed-off-by: song <liusongstep@gmail.com>
The fresh-clone quickstart asserted top-level quota_guard_command and
quota_spend_command fields that the thin agent-input projection intentionally
omits: the guard command is embedded in the task body and the spend command
arrives in the quota response's next_cli_actions.

Signed-off-by: song <liusongstep@gmail.com>
The three extracted CLI owners left their former modules with imports that
only the moved code used. Remove them and let Ruff sort the remaining blocks;
the pre-existing broad-exception handlers are unchanged.

Signed-off-by: song <liusongstep@gmail.com>
@songoow

songoow commented Sep 14, 2026

Copy link
Copy Markdown
Contributor Author

Closing as superseded: #4355 landed the same fleet restoration while this PR was in flight, covering the smoke contract realignments, the agent-capabilities/handoff classification, and the capability-memory failure on quota should-run. I verified on c5e43a161 that the previously failing scripts here now pass.

Two notes for the record:

  • fix: restore public smoke contract parity #4355 resolves the capability-memory failure by failing open (except Exception: state = {}), which also drops remembered observations whenever the status packet's registry path is unreadable. This PR instead passed the already-resolved roster from the agent identity through to the observation, keeping remembered capabilities live in that case. If that distinction matters, I can reopen that one change as a small follow-up on top of the fail-open guard.
  • fix: restore public smoke contract parity #4355 pins quota.py (1118) and support_control.py (1015) at their baselines "while each cohesive extraction lands". This branch contains two such extractions (the honest quota failure/validation payload owner, and the chat/dashboard registration pair) that retire both pins; I will resubmit them as a focused follow-up against the new baseline.

@songoow songoow closed this Sep 14, 2026
@songoow
songoow deleted the codex/public-smoke-fleet-repair branch September 16, 2026 05:54
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.

1 participant