Skip to content

[3844 by Claude Opus 5.5] Extensions: OpenCode 2.x runtime (MCP servers, skills, ProPR MCP) - #3861

Merged
integry merged 3 commits into
3841-epic-extension-library-r77from
3844/claude-opus-5-5-extensions-opencode-2-x-r-20261127-2200-4tj
Nov 27, 2026
Merged

integry merged 3 commits into
3841-epic-extension-library-r77from
3844/claude-opus-5-5-extensions-opencode-2-x-r-20261127-2200-4tj

Conversation

@propr-dev

@propr-dev propr-dev Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

AI Implementation Summary

Closes #3844

Branch: 3844/claude-opus-5-5-extensions-opencode-2-x-r-20261127-2200-4tj
Commits: ✅ Changes committed (081ef6f)


AI Processing Completed

Execution Details:

Summary:
OpenCode 2.x runs now receive extension MCP servers, skill bundles and the propr MCP server, and OpenCode 1.x stays unsupported. I checked this against a real OpenCode 2.4.2 install with a mock model:

  • The run sees only its own servers and skill.
  • A stdio stub through the bridge receives its secret.
  • The gateway gets the bearer token.
  • execute steps display under the tool names they called.

The base branch didn't have #3820. The epic branch was cut before OpenCode 2.4.2 landed on main, so I applied #3820's own diff unchanged (it applied cleanly). Those identical lines should merge cleanly when the epic picks up main, but the diff includes #3820's 26 files, not just this issue's.

How it works

  • Config: the builder is in packages/core/src/agents/mcpLaunch/openCodeMcpLaunch.ts, registered as opencode. It writes mcp.servers and skills.paths into OPENCODE_CONFIG_CONTENT, merged with any existing inline config, in the shape from the issue.
  • Secrets: remote servers use Bearer {env:VAR}. Tokens and stdio secrets reach the container as -e NAME only; their values are never in arguments or config.
  • Launch: OpenCodeAgent.executeTask sets extensionAgentLaunch and passes the variables through the docker process environment. The container now joins the policy's Docker network, so propr at api:4000 is reachable.
  • Exclusive mode: an inline empty mcp.servers does not remove host servers on 2.4.2, because OpenCode deep-merges its config sources. So I used the disposable config dir:
    • The launcher sets OPENCODE_CONFIG_PROJECT_DISABLE=1, OPENCODE_DISABLE_CLAUDE_CODE=1 and an empty OPENCODE_CONFIG.
    • scripts/opencode-entrypoint.sh builds a copy of the host config dir with mcp and skills stripped and the skills/ folders left out. Everything else links back to the host dir, so the user's providers still work.
    • The mounted host dir is never changed, and the run fails if a config file can't be rewritten.
  • Skills: OpenCode loads the staged bundles natively and uses the bundle folder name as the skill id. The prompt pointer is still added.
  • Display: an execute step that called tools now shows under their names (e.g. docs.lookup) with the call's input, in both the live view and persisted logs. A script that called no tool stays an execute step.
  • Capability map: OpenCode is turned on with the existing 2.x-only condition.

Beyond the issue text

  • An agent pinned to 1.x now fails a run that has servers or skills with a clear error instead of silently ignoring them.
  • The automation save checks and the UI now take the agent's CLI version into account. To do that, the instance catalog gained an optional cliVersion field.
  • Updated the UI hints, docs, CHANGELOG and the OpenAPI description, and regenerated the OpenAPI spec and client types.
  • Tests that used OpenCode as the "unsupported runtime" example now use OpenCode pinned to 1.19.6.

One gap: OpenCode always loads ~/.agents/skills from the container home, and no setting turns that off. The agent image doesn't create that folder, so nothing loads from it today.

Tests: all pass.

  • The new test/openCodeExtensionRuntime.test.ts covers:
    • a config snapshot for each server kind, with no secrets in arguments, config or serialized results
    • the exclusive switches overriding the user's own env vars, and the 1.x refusal
    • the entrypoint step, including the failing case
    • the bridge smoke test
    • both parsers, using a captured real 2.4.2 output fixture
  • Its live end-to-end case only runs when PROPR_OPENCODE_BIN is set. It passed against 2.4.2, with host, project and ~/.claude servers and skills all excluded.
  • I added OpenCode cases to extensionTaskAutoApply and extensionPackageServers.
  • The related root, core, API and UI suites pass.
  • ESLint is clean with zero warnings, and the core, API, shared and UI typechecks are clean.
  • Some root suites need --experimental-test-module-mocks to run locally.

