Repository navigation
[3813 by Claude Opus 5.5] Remote runtimes: reach ProPR MCP from Sprites via a per-run SSH reverse forward (no public URL) - #3817
Conversation
I've implemented issue #3813: Sprites runs can now reach ProPR MCP through a per-run SSH reverse forward, so a self-hosted instance with no public URL no longer has its runs refused. The unit and real-sshd tests pass. The live acceptance on a real Sprite (a Claude issue run and an automation run, with task-log evidence) has not been done: this container has no Sprites token. I added a live test for it, described below. How a run picks its MCP transport (`agentRunMcpTransport.ts`, new kind `ssh-reverse-forward`): 1. `PROPR_SPRITES_MCP_URL` if set, or a public HTTPS `PROPR_AGENT_MCP_URL` / `API_PUBLIC_URL`, is used directly, as before. 2. Otherwise the run uses the SSH reverse forward. The agent's MCP config points to `http://127.0.0.1:39080/api/mcp`, and the per-run grant token is still required. 3. Otherwise the run is refused with what to set. That happens when `PROPR_SPRITES_MCP_FORWARD=0` is set, or when `PROPR_INTERNAL_API_URL` isn't a plain `http(s)://host:port[/path]` URL. Behaviour change: a non-public `PROPR_AGENT_MCP_URL` or `API_PUBLIC_URL` used to be refused on restricted Sprites (and used as given on open ones). Now such runs get the forward. I updated the two existing tests that expected the old behaviour. An explicit non-public `PROPR_SPRITES_MCP_URL` is still the operator's choice and is still refused on restricted runs. The forward (new `sprites/spritesMcpForward.ts`, using the `ssh2` library): - Keys: each run generates its own client key and sshd host key in memory. They are never logged or kept, and the worker checks the host key so it can't be fooled by another listener behind the proxy. - sshd: it listens on `127.0.0.1:39022` only and accepts just that key for a shell-less `propr-mcp` user. It allows only the one loopback listener: no passwords, sessions, TTYs or local forwarding. A new root-owned helper, `scripts/sprites-mcp-forward.sh`, starts and stops it. - Proxy and relay: the worker reaches sshd through `sprite.proxyPort` and relays each forwarded connection only to the internal API host and port. Responses are passed through as they arrive, so streaming and SSE work. - Lifecycle: the forward starts before the agent and is torn down on success, failure, cancel or timeout, and when reattaching fails. If it drops, the worker retries up to 5 times with backoff, then fails the run with an `MCP_TRANSPORT_LOST` error instead of letting tool calls hang. - Restricted network: the address is loopback, so a restricted Sprite's network policy gets no MCP host entry. - Task log: shows `ProPR MCP transport: ssh-reverse-forward`. Provisioning: `sprites-agent-setup.sh` installs `openssh-server` if the image lacks it and stops the system sshd from starting. It creates the `propr-mcp` user and installs the helper, and the Dockerfile copies the new script. Other changes: - Added `[email protected]` (and `@types/ssh2`) to `packages/core`, which changes `package-lock.json`. - Added the new transport value to the admission API, the CLI types, the generated client types and the OpenAPI spec. - Updated `mcp.md`, the Sprites runtime docs (new section "ProPR MCP from Sprites", which also says when a public URL is preferred), `execution-safety.md` and `agent-run-admission.md`. Tests: - `test/spritesMcpForward.test.ts` (17 pass): transport selection, the refused cases, the sshd config, keys unique per run, an impostor host key refused, and JSON plus streamed SSE through the forward. It also covers a reconnect after a drop, a forward that can't reconnect, teardown on success, failure and cancel, and that the private key and grant token stay out of logs. It runs against an in-process SSH server standing in for the Sprite. - `test/spritesMcpForwardOpenSsh.test.ts` (2 pass): runs against a real OpenSSH 9.2 sshd. It checks that sshd is reachable on loopback only, that other keys, passwords, other listen addresses or ports, local forwarding and commands are all refused, and that a full forward works through a proxy, reconnects and tears down. It is skipped unless sshd is installed; point `PROPR_TEST_SSHD` at one to run it. - Live test: I added a case to `test/spritesRuntime.live.test.ts` that runs on a real Sprite with `PROPR_SPRITES_LIVE_TOKEN` and checks what sshd and the forward listen on plus a streamed call. It is a direct curl from the Sprite, not an agent tool call, so it doesn't replace the live Claude and automation runs the issue asks for. - The existing Sprites, Fly, transport, tool-policy, grant-client and admission/OpenAPI suites pass, as do typecheck and lint on the changed sources and `gen:openapi:check`. There is nothing visual to preview. ProPR-Agent: claude/claude-opus-5-5
|
/ultrafix goal=8 max=3 |
|
🔄 Ultrafix loop started (goal: 8/10, max cycles: 3) First action:
|
|
✅ AI Code Review Complete requested by @propr-ultrafix Posted 1 review: |
Live run of the forward test on a real Sprite: transport works ✅; fix the test's assertionI ran What passed live:
What failed: only the assertion The remaining live acceptance is an agent tool call and an automation through a self-hosted instance. I'll run it once the review loop settles. |
|
✅ Applied the requested follow-up changes in commit 36bf3bd Summary of ChangesI changed the assertion as you asked. At assert.match(result.stdout, /data: first\n\ndata: second\s*$/);The exit-code, I checked the new regex against a sample stdout with the entrypoint preamble (the There's nothing visual to preview. Review digestRisk-tiered paths
Diff size: 1 file changed, +1/−1 lines 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
I changed the assertion as you asked. At `test/spritesRuntime.live.test.ts:144` the exact-match check is now: ```ts assert.match(result.stdout, /data: first\n\ndata: second\s*$/); ``` The exit-code, `ssh-reverse-forward` diagnostic and no-`PRIVATE KEY` assertions are unchanged. I checked the new regex against a sample stdout with the entrypoint preamble (the `GH_TOKEN` warning and `Executing command: …`) followed by the two events, and it matches. It still fails if anything comes after `data: second`. The live case itself hasn't run again: it was skipped here because this container has no Sprites token. So the real-Sprite pass is still yours to confirm on your next run. There's nothing visual to preview. PR: #3817 Comment by: @integry (ID: 7179559262) Model: Claude Opus 5.5 ProPR-Agent: claude/claude-opus-5-5
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR adds per-run SSH forwarding with consistent transport planning, grant propagation, and runtime integration. No merge-blocking defect is established by the supplied code, but live verification remains a material gap before calling this merge-ready. This review was static; no commands were run. ✅ Pinned SSH identity — Each forward generates separate client and host keys, and verifies the server’s exact public key before authenticating. ✅ Transport propagation — The new transport reaches grant issuance, tool policy, runtime specifications, capability checks, and admission schemas. ✅ Failure coverage — Added tests exercise streamed responses, reconnect exhaustion, cancellation, startup failure, and teardown. The supplied current-head status reports 31 passed checks, three pending, and no failures. Merge blockersNo merge blockers. SuggestionsThese are optional follow-ups and are not sent to S1: 🟢 Complete live agent verificationThe supplied summary explicitly leaves real Claude and automation runs unverified. The new live test exercises curl against a stand-in API; the OpenSSH tests also substitute the current user for the provisioned S2: 🟢 Track pending upstream socketsIn S3: 🟢 Reconcile transport documentationThe modified MCP networking paragraph in ScoreThe implementation has substantial focused coverage and no verified blocker, but the missing real-agent acceptance evidence prevents an unconditional merge-ready assessment. Pending checks alone do not lower this rating. Score: 7/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
|
Please fix S2 and S3, and add what the live agent acceptance (S1) needsS2: track upstream sockets as soon as they're created, and give connections a deadline (e.g. 10 s), so closing the forward during a pending connection can't leave a socket behind. Add a test with an unreachable target. S3: qualify the sentence in For S1 (live real-agent acceptance), add two things I can run on Fly:
I'll run it with |
|
✅ Applied the requested follow-up changes in commit 12edf29 Summary of ChangesI've fixed S2 and S3 and added the The unit tests pass. Nothing ran live on Fly. The workflow passes actionlint and S2 (pending upstream connections):
S3: the sentence in Transport preference:
The
Unverified on Fly:
Review digestRisk-tiered paths
Diff size: 11 files changed, +309/−30 lines 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
I've fixed S2 and S3 and added the `PROPR_SPRITES_MCP_TRANSPORT` preference, plus an `mcp` mode for the Fly smoke workflow. One part of S1 can't work as you wrote it: **plain issue-labeled runs never get ProPR MCP.** Only automation (agent) runs do. The issue run starts its agent with no MCP tools (`src/jobs/issueJob/agent.ts`). So I left the fixture issue unchanged, and the transport line is checked for the automation run only. If you want both runs covered, giving issue runs ProPR MCP is a product change beyond this PR; the alternative is a second automation run. The unit tests pass. Nothing ran live on Fly. The workflow passes actionlint and `bash -n`, and I tested its jq and report checks on sample data. The real-sshd suite (`spritesMcpForwardOpenSsh.test.ts`) was skipped because this container has no sshd; the in-process SSH tests cover the changed relay code. **S2 (pending upstream connections):** - The upstream socket is now tracked as soon as it is created, so closing the forward destroys a connection that is still being set up. - A connection that doesn't complete in 10 s is refused; the agent gets an error instead of a hang. - Two new tests use a target that never answers: one hits the deadline, one closes the forward mid-connection. Both fail on the old code. **S3:** the sentence in `agent-run-admission.md` now says a missing public URL refuses the grant only on runtimes without reverse forwarding. Sprites use the forward and are refused only when it is turned off or can't reach the internal API. **Transport preference:** - `auto` (the default) keeps today's order. - `forward` uses the SSH reverse forward even when `PROPR_SPRITES_MCP_URL`, `PROPR_AGENT_MCP_URL` or `API_PUBLIC_URL` is set. - Under `forward`, runs are refused rather than falling back to a public URL if `PROPR_SPRITES_MCP_FORWARD=0` is also set or `PROPR_INTERNAL_API_URL` is unusable. - Any other value refuses Sprites runs that need MCP, so a typo never quietly picks a public URL. - A new selection test covers both values, the conflicts and the typo case, and checks that Docker and Fly Machines ignore the setting. - It's documented in the Sprites runtime docs, `mcp.md`, `execution-safety.md` and `.env.example`. - The worker's log line for the forward now uses the exact task-log text, `ProPR MCP transport: ssh-reverse-forward …`, with the task id. That way `flyctl logs` can show it. **The `mcp` workflow input** (off by default; the nightly run turns it on only if the repo variable `FLY_E2E_NIGHTLY_MCP` is `true`): - **Deploy:** sets `PROPR_SPRITES_MCP_TRANSPORT=forward` and `PROPR_INTERNAL_API_URL=http://127.0.0.1:4000`, enables MCP (`MCP_ENABLED`, origin, instance id, a fresh encryption key), and removes any of these from `FLY_E2E_APP_ENV` first. - **Owner:** the automation runs as the `FLY_E2E_GITHUB_TOKEN` user, so that user must be in `PROPR_ADMIN_USERS`; the step fails early if not. Automation runs only get MCP if their owner has signed in to ProPR, which a fresh instance lacks. So after the wake the workflow records that sign-in over SSH, using the token passed as a Fly secret, `PROPR_E2E_MCP_OWNER_TOKEN`, on the throwaway app. - **Automation:** created through the API as a report-only run with the `propr_mcp` capability. Its prompt asks the agent to call `list_repositories` once and start its report with `PROPR_MCP_REPOSITORIES: <names>`. The workflow then starts one run. - **Verify** (a separate step, up to 30 minutes): - the run ends `completed`. - the report line equals the fixture repository. - the MCP access log has a successful `list_repositories` call, so the answer wasn't guessed. - the worker log, captured from the wake onwards, has the transport line for the run's report task. The step summary records all three. **Unverified on Fly:** - `propr deploy fly` doesn't set `PROPR_INTERNAL_API_URL`, and its default `http://api:4000` probably doesn't resolve in the app container. That may already break agent-run grants on Fly. MCP mode sets it explicitly. - The `ssh-reverse-forward` transport is only proven by the worker log line, read via `flyctl logs`. The same line in the task's live log may be wiped when the agent's output stream starts, so I didn't rely on it. PR: #3817 Comment by: @integry (ID: 7179978906) Model: Claude Opus 5.5 ProPR-Agent: claude/claude-opus-5-5
Package (stdio) MCP servers now run on both Sprites and Fly Machines, and `packageMcp` is `true` for both. Nothing was tested live. Locally, the related suites, the core and root typechecks, and lint on the changed source all pass. **How the install works (both runtimes)** - The worker first installs and verifies each package server exactly as it does for Docker: same registry, exact version, integrity value, no lifecycle scripts. - The worker sends its verified `package.json` and `package-lock.json` to the sandbox. The sandbox replays them as root with `npm ci --ignore-scripts` against the same registry, so npm checks every dependency against the integrity value in the lock file. - The installer refuses a lock that doesn't pin the package at its stored integrity value, or any dependency not from the registry. It then checks the installed package's name and version and makes the result root-owned and read-only at `/opt/propr/packages/<key>`. - The servers run next to the agent through the same stdio bridge as on Docker. Plain variables are passed the same way, secrets only by environment name, and output redaction is the same. - A new test does the full replay locally: real `npm ci` against the fixture registry, then a tool call through the bridge. It also checks that a lock with the wrong integrity value is refused before npm runs. - **Registry reach:** the Sprite or Machine must reach the npm registry. A private mirror set with `PROPR_EXTENSION_NPM_REGISTRY` has to be reachable from there too. **Sprites** - The install runs during provisioning, after the setup script and before the clean checkpoint. A failure fails provisioning with the end of npm's output, and the Sprite is deleted. - Each pool slot carries a digest of its package-server set. An idle Sprite with a different digest is retired, not reused, and so is a background replacement built for another set. - Matching is exact, so a run with no package servers won't reuse a Sprite built with some. If runs with different sets alternate, Sprites will be reprovisioned more often. Background replacements are built for the set the latest run asked for. - The stdio bridge wasn't on Sprites before. It's now uploaded with the setup scripts and installed at `/opt/propr/extension-stdio-bridge.mjs`. - The install time is recorded as `packageServerInstallMs` in compute usage. A warm Sprite reports none. **Fly Machines** - At Machine start the wrapper reports `installing` and runs the installer as root, before the agent and before the start gate opens. The time limit is 10 minutes. - A failed or timed-out install reports `install-failed`. The run fails with an error naming the servers and digest, followed by the end of npm's output. The Machine is destroyed and the agent never starts. - A run without package servers gets no installer files and no install step. - The install time is recorded in compute usage (`packageServerInstallMs`, also counted in `provisioningMs`). **Interim rule** - The drop/refuse rule no longer applies to package servers on Sprites and Fly. It still applies to custom runtimes that don't declare `packageMcp`. - **Decision for you:** I split operator catalog stdio servers into their own class (`catalogMcp`, error capability `catalog_mcp`), and Sprites and Fly keep the drop/refuse rule for them. They run an executable that must already be in the run's image, which neither runtime provides, so turning on `packageMcp` would otherwise have launched them broken with no note. For custom runtimes `catalogMcp` defaults to their `packageMcp` value. Say if you'd rather handle those differently. **Log lines for your live check** - Every run that applies library items logs `Extension Library items applied to this run`. It carries the runtime, library revision, `extensionDigest` of the applied items, the counts `skills`, `urlServers`, `packageServers` and `catalogStdioServers`, and `packageServersDigest`. - The installs log `Installed package MCP servers on Sprite` and `Installed package MCP servers at Fly Machine start`, with the same digest and the install time. **Gateway reachability:** #3817 isn't merged, so it isn't wired. I left a `TODO(#3817)` in `extensionRuntimeSupport.ts` where URL servers are marked unsupported when there's no reachable URL. That's where the reverse forward's `/api/extensions/mcp` should go. **Docs:** the tables in `agent-runtime.md`, `agent-extensions.md` and the Fly tutorial now show package servers as supported, list catalog stdio separately, and describe the installs, failures and log lines. **Merging with #3816:** #3816 is also unmerged and edits the same spots: the Fly wrapper and probe states, Sprite provisioning and the compute usage fields. I used my own file names so the two installs can sit side by side, but whichever lands second will need its conflicts resolved. Updated tests cover: - the Sprite install happening before the checkpoint - warm-pool reuse versus retirement by digest - a Sprite provisioning failure - a Fly install that succeeds (with compute usage), fails, or isn't needed - the wrapper's install states - the remote launch carrying the install - catalog stdio refusal on both runtimes PR: #3818 Comment by: @integry (ID: 7180544030) Model: Claude Opus 5.5 ProPR-Agent: claude/claude-opus-5-5
I added the `extensions` mode to `.github/workflows/fly-e2e.yml`. It hasn't run live yet. Locally, the workflow parses as YAML and every step passes `bash -n`. I also ran the new parts against the repo's real validators and sample data: the skill archive, the library save body, the jq filters and the three-line check all pass. **#3816 isn't merged, so the mode is Sprites-only.** A comment at the `EXTENSIONS` env var says to combine it with `agent_runtime` once #3816 lands. **How it turns on** - **Manual runs:** a `workflow_dispatch` boolean input `extensions`, default `false`. - **Nightly runs:** only when the repo variable `FLY_E2E_NIGHTLY_EXTENSIONS` is `true`. **One fixture change.** The library API only accepts a stored administrator, and nothing signs in on the fixture. So in extensions mode the deploy step adds the `FLY_E2E_GITHUB_TOKEN` user's login to `PROPR_ADMIN_USERS`. The new step then claims the administrator role through `POST /api/admin/members/claim`. **1. Setup, before the idle stop (new step)** - It calls the Settings → Extensions API itself (`/api/instance/extensions/v1/…`), using the fixture GitHub token as a bearer token. - **Skill bundle:** a ustar archive holding one `SKILL.md` named `fixture-token`. When asked for the fixture skill token, it answers `SKILL-OK-<run id>-<attempt>`. It goes through the same archive upload route as Settings. - **Package MCP server:** `fixture-echo`, running `@modelcontextprotocol/server-everything` 2.3.1 with the `stdio` argument and the `echo` tool. - The integrity value is pinned in the workflow. Settings' "Check" lookup has to return that value, and so does the saved library. Otherwise the step fails. - I ran this version locally: `echo` with `MCP-OK-1` returns `Echo: MCP-OK-1`. - Both items are auto-applied and limited to the fixture repo. The step checks the saved revision afterwards. - **No URL MCP server.** The step summary says why: the fixture has no reachable URL MCP server of its own, and the gateway route from #3817 isn't merged. - Only the read requests retry. A repeated save would fail on the library revision check. **2. The issue** asks for `$APP.txt` with three lines: `$APP`, the skill token, and the `echo` output for `MCP-OK-<run id>-<attempt>`. Without the mode, the issue text is unchanged. **3. The verify step** - It checks all three lines, expecting line 3 to be `Echo: MCP-OK-…`, and that the file has exactly three lines. - It requires an `Extension Library items applied to this run` log line with runtime `sprites`, `skills>=1` and `packageServers>=1`. - It then requires an `Installed package MCP servers on Sprite` (or `… at Fly Machine start`) line with the same `packageServersDigest`. - It prints `extensionDigest`, `packageServersDigest`, the item counts and `installMs` to the log and the step summary. - The step streams app logs in the background from its start. `flyctl logs --no-tail` keeps only recent lines, and the install line could be gone by the time the PR exists. **Docs** - In `agent-runtime.md`, the operator catalog stdio row is now labelled `catalogMcp`. For Sprites and Fly it says "dropped with a note when auto-applied, run refused when added explicitly". - `setup-fly.md` has a new "Extension Library check" section covering the input, the nightly variable, the admin change, the pinned package and what gets verified. One thing to check before you run it: if the fixture's env sets a GitHub user whitelist, the token user has to be on it, or the API calls get a 403. There's no visible UI change, so I made no previews. PR: #3818 Comment by: @integry (ID: 7180949991) Model: Claude Opus 5.5 ProPR-Agent: claude/claude-opus-5-5
MCP-mode smoke run: the automation API call returned HTTP 400 (body hidden)Run: https://github.com/integry/propr/actions/runs/45739243778 (12edf29 with F1 (blocker): surface API errors. F2: find the 400. It's either
Pushing the payload through the real route handlers in a unit test would catch this class of error before the next live run. I'll re-run with |
|
✅ Applied the requested follow-up changes in commit 1636a4e Summary of ChangesI found the 400, and both F1 and F2 are done. I haven't re-run anything on Fly, so the next The 400 came from The fix: the MCP-mode sign-in seed (still over SSH, after the wake) now copies each Your other F2 questions:
F1: both MCP steps now use one helper, Test: the automation payload now lives in
Both tests pass, and actionlint passes on the workflow. Decision for you: on any instance configured only through Review digestRisk-tiered paths
Diff size: 4 files changed, +191/−16 lines 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
I found the 400, and both F1 and F2 are done. I haven't re-run anything on Fly, so the next `MCP=true` run is the live check. **The 400 came from `POST /automation-definitions`.** `validateAgentDefinitionRuntime` refuses it with `Repositories are not enabled: <repo>` (`AGENT_INVALID`). The fixture sets `GITHUB_REPOS_TO_MONITOR=$REPO`, which the daemon uses for issue runs, so the issue run worked. But automation admission and the `list_repositories` tool both read the stored repository list, and a fresh instance has nothing there. The new test reproduces this exact 400 with the real validator. If only the admission check were fixed, the run would have failed later anyway, because `list_repositories` would have returned nothing. **The fix:** the MCP-mode sign-in seed (still over SSH, after the wake) now copies each `GITHUB_REPOS_TO_MONITOR` repository into the stored list, with GitHub's default branch, and logs `Persisted monitored repositories: …`. It's limited to MCP mode, so the plain smoke path is unchanged. **Your other F2 questions:** - **Agent:** `agentId: "claude"` matches the alias the configure step saves. A test now fails if the two ever drift apart. - **Transport:** nothing requires a public MCP URL outside the transport selection. The admission report and the worker's grant request both use `planAgentRunMcpTransport`, which honours `forward`. Grant issuance only needs MCP enabled and the owner's GitHub sign-in, which the seed records. So there was no admission bug to fix. - **Other fields:** `capabilities`, `autonomy: "dry_run"` and `repositories` all pass the input validator. **F1:** both MCP steps now use one helper, `.github/fly-e2e/propr-api.sh`. On a non-2xx response it prints, for example, `::error::POST /api/automation-definitions returned HTTP 400: error: …; code: AGENT_INVALID` (plus `message` when the response has one) to stderr and the step fails. It never prints request headers or the token. A non-JSON body or a failed connection also fails the step, with a clear line. I checked these cases against a local HTTPS stub under `set -euo pipefail`; the token appeared nowhere in the output. **Test:** the automation payload now lives in `.github/fly-e2e/mcp-automation-definition.json`, and the workflow and the new test (`test/flyE2eMcpAutomation.test.ts`) both read it. The test passes the payload through the real create and start routes, the real validator and the real config store, configured as on Fly: Sprites, `PROPR_SPRITES_MCP_TRANSPORT=forward`, the internal URL, and no public URL. Only GitHub access and the job queue are stubbed. It checks: - the 400 above while only the env var lists the repository. - 201 and then 202 (run `queued` and enqueued) once the repository is stored. - that the admission report and the worker's grant request both choose `ssh-reverse-forward` at `http://127.0.0.1:39080/api/mcp`. Both tests pass, and actionlint passes on the workflow. **Decision for you:** on any instance configured only through `GITHUB_REPOS_TO_MONITOR`, automations on those repositories are refused and `list_repositories` returns nothing. That's an existing product gap, not something this PR introduced, so I only worked around it in the fixture. Fixing it would mean making admission and the MCP tools also accept env-monitored repositories, which goes beyond this PR; say if you want it. PR: #3817 Comment by: @integry (ID: 7181191277) Model: Claude Opus 5.5 ProPR-Agent: claude/claude-opus-5-5
MCP-mode rerun: the automation run ended
|
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR implements per-run SSH forwarding with transport selection, grant propagation, lifecycle cleanup, and deployment support. No verified merge blocker emerged from static review of the supplied diff and surrounding context. Merge readiness is conditional on the three pending checks completing successfully; 31 checks passed and none failed. No commands or tests were run during this review. ✅ Authenticated forwarding — Each run generates separate keys, verifies the SSH host key, and restricts sshd to one loopback listener with sessions and local forwarding disabled. ✅ Grant propagation — The new transport survives grant issuance, tool-policy construction, and runtime admission while retaining the per-run bearer token. ✅ Meaningful coverage — Added tests exercise streaming, reconnect exhaustion, host-key rejection, pending upstream cleanup, and runtime teardown. The supplied history also records successful live automation verification. Merge blockersNo merge blockers. SuggestionsThese are optional follow-ups and are not sent to S4: 🟢 Clarify public endpoint exposure
S5: 🟢 Exercise cancellation during setupThe lifecycle tests cover cancellation after launch, but not cancellation while ScoreThe implementation has substantial targeted coverage and no verified blocker in the supplied code. Final merge confidence remains conditional on the pending checks. Score: 8/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
My own review (90bccf5): please fix before mergeR1: reconnect can't rebind the remote port (
Test: a held port is released, then the reconnect succeeds. R2: a connection that completes after R3: Host header ( R4: repository seed restores removed repos ( R5: transport carried in a side field ( R6: R7 (small):
After these, ultrafix runs again. The live MCP-mode run stays the acceptance; I'll rerun it if R1, R2 or R5 change the forward or selection paths. |
|
✅ Applied the requested follow-up changes in commit 758d60c Summary of ChangesR1–R7 are all fixed. R1, R2 and R5 change the forward and selection paths, so your live MCP-mode run is still the acceptance. The touched suites, core typecheck and lint all pass. R1: reconnect can't rebind the port
R2: connection completing after
R3: Host header. I took the simpler option: R4: repos coming back after removal
R5: transport in a side field
R6: strict parsing. R7
Two things I found along the way:
Docs updated: Review digestRisk-tiered paths
Diff size: 21 files changed, +528/−98 lines 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
R1–R7 are all fixed. R1, R2 and R5 change the forward and selection paths, so your live MCP-mode run is still the acceptance. The touched suites, core typecheck and lint all pass. `test/spritesMcpForwardOpenSsh.test.ts` also passes against a real OpenSSH 9.2 sshd that I pulled in from Debian packages. **R1: reconnect can't rebind the port** - sshd now uses `ClientAliveInterval 5` and `ClientAliveCountMax 2`, so it drops a dead client after 10 s. - Before each reconnect attempt, the worker runs a new `mcp-forward.sh reset-sessions` command over the Sprites exec API. It kills the sshd daemon's per-connection children and any `propr-mcp` processes, waits until `127.0.0.1:39080` is free, and leaves the daemon running. If the reset fails, the worker logs it and keeps retrying. - Reconnecting keeps going for at least 5 attempts and at least 30 s, three times sshd's dead-peer timeout. - Tests: - A fake test where a stale session holds the port: it is released, then the reconnect succeeds. - A test that the worker retries past its attempt count until the window has passed. - A shell test of `reset_sessions`. - A real-sshd case: I close only the worker side of the proxy, so sshd keeps the stale session and its listener. With the reset, the reconnect succeeds within 8 s. With the reset turned into a no-op, the test fails. **R2: connection completing after `close()`** - The worker now checks for abort after `await connectProxy` (and destroys the socket) and again after `await established`, so a late connection is ended, never adopted. - Tests close the forward during a reconnect's proxy connect, during authentication and during the listener request. Each checks that no SSH session or listener is left. **R3: Host header.** I took the simpler option: `PROPR_INTERNAL_API_URL` must be plain `http://` on a loopback or private IP, `localhost`, a single-label name (`api`), or a `.internal`/`.local` name. Anything else is refused with a message saying why. The TLS path is removed. The choice is documented in `agent-runtime.md`. **R4: repos coming back after removal** - The seed runs only when `repos_to_monitor` was never stored and a new `repos_seeded_from_env` marker is unset. The marker is set after the seed. - Tests cover: seeded once, an emptied list stays empty, the marker blocks a re-seed, and a stored list is left alone. **R5: transport in a side field** - I removed `AgentToolPolicy.mcpTransport`. `agentRunMcpGrant` now derives the transport from the URL with `isSpritesMcpForwardUrl`. - A Sprites run whose ProPR MCP URL is any other loopback address is refused, both at planning and at run start. - **Behaviour change:** a loopback `PROPR_SPRITES_MCP_URL` (e.g. `https://localhost`) used to be accepted as given on open Sprites runs; it is now refused. I updated that assertion in `spritesNetworkPolicy.test.ts`. **R6: strict parsing.** `1/true/on/yes` (or unset) turns the forward on and `0/false/off/no` turns it off. Anything else, such as `disabled` or `none`, refuses Sprites MCP runs with `Invalid PROPR_SPRITES_MCP_FORWARD`. **R7** - `close()` starts the remote `mcp-forward.sh stop` in the background and no longer blocks the slot release. It is exposed as `forward.remoteStop` so tests can await it. - The log-once helper is now keyed by task id plus path. Scans with no task id always log. A test checks that a second task on the same path logs again. **Two things I found along the way:** - **Not in your list:** ssh2's own ed25519 key generator produces a key its parser rejects about 1 time in 250 (13 of 3,000 in a probe). For the client key that would fail every connection attempt of a run, and it made the suite flaky. The forward now generates a new key until it parses. Ten runs in a row were clean after the fix. - `test/spritesMcpForward.test.ts` passes but never exits on its own. The untouched HEAD copy does the same, so it isn't from these changes. I ran it with `--test-force-exit`. Docs updated: `agent-runtime.md`, `configuration-reference.md` and `setup-fly.md`. Nothing here is visual, so there are no previews. PR: #3817 Comment by: @integry (ID: 7186536546) Model: Claude Opus 5.5 ProPR-Agent: claude/claude-opus-5-5
|
/ultrafix goal=8 max=3 |
|
🔄 Ultrafix loop started (goal: 8/10, max cycles: 3) First action:
|
|
✅ AI Code Review Complete requested by @integry Posted 1 review: |
|
CI failed: Full Test Suite Shard 4/4 Please investigate and fix this CI failure.
Failure evidence
|
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR implements per-run SSH forwarding for Sprites, including transport selection, grant plumbing, reconnects, and cleanup. It needs a small correction to its documented security guarantees before merge. ✅ Restricted SSH configuration — The generated configuration limits authentication to the run’s key and forwarding to one loopback listener, with host-key verification on the worker. ✅ Substantial lifecycle coverage — Added tests cover streaming, reconnects, cancellation, failed startup, and pending upstream connections. This is a static review of the supplied code; no commands were run. Current checks show 29 passed, five pending, and no failures. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F1: 🔴 Forward mode does not disable public MCP
SuggestionsThese are optional follow-ups and are not sent to S6: 🟢 Exercise cleanup across Sprite reuseThe new test deliberately permits ScoreThe forwarding implementation has strong configuration and lifecycle coverage, but its privacy documentation currently promises more than the setting enforces. Correct that localized issue and complete the pending checks. Score: 6/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
✅ Applied the requested follow-up changes in commit 2f8f1ae Summary of ChangesI fixed the Shard 4/4 failure. It was a test that kept the process alive after passing, not a bug in the product code. Cause: Fix: that test now stops the fake sshd itself once its assertions are done ( Verification:
The "Node.js 20 is deprecated" message in the failure evidence is only a warning from Review digestRisk-tiered paths
Diff size: 1 file changed, +3/−1 lines 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
I fixed the Shard 4/4 failure. It was a test that kept the process alive after passing, not a bug in the product code. **Cause:** `test/spritesMcpForward.test.ts` was the only failing unit in the shard (291/292 passed). All 31 of its subtests passed within about 6 seconds, but the process never exited, so the runner killed it at the 180 s per-unit limit. I bisected it locally to the test "close() does not wait for the remote sshd stop before the slot is released", added in 758d60c. That test replaces `sprite.execFile` so the remote `stop` command never finishes until the test says so. Normally that same `stop` command is what shuts down the fake sshd's listener. With it intercepted, the listener stayed open and kept the process running. **Fix:** that test now stops the fake sshd itself once its assertions are done (`test/spritesMcpForward.test.ts`). Nothing else changed. **Verification:** - The test that hung on its own now exits in about 3 s; before the fix it hung until a 25 s timeout. - I ran the full file 3 times: each run exited 0 in about 7 s with 31 passed and 0 failed. Before the fix it hung every time. The "Node.js 20 is deprecated" message in the failure evidence is only a warning from `actions/checkout` and has nothing to do with the failure. PR: #3817 Comment by: @propr-dev[bot] (ID: 7187600473) Model: Claude Opus 5.5 ProPR-Agent: claude/claude-opus-5-5
|
✅ Applied the requested follow-up changes in commit d6cc6a6
Summary of ChangesI've corrected F1. The docs no longer claim that Files named in the finding:
Two more places with the same wrong claim, both changed:
The other references to the forward ( There are no code or behaviour changes, so no new regression tests apply, and there is nothing visual to preview. I ran the suites that read
Separate from F1: the PR description's live-verification note says the Fly run used forward mode "so MCP stays private even though the app has a public URL". That has the same inaccuracy, but I didn't edit the PR body. Review digestRisk-tiered paths
Diff size: 5 files changed, +7/−5 lines 🤖 Implementation Details
💡 ProPR Slash Commands
🤖 Generated by ProPR |
I've corrected F1. The docs no longer claim that `PROPR_SPRITES_MCP_TRANSPORT=forward` keeps ProPR MCP off the public internet. They now say it only changes how agent runs reach MCP, and that `MCP_ENABLED` and how the API is routed decide whether MCP is public.
**Files named in the finding:**
- **`docs/docs/features/mcp.md`:** the forward opens no public port, and with `forward` agent runs don't depend on a public MCP URL and their MCP traffic stays off the internet. A new note says the setting doesn't turn MCP off or remove it from the public origin. The example is a `propr deploy fly` deployment: it still sets `MCP_ENABLED=true` and `MCP_PUBLIC_ORIGIN=https://<app>.fly.dev`, so OAuth clients can still reach the authenticated endpoint there.
- **`docs/docs/operations/deploy-fly.md`:** I dropped "only" from "only over the SSH reverse forward" and added that MCP stays served at `https://<app>.fly.dev/api/mcp` either way. `MCP_ENABLED=false` is how to stop serving it publicly.
- **`.env.example`:** the `PROPR_SPRITES_MCP_TRANSPORT` comment no longer says "keeping MCP off the internet". It now says `forward` only picks the agents' path, and that `MCP_ENABLED` and API routing decide public exposure.
**Two more places with the same wrong claim, both changed:**
- **`docs/docs/architecture/agent-runtime.md`, the `forward` bullet:** its existing sentence ("ProPR MCP then never has to be reachable from the internet") was accurate. I added that this doesn't disable or hide a public MCP endpoint.
- **`packages/core/src/agents/runtime/sprites/spritesMcpForwardConfig.ts`:** a doc comment said `forward` keeps "ProPR MCP off the public internet". I reworded it the same way; this is a comment change only.
The other references to the forward (`agentRunMcpTransport.ts`, the Fly e2e workflow, the tests) say MCP doesn't *need* to be reachable from the internet, which is true, so I left them alone.
There are no code or behaviour changes, so no new regression tests apply, and there is nothing visual to preview. I ran the suites that read `.env.example` or the docs:
- `cliInitCommand`, `composeApiIdentityPath` and `cliAssetLoading` pass.
- `composeRenderedConfig` ran 0 tests in this container, so it checked nothing.
**Separate from F1:** the PR description's live-verification note says the Fly run used forward mode "so MCP stays private even though the app has a public URL". That has the same inaccuracy, but I didn't edit the PR body.
PR: #3817
Comment by: @propr-ultrafix (ID: 0)
Model: Claude Opus 5.5
ProPR-Agent: claude/claude-opus-5-5
|
✅ AI Code Review Complete requested by @propr-ultrafix Posted 1 review: |
|
CI failed: Full Test Suite Shard 1/4 Please investigate and fix this CI failure.
Failure evidence
|
|
✅ Applied the requested follow-up changes in commit 7bd1332 Summary of ChangesI fixed the Shard 1/4 failure. It was an intermittent race in a test this PR doesn't touch, triggered by the newer git on the CI runners. Nothing in the PR's own code caused it. What failed: 292 of 293 test files in the shard passed. The failure was in Cause: git 2.56's own source shows that automatic maintenance after Fix (test only): in Verification: this container has git 2.39, which doesn't do this, so I built git 2.56.1 and put it first on the PATH. With two runs at a time to mimic the busy CI host:
Possible follow-up, not changed here: real repository clones also run this background maintenance on git 2.56. If a repack lands while the repair code is checking objects, that check could fail and wrongly mark the repository as needing manual repair. That's a separate change to There's nothing visual to preview. Review digestRisk-tiered paths
Diff size: 1 file changed, +12/−3 lines 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
I fixed the Shard 1/4 failure. It was an intermittent race in a test this PR doesn't touch, triggered by the newer git on the CI runners. Nothing in the PR's own code caused it. **What failed:** 292 of 293 test files in the shard passed. The failure was in `test/worktreeObjectRecovery.test.ts`, which matches `main`. Two tests failed, the "second damaged ref" one and the "repair interrupted before its fetch" one, with `packfile … index not opened` / `unable to load rev-index`. The same file passed on two earlier runs with the same git (2.56.1) and the same runner image, so it fails only some of the time. **Cause:** git 2.56's own source shows that automatic maintenance after `fetch` and `commit` now uses the "geometric" strategy by default. It repacks in a background process. These two tests are the ones where the repair code adds a second pack to the test repository, and that is enough to start a background repack. The repack can swap pack files while the test's next git command is reading them. **Fix (test only):** in `test/worktreeObjectRecovery.test.ts`, the test's source repository and all three clones now have `maintenance.auto=false` and `gc.auto=0` (a small `cloneWithoutMaintenance` helper). I couldn't use a global git setting through environment variables: the production code already sets them, and another test in this file checks their exact numbering. **Verification:** this container has git 2.39, which doesn't do this, so I built git 2.56.1 and put it first on the PATH. With two runs at a time to mimic the busy CI host: - the original file failed in exactly these two tests in 4 of 12 runs. The background process was still writing packs after a test finished (`ENOTEMPTY … clone/.git/objects/pack` during cleanup). - the fixed file passed all 16 runs of those two tests, and 4 full runs passed 32/32. - it also passes 32/32 with the container's own git 2.39. **Possible follow-up, not changed here:** real repository clones also run this background maintenance on git 2.56. If a repack lands while the repair code is checking objects, that check could fail and wrongly mark the repository as needing manual repair. That's a separate change to `objectRecovery.ts`, so I left it out of this fix. There's nothing visual to preview. PR: #3817 Comment by: @propr-dev[bot] (ID: 7188508523) Model: Claude Opus 5.5 ProPR-Agent: claude/claude-opus-5-5
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR implements per-run SSH reverse forwarding for Sprites, with transport selection, admission reporting, provisioning, recovery, and documentation. The supplied code supports the intended behavior; no verified merge blocker was found. Merge readiness is conditional on the remaining Validate Changes check completing successfully. ✅ Restricted SSH access — The generated configuration permits only the designated loopback reverse listener, disables sessions and other forwarding, and verifies the per-run host key. ✅ Recovery and cleanup coverage — Added tests exercise streaming, reconnects, half-open sessions, cancellation during connection establishment, and unreachable upstream targets. ✅ Live acceptance evidence — The supplied history records a successful automation on the reviewed head, backed by an MCP access-log entry and the transport diagnostic. This was a static review of the supplied diff and context; no commands or tests were run. Merge blockersNo merge blockers. SuggestionsThese are optional follow-ups and are not sent to S7: 🟢 Exercise delayed teardown across reuseConsider adding a lifecycle test that delays the background S8: 🟢 Verify credential compatibility on upgradeConsider an upgrade regression test for adding ScoreThe implementation has substantial targeted coverage and supplied live verification, with no verified actionable defect. One current-head check remains pending. Score: 8/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
On Sprites with no public MCP URL, URL MCP servers now reach the gateway through #3817's forward, and `remoteMcp` counts as supported there. The new tests and the neighbouring suites pass. Nothing was run live on Sprites; that waits for your check with #3816. **1. Rebase.** The branch already contained 9d8892a: merge commit 983d1cc brought in the epic, so I didn't need to rebase again. The `TODO(#3817)` in `extensionRuntimeSupport.ts` is gone. **2. Gateway through the forward** - **Transport decision:** `extensionRuntimeSupport` uses #3817's `planAgentRunMcpTransport`. When it returns `ssh-reverse-forward`, the plan's loopback URL becomes the gateway's endpoint. The gateway is then `http://127.0.0.1:39080/api/extensions/mcp`, or `http://127.0.0.1:39080<base>/api/extensions/mcp` if `PROPR_INTERNAL_API_URL` has a base path. A test confirms the relay carries `/api/extensions/mcp/docs` to the API stand-in. - **Restricted network policy:** the forward needs no extra host. The policy now skips the gateway host when the gateway is the forward listener, and the result is identical to the policy with no gateway. Any other loopback gateway URL is still refused, because nothing in the Sprite listens there. - **Change you didn't ask for:** the forward used to open only when the run had a ProPR MCP grant over it, but an issue task with auto-applied URL servers may carry no grant. Without a change, its agent would call a loopback port where nothing listens. `SpritesRuntime.start` now also opens the forward when the run's gateway URL is the forward listener. It refuses the run if that URL doesn't match the forward target. **3. Tests** - In `packages/core/test/extensionRemoteRuntime.test.ts`: a Sprites run with a URL server and no public URL gets `http://127.0.0.1:39080/api/extensions/mcp/docs`, with `remoteMcp` supported in both open and restricted mode. With `PROPR_SPRITES_MCP_FORWARD=0`, the same run drops the auto-applied server, records it as skipped (`agent_runtime_unsupported`) and returns the note. - In `test/spritesMcpForward.test.ts`: - a run with no ProPR MCP grant starts the forward before the agent, and a gateway call over it reaches the API. - a restricted Sprite adds no host for the loopback gateway. - a gateway URL that doesn't match the forward listener is refused. - The new tests fail against the previous source and pass with the change. - The forward, network-policy, Sprites runtime, registry, network-capability, runtime-notice, launch-integration and auto-apply suites pass: 85 tests in the Sprites suites and 52 in the rest. - Core typecheck and core lint are clean. **Docs:** I updated `agent-runtime.md` (the extensions section and the runtime table), the "Extensions on Fly runtimes" table in `setup-fly.md`, and the Sprites network-policy text in `execution-safety.md`. The Sprites restricted-network description string now also says the forward needs no gateway host. There are no visual previews, since nothing in this change is visible in the UI. PR: #3818 Comment by: @integry (ID: 7189751302) Model: Claude Opus 5.5 ProPR-Agent: claude/claude-opus-5-5
AI Implementation Summary
Closes #3813
Branch:
3813/claude-opus-5-5-remote-runtimes-reach-pro-20261126-0040-t66Commits: ✅ Changes committed (c4bd958)
AI Processing Completed
Execution Details:
Summary:
I've implemented issue #3813: Sprites runs can now reach ProPR MCP through a per-run SSH reverse forward, so a self-hosted instance with no public URL no longer has its runs refused. The unit and real-sshd tests pass. The live acceptance on a real Sprite (a Claude issue run and an automation run, with task-log evidence) has not been done: this container has no Sprites token. I added a live test for it, described below.
How a run picks its MCP transport (
agentRunMcpTransport.ts, new kindssh-reverse-forward):PROPR_SPRITES_MCP_URLif set, or a public HTTPSPROPR_AGENT_MCP_URL/API_PUBLIC_URL, is used directly, as before.http://127.0.0.1:39080/api/mcp, and the per-run grant token is still required.PROPR_SPRITES_MCP_FORWARD=0is set, or whenPROPR_INTERNAL_API_URLisn't a plainhttp(s)://host:port[/path]URL.Behaviour change: a non-public
PROPR_AGENT_MCP_URLorAPI_PUBLIC_URLused to be refused on restricted Sprites (and used as given on open ones). Now such runs get the forward. I updated the two existing tests that expected the old behaviour. An explicit non-publicPROPR_SPRITES_MCP_URLis still the operator's choice and is still refused on restricted runs.The forward (new
sprites/spritesMcpForward.ts, using thessh2library):127.0.0.1:39022only and accepts just that key for a shell-lesspropr-mcpuser. It allows only the one loopback listener: no passwords, sessions, TTYs or local forwarding. A new root-owned helper,scripts/sprites-mcp-forward.sh, starts and stops it.sprite.proxyPortand relays each forwarded connection only to the internal API host and port. Responses are passed through as they arrive, so streaming and SSE work.MCP_TRANSPORT_LOSTerror instead of letting tool calls hang.ProPR MCP transport: ssh-reverse-forward.Provisioning:
sprites-agent-setup.shinstallsopenssh-serverif the image lacks it and stops the system sshd from starting. It creates thepropr-mcpuser and installs the helper, and the Dockerfile copies the new script.Other changes:
[email protected](and@types/ssh2) topackages/core, which changespackage-lock.json.mcp.md, the Sprites runtime docs (new section "ProPR MCP from Sprites", which also says when a public URL is preferred),execution-safety.mdandagent-run-admission.md.Tests:
test/spritesMcpForward.test.ts(17 pass): transport selection, the refused cases, the sshd config, keys unique per run, an impostor host key refused, and JSON plus streamed SSE through the forward. It also covers a reconnect after a drop, a forward that can't reconnect, teardown on success, failure and cancel, and that the private key and grant token stay out of logs. It runs against an in-process SSH server standing in for the Sprite.test/spritesMcpForwardOpenSsh.test.ts(2 pass): runs against a real OpenSSH 9.2 sshd. It checks that sshd is reachable on loopback only, that other keys, passwords, other listen addresses or ports, local forwarding and commands are all refused, and that a full forward works through a proxy, reconnects and tears down. It is skipped unless sshd is installed; pointPROPR_TEST_SSHDat one to run it.test/spritesRuntime.live.test.tsthat runs on a real Sprite withPROPR_SPRITES_LIVE_TOKENand checks what sshd and the forward listen on plus a streamed call. It is a direct curl from the Sprite, not an agent tool call, so it doesn't replace the live Claude and automation runs the issue asks for.gen:openapi:check.There is nothing visual to preview.
Review digest
Risk-tiered paths
package-lock.json(+100/−0): lockfilepackages/core/package.json(+2/−0): dependency manifestdocker/Dockerfile.app.prod(+1/−1)packages/api/openapi/schemasAdmission.ts(+1/−1)packages/cli/src/api/admission.ts(+1/−1)packages/client/src/generated/apiTypes.ts(+1/−1)packages/core/src/agents/runtime/agentRunMcpTransport.ts(+32/−1)packages/core/src/agents/runtime/agentRunSpec.ts(+5/−4)packages/core/src/agents/runtime/registry.ts(+4/−1)packages/core/src/agents/runtime/sprites/spritesMcpForward.ts(added, +281/−0)packages/core/src/agents/runtime/sprites/spritesMcpForwardConfig.ts(added, +120/−0)packages/core/src/agents/runtime/sprites/spritesNetwork.ts(+22/−9)packages/core/src/agents/runtime/sprites/spritesProvisioning.ts(+1/−1)packages/core/src/agents/runtime/spritesRuntime.ts(+46/−8)packages/core/src/agents/runtime/types.ts(+11/−3)packages/core/src/agents/types.ts(+6/−0)packages/core/src/extensions/extensionLaunch.ts(+1/−1)scripts/sprites-agent-setup.sh(+46/−0)scripts/sprites-mcp-forward.sh(added, +63/−0)src/jobs/agentRuns/mcpGrantClient.ts(+5/−1)src/jobs/agentRuns/toolPolicy.ts(+5/−1)docs/docs/architecture/agent-run-admission.md(+1/−1)docs/docs/architecture/agent-runtime.md(+19/−1)docs/docs/features/execution-safety.md(+2/−2)docs/docs/features/mcp.md(+4/−0)docs/static/openapi/propr-api.yaml(+1/−0)test/agentRuntimeNetworkCapability.test.ts(+17/−2)test/helpers/fakeSpriteSshd.ts(added, +142/−0)test/spritesMcpForward.test.ts(added, +389/−0)test/spritesMcpForwardOpenSsh.test.ts(added, +187/−0)test/spritesNetworkPolicy.test.ts(+3/−1)test/spritesRuntime.live.test.ts(+63/−0)New dependencies (2):
ssh2inpackages/core/package.json,@types/ssh2inpackages/core/package.jsonDiff size: 32 files changed, +1,582/−41 lines
View task for the run's logs and conversation.
This PR was created automatically by ProPR after processing issue #3813.
💡 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!
Live verification on Fly (real agent and automation)
Run https://github.com/integry/propr/actions/runs/45773807371 on 90bccf5,
MCP=true: ✅propr deploy fly(which now generatesSYSTEM_TASK_SECRET) andPROPR_SPRITES_MCP_TRANSPORT=forward, so MCP stays private even though the app has a public URL. No smoke-only workarounds: the repository list was seeded at startup fromGITHUB_REPOS_TO_MONITOR.webhookRecovery.redelivered=1). The issue run on Sprites opened its PR.propr_mcpautomation was created and started through the REST API, and finishedcompleted.ProPR MCP transport: ssh-reverse-forward (per-run SSH reverse forward through the Sprites proxy).PROPR_MCP_REPOSITORIES: integry/propr-fly-fixture, backed by a successfullist_repositoriesentry in the MCP access log, which the verify step checks.Product bugs found by the earlier live runs and fixed here:
propr deploy flydidn't generateSYSTEM_TASK_SECRET, so every automation failed on a Fly deploy;Re-verified after my review fixes (R1–R7): https://github.com/integry/propr/actions/runs/45787085027 on 758d60c ✅. The automation
completed, the task log showsssh-reverse-forward, the report showsPROPR_MCP_REPOSITORIES: integry/propr-fly-fixture, and teardown was clean.