Commit 5fff24a
bgagent
fix(agent): enforce provisioned-branch discipline in prompt
Live retest (Marrakesh epic) proved the agent ignores the platform-
provisioned branch bgagent/{task_id}/abca-NNN: it runs git checkout -b
feat/... and commits/PRs there instead. This is LLM drift, NOT a aws-samples#296
regression — the prompt text is byte-identical pre/post aws-samples#296; the agent
simply wasn't following the existing 'push to {branch_name}' line.
The rename silently breaks three platform contracts that key off the
provisioned branch: pr_url reporting (agent's commits never land on the
tracked branch -> ensure_pr finds nothing -> pr_url=null), screenshot->
Linear routing, and aws-samples#247 A4 stacking (the stacked child fetches the
predecessor's provisioned branch, which was never pushed -> falls back to
branching off main, so children don't actually stack).
Strengthen the instruction: base.py now explicitly forbids creating a new
branch and explains why (platform tracks work/preview/issue by this exact
branch); new_task.py PR step requires --head {branch_name}. Prompt-side
half of the defense-in-depth fix; platform-side reconcile/verify is
tracked separately (aws-samples#12/aws-samples#13/aws-samples#14).1 parent f4042ce commit 5fff24a
2 files changed
Lines changed: 13 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
62 | 69 | | |
63 | 70 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
41 | 44 | | |
42 | 45 | | |
43 | 46 | | |
| |||
0 commit comments