I captured two previews of the automation editor with an OpenCode 1.x agent selected: the new Additional extensions hint, and the locked ProPR tools hint.

Review digest

Risk-tiered paths

  • High risk (1 file)
    • scripts/opencode-credentials.py (added, +141/−0): auth-looking path
  • Normal risk (32 files)
    • .gitignore (+4/−0)
    • Dockerfile.agent (+9/−5)
    • docker/Dockerfile.app.prod (+1/−0)
    • packages/api/openapi/schemas.ts (+1/−1)
    • packages/api/routes/instanceCatalogRoutes.ts (+2/−0)
    • packages/api/routes/liveDetailsOpenCodeParser.ts (+6/−4)
    • packages/api/services/redisOutputParser.ts (+5/−1)
    • packages/client/src/generated/apiTypes.ts (+1/−1)
    • packages/core/src/agents/agentToolPolicy.ts (+1/−1)
    • packages/core/src/agents/impl/OpenCodeAgent.ts (+8/−5)
    • packages/core/src/agents/impl/openCodeCodeMode.ts (added, +65/−0)
    • packages/core/src/agents/impl/openCodeUtils.ts (+61/−10)
    • packages/core/src/agents/impl/utils/repositoryScoutMcpServer.ts (+21/−17)
    • packages/core/src/agents/mcpLaunch/index.ts (+3/−0)
    • packages/core/src/agents/mcpLaunch/openCodeMcpLaunch.ts (added, +106/−0)
    • packages/core/src/agents/types.ts (+1/−1)
    • packages/core/src/agents/version/types.ts (+3/−2)
    • packages/core/src/agents/version/versionService.ts (+4/−1)
    • packages/core/src/index.ts (+1/−0)
    • packages/core/src/services/agents/agentRunTrigger.ts (+14/−9)
    • packages/shared/src/agentRuntimeCapabilities.ts (+5/−4)
    • packages/shared/src/instanceCatalog.ts (+2/−0)
    • packages/shared/src/modelDefinitions.ts (+2/−2)
    • propr-ui/src/components/Agents/AgentCapabilitiesSection.tsx (+1/−1)
    • propr-ui/src/components/Agents/useAgentEditor.ts (+1/−1)
    • propr-ui/src/components/Extensions/AdditionalExtensionsSelector.tsx (+1/−1)
    • propr-ui/src/pages/SettingsPage/settingsCategoryGuides.ts (+1/−1)
    • scripts/build-images.sh (+2/−1)
    • scripts/generate-notices.sh (+3/−3)
    • scripts/opencode-entrypoint.sh (+124/−0)
    • scripts/opencode-run.sh (+8/−2)
    • scripts/smoke-test-images.sh (+28/−0)
  • Low risk (27 files)
    • CHANGELOG.md (+16/−0)
    • THIRD_PARTY_LICENSES.md (+2/−2)
    • docs/docs/architecture/agent-runtime.md (+4/−13)
    • docs/docs/features/agent-extensions.md (+55/−7)
    • docs/docs/features/agents-and-models.md (+1/−1)
    • docs/docs/tutorials/setup-vps.md (+1/−1)
    • docs/static/openapi/propr-api.yaml (+1/−1)
    • packages/api/test/taskSubmissionExtensions.test.ts (+4/−4)
    • packages/api/test/taskSubmissionRoutes.test.ts (+7/−6)
    • packages/cli/README.md (+2/−3)
    • packages/core/test/extensionPackageServers.test.ts (+21/−1)
    • packages/core/test/extensionProfiles.test.ts (+2/−1)
    • packages/core/test/extensionTaskAutoApply.test.ts (+11/−0)
    • packages/core/test/nativeLogPolicyLive.test.ts (+4/−4)
    • propr-ui/e2e/automations.pw.ts (+1/−1)
    • propr-ui/src/components/Agents/AgentEditor.test.tsx (+18/−4)
    • test/agentDefinitionsContract.test.ts (+7/−3)
    • …and 10 more

