Skip to content

fix(bin): fall back to notes for non-GitHub PR links - #27

Merged
geojitsu merged 2 commits into
mainfrom
fm/tasks-axi-pr-validator-github-only-001
Sep 15, 2026
Merged

geojitsu merged 2 commits into
mainfrom
fm/tasks-axi-pr-validator-github-only-001

Conversation

@geojitsu

Copy link
Copy Markdown
Owner

Intent

The captain wants the bug filed as tasks-axi-pr-validator-github-only-001 fixed: an interrupted teardown's crash-recovery close can wedge forever for a GitLab-hosted project. What happened (2026-09-15): a teardown for nocout-clockout-no-passdown-001 recorded state/.backlog-close with a GitLab merge-request link (https://gitlab.com/dc-noc/nocout/-/merge_requests/17) as the --pr value, then crashed before replaying the close. bin/fm-bootstrap.sh's automatic crash-recovery replay then failed every time with: error: Task pr link must be an http(s) pull request URL ending in /pull/ because tasks-axi done --pr only accepts GitHub-style .../pull/ URLs. Firstmate had to close the task by hand as a one-off workaround (recording the MR link via --note instead of --pr) and manually delete the stale .backlog-close marker.

What Changed

  • Retry a backlog close with --note when tasks-axi rejects a non-GitHub PR link, covering both teardown and crash recovery.
  • Preserve existing --pr handling for GitHub pull-request URLs.
  • Add atomicity coverage and maintainer documentation for GitLab merge-request links.

Risk Assessment

✅ Low: The targeted shared close path retries only tasks-axi’s documented PR-link validation failure as a note, preserving GitHub behavior and allowing the affected GitLab teardown and replay paths to complete.

Testing

Completed 1 recorded test check.

  • Outcome: ⚠️ 1 error across 2 runs (2h19m23s)

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

✅ **Review** - passed

✅ No issues found.

⚠️ **Test** - 1 error
  • 🚨 tests failed with exit code 1
  • bin/fm-test-run.sh --changed --exclude-family real-herdr-gated

🔧 Fix: Classify GitLab recovery bug documentation
1 error still open:

  • 🚨 tests failed with exit code 1
  • bin/fm-test-run.sh --changed --exclude-family real-herdr-gated
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

firstmate-crewmate added 2 commits September 15, 2026 04:11
…lose

tasks-axi's own --pr validator only accepts an http(s) URL ending in
/pull/<number> (GitHub's shape). A GitLab merge-request link recorded in
state/<id>.backlog-close made bin/fm-bootstrap.sh's crash-recovery replay
fail forever with a VALIDATION_ERROR, since fm_backlog_done passed that
link straight through to tasks-axi done --pr.

fm_backlog_done now detects that specific rejection from tasks-axi's own
error text and exit status, then retries the same link recorded via
--note instead. A GitHub-shaped link is unaffected. Because
bin/fm-teardown.sh's live close and fm_backlog_close_marker_replay's
crash-recovery replay both call this one function, the fallback applies
identically either way.

tasks-axi's own --pr validator is unchanged; this is a firstmate-side
workaround, not a fix to tasks-axi itself. See docs/bugs for the full
write-up.

Adds regression tests for both the GitHub-shaped (unchanged) and
GitLab-shaped (fallback) cases, on both the live teardown path and the
bootstrap replay path.
@geojitsu
geojitsu merged commit 529267e into main Sep 15, 2026
26 of 27 checks passed
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.

1 participant