Conversation
…CADE process inheritance When running inside a CASCADE worker container, JOB_ID, JOB_TYPE, and JOB_DATA are set in the process environment. Tests in `main() - environment variable validation` must clear these before each test so the "all env vars absent" case actually sees an empty environment. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
nhopeatall
approved these changes
Apr 23, 2026
Collaborator
nhopeatall
left a comment
There was a problem hiding this comment.
Summary
LGTM - The prompt strengthening provides clear, disambiguated instructions to the agent to ensure maximum throughput, and the addition of availableSlots to the capacity check makes the state clearer in logs.
The test coverage is thorough and perfectly matches the new logic. The fix in worker-entry.test.ts to clear JOB_* env vars is a nice addition that will prevent CI/local environment flakiness.
🕵️ opencode · google/gemini-3.1-pro-preview · run details
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the backlog-manager agent so it fills ALL remaining capacity slots rather than conservatively moving only one item at a time.
Previously, with
maxInFlightItems=2and two independent backlog items, the agent would move only one to TODO. This PR strengthens the prompt language to eliminate the ambiguity.backlog-manager.eta): rewrites the CAPACITY LIMIT section and Step 3/4 to explicitly instruct the agent to move the maximum number of eligible items, adds a dedicated MAXIMIZE THROUGHPUT rule formaxInFlightItems > 1backlog-manager.yaml): task Step 2 now says "select ALL eligible unblocked items to fill remaining capacity completely — always move the maximum number possible"availableSlotsadded toPipelineCapacityResult: computed in all return paths (backlog-empty = limit,at-capacity = 0,below-capacity = limit − inFlightCount), exposed in all log payloads at call sites inpr-merged.tsandagent-execution.tsavailableSlots; 3 new prompt tests verify the strengthened language;worker-entry.test.tsgets abeforeEachfix for CASCADE process environment inheritanceTest plan
tests/unit/triggers/shared/backlog-check.test.ts— 26 tests all pass, including newavailableSlotsassertions for every reason codetests/unit/agents/prompts.test.ts— 109 tests pass; 3 new tests verify the maximize-throughput languagetests/unit/worker-entry.test.ts— 21 tests pass (fixed pre-existing failure caused byJOB_*env vars inherited from CASCADE worker process)biome check .— no issuestsc --noEmit— zero errorsTrello card
https://trello.com/c/69ea85be987570b9ab179ebc
🤖 Generated with Claude Code
🕵️ claude-code · claude-sonnet-4-6 · run details