Repository navigation
Description
Problem
In mode shadow, the decision point alternatives.reply_fixable changes the job behavior. The spec says that it must not.
src/devops_cli/roadmap/alternatives.py:1278, in_OutputChecker.check:if self.returns > 0 or band is Band.CONTINUE: return None. This line runs inshadowand inon. Only the next line checksself.chain.mode is Mode.ON.- With the point
off, the chain is None. A refusal with the codejob_verdict,no_searchorskip_onlythen always gets one return (alternatives.py:1285-1287). - In
shadow, the rule gives the bandcontinuewhen the code equals the earlier failed reason of the item. The check then returns None, so the refusal loses its return. - A run of the real
_OutputCheckerwithResolverChain(REPLY_FIXABLE, Mode.SHADOW): codeno_searchwith earlier codeno_searchgives a return inoffand no return inshadow.job_verdictandskip_onlygive the same result. - Spec
openspec/specs/roadmap-alternatives/spec.md:807-813: the point "SHALL run in modeshadowand record its band with no change to the job behavior". - The test
test_mode_shadow_records_band_without_retryuses onlyno_tool, which gets no return inoff. So no test finds this. - Measured exposure is small: 0 of 590 alternatives result lines in 7 d had one of these 3 codes. But shadow can remove a retry, and the owner reads the shadow records before turning the point on.
Expected
- In
shadow,_OutputChecker.checkrecords the band and then follows theoffpath. Only in modeondoes the bandcontinuestop the return. - Test first: in
shadow, a refusal withjob_verdict,no_searchorskip_onlywhose earlier code is the same gets its one return, as inoff. The record holds the bandcontinue. - The tests of mode
onstay green.
Alternatives check of 2026-11-19: none.
Tool: none found.
Reason: Searches for shadow-mode decision evaluation found only unrelated DOM and web pages; the need is an internal fix to the project's own _OutputChecker path, which no external tool or library covers.
Proposed design
Problem statement
In mode shadow, alternatives.reply_fixable can remove one retry that mode off gives. The cause is the Band.CONTINUE short-circuit in _OutputChecker.check, which runs before the mode check. The fix makes shadow record the band and follow the off path. Only mode on stops the return.
Acceptance criteria
Requirement: Shadow keeps the off-path return
In mode shadow, _OutputChecker.check SHALL record the band and give the same one return as mode off for a fixable refusal.
Scenario: Shadow with a repeated fixable code
- WHEN The checker runs with ResolverChain(REPLY_FIXABLE, Mode.SHADOW), the earlier code equals the refusal code, and the code is job_verdict, no_search or skip_only.
- THEN The test in tests/roadmap/test_roadmap_alternatives_reply_fixable.py asserts one return and the band continue for each code.
Requirement: Mode on stops a continue band
In mode on, the band continue MUST stop the return for a repeated fixable refusal.
Scenario: Mode on with a repeated fixable code
- WHEN The checker runs with ResolverChain(REPLY_FIXABLE, Mode.ON), the earlier code equals the refusal code, and the code is job_verdict, no_search or skip_only.
- THEN The test in tests/roadmap/test_roadmap_alternatives_reply_fixable.py asserts zero returns for each code.
Requirement: Mode off stays unchanged
In mode off, a fixable refusal SHALL get one return when the earlier code equals the refusal code.
Scenario: Mode off with a repeated fixable code
- WHEN The checker runs with a None chain, the earlier code equals the refusal code, and the code is job_verdict, no_search or skip_only.
- THEN The test in tests/roadmap/test_roadmap_alternatives_reply_fixable.py asserts one return for each code.
Existing Tool Considered
The alternatives block in the issue body records verdict none and names no tool. It searched shadow-mode decision evaluation and found no open, maintained tool. The change fixes the project's own _OutputChecker path. It builds no new tool and keeps no new code. Cost: one guard change and a regression test.
Key questions
- What does the spec require when alternatives.reply_fixable runs in mode shadow?: It must record the band and must not change the job behavior. [sources: openspec/specs/roadmap-alternatives/spec.md:807-813]
- Which refusal codes lose a return in shadow mode?: The codes job_verdict, no_search and skip_only lose their one return when the earlier code equals the refusal code. [sources: src/devops_cli/roadmap/alternatives.py:1278, src/devops_cli/roadmap/alternatives.py:1285-1287, tests/roadmap/test_roadmap_alternatives_reply_fixable.py]
- How should the check gate the continue band?: Add a chain-mode guard to the continue short-circuit. Stop the return only when the chain exists and its mode is on. Shadow and off then reach the existing one-return path. (best practice) [sources: openspec/specs/roadmap-alternatives/spec.md:807-813, src/devops_cli/roadmap/alternatives.py:1278, src/devops_cli/roadmap/alternatives.py:1285-1287]
- Chosen: Gate continue on mode on. It follows the spec and keeps the off path for shadow.
- Rejected: Treat shadow as on. It keeps the defect and changes job behavior.
- Rejected: Remove the continue band. It changes mode on behavior and breaks the spec.
- How should the regression test cover the three codes?: Add a parametrized case to tests/roadmap/test_roadmap_alternatives_reply_fixable.py. Run each code in shadow, on and off. (best practice) [sources: tests/roadmap/test_roadmap_alternatives_reply_fixable.py, src/devops_cli/roadmap/alternatives.py:1278]
- Chosen: Parametrized cases in the existing test file. It covers each code and mode with one test body.
- Rejected: One new test function for each code. It repeats setup and adds no coverage.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 19, 2026
#4864 adds the one-return behavior for refused replies; the candidate fixes shadow mode of that same point so it does not remove the return.devops-cli-service commentedon Nov 19, 2026
The result in the alternatives block of the issue body changed. Before this check: no check. A person decides what the new result means for the item.
Searches (2)
Searches run:
Sources:
devops-cli-service commentedon Nov 19, 2026
Next step: the stage job writes the plan of the item. See the section Proposed design of the body.
devops-cli-service commentedon Nov 25, 2026
Released in v0.219.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.219.0
devops-cli-service commentedon Nov 25, 2026
Live since 2026-11-25 17:09 UTC