Repository navigation
Conversation
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
✅ SSOT Configuration Compliance: Passing🎉 No new hardcoded values of either class — Known backlog in |
|
Code review (code-reviewer pass) at b55f14f Verdict: APPROVE. Every claim checks out against the code. No blocking finding. Two items are owner decisions, listed below, and are not judged here. Behind main: 0 (main is an ancestor of the head).
Owner decisions (not judged by this review)
|
|
Code review (delta check) at ff3aa6d, after the APPROVE at b55f14f. One own commit since then. |
|
Code review (code-reviewer pass) at af0e0bd
Deviations 1 and 2 in the PR body are owner decisions; the code does what is stated, and both are one-line changes if the owner objects. CodeRabbit threads: 0 inline threads; the only CodeRabbit comment is a rate-limit notice.
|
|
Branch audit (zero-change deletion). This PR shows 0 changed files against |
Thinking Path
Single-issue rationale
Both parts touch the
llc/scheduler and budget files and the same test directories, and the two #20930 items were left over from a train that already carries the rest of that issue; a separate PR would repeat a full CI run for two small changes in files this PR already edits.What Changed
llc/exceptions.py:AdapterRunFailedtakes an optionalreason, appended to its message; newAdapterAuthFailedsubclass.llc/scheduler/auth_failure.py(new): raises the subclass when the adapter result equals the sharedAUTH_FAILED_REASONconstant (no output string matching), and pauses the agent throughControlsService.pause_agent(actor_type="system")after the run row is committed. A pause failure is logged as a warning. Thecompany_idguard is kept. No new status, no migration.llc/scheduler/heartbeat_scheduler.py: uses the two helpers; the file stays at its size baseline.llc/models/budget.py,llc/api/budget.py(follow-up: minor review findings from train PR #20911 for company-os work-item hierarchy (#20478) #20930):token_limitgets a lower bound (TOKEN_LIMIT_MIN), so a value below the signed 64-bit minimum is a 422 instead of a database error.llc/scheduler/liveness_monitor.py(follow-up: minor review findings from train PR #20911 for company-os work-item hierarchy (#20478) #20930): the unfiled-recovery notice is also written to the company activity feed; the existing router publish is kept.test_auth_failure_pause_20202.py; extendedtest_budget_raise_approval_8214.pyandtest_work_item_hierarchy_18978.py._log_unfiled_recovery) runs in its own savepoint undertry/except, so a failed write is logged as a warning and can no longer fail the recovery (test added).Deviations that need the owner's review
claude_codeadapter type alone.AUTH_FAILED_REASONis produced only by those two, the subscription adapter is the one that depends on a login, and other adapters' failures stay plain (bug(company-os): native AutoBot-agent runs are never charged to a budget (cost forwarding unwired) #20883). Narrowing it is a one-line change.Please object here if either should change.
Verification
llc/+tests/unit/llc/at-n 2 --dist loadscope, after merging current main: 3585 passed, 2 skipped, 0 failed.test_the_run_row_is_failed_with_the_reason_and_the_agent_is_paused_once_after_itshows the FAILED row already committed whenpause_agentis called, on a separate session;test_a_pause_that_fails_still_leaves_the_row_failed_with_its_reasoncovers a failing pause.autobot-frontend/src/views/llc/HeartbeatMonitor.vue:76-84).Model Used
Claude Sonnet 5.5
Closes #20202
Refs #20930, #21045
🤖 Generated with Claude Code