fix(bin): fall back to notes for non-GitHub PR links - #27
Merged
Merged
Conversation
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.
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.
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
--notewhentasks-axirejects a non-GitHub PR link, covering both teardown and crash recovery.--prhandling for GitHub pull-request URLs.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.
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
bin/fm-test-run.sh --changed --exclude-family real-herdr-gated🔧 Fix: Classify GitLab recovery bug documentation
1 error still open:
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.