Diff size: 60 files changed, +1,649/−190 lines

View task for the run's logs and conversation.


This PR was created automatically by ProPR after processing issue #3844.


💡 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!


Visual preview

ProPR tools locked for OpenCode 1.x

ProPR tools locked for OpenCode 1.x

Capabilities for an OpenCode agent pinned to CLI 1.19.6: ProPR tools and merging stay locked, with the hint naming the supported runtimes including OpenCode 2.x.

Full-size original

Additional extensions hint

Additional extensions hint

Automation editor with an OpenCode agent: the Additional extensions hint now reads 'OpenCode agents need CLI 2.x' instead of listing only Claude, Codex and Vibe.

Full-size original

OpenCode 2.x runs now receive extension MCP servers, skill bundles and the `propr` MCP server, and OpenCode 1.x stays unsupported. I checked this against a real OpenCode 2.4.2 install with a mock model:
- The run sees only its own servers and skill.
- A stdio stub through the bridge receives its secret.
- The gateway gets the bearer token.
- `execute` steps display under the tool names they called.

The base branch didn't have #3820. The epic branch was cut before OpenCode 2.4.2 landed on `main`, so I applied #3820's own diff unchanged (it applied cleanly). Those identical lines should merge cleanly when the epic picks up `main`, but the diff includes #3820's 26 files, not just this issue's.

How it works
- Config: the builder is in `packages/core/src/agents/mcpLaunch/openCodeMcpLaunch.ts`, registered as `opencode`. It writes `mcp.servers` and `skills.paths` into `OPENCODE_CONFIG_CONTENT`, merged with any existing inline config, in the shape from the issue.
- Secrets: remote servers use `Bearer {env:VAR}`. Tokens and stdio secrets reach the container as `-e NAME` only; their values are never in arguments or config.
- Launch: `OpenCodeAgent.executeTask` sets `extensionAgentLaunch` and passes the variables through the docker process environment. The container now joins the policy's Docker network, so `propr` at `api:4000` is reachable.
- Exclusive mode: an inline empty `mcp.servers` does not remove host servers on 2.4.2, because OpenCode deep-merges its config sources. So I used the disposable config dir:
  - The launcher sets `OPENCODE_CONFIG_PROJECT_DISABLE=1`, `OPENCODE_DISABLE_CLAUDE_CODE=1` and an empty `OPENCODE_CONFIG`.
  - `scripts/opencode-entrypoint.sh` builds a copy of the host config dir with `mcp` and `skills` stripped and the `skills/` folders left out. Everything else links back to the host dir, so the user's providers still work.
  - The mounted host dir is never changed, and the run fails if a config file can't be rewritten.
- Skills: OpenCode loads the staged bundles natively and uses the bundle folder name as the skill id. The prompt pointer is still added.
- Display: an `execute` step that called tools now shows under their names (e.g. `docs.lookup`) with the call's input, in both the live view and persisted logs. A script that called no tool stays an `execute` step.
- Capability map: OpenCode is turned on with the existing 2.x-only condition.

Beyond the issue text
- An agent pinned to 1.x now fails a run that has servers or skills with a clear error instead of silently ignoring them.
- The automation save checks and the UI now take the agent's CLI version into account. To do that, the instance catalog gained an optional `cliVersion` field.
- Updated the UI hints, docs, CHANGELOG and the OpenAPI description, and regenerated the OpenAPI spec and client types.
- Tests that used OpenCode as the "unsupported runtime" example now use OpenCode pinned to 1.19.6.

One gap: OpenCode always loads `~/.agents/skills` from the container home, and no setting turns that off. The agent image doesn't create that folder, so nothing loads from it today.

Tests: all pass.
- The new `test/openCodeExtensionRuntime.test.ts` covers:
  - a config snapshot for each server kind, with no secrets in arguments, config or serialized results
  - the exclusive switches overriding the user's own env vars, and the 1.x refusal
  - the entrypoint step, including the failing case
  - the bridge smoke test
  - both parsers, using a captured real 2.4.2 output fixture
