gut: drop orphan runEmbeddedPiAgent tests + stale LLM config doc refs (#2482)#2488
Merged
alexey-pelykh merged 1 commit intomainfrom Apr 22, 2026
Merged
Conversation
…#2482) RemoteClaw middleware delegates LLM execution to CLI agents — leftover scaffolding from the pre-fork embedded Pi engine still lingered in tests that were excluded from running anyway, and in docs that prompted for gutted concepts (thinking-level config, pi-embedded-runner, runEmbeddedPiAgent). Tests (all excluded from vitest.unit.config.ts — never actually ran): - Delete src/commands/agent.test.ts - Delete src/auto-reply/reply.block-streaming.test.ts - Delete src/auto-reply/reply/agent-runner.runreplyagent.e2e.test.ts (e2e, 37/42 failed locally — all tests mocked a dead runEmbeddedPiAgent) - Delete src/auto-reply/reply/agent-runner.media-paths.test.ts - Rename stale runEmbeddedPiAgentMock alias → runAgentMock in src/auto-reply/reply.triggers.trigger-handling.filters-usage-summary-*.cases.ts (live mock wired via ChannelBridge — assertions remain meaningful) Source/infra: - Delete src/agents/pi-embedded-helpers/failover-matches.ts (zero importers) - scripts/test-parallel.mjs: drop deleted + non-existent .test.ts entries - .fork-boundary-mock-baseline: 132 → 126 (decrease locked in) Docs — obsolete runEmbeddedPiAgent / pi-agent-core / pi-embedded-runner: - Delete docs/concepts/agent-loop.md (described pre-fork execution path) - docs/astro.config.mjs, docs/start/hubs.md, docs/automation/hooks.md: drop agent-loop cross-refs - docs/help/testing.md: drop "Embedded runner note" pointing at non-existent pi-embedded-runner test paths - docs/reference/session-management-compaction.md: describe current CLI subprocess compaction forwarding instead of ensurePiCompactionReserveTokens - docs/plugins/sdk-migration.md: drop runEmbeddedPiAgent code example + resolveThinkingDefault table row; explain that the pre-fork bridge has no RemoteClaw equivalent and plugins should route via agent.send RPC Docs — obsolete thinking-level references (#2480 gutted the surface): - docs/concepts/system-prompt.md, context.md, reference/token-use.md: align Runtime metadata description with current code (channel/user/timezone) - docs/automation/cron-jobs.md, cron-vs-heartbeat.md, webhook.md, docs/gateway/configuration-reference.md, configuration-examples.md, doctor.md: drop `thinking` payload field / migration enumeration entries - docs/concepts/session-tool.md: drop thinking? param from sessions_spawn - docs/concepts/session.md: /status shows verbose toggle only - docs/start/remoteclaw.md: drop "thinking defaults" tuning bullet - docs/concepts/messages.md, help/faq.md, start/hubs.md: drop broken /tools/thinking page links and the gutted /thinking directive - docs/platforms/macos.md: drop `thinking` from remoteclaw://agent query params AC verification: - `grep -rn "runEmbeddedPiAgent" src/` → zero hits - `grep -rn "runEmbeddedPiAgent" docs/` → only explanatory note in sdk-migration.md (pre-fork bridge has no RemoteClaw equivalent) - pnpm tsgo → clean - pnpm lint → clean - pnpm format → applied - Fork-integrity gates: stub-debt (126 == 126), zombie-imports, throwing-stub-callers, rebrand-leakage → all pass Closes #2482. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This was referenced Apr 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #2482.
RemoteClaw middleware delegates LLM execution to CLI agents (Claude/Gemini/Codex/OpenCode) — leftover scaffolding from the pre-fork embedded Pi engine still lingered in tests that were excluded from running anyway, and in docs that prompted for gutted concepts (thinking-level config, pi-embedded-runner, runEmbeddedPiAgent). This PR cleans both.
vitest.unit.config.ts— never ran):src/commands/agent.test.tssrc/auto-reply/reply.block-streaming.test.tssrc/auto-reply/reply/agent-runner.runreplyagent.e2e.test.ts(e2e, 37/42 failed locally — all tests mocked a deadrunEmbeddedPiAgent)src/auto-reply/reply/agent-runner.media-paths.test.tsrunEmbeddedPiAgentMockalias →runAgentMockinreply.triggers.trigger-handling.filters-usage-summary-*.cases.ts(live mock wired viaChannelBridge— assertions remain meaningful)src/agents/pi-embedded-helpers/failover-matches.ts(+ parent directory)scripts/test-parallel.mjsdrops deleted + 4 non-existent.test.tsentries;.fork-boundary-mock-baseline132 → 126 (decrease locked in)agent-loop.md, described pre-fork execution) + 18 modified to drop stalerunEmbeddedPiAgent,pi-embedded-runner, andthinking-levelconfig referencesAC verification
grep -rn "runEmbeddedPiAgent" src/→ zero hitsgrep -rn "runEmbeddedPiAgent" docs/→ only explanatory note insdk-migration.md(pre-fork bridge has no RemoteClaw equivalent)pnpm tsgo→ cleanpnpm lint→ cleanpnpm format→ appliedTest plan
pnpm tsgocleanpnpm lintcleanpnpm formatcleannode scripts/check-stub-debt.mjspasses (126 == baseline 126)node scripts/check-no-zombie-imports.mjspassesnode scripts/check-throwing-stub-callers.mjspassesbash scripts/ci/check-rebrand-leakage.shpasses