mirror of
https://bitbucket.org/siakitem/my-pi.git
synced 2026-08-28 08:35:57 +00:00
1.9 KiB
1.9 KiB
issue, issue_title
| issue | issue_title |
|---|---|
| 126 | refactor: extract ExtensionPaths value object from ExtensionRuntime |
Retro: #126 — extract ExtensionPaths value object
Final Retrospective (2026-05-08T00:20:00Z)
Session summary
Extracted six immutable path fields from ExtensionRuntime into a new ExtensionPaths interface and computeExtensionPaths() factory in src/extension-paths.ts.
Updated ExtensionRuntime to extends ExtensionPaths, delegated path computation in createExtensionRuntime, and narrowed HandlerDeps.piInfrastructureDirs to readonly string[].
Shipped as v5.7.0 with zero behavioral change. 11 new unit tests; total suite 1245 tests across 55 files.
Observations
What went well
- Plan-to-ship pipeline was smooth.
Three phases (plan → TDD → ship) completed in a single session with no rework.
The plan's risk table predicted the exact
readonly string[]assignability issue and thediscoverGlobalNodeModulesRootmock-interception strategy, both of which played out as described. - Transitive mock interception worked cleanly.
The existing
vi.mock("../src/node-modules-discovery")inruntime.test.tscontinued to intercept correctly throughcomputeExtensionPaths, avoiding any mock-target migration. The plan listed this as the simpler of two options and it proved correct.
What caused friction (agent side)
missing-context— The plan's Module-Level Changes section listedsrc/handlers/types.tsas "Unchanged" but thereadonly string[]narrowing ofpiInfrastructureDirsinExtensionPathsmadeHandlerDeps.piInfrastructureDirs: string[]incompatible at the assignment site insrc/index.ts. Caught bypnpm run buildduring cycle 2. Impact: one extra edit tosrc/handlers/types.tsfolded into the refactor commit — no rework, added ~30 seconds. Self-identified via compiler output.
What caused friction (user side)
- None observed.