Skip to content

feat(bin): accept repeated --allow-red waivers in one merge - #5224

Closed
nodoyuna wants to merge 2 commits into
kunchenguid:mainfrom
nodoyuna:fm/fm-pr-merge-multi-waiver
Closed

nodoyuna wants to merge 2 commits into
kunchenguid:mainfrom
nodoyuna:fm/fm-pr-merge-multi-waiver

Conversation

@nodoyuna

Copy link
Copy Markdown

Intent

Extend bin/fm-pr-merge.sh so the attended --allow-red waiver can be passed REPEATEDLY in one invocation, waiving each exactly-named check, instead of today's single-waiver limit that cannot accumulate. Decision: Jev chose extend_helper (probability 0.78) under the captain's blanket Jev mandate of 2026-09-21, over a one-time admin bypass. Blocking context: PRs 250, 247, 248 and 251 in jaak-terraform-oci all fail only the two structural-gate checks ("JAAK Structural Quality" and "Measure structural quality / Compare structural metrics") on the base snapshot - the failure the gitlink PR 250 itself removes - so none can merge while the helper waives only one check per call.

What Changed

  • bin/fm-pr-merge.sh no longer refuses a second --allow-red: the "may be specified only once" guard is dropped, so each occurrence accumulates into ALLOW_RED and waives only checks with its exact name, while every other check must still be green and the head stays bound by --match-head-commit.
  • Header comment and usage line in the helper, plus the --allow-red sentences in AGENTS.md and docs/architecture.md, now describe the flag as repeatable ([--allow-red <check-name>]...) with a per-occurrence exact-name waiver, instead of a single waived check.
  • tests/fm-pr-merge.test.sh replaces the duplicate-waiver refusal case with test_allow_red_accumulates_across_repeated_flags, covering: two named waivers merging two red checks, one of two waivers still refusing on the unwaived red check, a waiver matching no red check not blocking a green merge, and a waiver naming an absent check still refusing while naming the red check.

🤖 Generated with Claude Code

Risk Assessment

✅ Low: Removes a single-use guard so --allow-red accumulates, leaving every other safety path (exact-name matching, GitLab refusal, away-posture refusal, head binding) intact, with behavioral tests covering accumulation, partial waiver refusal, and exact-name scoping.

Testing

I stood up an isolated FM state directory with a task meta plus stub gh/gh-axi binaries on PATH and drove the real bin/fm-pr-merge.sh CLI the way an operator invokes it, because an actual GitHub merge is irreversible and out of bounds here. The blocking case from the intent now works: a pull request whose only failures are the two structural-gate checks merges when each is named by its own --allow-red, and the helper issues exactly one gh pr merge ... --match-head-commit ... --squash. The same command against the pre-change helper refuses with "--allow-red may be specified only once", so the regression is reproduced before and fixed after. Adversarially, accumulation never widened into a blanket waiver: waiving one of two still refuses and names the other, an extra unwaived red check still refuses, and near-miss names (different case, trailing space) waive nothing. The surrounding guards are untouched — inline --allow-red=&lt;name&gt;, a nameless trailing flag, GitLab, and the away-posture record all still refuse before any forge call. The helper's own test file runs fully green, including the new accumulation test. This change is a shell CLI with no rendered UI surface, so there is no screenshot or visual artifact; the reviewer-visible evidence is the CLI transcript of each drive.

  • Live validation: ✅ go - 11 of 12 scenarios driven live against the product
