fix(#483): defer target_branch until after default branch discovery - #488
Conversation
|
/fs-fix make the command |
|
🤖 Finished Fix · ✅ Success · Started 9:34 AM UTC · Completed 9:39 AM UTC |
Reorder branch discovery commands in SKILL.md so `gh repo view` is tried first, followed by `git rev-parse` and `git symbolic-ref` as fallbacks. Addresses review feedback on #488
🔧 Fix agent — iteration 1 (human-triggered)Reordered branch discovery commands in SKILL.md per human instruction: gh repo view is now the first method tried, with git rev-parse and git symbolic-ref as fallbacks. Fixed (1):
Tests: passed Updated by fullsend fix agent |
|
/fs-review |
|
🤖 Finished Review · ✅ Success · Started 9:41 AM UTC · Completed 9:56 AM UTC |
ReviewFindingsMedium
Low
Previous runReviewFindingsMedium
Low
Labels: PR fixes a bug in the code agent's branch validation logic (scripts/post-code.src.sh, skills/code-implementation/SKILL.md) |
|
/fs-fix |
|
🤖 Finished Fix · ✅ Success · Started 9:59 AM UTC · Completed 10:05 AM UTC |
🔧 Fix agent — iteration 2 (human-triggered)Addressed 2 of 5 review findings with code changes: rewrote contradictory documentation wording in SKILL.md and added a substring-matching edge-case test. Disagreed with 3 informational findings (protected-path requires human approval, authorization-change is intentional per #483, test-integrity refactor is out of scope). Fixed (2):
Disagreed (3):
Tests: passed Updated by fullsend fix agent |
- Reword documentation-coherence issue in SKILL.md: replace "Do not
hardcode main as a fallback" with "Do not skip discovery and assume
main" to align with the ${DEFAULT_BRANCH:-main} fallback in the jq
template (documentation-coherence finding).
- Add substring-not-accepted test case to verify comma-wrapping
rejects partial matches like "release" when only "release-1" and
"release-2" are in the allowed list (edge-case finding).
Addresses review feedback on #488
|
/fs-fix rebase and resolve conflicts |
|
🤖 Finished Fix · ✅ Success · Started 10:09 AM UTC · Completed 10:14 AM UTC |
🔧 Fix agent — iteration 3 (human-triggered)Rebased agent/483-defer-target-branch onto origin/main, resolving one conflict in skills/code-implementation/SKILL.md where main renamed code-result.json to agent-result.json (PR #377). Resolution keeps our branch's ${DEFAULT_BRANCH:-main} variable substitution with the new filename. All 76 post-code tests pass. Bundle check passes. Fixed (1):
Tests: passed Updated by fullsend fix agent |
Reorder branch discovery commands in SKILL.md so `gh repo view` is tried first, followed by `git rev-parse` and `git symbolic-ref` as fallbacks. Addresses review feedback on #488
- Reword documentation-coherence issue in SKILL.md: replace "Do not
hardcode main as a fallback" with "Do not skip discovery and assume
main" to align with the ${DEFAULT_BRANCH:-main} fallback in the jq
template (documentation-coherence finding).
- Add substring-not-accepted test case to verify comma-wrapping
rejects partial matches like "release" when only "release-1" and
"release-2" are in the allowed list (edge-case finding).
Addresses review feedback on #488
b050b0f to
bb81f63
Compare
|
/fs-fix rebase and resolve conflicts. |
|
🤖 Finished Fix · ❌ Failure · Started 9:53 AM UTC · Completed 10:01 AM UTC |
The code agent hardcoded target_branch to "main" when branch discovery failed in the sandbox. The post-code script then rejected the output on repos with a non-main default branch (e.g. "master"). Two changes fix this: 1. SKILL.md step 3: Add fallback discovery commands (git symbolic-ref, gh repo view) so the agent tries multiple methods before writing target_branch. Document that the post-script auto-corrects when no explicit allowed list is configured. 2. post-code.src.sh: When CODE_ALLOWED_TARGET_BRANCHES is unset and the agent's target doesn't match the API-discovered default, auto- correct to the default branch with a warning instead of hard-failing. Hard failure is preserved when an explicit allowed list is set. Bundled script (post-code.sh) regenerated via make script-build. 8 new test cases cover the branch validation decision matrix. Note: pre-commit could not run in the sandbox (network restrictions). The post-script runs an authoritative pre-commit check on the runner. Closes #483
Reorder branch discovery commands in SKILL.md so `gh repo view` is tried first, followed by `git rev-parse` and `git symbolic-ref` as fallbacks. Addresses review feedback on #488
- Reword documentation-coherence issue in SKILL.md: replace "Do not
hardcode main as a fallback" with "Do not skip discovery and assume
main" to align with the ${DEFAULT_BRANCH:-main} fallback in the jq
template (documentation-coherence finding).
- Add substring-not-accepted test case to verify comma-wrapping
rejects partial matches like "release" when only "release-1" and
"release-2" are in the allowed list (edge-case finding).
Addresses review feedback on #488
|
The fix agent completed, but the post-fix script failed before finishing. Workflow run: https://github.com/fullsend-ai/.fullsend/actions/runs/30532374812 Details: |
bb81f63 to
5793196
Compare
|
/fs-review |
|
🤖 Finished Review · ✅ Success · Started 6:49 AM UTC · Completed 7:07 AM UTC |
|
🤖 Finished Retro · ✅ Success · Started 7:29 AM UTC · Completed 7:40 AM UTC |
Retro: PR #488 — fix(#483): defer target_branch until after default branch discoveryThe workflow for issue #483 / PR #488 was largely successful. The code agent produced a solid 4-file fix with 8 test cases in ~8 minutes. The review agent found actionable issues (documentation-coherence, edge-case test coverage) that led to concrete code improvements via the fix agent. The human reviewer added value by requesting branch discovery command reordering (prioritizing Timeline summary: 8 agent runs (1 triage, 1 code, 4 fix, 2 review) over 3 days, with ~1 hour of active agent/human work on day 1. One fix run failed due to infrastructure (not agent error). PR merged after human approval. Fix run 4 failure (infrastructure): The fix agent's rebase and push succeeded, but Review nondeterminism: The second review (on identical code for the relevant file) surfaced a new Medium finding ([behavior-description-incomplete] on Documentation gap merged unaddressed: The review agent's second pass correctly identified that Branch discovery and sandbox compatibility: The human's first intervention was reordering branch discovery to prioritize No novel proposals. All identified improvement opportunities are already tracked by existing open issues. The workflow demonstrates that the triage → code → review → fix pipeline works well for this class of bug fix. |
Reorder branch discovery commands in SKILL.md so `gh repo view` is tried first, followed by `git rev-parse` and `git symbolic-ref` as fallbacks. Addresses review feedback on #488
- Reword documentation-coherence issue in SKILL.md: replace "Do not
hardcode main as a fallback" with "Do not skip discovery and assume
main" to align with the ${DEFAULT_BRANCH:-main} fallback in the jq
template (documentation-coherence finding).
- Add substring-not-accepted test case to verify comma-wrapping
rejects partial matches like "release" when only "release-1" and
"release-2" are in the allowed list (edge-case finding).
Addresses review feedback on #488
Reorder branch discovery commands in SKILL.md so `gh repo view` is tried first, followed by `git rev-parse` and `git symbolic-ref` as fallbacks. Addresses review feedback on fullsend-ai#488
- Reword documentation-coherence issue in SKILL.md: replace "Do not
hardcode main as a fallback" with "Do not skip discovery and assume
main" to align with the ${DEFAULT_BRANCH:-main} fallback in the jq
template (documentation-coherence finding).
- Add substring-not-accepted test case to verify comma-wrapping
rejects partial matches like "release" when only "release-1" and
"release-2" are in the allowed list (edge-case finding).
Addresses review feedback on fullsend-ai#488
Summary
Fixes branch validation failures on repos with non-
maindefault branches by:skills/code-implementation/SKILL.md(step 3): Adding fallback branch discovery commands (git symbolic-ref,gh repo view) so the agent tries multiple methods before writingtarget_branch. Documents that the post-script auto-corrects when no explicit allowed list is configured.scripts/post-code.src.sh: WhenCODE_ALLOWED_TARGET_BRANCHESis unset and the agent's target doesn't match the API-discovered default, auto-correcting to the default branch with a warning instead of hard-failing. Hard failure is preserved when an explicit allowed list is set.scripts/post-code.sh: Regenerated viamake script-build.scripts/post-code-test.sh: 8 new test cases covering the branch validation decision matrix (auto-correct, explicit list reject, match, wildcard, no-target fallback, etc.).Testing
make check-bundleconfirms bundled script is in syncpost-triage-test.sh(prerequisites-creates-allowed-issue) is unrelated to these changesCloses #483
Post-script verification
agent/483-defer-target-branch)3760b3bb70de32596c1922332fb96e76cd9ebcd8..HEAD)