9.0 KiB
issue, issue_title
| issue | issue_title |
|---|---|
| 527 | pi-permission-system: delete dead yolo arms from the prompt path; dissolve yolo-mode.ts |
Retro: #527 — delete dead yolo arms from the prompt path; dissolve yolo-mode.ts
Stage: Planning (2026-07-05T00:00:00Z)
Session summary
Planned Phase 8 Step 3: a pure narrowing that deletes the two unreachable yolo branches Step 2 (#526) left behind (the PermissionPrompter auto-approve arm and PromptingGateway.canConfirm()'s yolo arm), dissolves src/yolo-mode.ts by moving isYoloModeEnabled into extension-config.ts, and drops the now-dead config dependency from PermissionPrompterDeps and PromptingGatewayDeps.
The plan is four commits (three refactor: cycles plus a docs: completion commit) and is the tail of the "yolo-recorded-authority" release batch, so it ships now.
Observations
- The issue text says only "move
isYoloModeEnabled"; tracing the twoshouldAutoApprovePermissionStatecall sites showed the prompter arm is the only caller passing a variablestate— once it is removed, the serve arm always passes"ask", soshouldAutoApprovePermissionStatecollapses toisYoloModeEnabledand is deleted rather than moved. The serve arm re-points atisYoloModeEnabled(behavior-identical), keepingtest/permission-forwarder.test.tsgreen as the invariant pin. - Removing the
configfield from both dependency bags is a dependency-width narrowing, so the design-review checklist confirmed no new structural smell — the fixes are inline, not a follow-up. - The safety of deleting the prompter arm rests on the exhaustive reachability trace recorded in the #526 retro (no
askreaches the prompter under yolo); cited it in "Invariants at risk" rather than re-deriving it. test/yolo-mode.test.tsis deleted outright: its two subjects are removed, and its loneresolvePermissionForwardingTargetSessionIdassertion duplicates an existing case intest/permission-forwarding.test.ts("isSubagent=true, no candidates set returns null"), so no relocation is needed.- Doc sweep targets:
docs/architecture/architecture.md(module tree line,prompting-gateway.tsdescription, two metric rows, Step 3✅marker + Mermaid node) anddocs/architecture/permission-prompter.md(the #526 retro flagged this one rides with #527). NoREADME.mdcommand-surface change.
Stage: Implementation — TDD (2026-07-05T00:00:00Z)
Session summary
Executed all four planned commits: removed PermissionPrompter's dead auto-approve arm, reduced PromptingGateway.canConfirm() to hasUI ∨ isSubagent and deleted canResolveAskPermissionRequest/AskPermissionResolutionOptions, dissolved src/yolo-mode.ts (moved isYoloModeEnabled into extension-config.ts, deleted shouldAutoApprovePermissionState, re-pointed the forwarded-inbox serve arm), then updated architecture.md (Step 3 ✅ marker, Mermaid node, module tree, two metric rows) and permission-prompter.md.
Test count moved 2299 → 2283 (removed 4 prompter yolo tests, 1 gateway yolo test, 8 yolo-mode.test.ts tests; added 3 isYoloModeEnabled tests in extension-config.test.ts).
The pre-completion-reviewer returned PASS on the first dispatch.
Observations
- No deviations from the plan — all four TDD steps landed exactly as designed, including the dependency-bag narrowing (
configdropped from bothPermissionPrompterDepsandPromptingGatewayDeps) and the serve-arm re-point toisYoloModeEnabledwith the Phase 9 retention comment. - Followed the plan's metrics-table guidance by prefixing
✅on the Target-column values for "yolo checks on the ask path" and "canConfirm() predicates" (matching the precedent indocs/architecture/history/phase-7-accesspath-universal-representation.md) rather than mutating the frozen "Phase 7 close" baseline column. - The
test/permission-forwarder.test.tsserve-arm test needed no edit — confirmed the plan's claim thatisYoloModeEnabledis behavior-identical to the oldshouldAutoApprovePermissionState("ask", …)call it replaced. - Pre-completion reviewer: PASS.
Reviewer warnings: one non-blocking note —
architecture.md's "Target: the authority model" section (~line 500) still namesyolo-mode.tsin a "today these concerns are spread across…" sentence; this was outside the plan's declared doc-sweep scope (module tree, Step 3 marker, two metric rows,permission-prompter.md) and is left for a future spine-related doc pass. - Batch status: this is the tail of "yolo-recorded-authority" (Steps 2, 3) —
/ship-issueshould now merge the release-please PR left open by #526'smid-batch — defermarker.
Stage: Final Retrospective (2026-07-06T00:45:00Z)
Session summary
Shipped Phase 8 Step 3 across three stages (plan, TDD, ship) that ran essentially without rework: the plan matched the implementation exactly (four commits, zero deviations), the pre-completion-reviewer returned PASS on the first dispatch, CI was green on push, and the batch-tail release (pi-permission-system-v18.2.0) merged cleanly, closing both #526 and [#527].
The only friction was three minor, self-caught tool-usage slips in the ship/TDD stages, none of which caused rework or commit churn.
Observations
What went well
- Zero-deviation execution: the plan's four-commit TDD order landed verbatim, the design-review "narrowing" call held (dropping
configfromPermissionPrompterDepsandPromptingGatewayDepsintroduced no smell), and the pre-completion reviewer passed first try. This is the payoff of a plan that did the hard reasoning up front (the reachability trace, theshouldAutoApprovePermissionState-collapses-to-isYoloModeEnabledinsight). - Cross-session context bridge worked as designed: the #526 retro's exhaustive reachability trace ("no
askreaches the prompter under yolo") was cited directly in the plan's "Invariants at risk" and reused by the pre-completion reviewer, so the prompter-arm deletion was never re-litigated. - Batch-tail release coordination was frictionless: the plan's
**Release:**marker drove the ship decision with no operator prompt, and/ship-issueclosed both batch members (#526 deferred from a prior session, [#527] this session) against the singlev18.2.0release. - Incremental verification cadence:
pnpm run checkran immediately after each interface-narrowing step, the affected test file after each red/green, and the full suite + lint +fallow dead-codebefore the pre-completion dispatch — no end-only verification gap.
What caused friction (agent side)
other(tool-arg misuse) — during the release-PR merge, passed a$(gh pr view 545 --json headRefOid -q .headRefOid)shell substitution asci_find'sexpected_sha.ci_findis not a shell, so it received the literal string and timed out after ~125s / 7 retries. Recovered automatically from the timeout'slast_seen_sha: e5eca3c (run 28760232176)hint, feeding the run id straight toci_watch. This was also a minor deviation from/ship-issuestep 6.4, which prescribes re-pollinggh pr view --json statusCheckRollupfor a release PR's in-progress check rather than reaching forci_find/ci_watch. Impact: ~2 min wait, no rework. Self-identified.other(careless multi-edit) — a step-2Editonprompting-gateway.tsinserted a stray// eslint-disable-next-line no-restricted-syntax -- placeholder removed belowline aboveprompt(details:. Caught it on the immediate re-read and removed it before the commit. Impact: one extraEdit, no commit churn. Self-identified.other(tool-schema slip) — twice included an invalidnewText_notekey inside anEditedits[]entry (the forwarder import edit and thearchitecture.mdmetrics edit); both were rejected with "must not have additional properties" and retried immediately with the key removed. Impact: 2 rejected calls, no rework. Self-identified.
What caused friction (user side)
- None — the issue was the operator's own, well-specified, and required no mid-session correction or clarification.
Diagnostic details
- Model-performance correlation — one subagent dispatch (
pre-completion-reviewer) on judgment-heavy review work; appropriate assignment, PASS first try. No reasoning-weak-model-on-judgment or high-cost-model-on-mechanical mismatch. - Feedback-loop gap analysis — verification ran incrementally throughout TDD (per-step
check+ affected test file), not only at the end; no gap to flag. - Escalation-delay / unused-tool — no
rabbit-holeormissing-contextfriction; theci_findtimeout was a single tool call (its 7 retries are internal), so no >5-call escalation and no subagent/colgrepopportunity was missed.
Changes made
- Added this Final Retrospective stage entry to
packages/pi-permission-system/docs/retro/0527-delete-dead-yolo-arms.md. - No
AGENTS.mdor prompt changes — the operator confirmed retro-only; the one substantive slip (ci_findon a release-PR in-progress check) is already covered by/ship-issuestep 6.4'sstatusCheckRollupre-poll guidance.