Skip to content

Guide chargeable goal resumptions to change strategy - #1156

Open
KeenWill wants to merge 1 commit into
agent/daemon-live-absorb-fleet-soak-harnessfrom
agent/daemon-live-chargeable-resume-guidance
Open

Guide chargeable goal resumptions to change strategy#1156
KeenWill wants to merge 1 commit into
agent/daemon-live-absorb-fleet-soak-harnessfrom
agent/daemon-live-chargeable-resume-guidance

Conversation

@KeenWill

Copy link
Copy Markdown
Owner

Outcome

Chargeable automatic goal resumptions now receive typed strategy guidance instead of replaying the original goal statement unchanged. Unchargeable infrastructure, provider, rate-limit, reconciliation-timeout, and restart failures continue to reuse the original input without consuming the configured attempt budget.

The runtime classifies the exact failed turn through the existing durable failure classifier. If that read fails, the bounded automatic-resume loop retries infrastructure failure and leaves the goal visibly blocked on exhaustion rather than guessing.

123 meaningfully changed lines (excluding lockfiles).

Validation

  • Focused all-feature goal-mode tests: 23 passed
  • Workspace all-target/all-feature check and clippy passed
  • Workspace doctests and warning-denied rustdoc passed
  • Release signalboxd build passed
  • Documentation, domain-spine, migration, numeric-bound, panic-gate, and formatting checks passed
  • Full workspace tests reached only host-environment failures: group-writable worktree ancestors rejected by local-socket safety tests, and the rebuilt host lacks the US/Eastern zoneinfo alias. The affected process test suite passed 25 tests with 2 ignored.

Deployment

Deployed head: f8cd23845. Startup and the public runtime health checks passed.

Numeric bounds added: none. Existing required dogfood values are base backoff 120s, cap 1800s, attempt budget 20, and startup retry 1s.

Copilot AI lite review requested due to automatic review settings August 23, 2026 02:34
@coderabbitai

coderabbitai Bot commented Aug 23, 2026

Copy link
Copy Markdown

Warning

Your free Security trial is over. An organization admin can activate billing to continue.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for security reviews. Please try again later.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Aug 23, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: eaa53bbe-6c57-4ebf-8868-cd72c11615b3

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f8cd238450

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

u32::try_from(spent).unwrap_or(u32::MAX)
}

