Repository navigation
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: passed. What this changesThis PR lets automations without recorded accounts select credentials live and removes the obsolete refusal, adoption, and diagnostic paths. Example: An unbound session automation follows a conversation switched to stored account B.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Partial Merge readiness✅ Ready for maintainer review Keep open: current main still refuses affected unbound runs, and this PR resolves the previous boot-test blocker without a new actionable finding. Reviewed head: Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherCron admits an occurrence, prepares its agent or session selection, and passes credentials through the existing embedded or CLI runner to inference; Doctor separately restores eligible recorded authorizations after upgrades. flowchart TD
A[Scheduled occurrence] --> B[Occurrence admission]
B --> C[Account selection]
C --> D[Recorded binding]
C --> E[Live credential planner]
D --> F[Embedded or CLI runner]
E --> F
F --> G[Inference provider]
Technical reviewBest possible solution: Land the scoped refusal removal using the existing credential planners while preserving recorded bindings and receipt-backed restoration. Do we have a high-confidence way to reproduce the issue? Current-main source establishes the refusal path, and the supplied paired Gateway results reproduce an unbound session job failing after an account switch; this read-only review ran no target code. Is this the best way to solve the issue? Removing the scheduled-only refusal at its shared callers addresses the cause, and retiring its adoption and warning machinery avoids a competing selection policy. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against f3d7932f1eb1. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource -835, Tests -1250, Docs -25, Other -4. Total -2114 across 49 files. Added test files: 1. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall readiness starts with the lower of the proof and patch scores. It is capped at 3/6 if the fix is partial, the change offers little benefit, a product decision is still open, or the PR reverses an earlier decision without saying why. ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (2 earlier review cycles)Reviewed November 29, 2026, 6:14 PM ET / 23:14 UTC (Revision 3). |
e074ade to
ac10e3c
Compare
|
Use the account selection from #202833, including explicit session accounts. Keep existing account captures, model aliases and upgrade-receipt recovery. Remove the obsolete boot adoption of jobs without a saved account.
b777e9e to
933f8b0
Compare
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Related: #202699 (first, non-breaking cut)
What Problem This Solves
An automation created without a recorded inference account stops running after its session switches to a stored account, even though an interactive turn works. It fails with "Automation has no recorded inference account." The same refusal blocks stored-account fallbacks, scheduled CLI runs on native login, and creation on non-stored credential routes such as AWS SDK.
User Impact
Unbound automations use the account an interactive turn would select. Session-target jobs follow the session's current account choice, including an explicit switch, and fallbacks select credentials live. Existing recorded bindings, including automatically captured ones, stay authoritative. Explicit
model@profilepins, replacement and revocation refusal, #207097's auto-disable for a signed-out recorded account, configured-key recovery of a dead binding, native-CLI credential isolation, schedules and run history are unchanged. Unbound jobs need no migration or manual adoption.Why This Change Was Made
This removes the refusal instead of building another account-authorization layer around it, and reuses the existing live-selection planner and fallback chain. Removed with it:
Doctor's receipt-backed restoration of recorded accounts after a state upgrade is kept. Binding capture at creation and
currenttarget behavior are unchanged. This PR does not soften existing bindings or stop capturing them for new jobs; that would change a working path.Main changes reconciled in this rebase:
systemEventAccountstays stored as written. Doctor's recovery of recorded bindings after a state upgrade now covers recorded system-event bindings too. Thetest:e2e:system-event-accountscenario now expects no adoption and a successful live run.Review follow-ups from the previous revision:
Evidence
Head
9a44264f962e, rebased on main58f1d4143051. The Gateway proof below ran on933f8b041d65. The follow-up commit9a44264fonly changes Gateway boot: it now runs Doctor's account repair only when a job has a recorded account and an applied upgrade receipt exists. Its consumer testsrc/state/state-upgrade.test.tsnow asserts that boot leaves an unbound job unchanged and never starts the repair. That test,state-upgrade.large-agent-db.test.tsandtest/docker-entrypoint.test.tspass.local-container. An unbound session job; the owner switches the session to stored account B.58f1d414:error, "Automation has no recorded inference account…", no provider request.ok/succeeded. The automation turn ran on B (HTTP 200, 1024-token limit). The relay maps synthetic account aliases to one real ClawRouter key and sends upstream modelgpt-4.1-mini. It logs aliases and statuses only, never credentials or headers.2026.11.12. Jobs were created and run on stable. The fixed source build then took over the same state, anddoctor --fix --non-interactiveexited 0.cron_jobs.job_jsonrows were byte-identical before the upgrade, after it, and after the post-upgrade runs. That covers name, enabled, schedule, session target, payload, delivery andinferenceBinding, includingauthorizationId. The five jobs included a disabled cron-expression job with its own pin.gpt-4oand the account order became b,a:model@openai:aok, account Aok, account Aok, configured keyok, account BNo inference-account startup warnings appeared, and
doctor --lintreported nocron-inference-accountsfinding.src/cron/cron-execution-diagnostics.e2e.test.ts, from fix: point automations to their signed-out account #208493, passed in the same lease.pnpm check:changed: format, lint, core and test typechecks, and all ratchets pass. The dead-export scan reports only exports in files this PR does not touch, inherited from main:src/auto-reply/reply/queue/envelope.ts,src/commands/doctor-retained-runtime.tsandsrc/tui/tui-types.ts,ui/src/components/session-menu-view.tsxandui/src/pages/chat/chat-session-commands.ts. It is not claimed green.