Scenario Result Live Evidence
An operator waives both failing structural-gate checks in one merge command and the pull request merges ✅ pass live fm-pr-merge-allow-red-cli-transcript.txt, section "Scenario: both structural-gate checks waived in one invocation": exit 0 and `pr merge 250 --repo example/jaak-terraform-oci --match-head-commit bebeb…
The same two-waiver command refused before this change (regression reproduced on the base helper) ✅ pass live fm-pr-merge-allow-red-cli-transcript.txt, section "Regression baseline": base 8c1cdb7 helper prints error: --allow-red may be specified only once, exit 2, no gh pr merge
Waiving only one of two red checks still refuses and names the unwaived one ✅ pass live fm-pr-merge-allow-red-cli-transcript.txt, section "only one of two red structural checks waived": exit 1, check &#39;Measure structural quality / Compare structural metrics&#39; is not green, no gh pr merge
An unrelated third red check is not swept up by two accumulated waivers ✅ pass live fm-pr-merge-allow-red-cli-transcript.txt, section "a third unrelated red check": exit 1 naming only unit-tests, no gh pr merge
Near-miss waiver names (wrong case, trailing space) waive nothing ✅ pass live fm-pr-merge-allow-red-cli-transcript.txt, section "near-miss waiver names": both original checks still reported not green, exit 1, no gh pr merge
Waivers that match no red check leave a green pull request mergeable ✅ pass live fm-pr-merge-allow-red-cli-transcript.txt, section "Waivers that match nothing": exit 0 and pr merge 252 ... --squash
Repeating the identical check name is accepted rather than rejected as a duplicate ✅ pass live fm-pr-merge-allow-red-cli-transcript.txt, section "The same name repeated twice": exit 0 and pr merge 253 ... --squash
The separate-argument rule survives repetition: inline --allow-red=<name> and a nameless flag are still refused ✅ pass live fm-pr-merge-allow-red-cli-transcript.txt, sections "Inline --allow-red=<name>" and "trailing --allow-red with no name": exit 2 with requires a separate check name argument / requires a check name
Repeated waivers are still refused on GitLab ✅ pass live fm-pr-merge-allow-red-cli-transcript.txt, section "Repeated waivers never apply on GitLab": exit 2, --allow-red does not apply to GitLab
Repeated waivers remain attended-only: refused while the away-posture record exists ✅ pass live fm-pr-merge-allow-red-cli-transcript.txt, section "attended-only under the away-posture record": record confirmed via bin/fm-afk-contract.sh, then exit 2 with --allow-red is attended-only, no gh pr…
The helper's own regression suite covers the new accumulation behavior ✅ pass live bash tests/fm-pr-merge.test.sh → 94 ok, including ok - fm-pr-merge accumulates repeated --allow-red waivers, each still scoped to its exact name (fm-pr-merge-test-suite.log)
Merging a real GitHub pull request end-to-end with two live red structural checks ⏸️ untested no Requires a real GitHub repository, a disposable red pull request, and a credentialed gh token with merge rights; a merge is irreversible and outside this phase's authority, so the forge was stubbed wh…
Evidence: Live CLI transcript: every --allow-red scenario driven against the real helper, plus the base-commit regression baseline

Source: Live CLI transcript: every --allow-red scenario driven against the real helper, plus the base-commit regression baseline

fm-pr-merge.sh --allow-red repeated-waiver live CLI drive
worktree: ~/.no-mistakes/worktrees/41e74679a610/01M33CH3FWS7DDQX9CGPNRVFQZ
target commit: cbee0efa97b7eefc562ae876d310f761a284a83d   base: 8c1cdb7
forge: gh/gh-axi stubbed on PATH (a real merge is irreversible); the helper itself is the real binary under test

\### Regression baseline: same command against the pre-change helper (base 8c1cdb7)
$ fm-pr-merge.sh task-x1 https://github.com/example/jaak-terraform-oci/pull/250 --allow-red 'JAAK Structural Quality' --allow-red 'Measure structural quality / Compare structural metrics'
error: --allow-red may be specified only once
exit=2
(no gh pr merge issued)

\### Scenario: both structural-gate checks waived in one invocation
$ fm-pr-merge.sh task-x1 https://github.com/example/jaak-terraform-oci/pull/250 --allow-red 'JAAK Structural Quality' --allow-red 'Measure structural quality / Compare structural metrics'
armed: state/task-x1.check.sh
verified: https://github.com/example/jaak-terraform-oci/pull/250 is open and mergeable, with every required check green at head bebebebebebebebebebebebebebebebebebebebe
verified: https://github.com/example/jaak-terraform-oci/pull/250 is merged (state=MERGED, merged=true, isInMergeQueue=false)
exit=0
--- forge commands the helper actually issued ---
pr merge 250 --repo example/jaak-terraform-oci --match-head-commit bebebebebebebebebebebebebebebebebebebebe --squash

\### Adversarial: only one of two red structural checks waived
$ fm-pr-merge.sh task-x1 https://github.com/example/jaak-terraform-oci/pull/247 --allow-red JAAK\ Structural\ Quality
armed: state/task-x1.check.sh
error: refusing to merge https://github.com/example/jaak-terraform-oci/pull/247
  - check 'Measure structural quality / Compare structural metrics' is not green
error: these checks are not green: Measure structural quality / Compare structural metrics
exit=1
forge: no gh pr merge issued

\### Adversarial: a third unrelated red check is not covered by two waivers
$ fm-pr-merge.sh task-x1 https://github.com/example/jaak-terraform-oci/pull/248 --allow-red JAAK\ Structural\ Quality --allow-red Measure\ structural\ quality\ /\ Compare\ structural\ metrics
armed: state/task-x1.check.sh
error: refusing to merge https://github.com/example/jaak-terraform-oci/pull/248
  - check 'unit-tests' is not green
error: these checks are not green: unit-tests
exit=1
forge: no gh pr merge issued

\### Adversarial: near-miss waiver names (case and trailing space) must not match
$ fm-pr-merge.sh task-x1 https://github.com/example/jaak-terraform-oci/pull/251 --allow-red jaak\ structural\ quality --allow-red Measure\ structural\ quality\ /\ Compare\ structural\ metrics\ 
armed: state/task-x1.check.sh
error: refusing to merge https://github.com/example/jaak-terraform-oci/pull/251
  - check 'JAAK Structural Quality' is not green
  - check 'Measure structural quality / Compare structural metrics' is not green
error: these checks are not green: JAAK Structural Quality, Measure structural quality / Compare structural metrics
exit=1
forge: no gh pr merge issued

\### Waivers that match nothing leave a green pull request mergeable
$ fm-pr-merge.sh task-x1 https://github.com/example/jaak-terraform-oci/pull/252 --allow-red JAAK\ Structural\ Quality --allow-red Measure\ structural\ quality\ /\ Compare\ structural\ metrics --allow-red nonexistent
armed: state/task-x1.check.sh
verified: https://github.com/example/jaak-terraform-oci/pull/252 is open and mergeable, with every required check green at head bebebebebebebebebebebebebebebebebebebebe
verified: https://github.com/example/jaak-terraform-oci/pull/252 is merged (state=MERGED, merged=true, isInMergeQueue=false)
exit=0
forge: pr merge 252 --repo example/jaak-terraform-oci --match-head-commit bebebebebebebebebebebebebebebebebebebebe --squash

\### The same name repeated twice is accepted, not an error
$ fm-pr-merge.sh task-x1 https://github.com/example/jaak-terraform-oci/pull/253 --allow-red JAAK\ Structural\ Quality --allow-red JAAK\ Structural\ Quality
armed: state/task-x1.check.sh
verified: https://github.com/example/jaak-terraform-oci/pull/253 is open and mergeable, with every required check green at head bebebebebebebebebebebebebebebebebebebebe
verified: https://github.com/example/jaak-terraform-oci/pull/253 is merged (state=MERGED, merged=true, isInMergeQueue=false)
exit=0
forge: pr merge 253 --repo example/jaak-terraform-oci --match-head-commit bebebebebebebebebebebebebebebebebebebebe --squash

\### Inline --allow-red=<name> is still refused, even among repeats
$ fm-pr-merge.sh task-x1 https://github.com/example/jaak-terraform-oci/pull/254 --allow-red JAAK\ Structural\ Quality --allow-red=Measure\ structural\ quality\ /\ Compare\ structural\ metrics
error: --allow-red requires a separate check name argument
exit=2
forge: no gh pr merge issued

\### A trailing --allow-red with no name is still refused
$ fm-pr-merge.sh task-x1 https://github.com/example/jaak-terraform-oci/pull/255 --allow-red JAAK\ Structural\ Quality --allow-red
error: --allow-red requires a check name
exit=2
forge: no gh pr merge issued

\### Repeated waivers never apply on GitLab
$ fm-pr-merge.sh task-x1 https://gitlab.example/group/subgroup/project/-/merge_requests/7 --allow-red JAAK\ Structural\ Quality --allow-red Measure\ structural\ quality\ /\ Compare\ structural\ metrics
error: --allow-red does not apply to GitLab, where a merge already requires the head pipeline to have succeeded
exit=2
forge: no gh pr merge issued

\### Adversarial: repeated waivers stay attended-only under the away-posture record
(away-posture record confirmed: merge task-x1 when green)
$ fm-pr-merge.sh task-x1 .../pull/256 --allow-red JAAK\ Structural\ Quality --allow-red Measure\ structural\ quality\ /\ Compare\ structural\ metrics
error: --allow-red is attended-only; while the away-posture record exists the green check is absolute
exit=2
forge: no gh pr merge issued
Evidence: tests/fm-pr-merge.test.sh full run log (94 ok)

Source: tests/fm-pr-merge.test.sh full run log (94 ok)

ok - fm-pr-merge reports exact queue retry flags after a zero-exit false success
ok - fm-pr-merge omits merge-queue retry guidance for a closed GitHub PR
ok - fm-pr-merge aggregates agreeing merge-queue rules
ok - fm-pr-merge reports ambiguity for conflicting merge-queue rules
ok - fm-pr-merge records pr= and pr_head= for a verified GitHub merge
ok - fm-pr-merge records pr= before the forge call can land the merge
ok - fm-pr-merge propagates a real merge failure without silently succeeding
ok - fm-pr-merge refuses a GitHub merge call that leaves the PR open and unqueued
ok - fm-pr-merge keeps PR bookkeeping when it cannot read a successful merge call's outcome
ok - fm-pr-merge refuses with the forge's own output quoted apart from its verdict
ok - fm-pr-merge quotes the forge output when it cannot read the outcome either
ok - fm-pr-merge does not echo back queue flags the caller already used
ok - fm-pr-merge still names retry flags when the caller used a different method
ok - fm-pr-merge names the queue requirement even when its method is unrecognised
ok - fm-pr-merge distinguishes unreadable branch rules from a base with no merge queue
ok - fm-pr-merge reads a plan-gated 403 on branch rules as no merge queue, not unreadable
ok - fm-pr-merge says nothing about a merge queue when the base branch has no queue rule
ok - fm-pr-merge accepts only a proved merge from the gh-axi fallback
ok - fm-pr-merge explains an armed auto-merge that landed nothing on a queue-less base
ok - fm-pr-merge never reports auto-merge as armed when the merge command failed
ok - fm-pr-merge claims no acceptance for a failed merge command carrying queue flags
ok - fm-pr-merge falls back to the gh-axi view when gh's read fails
ok - fm-pr-merge names a landed state hiding behind a failed GitHub merge command
ok - fm-pr-merge refuses a GitHub merge when gh is missing, before recording
ok - fm-pr-merge refuses a GitHub merge when gh is missing rather than merging blind
ok - fm-pr-merge verifies a genuinely merged GitHub pull request
ok - fm-pr-merge refuses to claim a merge when poll recording fails
ok - fm-pr-merge accepts and accurately reports a GitHub merge-queue entry
ok - fm-pr-merge explains how to retry with the required GitHub merge queue method
ok - fm-pr-merge refuses branch deletion unless --attended-override is passed
ok - fm-pr-merge refuses before merging when task meta is missing
ok - fm-pr-merge refuses malformed PR URLs before calling gh-axi
ok - fm-pr-merge refuses unsafe PR URL segments before recording state
ok - fm-pr-merge refuses repo override args before recording state
ok - fm-pr-merge refuses a bundled short-option repo override and refuses -d unless attended
ok - fm-pr-merge does not add default --squash when the caller passes an explicit merge method
ok - fm-pr-merge respects --method=<value> as an explicit merge method
ok - fm-pr-merge parses a GitHub PR URL into gh-axi number and --repo arguments
ok - fm-pr-merge refuses a caller --sha on GitHub because the head comes from the live read
ok - fm-pr-merge merges a GitLab merge request through glab instead of refusing it
ok - fm-pr-merge takes the GitLab instance from the URL rather than assuming one
ok - fm-pr-merge imposes no merge method on GitLab, leaving the project's own one
ok - fm-pr-merge refuses GitLab source-branch deletion unless --attended-override is passed
ok - fm-pr-merge propagates a real glab merge failure without silently succeeding
ok - fm-pr-merge refuses on each GitLab pre-merge condition independently
ok - fm-pr-merge reports every failing GitLab condition, not only the first
ok - fm-pr-merge reports a stale recorded head and verifies the live one
ok - fm-pr-merge refuses an unreadable GitLab merge request state rather than merging blind
ok - fm-pr-merge refuses a GitLab head commit it cannot validate
ok - fm-pr-merge refuses before recording anything when glab or jq is absent
ok - fm-pr-merge refuses a GitLab head override before recording state
ok - a merge a secondmate home performs itself is reported upward exactly once
ok - a locally routed secondmate home reports the landed PR into its parent's own channel
ok - a landed GitLab merge request is reported upward on the same channel
ok - a queued GitLab merge stays silent and leaves confirmation to the armed poll
ok - a refused or failed merge reports no outcome
ok - a GitLab merge refused before the forge call reports no outcome
ok - a merge a main home performs itself leaves one durable wake naming the PR
ok - a queued GitHub merge stays silent and leaves confirmation to the armed poll
ok - distinct merged PRs for one task retain distinct captain-facing wakes
ok - an uncommitted marker retry preserves at least one durable outcome
ok - a secondmate home that cannot report upward says so instead of merging in silence
ok - fm-pr-merge proceeds when the home carries no backlog at all
ok - fm-pr-merge refuses when the backlog exists but cannot be read
ok - fm-pr-merge refuses when its configured backend cannot be read
ok - fm-pr-merge refuses when its user backend configuration cannot be read
ok - fm-pr-merge refuses when its user backend configuration directory cannot be traversed
ok - fm-pr-merge proceeds once when its user configuration directory and backlog are genuinely absent
ok - fm-pr-merge honors a backend override over an unreadable user configuration
ok - fm-pr-merge refuses red GitHub checks and waives only a named --allow-red check
ok - fm-pr-merge refuses a draft pull request and one with no boolean draft state
ok - fm-pr-merge merges when a failed check run was replaced by a passing re-run
ok - fm-pr-merge never lets a check run supersede a legacy status context
ok - fm-pr-merge still refuses when a check's current run failed after an earlier pass
ok - fm-pr-merge uses start order when the old success finishes last
ok - fm-pr-merge supersedes an old cancellation that finishes last
ok - fm-pr-merge keeps a check red while its re-run is still in flight
ok - fm-pr-merge never lets one check's pass clear another check's failure
ok - fm-pr-merge clears a failure only on a proven later pass of the same check
ok - fm-pr-merge keeps --allow-red scoped to its named check beside a superseded failure
ok - fm-pr-merge rechecks away presence before an attended red merge
ok - fm-pr-merge accepts each red-check waiver only as one separate name
ok - fm-pr-merge accumulates repeated --allow-red waivers, each still scoped to its exact name
ok - while the away-posture record exists any green merge lands under away authority, yolo or not, and attended merges stay untagged
ok - under the away-posture record the branch merges a green task, is refused on a red check with or without --allow-red, and is refused at the partition while attended
ok - a branch merge refuses under the lock when the away record is archived during preflight
ok - away posture permits immediate merges but refuses every asynchronous path
ok - away merge proceeds on a plan-gated 403 because that repository cannot have a merge queue
ok - the away record does not bypass red checks, and a recorded pr= must match the URL
ok - an unreadable away-posture record refuses the merge instead of skipping the record
ok - no away-record archive or replacement lands between the authority read and the merge
ok - a record made unreadable before the merge's own authority read refuses the merge
ok - a merge that cannot lock the away record refuses instead of merging unlocked
ok - fm-pr-merge refuses --allow-red on GitLab
Evidence: Blocking case before vs after
# base 8c1cdb7
$ fm-pr-merge.sh task-x1 .../pull/250 --allow-red 'JAAK Structural Quality' --allow-red 'Measure structural quality / Compare structural metrics'
error: --allow-red may be specified only once
exit=2

# target cbee0ef
$ fm-pr-merge.sh task-x1 .../pull/250 --allow-red 'JAAK Structural Quality' --allow-red 'Measure structural quality / Compare structural metrics'
verified: .../pull/250 is open and mergeable, with every required check green at head bebebebe...
verified: .../pull/250 is merged (state=MERGED, merged=true, isInMergeQueue=false)
exit=0
forge: pr merge 250 --repo example/jaak-terraform-oci --match-head-commit bebebebe... --squash

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

✅ **Review** - passed

✅ No issues found.

✅ **Test** - passed

✅ No issues found.

  • Live validation: ✅ go - 11 of 12 scenarios driven live against the product
Scenario Result Live Evidence
An operator waives both failing structural-gate checks in one merge command and the pull request merges ✅ pass live fm-pr-merge-allow-red-cli-transcript.txt, section "Scenario: both structural-gate checks waived in one invocation": exit 0 and `pr merge 250 --repo example/jaak-terraform-oci --match-head-commit bebeb…
The same two-waiver command refused before this change (regression reproduced on the base helper) ✅ pass live fm-pr-merge-allow-red-cli-transcript.txt, section "Regression baseline": base 8c1cdb7 helper prints error: --allow-red may be specified only once, exit 2, no gh pr merge
Waiving only one of two red checks still refuses and names the unwaived one ✅ pass live fm-pr-merge-allow-red-cli-transcript.txt, section "only one of two red structural checks waived": exit 1, check &#39;Measure structural quality / Compare structural metrics&#39; is not green, no gh pr merge
An unrelated third red check is not swept up by two accumulated waivers ✅ pass live fm-pr-merge-allow-red-cli-transcript.txt, section "a third unrelated red check": exit 1 naming only unit-tests, no gh pr merge
Near-miss waiver names (wrong case, trailing space) waive nothing ✅ pass live fm-pr-merge-allow-red-cli-transcript.txt, section "near-miss waiver names": both original checks still reported not green, exit 1, no gh pr merge
Waivers that match no red check leave a green pull request mergeable ✅ pass live fm-pr-merge-allow-red-cli-transcript.txt, section "Waivers that match nothing": exit 0 and pr merge 252 ... --squash
Repeating the identical check name is accepted rather than rejected as a duplicate ✅ pass live fm-pr-merge-allow-red-cli-transcript.txt, section "The same name repeated twice": exit 0 and pr merge 253 ... --squash
The separate-argument rule survives repetition: inline --allow-red=<name> and a nameless flag are still refused ✅ pass live fm-pr-merge-allow-red-cli-transcript.txt, sections "Inline --allow-red=<name>" and "trailing --allow-red with no name": exit 2 with requires a separate check name argument / requires a check name
Repeated waivers are still refused on GitLab ✅ pass live fm-pr-merge-allow-red-cli-transcript.txt, section "Repeated waivers never apply on GitLab": exit 2, --allow-red does not apply to GitLab
Repeated waivers remain attended-only: refused while the away-posture record exists ✅ pass live fm-pr-merge-allow-red-cli-transcript.txt, section "attended-only under the away-posture record": record confirmed via bin/fm-afk-contract.sh, then exit 2 with --allow-red is attended-only, no gh pr…
The helper's own regression suite covers the new accumulation behavior ✅ pass live bash tests/fm-pr-merge.test.sh → 94 ok, including ok - fm-pr-merge accumulates repeated --allow-red waivers, each still scoped to its exact name (fm-pr-merge-test-suite.log)
Merging a real GitHub pull request end-to-end with two live red structural checks ⏸️ untested no Requires a real GitHub repository, a disposable red pull request, and a credentialed gh token with merge rights; a merge is irreversible and outside this phase's authority, so the forge was stubbed wh…
  • Live CLI drive: fm-pr-merge.sh task-x1 https://github.com/example/jaak-terraform-oci/pull/250 --allow-red &#39;JAAK Structural Quality&#39; --allow-red &#39;Measure structural quality / Compare structural metrics&#39; against the target helper (merges, exit 0)
  • Same command driven against the base-commit helper extracted via git archive 8c1cdb7 bin (refuses with error: --allow-red may be specified only once, exit 2)
  • Live CLI drive waiving only 1 of 2 red checks (refuses, names the unwaived check, no gh pr merge)
  • Live CLI drive with a third unwaived red check unit-tests beside two waivers (refuses naming only unit-tests)
  • Live CLI drive with near-miss waiver names (lowercased name, trailing space) — neither matches, both checks stay red
  • Live CLI drive with waivers matching no red check on a green PR (still merges)
  • Live CLI drive repeating the identical name twice (accepted, merges)
  • Live CLI drive of --allow-red=&lt;name&gt; inline form and trailing --allow-red with no name (both exit 2)
  • Live CLI drive with repeated waivers on a GitLab MR URL (exit 2, GitLab refusal)
  • Live CLI drive with repeated waivers under a confirmed away-posture record via bin/fm-afk-contract.sh propose/confirm (exit 2, attended-only refusal, no merge)
  • bash tests/fm-pr-merge.test.sh (94 ok, includes test_allow_red_accumulates_across_repeated_flags)
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

