Skip to content

fix(quota): render selection recovery without scheduler context - #6394

Open
hhyykk wants to merge 1 commit into
loopx-project:mainfrom
hhyykk:codex/loopx-self-opt-round2
Open

hhyykk wants to merge 1 commit into
loopx-project:mainfrom
hhyykk:codex/loopx-self-opt-round2

Conversation

@hhyykk

@hhyykk hhyykk commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

Goal And Delivered Outcome

When explicit action selection is deferred or rejected and no scheduler is configured, quota can pass resolve_scheduler_execution_context(None) into the recovery command renderer. The renderer raises ValueError, so callers receive a generic quota/receipt failure instead of the intended read-only reentry command.

_selection_recovery_command now uses the existing neighboring projection policy: omit unrenderable optional scheduler arguments while retaining registry, runtime, Goal, Agent, Turn and capability arguments. Valid declared scheduler profiles remain present. The scheduler validator and typed admission/settlement rules are unchanged; a refused selection still cannot execute work or spend quota.

  • Outcome basis: demonstrated native quota failure; no separate issue required.
  • Before → after: unresolved optional scheduler context raises → recovery command is returned with the original identity and no delivery/spend permission.
  • Intended base: main at 3dd3c550afecfa0c525a34e8744a3cf06774ac94.

Author Declaration

  • Written by: model_agent — OpenAI Codex, GPT-6 family.
  • Specification: no separate written bug specification; the defect and requested behavior above are the basis. Reuses existing unadmitted selection and scheduler projection contracts at the base revision.
Criterion Disposition Symbol / path Evidence
Recover with omitted or unresolved optional scheduler context implemented interaction_contract.py::_selection_recovery_command Parameterized deferred/rejected recovery regression
Keep a declared scheduler profile and original reentry identity implemented Same existing renderer and command builder Declared generic CLI and quoted identity/path arguments
Preserve refusal of execution and spend implemented Existing interaction contract and typed consumers Full unadmitted selection suite and adjacent selection/settlement tests

Scope And Continuation

Complete within recovery command projection. Existing Python CLI glue remains the owner; no parallel decision logic, schema, provider, configuration or authority is introduced. Related broader refactoring is unnecessary: the shared renderer and existing neighboring fallback already supply the behavior. An independently reviewable repair; no rollout or merge is performed.

Validation

  • Tested revision: 12a5c685db2bad0ab6b36d55e19b32dbf5020abd (same source tested before commit).
  • Run state: finished. Inputs: synthetic fixtures and a manually driven native LoopX workflow.
Check kind Result Evidence / limitation
regression_parity passed New 6-case regression: unresolved deferred/rejected cases fail on the base; all 6 pass after repair. Omitted and declared contexts retain their behavior
unit / integration passed test_unadmitted_selection_construction.py: 56 passed; adjacent scheduler context, action-selection conflict and selected quota-settlement cases: 261 passed, 76 deselected
static passed Ruff on both changed files; control-plane typecheck; diff/compilation checks; semantic vocabulary advisory
integration passed loopx canary premerge --from-git-diff --git-diff-base origin/main: 5 direct checks and 18 selected checks, no failures or advisory failures
static / integration passed loopx check scoped to both files: no errors or warnings
real_entrypoint passed Native LoopX Goal/Todo/quota workflow exposed the actual exception. A declared generic CLI host allowed controlled continuation; portable regressions qualify the missing-context recovery boundary
manual passed Code/test/docs guard passes and scoped privacy review

These checks cover all three recovery-command callers, optional scheduler handling, reentry identity and refusal boundaries. They do not certify every host integration or complete operational qualification. Hosted CI and exact-head maintainer review remain separate; no merge authorization is inferred.

Frontend / Visual Evidence

UI impact: none. CLI recovery projection only; no visual surface changed.

Type of Change / LoopX Area

Bug fix and regression test; control plane / host runtime integration.

Technical Direction

Bounded S10 reliability/diagnostics repair under the existing overall roadmap.

Shared-authority RFC fixture impact

N/A: no authority-provider, schema, promotion, persistence or compatibility projection changes.

Boundary Checklist

  • Public-safe diff and description; no credentials, private Goal state, raw traces, internal links or local machine paths.
  • Related PRs checked; no duplicate maintainer-owned work.
  • Two-file, single-purpose repair; UI impact none.
  • DCO sign-off included.

Signed-off-by: aihop <4408344+hhyykk@users.noreply.github.com>

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant