fix(bin): honor GitLab merge request defaults - #11
Merged
Merged
Conversation
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
Diagnose and fix Firstmate's GitLab merge-request submission behavior so future direct GitLab MRs reliably request and verify both Delete source branch and Squash commits without false metadata failures. Treat source-deletion verification and missing squash submission as distinct faults until evidence joins them; compare creation and exact-MR reuse, GitLab request payloads, response fields, project defaults, and read-back behavior. Provide explicit idempotent mr-create options, preserve ambiguous-success no-retry safety and exact identity/head/authorship checks, keep omitted options delegated to GitLab project defaults, and apply this captain's local squash-and-delete preference through the existing captain-preference configuration seam rather than imposing it on every Firstmate user. Update exact help, configuration documentation, and regression coverage for creation, reuse, project defaults, response variation, and true mismatch behavior. Do not mutate existing live MRs or weaken guarded verification.
What Changed
--squashand--remove-source-branchoptions to GitLab MR creation, while leaving omitted settings to project defaults.Risk Assessment
✅ Low: Captain, the change is well-bounded, the strict affirmative preference grammar resolves the prior findings, and the guarded GitLab MR creation and reuse invariants remain intact.
Testing
The previously successful full baseline plus focused adapter, generated-brief, help, and request/read-back checks demonstrated explicit squash/delete creation, exact-MR reuse, project-default omission, response-shape fallbacks, distinct mismatch failures, guarded identity verification, and captain-scoped preference behavior; all passed with reviewer-visible CLI evidence and no UI screenshot because this change has no rendered UI surface.
Evidence: GitLab MR behavior transcript
Evidence: GitLab MR adapter validation
Evidence: Captain preference validation
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
🔧 **Review** - 1 issue found → auto-fixed (2) ✅
bin/fm-brief.sh:120- Intent requires “affirmative MR defaults,” but the parser treats any recognized line containingsquashordelete/remove source branchas affirmative. For example,- GitLab MR defaults: do not squash; do not delete source branchenables both flags, contradicting docs/configuration.md’s claim that negative prose is ignored. Captain, either reject negated phrases or define a strict positive-token grammar and add regression coverage.🔧 Fix: Honor negated GitLab MR preferences
1 warning still open:
bin/fm-brief.sh:120- Captain, the negation fix still treats common negative forms such asGitLab MR defaults: squash disabledorsquash: falseas affirmative because it recognizes only a fixed phrase list. This still conflicts with the intent’s “affirmative MR defaults” requirement and docs/configuration.md’s claim that negative prose is ignored. Use a strict positive grammar or explicitly parse option values instead of enumerating negation phrases.🔧 Fix: Enforce affirmative GitLab MR preference grammar
✅ Re-checked - no issues remain.
✅ **Test** - passed
✅ No issues found.
command -v tmux >/dev/null || { echo "tmux is required for e2e tests" >&2; exit 1; }; tmux -V; rc=0; for t in tests/*.test.sh; do echo "== $t =="; bash "$t" || rc=1; done; exit "$rc"Confirmed the configured baseline had already passed:command -v tmux …; for t in tests/*.test.sh; do bash "$t"; doneInspected the change from9845ea3e043deb43814e826f2f337ff09be8194dtof7888c4b440e91fab17f8fda57afa40e21894ababash tests/fm-forge.test.shbash tests/fm-brief.test.shbin/fm-forge.sh --help | sed -n '/mr-create/,/mr-note/p'bash -x tests/fm-forge.test.sh 2>&1 | grep -E '<relevant request/read-back assertions>'git status --short✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.