The attended GitHub red-check waiver can now be passed more than once in
a single fm-pr-merge.sh invocation, each occurrence waiving only checks
with that exact name. Every other check must still be green at the live
head, and the away-posture and GitLab refusals are unchanged.
@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate: stamped waiting-ci.

HEAD cbee0efa97b7eefc562ae876d310f761a284a83d. Attestation MATCH. workflow-zero yes. MERGEABLE/UNSTABLE.

contract-class: opt-in — unconfigured merge path unchanged. Extends the existing attended --allow-red <check-name> so it may be repeated (each exact-name waiver accumulates); still refuses away-posture, GitLab, nameless/= forms, and any unwaived red check. Not a new default-on merge authority.

VISION: One captain/interface aligns (clearer multi-check waive UX under explicit instruction); Authority aligns (still requires current explicit captain-named checks; no blanket waiver); Scripts/judgment aligns (helper mechanics + tests); Restart n/a; Delegation aligns (attended merge helper only); Fleet/vendor aligns (GitHub-only waive unchanged); Scope aligns (merge helper / docs). Align.

Diff reviewed (AGENTS.md, bin/fm-pr-merge.sh, docs, tests). Approved fork runs this pass: CI 35677608700, Require no-mistakes 35677608630. Waiting on green; then eligible for auto-merge as opt-in + MATCH.

Security FYI (not a merge gate while CI pending): multi-waiver still exact-name only; does not widen into admin/--auto or away red merges.

@nodoyuna

Copy link
Copy Markdown
Author

[AGENT] Closing as stale (no activity for more than 5 days) during the backlog cleanup Javi requested on 2026-10-16. The branch is kept; reopen this PR if the work is still needed.

@nodoyuna nodoyuna closed this Oct 16, 2026
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.

2 participants