- Its live end-to-end case only runs when `PROPR_OPENCODE_BIN` is set. It passed against 2.4.2, with host, project and `~/.claude` servers and skills all excluded.
- I added OpenCode cases to `extensionTaskAutoApply` and `extensionPackageServers`.
- The related root, core, API and UI suites pass.
- ESLint is clean with zero warnings, and the core, API, shared and UI typechecks are clean.
- Some root suites need `--experimental-test-module-mocks` to run locally.

I captured two previews of the automation editor with an OpenCode 1.x agent selected: the new Additional extensions hint, and the locked ProPR tools hint.

ProPR-Agent: claude/claude-opus-5-5
@propr-dev

propr-dev Bot commented Nov 27, 2026

Copy link
Copy Markdown
Contributor Author

/ultrafix goal=8 max=8
Triggered automatically by the requested execution settings.

@propr-dev

propr-dev Bot commented Nov 27, 2026

Copy link
Copy Markdown
Contributor Author

🔄 Ultrafix loop started (goal: 8/10, max cycles: 8)

First action: /review

💡 Tip: Remove the ultrafix label from this PR to stop further ultrafix cycles.

@propr-dev

propr-dev Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @propr-ultrafix

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Nov 27, 2026

Copy link
Copy Markdown
Contributor Author

CI failed: Full Test Suite Shard 3/4

Please investigate and fix this CI failure.

  • Check: Full Test Suite Shard 3/4
  • Result: failure
  • Commit: 081ef6fbf61b (081ef6fbf61b238059d5ad1f17ad59bccd382ac0)
  • Run: View CI failure

Failure evidence

.github:11
Process completed with exit code 1.

.github:46077
Process completed with exit code 1.

.github:2
Node.js 20 is deprecated. The following actions target Node.js 20 but are being forced to run on Node.js 24: actions/checkout@11d5960. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/

@propr-dev

propr-dev Bot commented Nov 27, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-6-astra

Overall Evaluation

The PR implements OpenCode 2.x extension support across launch configuration, capability gates, credentials, and tool displays. It needs localized corrections before merge.

✅ Secret transport — Generated MCP configuration references environment variables; Docker receives secret variable names rather than their values.

✅ Tool display consistency — Both output parsers use the same Code Mode helper, with captured-output coverage.

✅ Version-aware automation gates — Automation validation and the editor distinguish pinned OpenCode 1.x agents from supported versions.

The supplied check status has no failures and four pending checks. This review is based on static analysis; no commands were run.

Merge blockers

Every finding below was introduced by this PR and must be resolved before merging.

F1: 🔴 Preserve existing inline launch configuration

  • Category: correctness

  • Required behavior: The launch must merge extension configuration into existing inline configuration while preserving unrelated settings.

  • Evidence: packages/core/src/agents/impl/openCodeUtils.ts, buildOpenCodeConfigEnvArgs and buildOpenCodeToolPolicyEnvArgs

    1. An agent supplies inline provider configuration through OPENCODE_CONFIG_CONTENT in its environment variables.
    2. A normal task receives an MCP server or skill policy. Docker arguments first include ...envVars.
    3. buildOpenCodeConfigEnvArgs calls buildOpenCodeToolPolicyEnvArgs(undefined, toolPolicy), so the merge helper never receives the existing content.
    4. The launcher appends another OPENCODE_CONFIG_CONTENT containing only the policy configuration. The last Docker environment assignment wins, removing the inline provider settings and potentially preventing the selected model from running.

    static trace: The production call explicitly passes undefined; the merge test exercises the helper directly with existing content and therefore does not cover this launch path. The same normal-task path handles extension policies and standalone ProPR MCP policies.

  • Minimum fix: Pass the existing inline configuration into the production merge path and emit one final assignment. In exclusive mode, remove ambient MCP and skill entries while preserving unrelated settings. Add a Docker-argument regression covering an inline provider plus a run server.

F2: 🔴 Accept comments after trailing commas

  • Category: correctness

  • Required behavior: Exclusive configuration preparation must preserve valid host JSONC settings without preventing extension runs.

  • Evidence: scripts/opencode-entrypoint.sh, prepare_exclusive_opencode_config / strip_jsonc

    1. A host uses valid JSONC containing a trailing comma followed by a comment, such as {"model":"acme/m", /* explanation */ }.
    2. The comma handler skips whitespace only. Because its next character is /, it retains the comma.
    3. The comment handler subsequently removes the comment, leaving {"model":"acme/m", }.
    4. json.loads rejects that output, and the entrypoint exits before launching the task.

    static trace: Comment removal and trailing-comma removal occur in one pass without revisiting the retained comma. The existing JSONC fixture tests comments and trailing commas separately, so it misses this valid combination. Both line comments and block comments can trigger the failure.

  • Minimum fix: Remove comments before processing trailing commas, preserving string contents, or use a compatible JSONC parser. Cover trailing commas followed by both comment forms.