fn automatic_resume_guidance(unchargeable: bool) -> Result<Option<GoalGuidance>, GoalTextError> {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Replace the boolean classification with a labeled enum

At the added call sites, false means chargeable and true means unchargeable, so reversing either literal silently changes whether strategy guidance is injected. This is the boolean-blindness case prohibited by docs/style.md; represent the classification with a named two-variant enum so the polarity is visible and checked at every call.

AGENTS.md reference: AGENTS.md:L14-L15

Useful? React with 👍 / 👎.

Comment on lines +1426 to +1430
let guidance = automatic_resume_guidance(false)
.expect("the static guidance is admitted")
.expect("a chargeable failure carries guidance");

assert_eq!(guidance.as_str(), CHARGEABLE_FAILURE_RESUME_GUIDANCE);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Test the durable automatic-resume path

If attempt_automatic_resume flips the classification, always constructs Resume(None), or fails to persist the guidance as the next turn's input, both new tests still pass because they invoke only automatic_resume_guidance and compare its wrapper against the same constant used to construct it. Exercise the classification-to-command-to-accepted-input path so these tests classify the behavior their names claim.

AGENTS.md reference: AGENTS.md:L231-L237

Useful? React with 👍 / 👎.

Comment thread docs/spec/goal-mode.md
Comment on lines +210 to +211
answered them, and every other event ends it. Below the required configured
chargeable-attempt budget, the appended need text states that automatic

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Remove the stale twenty-attempt contract

When automatic_resume_attempt_budget is configured to anything other than 20, this changed paragraph correctly describes a configured budget, but the same section still calls it a “twenty-attempt goal budget” on line 224 and the page header still promises a “twenty-attempt ceiling” on line 24. Because this page owns the implemented cross-crate behavior, those remaining claims now contradict the changed contract and should also refer to the configured budget.

AGENTS.md reference: AGENTS.md:L46-L49

Useful? React with 👍 / 👎.

@github-actions

Copy link
Copy Markdown
Contributor

Rust coverage (report only)

Report only. This measurement has no threshold, gates no merge, and
fails no check; it exists so untested code stays visible.

Measured suite Outcome
workspace (--all-targets --all-features) success
persistence PostgreSQL (--ignored) success
signalboxd PostgreSQL (--ignored) failure
terminal-client PostgreSQL (--ignored) success
What this number does not measure
  • Doctests. cargo llvm-cov --doctests needs a nightly
    toolchain; this workspace pins stable, so the compile-fail
    sealing proofs and every other doctest are outside the
    denominator.
  • Live smokes, which spend real network requests or
    credentials and are never run here: the tools-github and
    tools-web smokes stay --ignored, and the whole-daemon and
    real-provider terminal smokes are skipped by name above.
  • The Swift native client, which Xcode measures separately.
  • One environment-clearing test in signalbox-tools-exec,
    which instrumenting its supervisor process perturbs. The
    workflow comment on the workspace step states why; rust.yml
    runs that test uninstrumented and gates on it.
  • Dedicated test files. cargo-llvm-cov excludes tests/
    and benches/ targets and *tests.rs modules from the
    report by default, so that test code is counted neither
    covered nor uncovered here. Inline #[cfg(test)] modules
    inside a source file are the exception: they are
    instrumented, and they land on both sides. A test body
    that ran counts as covered, which makes every percentage
    below optimistic; the body of an #[ignore]d test no
    measured suite runs counts as uncovered, which puts test
    lines into the file ranking. Read both tables as close,
    not exact.
Measure Covered Total Percent
Lines 253865 311053 81.61%
Functions 20705 25157 82.30%
Regions 321628 402425 79.92%

Per crate, least-covered first

Crate Line % Lines Function % Region %
crates/program-runtime 7.57% 38/502 5.77% 6.13%
crates/runner-wire 60.41% 644/1066 62.67% 59.14%
apps/signalboxd 63.67% 35476/55715 70.84% 63.56%
crates/tools-sessions 65.06% 378/581 63.29% 61.68%
apps/signalbox-runner 69.47% 1784/2568 70.93% 70.29%
crates/approval-judge-eval 73.87% 492/666 76.12% 76.41%
crates/tool-schema-derive 74.20% 279/376 88.00% 72.42%
crates/tools-basic 75.37% 771/1023 66.15% 79.16%
crates/model-runtime-claude-cli 76.49% 1653/2161 73.10% 77.35%
crates/tools-github 77.06% 2408/3125 74.19% 74.82%
crates/tools-exec 77.76% 5196/6682 75.04% 74.13%
apps/client 78.88% 13283/16840 89.58% 75.76%
crates/persistence 80.07% 53927/67346 78.03% 75.48%
crates/tools-code-host 80.39% 7089/8818 80.46% 76.60%
crates/blob-store-filesystem 80.50% 1371/1703 70.17% 80.45%
crates/model-provider-runtime 81.47% 2454/3012 85.71% 79.95%
crates/blob-store 82.31% 307/373 75.41% 83.49%
crates/tools-conversations 83.01% 508/612 83.78% 77.65%
crates/egress-transport 85.35% 134/157 83.33% 77.61%
crates/conversation-import-claude-code 85.45% 740/866 66.09% 84.67%
crates/tools-plan 85.71% 768/896 88.89% 81.74%
crates/conversation-import-codex 85.76% 873/1018 64.00% 83.56%
crates/tools-workspace 86.36% 2977/3447 82.14% 87.30%
crates/tools-web 86.59% 2978/3439 87.93% 85.03%
crates/tools-git 87.40% 8750/10011 86.50% 83.24%
crates/application 88.63% 19154/21610 87.86% 88.80%
crates/model-runtime-codex-cli 90.00% 1548/1720 90.98% 89.95%
crates/test-bin 90.91% 10/11 100.00% 70.00%
crates/domain 92.28% 60106/65137 91.36% 94.12%
crates/web-contract 92.31% 408/442 82.61% 82.09%
crates/conversation-import-json 92.51% 284/307 96.88% 91.36%
crates/model-runtime-openai 93.55% 3812/4075 97.50% 91.72%
crates/process-protocol 93.67% 8469/9041 95.89% 86.68%
crates/model-runtime-anthropic 93.88% 3910/4165 97.51% 91.26%
crates/model-runtime 93.98% 9221/9812 93.29% 94.72%
crates/expect-table 95.60% 977/1022 100.00% 95.75%
crates/tool-contract 97.18% 688/708 96.47% 95.54%

25 files with the most uncovered lines

File Uncovered lines Line %
apps/signalboxd/src/process_runtime.rs 6572 53.42%
apps/signalboxd/src/repo_watch_runtime.rs 2235 69.20%
apps/signalboxd/src/runner_protocol_runtime.rs 2212 34.75%
crates/persistence/src/submit_input.rs 2071 71.81%
apps/client/src/lib.rs 1697 79.51%
apps/signalboxd/src/review_orchestration_runtime.rs 1333 2.56%
apps/signalboxd/src/main.rs 1303 47.46%
crates/persistence/src/model_execution.rs 1243 84.60%
crates/domain/src/turn_eligibility.rs 1223 90.33%
crates/persistence/src/runner_protocol.rs 1157 82.16%
crates/tools-code-host/src/code_host/github.rs 1052 76.26%
crates/persistence/src/review_workflow.rs 997 77.35%
crates/tools-exec/src/bin/signalbox-exec-supervisor.rs 885 45.61%
crates/persistence/src/tool_loop.rs 732 76.49%
crates/tools-github/src/lib.rs 717 76.47%
apps/signalboxd/src/convergence_sweep_runtime.rs 683 22.21%
apps/client/src/presentation.rs 680 80.55%
crates/persistence/src/process_read.rs 679 82.35%
apps/signalboxd/src/lib.rs 647 72.20%
crates/domain/src/submit_input.rs 640 88.03%
apps/signalboxd/src/daemon_tools.rs 573 89.68%
crates/process-protocol/src/lib.rs 572 93.67%
crates/persistence/src/review_orchestration.rs 569 75.66%
crates/persistence/src/session_delegation.rs 543 77.63%
crates/application/src/model_execution.rs 541 86.05%

Measured at 9c54ea255b13d5fdd0a3a6d5e759a7f430f65007, the merge commit this pull request builds, whose head is f8cd2384503a434a4ee3aa34b080f525c2773ab3, by run 32613184296, which uploads the HTML report and LCOV as an artifact.

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.

2 participants