Fix task checkout branches for agent completion pushes#1673
Open
simple-agent-manager[bot] wants to merge 3 commits into
Open
Fix task checkout branches for agent completion pushes#1673simple-agent-manager[bot] wants to merge 3 commits into
simple-agent-manager[bot] wants to merge 3 commits into
Conversation
Auto-committed by SAM on agent completion.
Contributor
|
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
Validation
Preflight
Classification
External References
N/A: No external API or third-party behavior changed; this is internal SAM task dispatch and TaskRunner branch wiring.
Codebase Impact Analysis
Touched task dispatch wiring in apps/api/src/routes/tasks/submit.ts, apps/api/src/routes/tasks/run.ts, apps/api/src/routes/mcp/dispatch-tool.ts, apps/api/src/routes/mcp/orchestration-tools.ts, apps/api/src/durable-objects/sam-session/tools/dispatch-task.ts, and apps/api/src/durable-objects/sam-session/tools/retry-subtask.ts. The change keeps explicit branch behavior intact and only changes default checkout behavior to use generated task output branches.
Documentation & Specs
N/A: No public behavior, docs site content, setup flow, or user-facing copy changed. Added source-contract regression coverage in apps/api/tests/unit/task-runner-do-service.test.ts.
Constitution & Risk Check
Checked Principle XI / no hardcoded values and fail-closed security posture. The change removes default-branch checkout coupling for generated task branches without adding hardcoded environment values. Main risk is branch selection regression, covered by focused source-contract tests and API typecheck.
Notes
This is a focused fallback remediation for the confirmed default-branch auto-push risk discovered during the CTO review orchestration. It intentionally avoids changing VM-agent git push semantics and instead ensures TaskRunner workspaces start on the branch they are expected to push.