Suggestions

These are optional follow-ups and are not sent to /fix.

No suggestions.

Score

The integration has substantial targeted coverage and consistent launch plumbing, but two configuration regressions can prevent otherwise valid runs. Both fixes are localized; pending checks still need to complete.

Score: 6/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 7m 17s
  • Tokens: 100,745 (99,568 in / 1,177 out)
  • Cost: $0.92

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

Copy and edit to choose records from this review:

/fix F1 F2

🤖 Review by ProPR

@propr-dev

propr-dev Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit 4b51a79

Summary of Changes

I fixed the Shard 3/4 failure. It was one stale test, not a code bug.

Cause: in packages/shared/test/extensionLibrary.test.ts, the case "explicit entries that are missing, disabled or out of limits are skipped with a reason" uses OpenCode with no version as its example of a runtime that can't receive extensions. Its last assertion expected the docs server to be skipped with reason runtime. This PR turns extensions on for OpenCode 2.x, and a runtime with no version gets the mapped capabilities. So docs now applies, skipped is empty, and skipped[0].reason threw Cannot read properties of undefined (reading 'reason').

Fix: that assertion now passes cliVersion: '1.19.6', the same OpenCode 1.x pin this PR already uses in the other "unsupported runtime" tests. It's a one-line change, and it still checks the skip with reason runtime.

Verification: that file now passes 11/11, and all of packages/shared/test/*.test.ts passes (136 pass, 0 fail). This was the only failing test in the shard; the other 281 files passed.

There are no visual changes, so I made no preview.

Review digest

Risk-tiered paths

  • High risk: none
  • Normal risk: none
  • Low risk (1 file)
    • packages/shared/test/extensionLibrary.test.ts (+1/−1)

Diff size: 1 file changed, +1/−1 lines


🤖 Implementation Details

  • Model: Claude Opus 5.5 (medium)
  • Requested By: @propr-dev[bot]
  • Time: 5m 31s
  • Tokens: 527,079 (525,219 in / 1,860 out)
  • Cost: $0.39

Undo Changes • View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR
Processing comment ID: 7229795304✓

I fixed the Shard 3/4 failure. It was one stale test, not a code bug.

**Cause:** in `packages/shared/test/extensionLibrary.test.ts`, the case "explicit entries that are missing, disabled or out of limits are skipped with a reason" uses OpenCode with no version as its example of a runtime that can't receive extensions. Its last assertion expected the `docs` server to be skipped with reason `runtime`. This PR turns extensions on for OpenCode 2.x, and a runtime with no version gets the mapped capabilities. So `docs` now applies, `skipped` is empty, and `skipped[0].reason` threw `Cannot read properties of undefined (reading 'reason')`.

**Fix:** that assertion now passes `cliVersion: '1.19.6'`, the same OpenCode 1.x pin this PR already uses in the other "unsupported runtime" tests. It's a one-line change, and it still checks the skip with reason `runtime`.

**Verification:** that file now passes 11/11, and all of `packages/shared/test/*.test.ts` passes (136 pass, 0 fail). This was the only failing test in the shard; the other 281 files passed.

There are no visual changes, so I made no preview.

PR: #3861
Comment by: @propr-dev[bot] (ID: 7229795304)
Model: Claude Opus 5.5

ProPR-Agent: claude/claude-opus-5-5
@propr-dev

propr-dev Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit faa5442

Addressed 1 AI review comment (IDs: 7229883784)

Addressed findings F1, F2

Summary of Changes

I fixed F2 and added regression tests for both findings. I did not change the F1 production code, because the failure it describes can't happen in the current code.

F2 (fixed) — scripts/opencode-entrypoint.sh: the JSONC cleanup now runs in two passes, both of which skip over string contents. Comments are removed first and trailing commas second. Before, comments and commas were handled in a single pass, so a comma followed by a comment and then } or ] was kept. Block comments are replaced with a space so the tokens on either side don't join. The new entrypoint test covers:

  • {"model":"acme/m", /* explanation */ }
  • a trailing comma before a // line comment in an array
  • several comments after a trailing comma
  • a string value containing , }, // and /* */, which must come through unchanged

