Repository navigation
[3833 by Claude Opus 5.5] Pi: analysis runs for reviews, summaries, commit subjects, planner, indexing and the repository scout - #3858
Conversation
Pi now handles every analysis path (reviews, summaries, commit subjects, planner, indexing and the review context scout), and Pi task runs get the extension library and the `propr` MCP server. I installed Pi 1.6.1 locally and ran the real CLI against a stub model server, because the issue's scout flag set doesn't work as written.
The scout flags needed one change. The issue's flags (`--no-builtin-tools --no-extensions …`) leave the scout with no tools at all. `--no-extensions` also unloads Pi's own built-in MCP support. The working set is:
- `--no-builtin-tools`, plus `--tools` listing only the three `mcp__propr_repository__*` tools.
- `--no-extensions --extension builtin:mcp`, `--no-skills`, `--no-prompt-templates`, `--no-approve`.
- A generated `mcp.json` with only the `propr_repository` server, set to `"exposure": "direct"`. Pi's default exposure only lets the model reach MCP tools through its `codemode` script tool, which the flags above leave unloaded.
With exactly the args ProPR builds, the model saw only the three scout tools: `bash` and `read` came back "Tool … not found", and a scout read returned the file. A `.pi/mcp.json`, an extension and a skill planted in the project and agent dirs did not load; with the flags removed, they did. The scout mounts the repository read-only at the scout server's root, with no git mounts and no GitHub token, like the other agents. `buildPiRepositoryScoutConfig` and `buildPiRepositoryScoutArgs` sit next to the OpenCode and Vibe builders in `repositoryScoutMcpServer.ts`.
Other analyses run tool-less (`--no-tools`) on a read-only workspace, the same as Claude. The scout is the only analysis that asks for tools, so I replaced the old `read,grep,find,ls` mode with the scout mode. Analysis results go through the existing JSON parser and success rules (final text, usage, provider cost).
Task runs:
- `PiAgent.executeTask` now goes through `executeWithExtensions` and passes `extensionAgentLaunch`, as Claude and Codex do.
- The tool policy becomes a generated `mcp.json`, passed to the container as `PROPR_PI_MCP_CONFIG`. It holds `Bearer ${PROPR_EXTENSION_MCP_0_TOKEN}` placeholders, never token values; the values arrive via `-e NAME`.
- Each staged skill bundle is passed as `--skill /opt/propr/extensions/<id>`, with `--no-skills` for exclusive runs. I added an internal `skillPaths` field to the tool policy for this.
- Runs join the policy's Docker network.
Live checks with real Pi all passed: bearer-auth HTTP server, stdio server through the bridge (secret inherited from the environment), and skill loading.
Gates: #3841 hasn't landed, so I added `pi` to `EXTENSION_RUNTIMES` and `AGENT_TYPES_SUPPORTING_PROPR_MCP`. The five hard-coded `['claude', 'codex']` copies now call a shared `isExtensionRuntime`. Error messages and UI text now read "Claude, Codex or Pi". I regenerated the OpenAPI spec and client types.
Readable tool events:
- MCP tools are named `<server>/<tool>` in persisted events.
- Calls made inside a `codemode` script now get their own tool events. Before, they produced results with no matching call.
- The live view now recognises Pi output, and the task watcher uses the Redis stream for Pi.
`src/jobs/reviewContextScout.ts` now accepts Pi. Indexing and the planner already choose agents generically, so they needed no change.
Tests: I added `test/piScoutAndExtensions.test.ts` (14 tests, including the bridge smoke test), `test/piAgentAnalysis.test.ts` (7) and `packages/api/test/liveDetailsPiParser.test.ts` (3). Two real Pi 1.6.1 recordings are now fixtures, with only the temp paths rewritten. The existing Pi, extension, scout, agent-run-trigger, task-submission and live-details suites and the UI editor test pass. Typecheck and lint are clean for root, core, api and propr-ui. `packages/api/test/mcpObservableSurface.test.ts` fails, but it fails the same way on a clean copy of HEAD.
Not tested: a containerised Pi run, because there is no Docker here. The flags and config were verified with the Pi CLI run directly on the host.
I updated the Pi section in `agents-and-models.md` and the runtime mentions in `agent-extensions.md`. No preview: the only visible change is the word "Pi" added to three help texts.
ProPR-Agent: claude/claude-opus-5-5
|
/ultrafix goal=8 max=8 |
|
🔄 Ultrafix loop started (goal: 8/10, max cycles: 8) First action:
|
|
✅ AI Code Review Complete requested by @propr-ultrafix Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR coherently adds Pi scout support, extension and ProPR MCP launch configuration, and live conversation parsing. No merge-blocking defect is demonstrated by the supplied diff and surrounding context. It is merge-ready within the reviewed scope, conditional on the remaining checks passing. ✅ Scout isolation — Scout launches disable built-in tools, allowlist only repository MCP tools, mount the repository read-only outside the working directory, and omit git mounts and credentials. ✅ Launch integration — Pi uses the existing extension lifecycle and launch validation hooks, passes credentials through environment variables, and honors the policy’s Docker network. ✅ Readable tool events — Nested codemode calls receive matching tool-use events, with recorded fixtures covering nested and direct MCP calls. This was a static review of the supplied code; no commands or tests were run. The authoritative check summary reports 29 passed, five pending, and no failures. Merge blockersNo merge blockers. SuggestionsThese are optional follow-ups and are not sent to S1: 🟢 Exercise the complete container launchAdd a container smoke test covering the generated MCP configuration, staged skills, and a stdio bridge through the actual Pi entrypoint. The supplied tests validate argument construction, recorded CLI output, and the bridge separately, while the implementation report explicitly excludes container execution. This would strengthen integration confidence; it is optional because the supplied entrypoint and launch-consumer code support the intended wiring and no concrete mismatch was found. ScoreThe implementation follows the requested scope and includes focused regression coverage. Pending checks and the absence of a full container smoke test leave some integration uncertainty, but no verified blocker. Score: 8/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
AI Implementation Summary
Closes #3833
Branch:
3833/claude-opus-5-5-pi-analysis-runs-for-revi-20261127-1852-3bjCommits: ✅ Changes committed (8a64227)
AI Processing Completed
Execution Details:
Summary:
Pi now handles every analysis path (reviews, summaries, commit subjects, planner, indexing and the review context scout), and Pi task runs get the extension library and the
proprMCP server. I installed Pi 1.6.1 locally and ran the real CLI against a stub model server, because the issue's scout flag set doesn't work as written.The scout flags needed one change. The issue's flags (
--no-builtin-tools --no-extensions …) leave the scout with no tools at all.--no-extensionsalso unloads Pi's own built-in MCP support. The working set is:--no-builtin-tools, plus--toolslisting only the threemcp__propr_repository__*tools.--no-extensions --extension builtin:mcp,--no-skills,--no-prompt-templates,--no-approve.mcp.jsonwith only thepropr_repositoryserver, set to"exposure": "direct". Pi's default exposure only lets the model reach MCP tools through itscodemodescript tool, which the flags above leave unloaded.With exactly the args ProPR builds, the model saw only the three scout tools:
bashandreadcame back "Tool … not found", and a scout read returned the file. A.pi/mcp.json, an extension and a skill planted in the project and agent dirs did not load; with the flags removed, they did. The scout mounts the repository read-only at the scout server's root, with no git mounts and no GitHub token, like the other agents.buildPiRepositoryScoutConfigandbuildPiRepositoryScoutArgssit next to the OpenCode and Vibe builders inrepositoryScoutMcpServer.ts.Other analyses run tool-less (
--no-tools) on a read-only workspace, the same as Claude. The scout is the only analysis that asks for tools, so I replaced the oldread,grep,find,lsmode with the scout mode. Analysis results go through the existing JSON parser and success rules (final text, usage, provider cost).Task runs:
PiAgent.executeTasknow goes throughexecuteWithExtensionsand passesextensionAgentLaunch, as Claude and Codex do.mcp.json, passed to the container asPROPR_PI_MCP_CONFIG. It holdsBearer ${PROPR_EXTENSION_MCP_0_TOKEN}placeholders, never token values; the values arrive via-e NAME.--skill /opt/propr/extensions/<id>, with--no-skillsfor exclusive runs. I added an internalskillPathsfield to the tool policy for this.Live checks with real Pi all passed: bearer-auth HTTP server, stdio server through the bridge (secret inherited from the environment), and skill loading.
Gates: #3841 hasn't landed, so I added
pitoEXTENSION_RUNTIMESandAGENT_TYPES_SUPPORTING_PROPR_MCP. The five hard-coded['claude', 'codex']copies now call a sharedisExtensionRuntime. Error messages and UI text now read "Claude, Codex or Pi". I regenerated the OpenAPI spec and client types.Readable tool events:
<server>/<tool>in persisted events.codemodescript now get their own tool events. Before, they produced results with no matching call.src/jobs/reviewContextScout.tsnow accepts Pi. Indexing and the planner already choose agents generically, so they needed no change.Tests: I added
test/piScoutAndExtensions.test.ts(14 tests, including the bridge smoke test),test/piAgentAnalysis.test.ts(7) andpackages/api/test/liveDetailsPiParser.test.ts(3). Two real Pi 1.6.1 recordings are now fixtures, with only the temp paths rewritten. The existing Pi, extension, scout, agent-run-trigger, task-submission and live-details suites and the UI editor test pass. Typecheck and lint are clean for root, core, api and propr-ui.packages/api/test/mcpObservableSurface.test.tsfails, but it fails the same way on a clean copy of HEAD.Not tested: a containerised Pi run, because there is no Docker here. The flags and config were verified with the Pi CLI run directly on the host.
I updated the Pi section in
agents-and-models.mdand the runtime mentions inagent-extensions.md. No preview: the only visible change is the word "Pi" added to three help texts.Review digest
Risk-tiered paths
packages/api/openapi/schemas.ts(+1/−1)packages/api/routes/liveDetailsOutputParsers.ts(+16/−1)packages/api/routes/liveDetailsRoutes.ts(+2/−1)packages/api/routes/liveDetailsStoredOutputFormat.ts(+14/−1)packages/api/routes/taskSubmissionRoutes.ts(+4/−4)packages/api/services/taskWatcher.ts(+2/−1)packages/client/src/generated/apiTypes.ts(+1/−1)packages/core/src/agents/agentToolPolicy.ts(+34/−0)packages/core/src/agents/impl/PiAgent.ts(+18/−7)packages/core/src/agents/impl/utils/piDockerArgsBuilder.ts(+63/−20)packages/core/src/agents/impl/utils/piOutputParser.ts(+36/−1)packages/core/src/agents/impl/utils/repositoryScoutMcpServer.ts(+40/−0)packages/core/src/agents/types.ts(+7/−1)packages/core/src/extensions/extensionLaunch.ts(+1/−1)packages/core/src/extensions/extensionProfileStore.ts(+3/−3)packages/core/src/services/agents/agentRunTrigger.ts(+3/−3)packages/shared/src/automationDefinitions.ts(+3/−3)packages/shared/src/extensionLibrary.ts(+9/−2)propr-ui/src/components/Agents/AgentCapabilitiesSection.tsx(+1/−1)propr-ui/src/components/Extensions/AdditionalExtensionsSelector.tsx(+1/−1)propr-ui/src/pages/SettingsPage/settingsCategoryGuides.ts(+1/−1)src/jobs/agentRuns/agentTaskOptions.ts(+2/−1)src/jobs/reviewContextScout.ts(+1/−0)docs/docs/features/agent-extensions.md(+6/−6)docs/docs/features/agents-and-models.md(+5/−1)docs/static/openapi/propr-api.yaml(+1/−1)packages/api/test/liveDetailsPiParser.test.ts(added, +45/−0)packages/api/test/taskSubmissionRoutes.test.ts(+3/−3)packages/core/test/extensionProfiles.test.ts(+1/−1)propr-ui/e2e/automations.pw.ts(+1/−1)propr-ui/src/components/Agents/AgentEditor.test.tsx(+1/−1)test/agentDefinitionsContract.test.ts(+3/−2)test/agentRunTrigger.test.ts(+3/−3)test/fixtures/pi/pi-1.6.1-json-codemode-mcp.jsonl(added, +31/−0)test/fixtures/pi/pi-1.6.1-json-scout-mcp.jsonl(added, +26/−0)test/piAgent.test.ts(+3/−2)test/piAgentAnalysis.test.ts(added, +150/−0)test/piScoutAndExtensions.test.ts(added, +225/−0)test/reviewContextScoutRuntime.test.ts(+1/−1)Diff size: 39 files changed, +768/−77 lines
View task for the run's logs and conversation.
This PR was created automatically by ProPR after processing issue #3833.
💡 Need changes?
Comment on this PR to request refinements — the AI agent monitors comments and will update the implementation based on your feedback. Keep iterating until you're satisfied!