mirror of
https://bitbucket.org/siakitem/my-pi.git
synced 2026-08-28 08:35:57 +00:00
2.4 KiB
2.4 KiB
issue, issue_title
| issue | issue_title |
|---|---|
| 51 | Generalize session approvals to all permission surfaces with wildcard patterns |
Retro: #51 — Generalize session approvals to all permission surfaces with wildcard patterns
Final Retrospective (2026-05-04T23:36Z)
Session summary
Implemented generalized session approvals across all permission surfaces (bash, mcp, skill, tools) in 6 commits released as v4.3.0.
The work added a pattern-suggest module, extended checkPermission session evaluation to all surface branches, wired the gate with sessionApproval pass-through, made the dialog label dynamic, and threaded sessionLabel through the full prompt chain. 44 new tests (754 → 798), all green, no breaking changes.
Observations
What went well
- TDD cycle was clean across all 5 steps — every step went red→green on first implementation attempt with no rework.
- The existing
evaluate()engine handled cross-surface session rules without modification; the work was purely additive at thecheckPermissionand handler layers. - The
suggestSessionPatterndesign as pure functions with no IO made step 1 trivially testable.
What caused friction (agent side)
missing-context— The plan's "Module-Level Changes" listedtool-call.ts,permission-gate.ts,permission-dialog.ts, andpermission-prompts.tsfor step 5, but the actualsessionLabelthreading required changes tosrc/handlers/types.ts,src/forwarded-permissions/polling.ts, andsrc/runtime.ts(the full callback chain). I had to trace the chain at implementation time:deps.promptPermission→runtime.promptPermission→confirmPermission→requestPermissionDecisionFromUi. Impact: ~5 extra read/grep calls to map the chain before writing code. No rework, but added friction.missing-context— FirstEditattempt ontests/handlers/tool-call.test.tsfailed with "Found 2 occurrences" because the file had two identical closing sequences (expect(result).toEqual({});\n });\n});\n). Impact: one failed tool call, immediate retry with wider context. Self-identified.
What caused friction (user side)
- No significant friction from the user side. The plan was well-specified and the session flow was smooth.
Changes made
- Added planning guidance to
AGENTS.md(Testing section): plans must list every file in callback/threading chains, not just entry and exit points.