FE-868: Pi runtime rehabilitation and dependency alignment#215
FE-868: Pi runtime rehabilitation and dependency alignment#215lunelson wants to merge 5 commits into
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
PR SummaryMedium Risk Overview Assistant origination moves kick firing into Planning and verification docs are updated: origination-follow-ups chain removed as landed, renderer golden Card 1 marked done with a full Reviewed by Cursor Bugbot for commit 8bba879. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 8bba879. Configure here.
| ...created, | ||
| services, | ||
| diagnostics: services.diagnostics, | ||
| diagnostics: [...services.diagnostics, ...kickDiagnostics], |
There was a problem hiding this comment.
Kick failure diagnostics dropped async
Medium Severity
Launch calls completeAssistantKick without awaiting it, then immediately returns diagnostics built from a spread of kickDiagnostics. Skip paths (idle, no_model_available) populate that array synchronously, but a failed sendCustomMessage reports through onOutcome only after the await, so the warning never appears in the boot diagnostics this change was meant to surface.
Reviewed by Cursor Bugbot for commit 8bba879. Configure here.
There was a problem hiding this comment.
Pull request overview
This PR rehabilitates Brunch’s Pi runtime baseline by aligning dependencies/settings with current Pi expectations and hardening assistant-kick observability so session boots no longer silently skip or bury failures.
Changes:
- Adds a session-owned
completeAssistantKickseam that classifies kick outcomes (fired/skipped/failed) and wires it into TUI boot with dev-mode origination recording. - Extends dev harnesses/tests to assert origination decision/outcome recording across new-session, resume, idle, and no-model paths.
- Updates the sealed Pi settings policy/audited getters (trust + analytics), refreshes runtime-aligned dependencies, and updates renderer/planning documentation accordingly.
Reviewed changes
Copilot reviewed 20 out of 21 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/session/originate-assistant-turn.ts | Adds kick completion outcome model + completeAssistantKick, and threads optional strategy into origination decision. |
| src/session/originate-assistant-turn.test.ts | Adds unit coverage for kickTurnMessage copy lock and completeAssistantKick outcomes. |
| src/app/brunch-tui.ts | Switches boot kick to completeAssistantKick, adds dev debug mirroring + kick diagnostics handling, and threads runtime strategy from projected agent state. |
| src/app/brunch-tui.test.ts | Updates audited settings assertions for newly sealed settings fields. |
| src/.pi/extensions/introspection/debug-cache.ts | Adds .brunch/debug/origination.md mirror writer for origination decision/outcome records. |
| src/.pi/extensions/introspection/index.ts | Re-exports the new origination debug-cache helper. |
| src/.pi/extensions/introspection/README.md | Documents new origination record mirroring behavior. |
| src/.pi/tests/introspection.test.ts | Adds test coverage for the origination debug mirror file output. |
| src/dev/tier-2-harness.ts | Adds dev?: boolean option to tier-2 boots to enable BRUNCH_DEV-gated debug recording. |
| src/dev/tier-2-harness.test.ts | Adds tier-2 assertions that origination decision/outcome records are written and classified correctly. |
| src/.pi/brunch-pi-settings.ts | Extends sealed settings policy and audited getter list (trust + analytics/tracking). |
| src/renderers/README.md | Expands renderer/tool/entry-copy ledger and documents preview/golden authority. |
| package.json | Aligns Pi/TanStack/etc dependency versions with the intended runtime baseline. |
| package-lock.json | Lockfile update matching the dependency alignment. |
| memory/SPEC.md | Updates decision D39-L wording to include new sealed settings concerns; adds TUI harness verification row. |
| memory/PLAN.md | Updates plan history and marks origination follow-ups as landed in this stack. |
| memory/cards/tooling--pi-tui-component-harness.md | Adds a new tooling chain card for a Pi TUI component test harness. |
| memory/cards/renderer-golden-coverage--render-stage-chain.md | Marks renderer ledger authority work as done and records completion notes. |
| memory/cards/origination-follow-ups--kick-observability.md | Removes now-landed kick observability chain card. |
| docs/architecture/pi-wrapper-trust-and-resume-exit.md | Adds an architecture “finding only” note about trust flow and resume line customization. |
| .npmcheckrc | Adds depcheck ignore configuration. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // LLM turn, which only the live AgentSession can run. Fire-and-forget: | ||
| // sendCustomMessage with triggerTurn awaits the whole turn, and boot must | ||
| // not block on provider latency. The completion seam classifies every | ||
| // exit, so launch paths no longer silently skip or bury failures in console | ||
| // IO. |
| const block = [ | ||
| `## brunch.origination (${new Date().toISOString()})`, | ||
| '', | ||
| '```json', | ||
| JSON.stringify(record, null, 2), | ||
| '```', | ||
| ].join('\n'); |



Stack Context
This stack is a post-demo rehabilitation pass that prepares Brunch for the next alpha-week work: runtime stability first, topology clarity second, renderer/context coverage next.
What?
Why?
The following branches depend on a stable Pi runtime baseline. This PR absorbs the low-level rehabilitation work separately from the topology moves and renderer/context coverage so those later PRs can stay easier to review.