The new test fails against the old entrypoint and passes with the fix.

F1 (stated failure doesn't occur; regression added) — The review's trace assumes an agent's own OPENCODE_CONFIG_CONTENT reaches the Docker arguments through ...envVars. It doesn't. openCodeEnvForwarding.ts lists OPENCODE_CONFIG_CONTENT as a ProPR-managed variable, so buildEnvVars drops it with the warning "Skipping OpenCode env var managed by ProPR". That rule is unchanged from main (it came in with #3031). So there is never an earlier assignment for the run's config to override, and passing undefined on the normal-task path is correct. The only existing inline config a run can have is the scout config, and the scout path already merges into it and emits it once.

Making the agent's value merge into the launch would mean reversing that #3031 hardening decision, which is a policy change beyond this finding. I added a Docker-argument test instead. It sets an inline provider in the agent's envVars and checks two runs, one with extension servers in exclusive mode and one with only the ProPR server. In both there is exactly one OPENCODE_CONFIG_CONTENT assignment and it is the run's config. With no tool policy there is none.

Other notes:

  • A provider set through OPENCODE_CONFIG_CONTENT in the agent's variables has always been dropped, with or without this PR. Inline provider settings only work through the mounted config directory, which the exclusive-mode entrypoint keeps. If merging the agent's own inline config is wanted, it needs a separate decision about that hardening rule.
  • I ran git stash by mistake while checking lint. It failed because the git directory is read-only, so nothing changed, and both edited files are intact.

Verification: test/openCodeExtensionRuntime.test.ts passes, 20 of 20. The live OpenCode case is skipped because it needs PROPR_OPENCODE_BIN. bash -n finds no syntax errors in the entrypoint. ESLint has no config that covers test/, so the test file isn't linted.

Review digest

Risk-tiered paths

  • High risk: none
  • Normal risk (1 file)
    • scripts/opencode-entrypoint.sh (+37/−21)
  • Low risk (1 file)
    • test/openCodeExtensionRuntime.test.ts (+30/−0)

Diff size: 2 files changed, +67/−21 lines


🤖 Implementation Details

  • Model: Claude Opus 5.5 (medium)
  • Requested By: @propr-ultrafix
  • Time: 5m 26s
  • Tokens: 994,711 (987,064 in / 7,647 out)
  • Cost: $0.71
  • Subscription usage: Weekly +1%

View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR

I fixed F2 and added regression tests for both findings. I did not change the F1 production code, because the failure it describes can't happen in the current code.

**F2 (fixed)** — `scripts/opencode-entrypoint.sh`: the JSONC cleanup now runs in two passes, both of which skip over string contents. Comments are removed first and trailing commas second. Before, comments and commas were handled in a single pass, so a comma followed by a comment and then `}` or `]` was kept. Block comments are replaced with a space so the tokens on either side don't join. The new entrypoint test covers:
- `{"model":"acme/m", /* explanation */ }`
- a trailing comma before a `//` line comment in an array
- several comments after a trailing comma
- a string value containing `, }`, `//` and `/* */`, which must come through unchanged

The new test fails against the old entrypoint and passes with the fix.

**F1 (stated failure doesn't occur; regression added)** — The review's trace assumes an agent's own `OPENCODE_CONFIG_CONTENT` reaches the Docker arguments through `...envVars`. It doesn't. `openCodeEnvForwarding.ts` lists `OPENCODE_CONFIG_CONTENT` as a ProPR-managed variable, so `buildEnvVars` drops it with the warning "Skipping OpenCode env var managed by ProPR". That rule is unchanged from `main` (it came in with #3031). So there is never an earlier assignment for the run's config to override, and passing `undefined` on the normal-task path is correct. The only existing inline config a run can have is the scout config, and the scout path already merges into it and emits it once.

Making the agent's value merge into the launch would mean reversing that #3031 hardening decision, which is a policy change beyond this finding. I added a Docker-argument test instead. It sets an inline provider in the agent's `envVars` and checks two runs, one with extension servers in exclusive mode and one with only the ProPR server. In both there is exactly one `OPENCODE_CONFIG_CONTENT` assignment and it is the run's config. With no tool policy there is none.

**Other notes:**
- A provider set through `OPENCODE_CONFIG_CONTENT` in the agent's variables has always been dropped, with or without this PR. Inline provider settings only work through the mounted config directory, which the exclusive-mode entrypoint keeps. If merging the agent's own inline config is wanted, it needs a separate decision about that hardening rule.
- I ran `git stash` by mistake while checking lint. It failed because the git directory is read-only, so nothing changed, and both edited files are intact.

**Verification:** `test/openCodeExtensionRuntime.test.ts` passes, 20 of 20. The live OpenCode case is skipped because it needs `PROPR_OPENCODE_BIN`. `bash -n` finds no syntax errors in the entrypoint. ESLint has no config that covers `test/`, so the test file isn't linted.

PR: #3861
Comment by: @propr-ultrafix (ID: 0)
Model: Claude Opus 5.5

ProPR-Agent: claude/claude-opus-5-5
@propr-dev

propr-dev Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @propr-ultrafix

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Nov 27, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-6-astra

Overall Evaluation

The PR adds OpenCode 2.x extension support across configuration, launch, capability checks, and tool-call display. The runtime upgrade and credential handling support that integration. No merge-blocking defect was verified from the supplied diff and context. Merge readiness is conditional on the five pending checks completing successfully.

✅ Secret forwarding — The OpenCode launcher passes MCP credentials through environment-variable names, while generated configuration references those names.

✅ Exclusive configuration — Extension runs disable project and Claude configuration sources and remove ambient MCP and skill settings from disposable host-config copies. Invalid configuration aborts preparation.

✅ Consistent tool display — Live and persisted parsers share the Code Mode display helper, with captured-output coverage for multiple calls and scripts that call no tools.

This was a static review; no commands or tests were run.

Merge blockers

No merge blockers.

Suggestions

These are optional follow-ups and are not sent to /fix.

S1: 🟢 Exercise live integration in CI

The real-runtime test in test/openCodeExtensionRuntime.test.ts runs only when PROPR_OPENCODE_BIN is supplied. Consider enabling it in a dedicated integration job, particularly for CLI upgrades: configuration precedence, skill discovery, and environment substitution depend on upstream behavior that configuration snapshots cannot establish. This is optional given the reported successful 2.4.2 execution and existing coverage.

S2: 🟢 Coordinate legacy credential writes

In scripts/opencode-credentials.py, sync_auth_json compares credentials against a host-file snapshot before replacing the entire file. Concurrent writers can still change that file between the read and replacement. A follow-up could coordinate ProPR writers and test overlapping refreshes of different providers. This is not a blocker here: the previous whole-file credential copy already had this concurrency limitation, and the new comparison improves preservation of intervening host changes.

Score

The implementation addresses the objective with substantial targeted coverage and no verified introduced blocker. The supplied check status reports no failures, with five checks still pending; runtime verification was not independently repeated in this review.

Score: 8/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 1m 3s
  • Tokens: 102,316 (101,236 in / 1,080 out)
  • Cost: $0.96

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

Copy and edit to choose records from this review:

/fix S1 S2

🤖 Review by ProPR

@propr-dev propr-dev Bot removed the ultrafix label Nov 27, 2026
@propr-dev propr-dev Bot changed the title 🔨 [3844 by Claude Opus 5.5] Extensions: OpenCode 2.x runtime (MCP servers, skills, ProPR MCP) ✅❽ [3844 by Claude Opus 5.5] Extensions: OpenCode 2.x runtime (MCP servers, skills, ProPR MCP) Nov 27, 2026
@integry
integry merged commit 89186a8 into 3841-epic-extension-library-r77 Nov 27, 2026
51 checks passed
@propr-dev propr-dev Bot changed the title ✅❽ [3844 by Claude Opus 5.5] Extensions: OpenCode 2.x runtime (MCP servers, skills, ProPR MCP) [3844 by Claude Opus 5.5] Extensions: OpenCode 2.x runtime (MCP servers, skills, ProPR MCP) Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant