Skip to content

fix(plan): mechanical follow-ups from the PR-293 post-merge review - #297

Merged
JAORMX merged 1 commit into
mainfrom
fix/plan-approval-mechanical-followups
Jul 24, 2026
Merged

JAORMX merged 1 commit into
mainfrom
fix/plan-approval-mechanical-followups

Conversation

@jhrozek

@jhrozek jhrozek commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Post-merge review of the plan-approval gate (issue #206 / PR #293, already merged to main). This PR addresses only the mechanical findings from that review; the design-loaded ones (approve-then-cancel mode-flip loss, disconnect durable-log-tail drop, continuation-logic dedup) are deliberately left for separate decisions.

Fixes

  • server/http.go — planModeFromString now lowercases before trimming the PERMISSION_MODE_ prefix, so the documented case-insensitive spelling (permission_mode_default) is honoured instead of silently falling through to the deny/iterate fail-safe.
  • server/service.go — autoApproveWaitTimeout var → const (never overridden; matches its sibling autoApprovePollInterval).
  • app/build.go — --plan-mode-auto-approve on an interactive deployment now WARNs that it is INERT (the flag only fires headless; gate is !PlanModeAutoApprove || Interactive), mirroring normalizeAskReviewerModel's inert-when-interactive posture, instead of narrating a "NO HUMAN REVIEW" fact that does nothing there.
  • mecatui/ui/view.go — the footer W auto-accept hint is gated on ask.offerAlways, matching the action bar; a surfaced child plan ask (offerAlways=false) no longer advertises a key that no-ops.
  • permconfig — new plan_mode_auto_approve_test.go pins the operator-tier-only boundary (a project-tier plan-mode-auto-approve: is ignored with a WARN) — the one operator-tier scalar whose boundary was previously untested.
  • adr/0069 — amendment note recording that the deny path terminates via StopPlanIterate (superseded the ADR's "loop continues" design during implementation; frozen ADR corrected by note, not rewritten in place).

Notes

  • llms.txt regenerated (task docs:llms) after the ADR edit — the index is byte-identical, since the amendment note touches no field the index captures. No content change.

🤖 Generated with Claude Code

Addresses only the MECHANICAL findings from the post-merge review of the
plan-approval gate (issue #206 / PR #293). The design-loaded findings
(approve-then-cancel mode-flip loss, disconnect durable-log-tail drop,
continuation-logic dedup) are deliberately left for separate decisions.

- server/http.go: planModeFromString lowercases BEFORE trimming the
  PERMISSION_MODE_ prefix, so the documented case-insensitive spelling
  ("permission_mode_default") is honoured instead of silently falling
  through to deny/iterate.
- server/service.go: autoApproveWaitTimeout var -> const (never overridden;
  matches its sibling const autoApprovePollInterval).
- app/build.go: --plan-mode-auto-approve on an INTERACTIVE deployment now
  WARNs it is INERT (the flag only fires headless), mirroring
  normalizeAskReviewerModel's inert-when-interactive posture, instead of
  narrating a "NO HUMAN REVIEW" fact that does nothing.
- mecatui/ui/view.go: the footer "W auto-accept" hint is gated on
  ask.offerAlways, matching the action bar; a surfaced child plan ask
  (offerAlways=false) no longer advertises a key that no-ops.
- permconfig: new plan_mode_auto_approve_test.go pins the operator-tier-only
  boundary (a project-tier plan-mode-auto-approve: is ignored with a WARN) —
  the one operator-tier scalar whose boundary was previously untested.
- adr/0069: amendment note recording the deny path terminates via
  StopPlanIterate (superseded the ADR's "loop continues" design; frozen ADR
  corrected by note, not rewritten in place).

NOTE: llms.txt must be regenerated (task docs:llms) after the ADR edit; the
sandbox could not fetch the matlatl module to do so here.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@JAORMX
JAORMX merged commit 3abdd32 into main Jul 24, 2026
14 checks passed
@JAORMX
JAORMX deleted the fix/plan-approval-mechanical-followups branch July 24, 2026 04:57
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