# Implementation log

2026-10-24 — Created a new branch from 1e7a693 for a stacked PR. Read PR descriptions as product feedback only; no PR patch/branch/code fetched. Reviewed the installed Pi 1.4 public extension and keybinding APIs and existing settings, command and interrupt wiring. Commands cannot be unregistered through the public API, so command edits need an explicit idle reload; shortcuts remain live. Product and technical plan written before implementation. The unrelated untracked `specs/2026-10-01-open-pr-disposition/` directory is excluded from this work.

Implemented an independent action catalog, command routing and argument completion, sparse controls settings with per-leaf provenance, live public shortcuts and three pause orders. A turn-only stop persists an interrupted scheduler generation and holds all scheduling without pausing the goal. Abort settlement checks both the originating goal and the hold. Existing command registration order and default shortcuts are preserved.

The first unit run caught TypeScript parameter properties that Node's strip-only loader cannot execute; replaced them with ordinary fields. Focused tests then passed. The first full run after that passed 1,163 of 1,165 checks: restored the pinned default command registration order and updated a narrow core mock for the new interruption component. Existing SDK user workflows and supported 0.83/1.0 compatibility checks passed at that point.

Controls UI iteration: a small-terminal render test found action menus could exceed their height; corrected menu windowing to keep the selected action and validation messages visible. A real Pi 1.4 PTY walkthrough confirmed aliases, explicit reload, key capture, collision feedback, global/project switching, inheritance and the 72×20 pause preview with no model calls. It also exposed Input.setValue retaining a cursor at column zero: replacing a prefilled command inserted before the old value. Each editor now starts with fresh input and undo state, with the cursor at the end; added a regression that replaces a command using Ctrl+U.

Expanded coverage to custom goal dialog keys before implementation, updating PRODUCT then TECH. Questionnaire presentation scans had depended on the literal default auditor key; changed them to recognize the auditor status so a remapped key cannot hide that control. Settings navigation remains independent for recovery. Validation of scope inheritance/reset now runs against fresh layers under the existing settings write lock and permits fixing pre-existing errors without introducing new conflicts.

Primary API references: [Pi 1.4 keybindings](https://github.com/earendil-works/pi/blob/v1.4.0/packages/coding-agent/docs/keybindings.md) and [extensions](https://github.com/earendil-works/pi/blob/v1.4.0/packages/coding-agent/docs/extensions.md), cross-checked against installed public SDK types. PR descriptions were requirements only; no contributor patch was used.

Final review found a Resume arriving during abort settlement could leave its saved kickoff unarmed. Both current and older settlement paths now arrange it after the interrupted run settles, without treating the user's interruption as a provider failure. Added a real-SDK barrier test that resumes before settlement finishes, plus unit checks for a refused resume and session replacement. Cleared transient interruption state on session start. A full-suite run exposed headless fixtures without UI methods; guarded the new status cleanup by hasUI and verified those profiles separately.

Goal-first now stops at the current turn boundary, so letting in-flight work finish cannot cause another provider request. A second press still stops immediately; an explicit resume cancels the pending boundary stop. Added unit coverage and a real CLI case that lets the turn finish before resuming. The ordinary combined-stop default stays unchanged.

The repeatable CLI walkthrough now observes the public session_start event for readiness. Its initial startup-text check depended on fd being absent and could send commands before startup completed; the observer works whether fd is installed or not. It also checks that opening settings through a command shortcut preserves unsent editor text. Added the walkthrough to CI.

Validation complete: 1,177 tests passed with the manifest self-check; type/lint/package checks passed; seven SDK versions passed 39 checks per host and provider checks. Fast-resume also passed on the actual minimum Node versions for Pi 0.83 and 1.4. All five installed-CLI scenarios passed, including natural goal-first turn completion and unsent editor text. The context gate, provider boundaries, 4 MiB retention check and final 105-row same-machine performance comparison passed. Captured evidence and commands are recorded in VALIDATION.md. No README change or unrelated untracked file is included.

PR #106 opened against the parent branch. A final alias review corrected the remaining recovery-report, empty-summary and drafting-tool guidance paths, including the fixed settings recovery entry when its aliases are disabled. The 31 focused controls/recovery tests, type check and lint passed after those corrections; ordinary default text and prompt fixtures are unchanged.

Review follow-up — Exercised every command editor and every public key editor through replacement, aliases/additional keys, disable, default and inheritance. Added explicit route/shortcut dispatch checks for all sixteen command actions and dispatch checks for dashboard, audit and dialog controls. Found and fixed loss of provenance on short terminals, resetting the selected pause option to the default on reopening, misleading settings-disabled wording, and comma-key lists that could not be saved unchanged. Added page/end navigation, action counts and previews of inherited/default values. Narrow terminal tests cover 40/72/110 columns and 16/20/32 rows.

Expanded actual-CLI checks to reset/back/cancel, invalid-input correction, recovery-only settings, command shortcuts that ask for an objective, native Escape with a custom pause key, custom confirmation/cancellation/navigation/auditor keys, and multi-question answer editing. The editing walkthrough reproduced printable dialog shortcuts stealing answer text and native Ctrl+A; selection shortcuts now yield to typing and Pi's editor bindings. Native Escape remains available in the answer editor, and free custom cancellation keys still work. Safe editing bindings are computed once per modal. Hints now describe custom confirmation, cancellation and paging keys, and separate custom navigation letters.

Validation setbacks: the first expanded walkthrough expected the default pause binding as an array, although defaults correctly retain the original string form. Another check waited for text from a collapsed tool result; changed it to wait for the visible refinement reply and made the fixture provider ask for refinement rather than repeat its proposal. The paging hint change initially altered the default PgUp/PgDn spelling; two existing questionnaire tests caught that and the default spelling is preserved. Cursor-highlight markers in the native editor required moving the cursor to the end before asserting the displayed answer. All these paths now have focused regressions or actual terminal checks.

Actions review — The previous green run (40084436857) used eight jobs, 226 seconds elapsed and 552 summed job-seconds. Kept all seven Pi versions but grouped compatibility into oldest/modern jobs with bounded host parallelism, reused the installed current SDK, and combined manifest validation with the full suite. Full tests, RPC lifecycle and terminal walkthroughs run in isolated processes concurrently; benchmarks wait until those settle. Recognized prose/assets-only changes retain completed check jobs while skipping runtime installs/tests. Added failure-log artifacts, 15-minute job bounds, npm cache use on publication, and grouped Actions dependency updates. Release tag/ancestry, ranking and registry safeguards remain. Tests cover mixed/deleted paths and failure propagation; actionlint validates both workflows.

Final review validation passed: 1,186 tests, all ten actual-CLI cases, seven SDKs with 39 checks per host, and actual Node 22.15/22.19 boundary runs. The concurrent test/CLI group took 70 seconds locally. Type checking, lint, workflow/ranking tests, actionlint, 24-fixture context gate, provider/retention checks, package dry run and production audit passed. Saved review reports and selected terminal frames alongside the original evidence. README and the unrelated untracked spec directory are unchanged.

Hosted CI follow-up — The first three-job run was green in 2m41s for validation, but inspecting its test summary found two RPC recovery tests skipped because the direct runner did not inherit npm's local executable PATH. Restored the checkout's node_modules/.bin ahead of PATH and added a local-only executable regression. The full-suite task now fails on skips or a missing summary, with a separate regression for both cases. The corrected local run passed all 1,186 tests with zero skips and all ten terminal cases in about 68 seconds. Workflow/publication tests total eleven. This preserves the installed Pi checks instead of relying on a globally installed CLI.
