Skip to content

Runner defers failure-side tracker transition for retry-eligible attempts - #776

Draft
rensei-ai[bot] wants to merge 2 commits into
mainfrom
defer-provider-error-transition
Draft

rensei-ai[bot] wants to merge 2 commits into
mainfrom
defer-provider-error-transition

Conversation

@rensei-ai

@rensei-ai rensei-ai Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Defers the failure-side tracker transition when work opts in and a provider-error failure happens before any tool call, so a re-dispatch starts from the same state. The skipped transition is recorded on the terminal result for later completion.

Confirmed the current path first: a failed session on a result-sensitive type resolves to its fail status (agent-failed branch in runner/sdlc.go), including provider errors.

Rework update (merge with main): merged origin/main into this branch as a plain merge commit (no rebase/force-push). Two content conflicts resolved, both keeping both sides: runner/types.go keeps the per-work opt-in flag alongside the newer per-seat budget field; the queued-work translation keeps the opt-in flag alongside the newer budget mapping. One gofumpt alignment fix on the merged hunk. No scope change beyond the merge.

Changed test files and results on the merged tree (fresh, count=1):

  • runner/sdlc_test.go + post_session_test.go: go test -race -run 'TestShouldDeferFailureTransition|TestResultSessionToolCalls|TestRunPostSession_ProviderError' ./runner/ -> ok github.com/RenseiAI/donmai/runner 1.641s
  • daemon/poll_test.go: go test -race -run 'TestPollItemToSessionDetail_DeferFailureTransition' ./daemon/ -> ok github.com/RenseiAI/donmai/daemon 1.571s
  • afcli/agent_run_pull_request_plumbing_test.go: go test -race -run 'TestDetailToQueuedWork_DeferFailureTransitionSurvives' ./afcli/ -> ok github.com/RenseiAI/donmai/afcli 1.575s
  • runner/operational_payload_test.go: go test -race -run 'TestOperationalPayloadProjection' ./runner/ -> ok github.com/RenseiAI/donmai/runner 1.296s (cached)

Revert proof (mutated zero-tool-call gate to always defer, restored after):

  • RED: --- FAIL: TestRunPostSession_ProviderErrorWithToolCallsTransitions (post_session_test.go:645: expected 1 proxy call (tool call ran, no deferral); got 0)
  • GREEN after restore: ok github.com/RenseiAI/donmai/runner

Lint: 0 issues (golangci-lint run runner/... daemon/... afcli/...). Build: go build ./runner/... ./daemon/... ./afcli/... exit 0. gofmt: no diff. Guard: make guard exit 0 (self-tests OK, staged scan clean, identity clean, no-inbound-attach OK).

Smoke gap: no new smoke coverage in the smokes repo for this runner policy flag.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@github-actions

github-actions Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

Donmai native drift check

Commit: 1b1f817628ad9e66ceb99417d0c8303c18d689a9
Policy: no-severity-high

Policy passed.
Native observations: 0 (patterns: 0, conventions: 0, decisions: 0).

This is regex-based diff analysis, not a learned architectural baseline or a semantic review.
Analyzer: Donmai 0.72.53. A passed policy does not mean there are no architectural problems.

@MarkKropf
MarkKropf marked this pull request as draft October 4, 2026 10:50
Keeps the deferred failure-side transition intent; adopts main's
newer behaviour (per-seat budget plumbing, continued-request guards)
alongside it.
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.

0 participants