Skip to content

[3863 by Claude Opus 5.5] Agent credentials on Docker-less instances: paste credentials + interactive login on the remote runtime - #3865

Merged
integry merged 25 commits into
3758-epic-runtime-abstraction-sc0from
3863/claude-opus-5-5-agent-credentials-on-dock-20261127-2255-6h9
Nov 29, 2026
Merged

integry merged 25 commits into
3758-epic-runtime-abstraction-sc0from
3863/claude-opus-5-5-agent-credentials-on-dock-20261127-2255-6h9

Conversation

@propr-dev

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

Copy link
Copy Markdown
Contributor

AI Implementation Summary

Closes #3863

Branch: 3863/claude-opus-5-5-agent-credentials-on-dock-20261127-2255-6h9
Commits: ✅ Changes committed (37d2eb3)


AI Processing Completed

Execution Details:

Summary:
I've implemented all three parts of #3863, but none of the live acceptance runs on a Fly-launched instance have happened, so there are no run links for the PR yet. The new tests pass: 311 server-side tests across the touched suites and 12 UI tests. Typecheck, lint (zero warnings) and the OpenAPI check are clean.

1. Pasted credentials (works on every runtime, including Docker)

  • The agent dialog has a third setup option, Paste a key or token. Editing a saved agent shows the same section.
  • Claude: an Anthropic API key or a claude setup-token token. Either goes into settings.json under env as ANTHROPIC_API_KEY or CLAUDE_CODE_OAUTH_TOKEN. Saving one removes the other, and other settings are kept.
  • Codex: an OpenAI API key, written to auth.json the way codex login --with-api-key does it, or a pasted auth.json.
  • OpenCode: a pasted auth.json, stored in its data directory.
  • Each option links to where the key or token comes from.
  • Values are write-only. The dialog and the new GET/PUT/DELETE /api/agents/:id/credentials endpoints only report "set" plus the last 4 characters. Remove deletes a value.
  • Files are written atomically with mode 0600, under the same store lock the runs use.
  • I added redaction patterns for these key formats and for secrets inside the JSON files, with a case in test/redactSecrets.test.ts.
  • Vibe keeps its existing Mistral key field, which the API already redacts. I didn't touch the stores [3838 by Claude Opus 5.5] Run Mistral Vibe and OpenCode on Fly Machines and Sprites #3853 changes.

2. Interactive login on the remote runtime

  • This applies when the agent runs on Sprites or Fly Machines and there's no local Docker. "No Docker" means neither DOCKER_HOST nor /var/run/docker.sock is present.
  • Sprites: the login takes a Sprite from the normal pool, so it counts against PROPR_SPRITES_MAX. It runs the login CLI with a TTY, and the Sprite is always deleted afterwards, never returned to the pool.
  • Fly Machines: the login starts a short-lived propr-login-* Machine from PROPR_FLY_IMAGE, holding a PROPR_FLY_MACHINES_MAX slot. Fly's API has no interactive console, so output and keystrokes go through its exec API, polled about once a second. If ProPR crashes, the Machine ends the CLI and destroys itself.
  • On success, the login files the provider manifest declares are copied into the agent's credential store, then the Sprite or Machine is destroyed.
  • If no slot frees up within 30 seconds, or Fly's organization machine limit is hit, the login fails with a message naming the cap.
  • Provisioning a new Sprite takes a few minutes. The dialog streams progress meanwhile.

3. Health check by runtime

  • For agents on Sprites or Fly Machines, the check no longer touches a local Docker image or starts a test run. It checks three things: the runtime token is accepted, the CLI version (Sprites) or agent image (Fly) resolves, and the agent has a stored credential.
  • Failures now show Agent runtime unavailable or an auth error, never "Agent image preparation failed".
  • Docker instances behave as before.

Things to know

  • The API process needs PROPR_SPRITES_TOKEN or the PROPR_FLY_* variables. They're already shared on a propr deploy fly instance, since the API and worker run in the same container.
  • Interactive login on Sprites covers the agents Sprites runs today (Claude, Codex, Antigravity). OpenCode becomes available there once [3838 by Claude Opus 5.5] Run Mistral Vibe and OpenCode on Fly Machines and Sprites #3853 adds it.
  • To stay under the file-length limit, I moved the terminal-output sanitizer, the Docker helpers and the login routes into separate files. The OpenAPI spec was regenerated.

Docs: setup-fly.md has a new "Agent credentials" section. agents-and-models.md describes pasting credentials and interactive login without Docker.

Still needed before merge: the live runs on a Fly-launched instance — (a) an AI issue to a PR with a pasted key on both Sprites and Fly Machines, (b) the interactive Claude login on Sprites followed by a run, and (c) a healthy agent card. Previews of the dialog and agent cards were taken against a mocked API.

Review digest

Risk-tiered paths

  • High risk (18 files)
    • packages/api/agentLoginRouteRegistry.ts (added, +23/−0): auth-looking path
    • packages/api/routes/agentCredentialRoutes.ts (added, +67/−0): auth-looking path
    • packages/api/routes/agentLoginRoutes.ts (+4/−2): auth-looking path
    • packages/api/services/agentCredentialStore.ts (added, +176/−0): auth-looking path
    • packages/api/services/agentLoginDocker.ts (+28/−0): auth-looking path
    • packages/api/services/agentLoginRemote.ts (added, +189/−0): auth-looking path
    • packages/api/services/agentLoginSessionManager.ts (+104/−103): auth-looking path
    • packages/api/services/agentLoginTerminal.ts (added, +84/−0): auth-looking path
    • packages/core/src/agents/credentials/credentialStoreWriter.ts (added, +90/−0): auth-looking path
    • packages/core/src/agents/credentials/pastedCredentials.ts (added, +203/−0): auth-looking path
    • packages/core/src/agents/runtime/fly/flyLogin.ts (added, +201/−0): auth-looking path
    • packages/core/src/agents/runtime/remoteLogin.ts (added, +90/−0): auth-looking path
    • packages/core/src/agents/runtime/sprites/spritesLogin.ts (added, +83/−0): auth-looking path
    • packages/shared/src/agentCredentials.ts (added, +118/−0): auth-looking path
    • propr-ui/src/api/agentCredentialApi.ts (added, +52/−0): auth-looking path
    • propr-ui/src/pages/SettingsPage/AgentCredentialSetup.tsx (+16/−6): auth-looking path
    • propr-ui/src/pages/SettingsPage/AgentPastedCredentials.tsx (added, +185/−0): auth-looking path
    • propr-ui/src/pages/SettingsPage/agentCredentialSetupUtils.ts (+1/−1): auth-looking path
  • Normal risk (17 files)
    • packages/api/routeRegistry.ts (+2/−4)
    • packages/api/routes/agentRoutes.ts (+5/−0)
    • packages/api/services/agentHealthCheck.ts (+54/−2)
    • packages/core/src/agents/runtime/agentRuntimePackageProfile.ts (+8/−0)
    • packages/core/src/agents/runtime/flyMachinesRuntime.ts (+12/−0)
    • packages/core/src/agents/runtime/remoteRuntimeReadiness.ts (added, +89/−0)
    • packages/core/src/agents/runtime/sprites/spritesProvisioning.ts (+6/−5)
    • packages/core/src/agents/runtime/sprites/spritesSlot.ts (+13/−0)
    • packages/core/src/agents/runtime/spritesRuntime.ts (+21/−1)
    • packages/core/src/index.ts (+13/−1)
    • packages/core/src/utils/secretRedaction.ts (+3/−0)
    • packages/shared/src/index.ts (+11/−0)
    • propr-ui/src/api/agentHealthApi.ts (+5/−1)
    • propr-ui/src/pages/SettingsPage/AgentCard.tsx (+1/−1)
    • propr-ui/src/pages/SettingsPage/AgentConfigModal.tsx (+29/−3)
    • propr-ui/src/pages/SettingsPage/AgentHealthFeedback.tsx (+2/−1)
    • propr-ui/src/pages/SettingsPage/AgentsListSection.tsx (+15/−1)
  • Low risk (7 files)
    • docs/docs/features/agents-and-models.md (+26/−1)
    • docs/docs/tutorials/setup-fly.md (+11/−2)
    • docs/static/openapi/propr-api.yaml (+102/−2)
    • packages/api/test/agentRemoteCredentials.test.ts (added, +269/−0)
    • propr-ui/src/pages/SettingsPage/AgentPastedCredentials.test.tsx (added, +74/−0)
    • test/redactSecrets.test.ts (+12/−0)
    • test/remoteAgentLogin.test.ts (added, +276/−0)

Diff size: 42 files changed, +2,773/−137 lines

View task for the run's logs and conversation.


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


💡 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

Add agent: paste a key or token

Add agent: paste a key or token

New Claude agent with the new 'Paste a key or token' credential setup and the setup-token kind selected; the value is a masked placeholder (mocked API).

Full-size original

Agent cards: remote runtime health

Agent cards: remote runtime health

Claude on Sprites reports Ready from the runtime check; Codex on Fly Machines shows 'Agent runtime unavailable' (refused token) instead of 'Agent image preparation failed' (mocked API).

Full-size original

Edit agent: write-only stored credential

Edit agent: write-only stored credential

Saved Codex agent showing its OpenAI API key only as set with the last four characters, a Remove action and an empty field to replace it (mocked API).

Full-size original

I've implemented all three parts of #3863, but none of the live acceptance runs on a Fly-launched instance have happened, so there are no run links for the PR yet. The new tests pass: 311 server-side tests across the touched suites and 12 UI tests. Typecheck, lint (zero warnings) and the OpenAPI check are clean.

1. Pasted credentials (works on every runtime, including Docker)
- The agent dialog has a third setup option, Paste a key or token. Editing a saved agent shows the same section.
- Claude: an Anthropic API key or a `claude setup-token` token. Either goes into `settings.json` under `env` as `ANTHROPIC_API_KEY` or `CLAUDE_CODE_OAUTH_TOKEN`. Saving one removes the other, and other settings are kept.
- Codex: an OpenAI API key, written to `auth.json` the way `codex login --with-api-key` does it, or a pasted `auth.json`.
- OpenCode: a pasted `auth.json`, stored in its data directory.
- Each option links to where the key or token comes from.
- Values are write-only. The dialog and the new `GET/PUT/DELETE /api/agents/:id/credentials` endpoints only report "set" plus the last 4 characters. Remove deletes a value.
- Files are written atomically with mode 0600, under the same store lock the runs use.
- I added redaction patterns for these key formats and for secrets inside the JSON files, with a case in `test/redactSecrets.test.ts`.
- Vibe keeps its existing Mistral key field, which the API already redacts. I didn't touch the stores #3853 changes.

2. Interactive login on the remote runtime
- This applies when the agent runs on Sprites or Fly Machines and there's no local Docker. "No Docker" means neither `DOCKER_HOST` nor `/var/run/docker.sock` is present.
- Sprites: the login takes a Sprite from the normal pool, so it counts against `PROPR_SPRITES_MAX`. It runs the login CLI with a TTY, and the Sprite is always deleted afterwards, never returned to the pool.
- Fly Machines: the login starts a short-lived `propr-login-*` Machine from `PROPR_FLY_IMAGE`, holding a `PROPR_FLY_MACHINES_MAX` slot. Fly's API has no interactive console, so output and keystrokes go through its exec API, polled about once a second. If ProPR crashes, the Machine ends the CLI and destroys itself.
- On success, the login files the provider manifest declares are copied into the agent's credential store, then the Sprite or Machine is destroyed.
- If no slot frees up within 30 seconds, or Fly's organization machine limit is hit, the login fails with a message naming the cap.
- Provisioning a new Sprite takes a few minutes. The dialog streams progress meanwhile.

3. Health check by runtime
- For agents on Sprites or Fly Machines, the check no longer touches a local Docker image or starts a test run. It checks three things: the runtime token is accepted, the CLI version (Sprites) or agent image (Fly) resolves, and the agent has a stored credential.
- Failures now show Agent runtime unavailable or an auth error, never "Agent image preparation failed".
- Docker instances behave as before.

Things to know
- The API process needs `PROPR_SPRITES_TOKEN` or the `PROPR_FLY_*` variables. They're already shared on a `propr deploy fly` instance, since the API and worker run in the same container.
- Interactive login on Sprites covers the agents Sprites runs today (Claude, Codex, Antigravity). OpenCode becomes available there once #3853 adds it.
- To stay under the file-length limit, I moved the terminal-output sanitizer, the Docker helpers and the login routes into separate files. The OpenAPI spec was regenerated.

Docs: `setup-fly.md` has a new "Agent credentials" section. `agents-and-models.md` describes pasting credentials and interactive login without Docker.

Still needed before merge: the live runs on a Fly-launched instance — (a) an `AI` issue to a PR with a pasted key on both Sprites and Fly Machines, (b) the interactive Claude login on Sprites followed by a run, and (c) a healthy agent card. Previews of the dialog and agent cards were taken against a mocked API.

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

propr-dev Bot commented Nov 27, 2026

Copy link
Copy Markdown
Contributor Author

CI failed: Full Test Suite Shard 2/4

Please investigate and fix this CI failure.

  • Check: Full Test Suite Shard 2/4
  • Result: failure
  • Commit: 37d2eb3db8a6 (37d2eb3db8a6e72537ad7f193033f8976c4247c8)
  • Run: View CI failure

Failure evidence

.github:11
Process completed with exit code 1.

.github:48855
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

✅ Applied the requested follow-up changes in commit 01eb760

Summary of Changes

I fixed the Shard 2/4 failure; it was caused by this PR's code, not by flakiness. The failing test file now passes.

Cause: test/agentRoutesOpenCodeDiscovery.test.ts replaces child_process with a mock that only provides execFile. This PR gave agentRoutes a new import chain: agentCredentialStore → agentLoginDocker.ts. When I moved the Docker helpers into agentLoginDocker.ts, that file started importing spawn from node:child_process. Under the mock, spawn doesn't exist, so the test file failed to load:

SyntaxError: The requested module 'node:child_process' does not provide an export named 'spawn'

Fix: I changed the source rather than adding spawn to the test's mock.

  • defaultRunDocker, defaultSpawnDocker and DockerCommandResult now live in a new file, packages/api/services/agentLoginDockerProcess.ts.
  • agentLoginDocker.ts no longer imports child_process. It keeps only the path and image resolution, which is all the credential store needs.
  • agentLoginSessionManager.ts imports the Docker helpers from the new file. Its exports are unchanged.

Checks run:

  • agentRoutesOpenCodeDiscovery, remoteAgentLogin and agentRemoteCredentials: all pass.
  • The six other suites that touch agent login: all pass, including agentLoginRoutes, routeAuthorization and agentDefaultConfigPaths.
  • tsc for packages/api and zero-warning ESLint on the three changed files: clean.

I didn't rerun the full shard locally. There's no visual change, so I didn't make previews.

Review digest

Risk-tiered paths

  • High risk (3 files)
    • packages/api/services/agentLoginDocker.ts (+0/−28): auth-looking path
    • packages/api/services/agentLoginDockerProcess.ts (added, +30/−0): auth-looking path
    • packages/api/services/agentLoginSessionManager.ts (+2/−4): auth-looking path
  • Normal risk: none
  • Low risk: none

Diff size: 3 files changed, +32/−32 lines


🤖 Implementation Details

  • Model: Claude Opus 5.5 (medium)
  • Requested By: @propr-dev[bot]
  • Time: 7m 40s
  • Tokens: 725,830 (721,924 in / 3,906 out)
  • Cost: $0.49

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: 7230494503✓

I fixed the Shard 2/4 failure; it was caused by this PR's code, not by flakiness. The failing test file now passes.

**Cause:** `test/agentRoutesOpenCodeDiscovery.test.ts` replaces `child_process` with a mock that only provides `execFile`. This PR gave `agentRoutes` a new import chain: `agentCredentialStore` → `agentLoginDocker.ts`. When I moved the Docker helpers into `agentLoginDocker.ts`, that file started importing `spawn` from `node:child_process`. Under the mock, `spawn` doesn't exist, so the test file failed to load:

```
SyntaxError: The requested module 'node:child_process' does not provide an export named 'spawn'
```

**Fix:** I changed the source rather than adding `spawn` to the test's mock.
- `defaultRunDocker`, `defaultSpawnDocker` and `DockerCommandResult` now live in a new file, `packages/api/services/agentLoginDockerProcess.ts`.
- `agentLoginDocker.ts` no longer imports `child_process`. It keeps only the path and image resolution, which is all the credential store needs.
- `agentLoginSessionManager.ts` imports the Docker helpers from the new file. Its exports are unchanged.

**Checks run:**
- `agentRoutesOpenCodeDiscovery`, `remoteAgentLogin` and `agentRemoteCredentials`: all pass.
- The six other suites that touch agent login: all pass, including `agentLoginRoutes`, `routeAuthorization` and `agentDefaultConfigPaths`.
- `tsc` for `packages/api` and zero-warning ESLint on the three changed files: clean.

I didn't rerun the full shard locally. There's no visual change, so I didn't make previews.

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

ProPR-Agent: claude/claude-opus-5-5
@propr-dev propr-dev Bot changed the title 🔨 [3863 by Claude Opus 5.5] Agent credentials on Docker-less instances: paste credentials + interactive login on the remote runtime ✅ [3863 by Claude Opus 5.5] Agent credentials on Docker-less instances: paste credentials + interactive login on the remote runtime Nov 28, 2026

integry commented Nov 28, 2026

Copy link
Copy Markdown
Owner

/review

@propr-dev propr-dev Bot changed the title ✅ [3863 by Claude Opus 5.5] Agent credentials on Docker-less instances: paste credentials + interactive login on the remote runtime 🔨 [3863 by Claude Opus 5.5] Agent credentials on Docker-less instances: paste credentials + interactive login on the remote runtime Nov 28, 2026
@propr-dev

propr-dev Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @integry

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Nov 28, 2026

Copy link
Copy Markdown
Contributor Author

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

Overall Evaluation

The PR adds pasted credentials, remote interactive login, and runtime-aware health checks with a coherent separation between UI, storage, and runtime adapters. It needs changes before merge: credential updates can lose concurrent changes, cancelled logins can still publish credentials, and remote readiness checks omit promised checks.

✅ Write-only credential responses — Credential endpoints return status and suffixes, set Cache-Control: no-store, and avoid logging unexpected error contents.

✅ Restricted login collection — Returned login files are checked against provider manifest entries before being stored.

✅ Remote health routing — Remote agents bypass local Docker image preparation and model probes.

Current-head checks report 24 passed and 17 skipped, with no failures. This review uses static tracing of the supplied code; no commands were run. The stated live acceptance runs remain unverified.

Merge blockers

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

F1: 🔴 Credential merges happen outside the lock

  • Category: correctness

  • Required behavior: Credential edits must preserve unrelated settings and credentials while serializing changes to the shared store.

  • Evidence: packages/api/services/agentCredentialStore.ts, rewrite; packages/core/src/agents/credentials/credentialStoreWriter.ts, writeCredentialStoreFiles.

    1. A Claude store contains an Anthropic API key. A PUT replacing it with an OAuth token reads that file and computes the replacement before awaiting the store lock.
    2. While that PUT awaits lock acquisition, another request removes the Anthropic key. It reads the same old file and computes settings without either credential.
    3. The PUT publishes its OAuth token, then the DELETE publishes its previously computed settings.
    4. The newly saved OAuth token disappears even though the DELETE targeted only the Anthropic API key.

    static trace: rewrite calls change(...reader(...)) before writeCredentialStoreFiles acquires the lock. Serializing publication cannot protect the earlier read-modify-write operation. The existing writer test checks atomic replacement and symlink rejection, not concurrent merges.

  • Minimum fix: Read the current file and compute its replacement inside the same store-lock callback that publishes it. Add a regression covering overlapping replacement and removal requests.

F2: 🔴 Cancelled logins can still publish credentials

  • Category: correctness

  • Required behavior: Cancelling or timing out a remote login must prevent that session from subsequently changing the agent’s credentials.

  • Evidence: packages/api/services/agentLoginRemote.ts, runRemoteLoginSession and collectRemoteLoginFiles; packages/api/services/agentCredentialStore.ts, storeReturnedLoginFiles.

    1. A remote CLI exits successfully. The session passes hooks.terminal() and begins awaiting hooks.collect(remote).
    2. Collection reaches writeCredentialStoreFiles and waits for a busy store lock.
    3. The user cancels the session, or its inactivity timeout fires. The manager marks it terminal, aborts the remote request, and closes the runtime.
    4. When the store lock becomes available, the pending collection still writes the cancelled session’s credentials.

    static trace: collection and storage receive neither the cancellation signal nor a terminal-state predicate. The lock protects publication from other writers but does not authorize publication after cancellation. Closing the runtime cannot cancel a local write already waiting for that lock. The cancellation test covers a running CLI, not collection after exit.

  • Minimum fix: Propagate cancellation through collection and storage, and check it inside the store lock immediately before publication. Stop subsequent success handling when collection finishes after cancellation.

F3: 🔴 Antigravity readiness skips credential checks

  • Category: correctness

  • Required behavior: Remote health checks must verify that the agent has stored credentials before reporting Ready.

  • Evidence: packages/api/services/agentCredentialStore.ts, remoteCredentialProblem; packages/core/src/agents/runtime/remoteRuntimeReadiness.ts, spritesReadiness.

    1. An enabled Antigravity agent selects Sprites but has no stored login.
    2. Sprites readiness accepts its supported type, resolves the pinned CLI version, and successfully lists Sprites.
    3. remoteCredentialProblem immediately returns undefined because Antigravity does not support pasted credentials.
    4. remoteResult reports Ready despite the absent authentication file.

    static trace: pasted-credential support gates the entire credential check. The supplied manifest explicitly declares Antigravity’s antigravity-cli/antigravity-oauth-token as a refreshable login file, but this path never examines it. Existing remote health tests exercise Claude only.

  • Minimum fix: Separate stored-login validation from pasted-credential support. Check Antigravity’s manifest login file before reporting Ready, and cover the missing-login case.

F4: 🔴 Fly readiness never resolves the image

  • Category: requirement

  • Required behavior: The remote health check must verify that the Fly agent image resolves, alongside runtime-token acceptance and credential presence.

  • Evidence: packages/core/src/agents/runtime/remoteRuntimeReadiness.ts, flyReadiness.

    1. Configure a valid Fly token and app, a stored agent credential, and a nonexistent image tag in PROPR_FLY_IMAGE.
    2. flyConfig accepts the nonempty image string; its supplied implementation does not resolve the image.
    3. flyReadiness only lists Machines and then returns ready: true, displaying that image string.
    4. The agent card reports Ready without establishing the explicitly promised image availability.

    static trace: there is no image-resolution operation between configuration parsing and the successful result. The new Fly readiness test likewise supplies only a successful Machine-list response, so it cannot detect this gap.

  • Minimum fix: Verify that the configured image reference resolves with the applicable registry credentials before returning Ready; return runtime_unavailable when resolution fails.

Suggestions

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

S1: 🟢 Document credential API schemas

The regenerated OpenAPI entries expose the new routes but leave request bodies, status responses, and validation errors undocumented. Adding those schemas would make the write-only contract clearer for API clients. This is optional because the objective does not explicitly require complete endpoint documentation.

Score

The passing checks and manifest-based integration are useful foundations, but credential mutation races and incomplete readiness checks prevent merge readiness. Live acceptance evidence is also still outstanding.

Score: 5/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 1m 20s
  • Tokens: 101,194 (99,035 in / 2,159 out)
  • Cost: $0.97

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 F3 F4 S1

🤖 Review by ProPR

@propr-dev propr-dev Bot changed the title 🔨 [3863 by Claude Opus 5.5] Agent credentials on Docker-less instances: paste credentials + interactive login on the remote runtime ⚠️❺ [3863 by Claude Opus 5.5] Agent credentials on Docker-less instances: paste credentials + interactive login on the remote runtime Nov 28, 2026
@integry

integry commented Nov 28, 2026

Copy link
Copy Markdown
Owner

/fix

@propr-dev propr-dev Bot changed the title ⚠️❺ [3863 by Claude Opus 5.5] Agent credentials on Docker-less instances: paste credentials + interactive login on the remote runtime 🔨 [3863 by Claude Opus 5.5] Agent credentials on Docker-less instances: paste credentials + interactive login on the remote runtime Nov 28, 2026
@propr-dev

propr-dev Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit ca7b840

Addressed 1 AI review comment (IDs: 7231361357)

Addressed findings F1, F2, F3, F4

Summary of Changes

I fixed all four findings (F1–F4) and added a regression test for each. I put the HEAD versions of the API services back temporarily, and the new F1, F2 and F3 tests failed against them. With the fixes, the touched suites pass: 17 core tests and 61 API tests. Typecheck and lint pass with zero warnings.

F1: credential edits now read and merge inside the lock

  • writeCredentialStoreFiles (credentialStoreWriter.ts) now also accepts a function that computes the files to write. It runs while holding the store lock, and the symlink and size checks run there too.
  • rewrite in agentCredentialStore.ts now reads settings.json and merges into it inside that function, so a PUT and a DELETE that overlap each build on the other's result.
  • storeReturnedLoginFiles writes whole login files and doesn't merge, so it didn't have this bug.
  • Tests: a core test runs two overlapping merges. An API test makes a real PUT (swap the API key for an OAuth token) and DELETE (remove the API key) wait on a busy lock at the same time. The result keeps the new token, removes the key, and keeps an unrelated model setting.

F2: a cancelled login can no longer save credentials

  • The writer takes an optional cancellation signal. It checks it before waiting for the lock, and again inside the lock just before writing.
  • That signal is the one cancel and timeout already abort. It now reaches the writer through the session manager, collectRemoteLoginFiles and storeReturnedLoginFiles. Collection also checks it between file reads.
  • For OpenCode, which writes to two stores, the check runs under each store's lock.
  • After collection, runRemoteLoginSession checks whether the session has already ended. If so, it reports neither "Saved…" nor "Could not save…" and leaves the cancelled or timed-out status as it is.
  • Tests:
    • A login is cancelled while its collection waits on a busy lock: nothing is written, the status stays cancelled, and the runtime is closed once.
    • Collection with an already-aborted signal stores nothing.
    • A write aborted while waiting for the lock publishes nothing.

F3: Antigravity's stored login is now checked

  • remoteCredentialProblem no longer depends on whether a provider supports pasted credentials. It checks the provider's login files from the credential manifest, plus pasted credentials where those are supported.
  • An Antigravity agent without antigravity-cli/antigravity-oauth-token now reports auth_required, with a login-only message, since it has no paste option.
  • Test: the missing-login case, then the ready case once the file is stored.

F4: Fly readiness now resolves the image

  • New fly/imageResolution.ts. Images on registry.fly.io are resolved with the Fly token (through the existing FlyRegistry), down to the linux/amd64 manifest.
  • Images on other registries are resolved anonymously, the same way Fly would pull them without credentials. The Fly token is never sent outside registry.fly.io.
  • flyReadiness calls this after the Machines list succeeds. A failure returns not-ready, which shows on the card as runtime_unavailable. A 404 says the image doesn't resolve, and a 401 or 403 says access was refused.
  • Tests:
    • Image resolution is required before Ready.
    • A 404 or 403 makes the agent not ready.
    • Image references parse correctly.
    • A fake registry checks the Fly-token path and the anonymous path, including that the Fly token never reaches another registry.

Not fixed: unavoidable timing gaps.

  • A cancel that arrives after the in-lock check has passed can't stop a write that is already happening.
  • For OpenCode's two stores, a cancel between the two writes can leave the first store written.

These come down to the filesystem having no atomic cross-store write, not stale state.

There's no visual change, so I didn't capture previews.

Review digest

Risk-tiered paths

  • High risk (4 files)
    • packages/api/services/agentCredentialStore.ts (+30/−14): auth-looking path
    • packages/api/services/agentLoginRemote.ts (+18/−7): auth-looking path
    • packages/api/services/agentLoginSessionManager.ts (+2/−2): auth-looking path
    • packages/core/src/agents/credentials/credentialStoreWriter.ts (+25/−4): auth-looking path
  • Normal risk (3 files)
    • packages/core/src/agents/runtime/fly/imageResolution.ts (added, +101/−0)
    • packages/core/src/agents/runtime/remoteRuntimeReadiness.ts (+14/−0)
    • packages/core/src/index.ts (+1/−1)
  • Low risk (2 files)
    • packages/api/test/agentRemoteCredentials.test.ts (+81/−3)
    • test/remoteAgentLogin.test.ts (+94/−1)

Diff size: 9 files changed, +366/−32 lines


🤖 Implementation Details

  • Model: Claude Opus 5.5 (medium)
  • Requested By: @integry
  • Time: 10m 3s
  • Tokens: 3,021,168 (2,994,935 in / 26,233 out)
  • Cost: $1.64

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: 7232932164✓

I fixed all four findings (F1–F4) and added a regression test for each. I put the HEAD versions of the API services back temporarily, and the new F1, F2 and F3 tests failed against them. With the fixes, the touched suites pass: 17 core tests and 61 API tests. Typecheck and lint pass with zero warnings.

**F1: credential edits now read and merge inside the lock**
- `writeCredentialStoreFiles` (`credentialStoreWriter.ts`) now also accepts a function that computes the files to write. It runs while holding the store lock, and the symlink and size checks run there too.
- `rewrite` in `agentCredentialStore.ts` now reads `settings.json` and merges into it inside that function, so a PUT and a DELETE that overlap each build on the other's result.
- `storeReturnedLoginFiles` writes whole login files and doesn't merge, so it didn't have this bug.
- **Tests:** a core test runs two overlapping merges. An API test makes a real PUT (swap the API key for an OAuth token) and DELETE (remove the API key) wait on a busy lock at the same time. The result keeps the new token, removes the key, and keeps an unrelated `model` setting.

**F2: a cancelled login can no longer save credentials**
- The writer takes an optional cancellation signal. It checks it before waiting for the lock, and again inside the lock just before writing.
- That signal is the one cancel and timeout already abort. It now reaches the writer through the session manager, `collectRemoteLoginFiles` and `storeReturnedLoginFiles`. Collection also checks it between file reads.
- For OpenCode, which writes to two stores, the check runs under each store's lock.
- After collection, `runRemoteLoginSession` checks whether the session has already ended. If so, it reports neither "Saved…" nor "Could not save…" and leaves the cancelled or timed-out status as it is.
- **Tests:**
  - A login is cancelled while its collection waits on a busy lock: nothing is written, the status stays cancelled, and the runtime is closed once.
  - Collection with an already-aborted signal stores nothing.
  - A write aborted while waiting for the lock publishes nothing.

**F3: Antigravity's stored login is now checked**
- `remoteCredentialProblem` no longer depends on whether a provider supports pasted credentials. It checks the provider's login files from the credential manifest, plus pasted credentials where those are supported.
- An Antigravity agent without `antigravity-cli/antigravity-oauth-token` now reports `auth_required`, with a login-only message, since it has no paste option.
- **Test:** the missing-login case, then the ready case once the file is stored.

**F4: Fly readiness now resolves the image**
- New `fly/imageResolution.ts`. Images on `registry.fly.io` are resolved with the Fly token (through the existing `FlyRegistry`), down to the linux/amd64 manifest.
- Images on other registries are resolved anonymously, the same way Fly would pull them without credentials. The Fly token is never sent outside `registry.fly.io`.
- `flyReadiness` calls this after the Machines list succeeds. A failure returns not-ready, which shows on the card as `runtime_unavailable`. A 404 says the image doesn't resolve, and a 401 or 403 says access was refused.
- **Tests:**
  - Image resolution is required before Ready.
  - A 404 or 403 makes the agent not ready.
  - Image references parse correctly.
  - A fake registry checks the Fly-token path and the anonymous path, including that the Fly token never reaches another registry.

**Not fixed: unavoidable timing gaps.**
- A cancel that arrives after the in-lock check has passed can't stop a write that is already happening.
- For OpenCode's two stores, a cancel between the two writes can leave the first store written.

These come down to the filesystem having no atomic cross-store write, not stale state.

There's no visual change, so I didn't capture previews.

PR: #3865
Comment by: @integry (ID: 7232932164)
Model: Claude Opus 5.5

ProPR-Agent: claude/claude-opus-5-5
@propr-dev propr-dev Bot changed the title 🔨 [3863 by Claude Opus 5.5] Agent credentials on Docker-less instances: paste credentials + interactive login on the remote runtime ⚠️❺ [3863 by Claude Opus 5.5] Agent credentials on Docker-less instances: paste credentials + interactive login on the remote runtime Nov 28, 2026

integry commented Nov 28, 2026

Copy link
Copy Markdown
Owner

/ultrafix goal=8 max=10

@propr-dev

propr-dev Bot commented Nov 28, 2026

Copy link
Copy Markdown
Contributor Author

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

First action: /review

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

@propr-dev propr-dev Bot added the ultrafix label Nov 28, 2026
@propr-dev propr-dev Bot changed the title ⚠️❺ [3863 by Claude Opus 5.5] Agent credentials on Docker-less instances: paste credentials + interactive login on the remote runtime 🔨 [3863 by Claude Opus 5.5] Agent credentials on Docker-less instances: paste credentials + interactive login on the remote runtime Nov 28, 2026
@propr-dev

propr-dev Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @integry

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Nov 28, 2026

Copy link
Copy Markdown
Contributor Author

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

Overall Evaluation

This PR adds pasted credentials, remote interactive login, and runtime-aware health checks. The approach fits the objective, but two credential-handling defects require correction before merge.

✅ Serialized credential updates — Pasted settings are merged under the credential-store lock, with atomic replacement and mode 0600.

✅ Cancellation-aware collection — Remote login collection checks cancellation before reading and again under the store lock before publication.

The authoritative checks show 24 passed, none failed or pending, and 19 neutral/skipped. This review is a static trace of the supplied code; no commands were run.

Merge blockers

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

F5: 🔴 Read failures can erase existing settings

  • Category: correctness

  • Required behavior: Saving a pasted Claude credential must preserve existing settings and refuse an unreadable existing document rather than overwrite it.

  • Evidence: packages/api/services/agentCredentialStore.ts, reader and rewrite; packages/core/src/agents/credentials/credentialStoreWriter.ts, readCredentialStoreFile

    1. An agent has an existing settings.json larger than MAX_RETURNED_CREDENTIAL_BYTES.
    2. The operator pastes a Claude key. Under the store lock, readCredentialStoreFile detects the oversized file and throws.
    3. reader catches that error and returns undefined.
    4. applyPastedCredential interprets this as a missing file and produces settings containing only the new credential. The writer replaces the existing file, deleting its other settings.

    The same error suppression affects removal and other read failures. Locking prevents concurrent publication but does not distinguish a failed read from an absent file. static trace: the supplied functions establish this sequence; no test was executed.

  • Minimum fix: Use a strict reader for mutations that propagates read failures. Keep tolerant reads limited to status reporting. Verify that oversized existing settings remain unchanged after both set and remove requests.

F6: 🔴 Interactive login retains overriding pasted credentials

  • Category: correctness

  • Required behavior: A successful interactive login must make the newly authenticated account usable by subsequent runs, without a previously pasted credential overriding it.

  • Evidence: packages/api/services/agentLoginRemote.ts, collectRemoteLoginFiles; packages/api/services/agentCredentialStore.ts, storeReturnedLoginFiles; packages/core/src/agents/credentials/pastedCredentials.ts, applyPastedCredential

    1. An operator saves an Anthropic API key for a Claude agent. This writes settings.json.env.ANTHROPIC_API_KEY.
    2. The operator subsequently logs that agent into a subscription account through the remote interactive login.
    3. Collection copies Claude’s manifest login file, .credentials.json, into the canonical store. It leaves settings.json unchanged and reports success.
    4. Subsequent runs receive both files, including the old API-key environment setting, so the pasted authentication continues overriding the newly stored login. Runs can continue using and billing the previous account.

    The pasted-credential implementation explicitly removes competing environment credentials when switching between pasted methods, but successful interactive collection performs no equivalent transition. Store locks serialize the writes without removing this conflict. static trace: traced the supplied collection path, Claude manifest, and runtime credential materialization; no live login was executed.

  • Minimum fix: When successfully publishing a Claude interactive login, remove the two pasted authentication variables from its canonical settings under the same store lock, preserving unrelated settings. Cover a pasted-key-to-interactive-login transition.

Suggestions

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

S2: 🟢 Record live acceptance evidence

The supplied context explicitly says the Fly-launched acceptance runs remain unperformed. Attach results for pasted-key runs on both runtimes, interactive Claude login on Sprites followed by a run, and the healthy card. This is validation follow-up rather than an additional demonstrated code defect; mocked transport tests cannot establish live provider interoperability.

S3: 🟢 Refresh health after credential removal

AgentPastedCredentials.remove updates credential status without notifying useAgentHealth, whose cached result can continue displaying Ready. Triggering a fresh check after removal would make the card more useful. This is an optional UI consistency improvement.

Score

The implementation has useful coverage and passing current checks, but settings loss and an incomplete authentication transition prevent merge readiness. Live acceptance evidence also remains outstanding.

Score: 5/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 1m 17s
  • Tokens: 107,279 (105,529 in / 1,750 out)
  • Cost: $1.01

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 F5 F6 S2 S3

🤖 Review by ProPR

@propr-dev

propr-dev Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit 8aab319

Addressed 1 AI review comment (IDs: 7234897518)

Addressed findings F5, F6

Summary of Changes

I fixed F5 and F6. All 19 tests in packages/api/test/agentRemoteCredentials.test.ts pass, including 3 new ones, and so do the 17 in test/remoteAgentLogin.test.ts. Core and API typecheck clean and lint shows zero warnings. All 3 new tests fail when run against the previous agentCredentialStore.ts.

F5: a failed read no longer wipes existing settings

  • Saving or removing a pasted credential now uses a strict reader (strictRead in packages/api/services/agentCredentialStore.ts), still under the store lock. A missing file still counts as empty. Any other read failure, such as an oversized settings.json, now stops the request with a 400: "The existing settings.json could not be read, so it was left unchanged". Before, the failure was treated as an empty file and the settings were overwritten.
  • The tolerant reader is now used only for status reporting (readAgentCredentialStatus and remoteCredentialProblem).
  • New test: with an oversized settings.json, both a save and a remove are refused, the file is byte-for-byte unchanged, and the status still reads.

F6: interactive login now replaces a pasted key or token

  • A new core helper, withoutPastedClaudeAuthentication in pastedCredentials.ts (exported from @propr/core), takes ANTHROPIC_API_KEY and CLAUDE_CODE_OAUTH_TOKEN out of settings.json and keeps everything else.
  • When storeReturnedLoginFiles saves a Claude login, it rewrites settings.json in the same locked write as .credentials.json. The new login and the removal of the old key land together, and the existing cancellation check before publishing still covers both.
  • If settings.json can't be read, nothing is saved and the login reports "Could not save the login". Otherwise the old key could still override the new login.
  • New tests:
    • Switching from a pasted key to an interactive login removes the key and keeps the other settings (model, other env vars). The status then shows no pasted credential, only the stored login.
    • When settings.json can't be read, the login stores no .credentials.json and leaves settings.json unchanged.

Codex and OpenCode don't have this problem, because their login file (auth.json) is the same file the pasted credential lives in, so a login replaces it.

Not fixed: the same F6 conflict exists for Docker logins. On a Docker instance, the CLI writes .credentials.json straight into the bound config directory, and the session is marked successful when the container exits. Nothing removes a previously pasted key from settings.json, so it can still override the new login. That code path wasn't part of the requested fix. Fixing it would mean adding a locked settings cleanup to the Docker success handler in agentLoginSessionManager.ts.

I made no previews because nothing in the UI changes.

Review digest

Risk-tiered paths

  • High risk (2 files)
    • packages/api/services/agentCredentialStore.ts (+38/−3): auth-looking path
    • packages/core/src/agents/credentials/pastedCredentials.ts (+18/−0): auth-looking path
  • Normal risk (1 file)
    • packages/core/src/index.ts (+1/−0)
  • Low risk (1 file)
    • packages/api/test/agentRemoteCredentials.test.ts (+43/−1)

Diff size: 4 files changed, +100/−4 lines


🤖 Implementation Details

  • Model: Claude Opus 5.5 (medium)
  • Requested By: @propr-ultrafix
  • Time: 6m 8s
  • Tokens: 1,498,627 (1,488,824 in / 9,803 out)
  • Cost: $0.84

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 F5 and F6. All 19 tests in `packages/api/test/agentRemoteCredentials.test.ts` pass, including 3 new ones, and so do the 17 in `test/remoteAgentLogin.test.ts`. Core and API typecheck clean and lint shows zero warnings. All 3 new tests fail when run against the previous `agentCredentialStore.ts`.

**F5: a failed read no longer wipes existing settings**
- Saving or removing a pasted credential now uses a strict reader (`strictRead` in `packages/api/services/agentCredentialStore.ts`), still under the store lock. A missing file still counts as empty. Any other read failure, such as an oversized `settings.json`, now stops the request with a 400: "The existing settings.json could not be read, so it was left unchanged". Before, the failure was treated as an empty file and the settings were overwritten.
- The tolerant reader is now used only for status reporting (`readAgentCredentialStatus` and `remoteCredentialProblem`).
- New test: with an oversized `settings.json`, both a save and a remove are refused, the file is byte-for-byte unchanged, and the status still reads.

**F6: interactive login now replaces a pasted key or token**
- A new core helper, `withoutPastedClaudeAuthentication` in `pastedCredentials.ts` (exported from `@propr/core`), takes `ANTHROPIC_API_KEY` and `CLAUDE_CODE_OAUTH_TOKEN` out of `settings.json` and keeps everything else.
- When `storeReturnedLoginFiles` saves a Claude login, it rewrites `settings.json` in the same locked write as `.credentials.json`. The new login and the removal of the old key land together, and the existing cancellation check before publishing still covers both.
- If `settings.json` can't be read, nothing is saved and the login reports "Could not save the login". Otherwise the old key could still override the new login.
- New tests:
  - Switching from a pasted key to an interactive login removes the key and keeps the other settings (`model`, other env vars). The status then shows no pasted credential, only the stored login.
  - When `settings.json` can't be read, the login stores no `.credentials.json` and leaves `settings.json` unchanged.

Codex and OpenCode don't have this problem, because their login file (`auth.json`) is the same file the pasted credential lives in, so a login replaces it.

**Not fixed: the same F6 conflict exists for Docker logins.** On a Docker instance, the CLI writes `.credentials.json` straight into the bound config directory, and the session is marked successful when the container exits. Nothing removes a previously pasted key from `settings.json`, so it can still override the new login. That code path wasn't part of the requested fix. Fixing it would mean adding a locked settings cleanup to the Docker success handler in `agentLoginSessionManager.ts`.

I made no previews because nothing in the UI changes.

PR: #3865
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 28, 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 28, 2026 •

Copy link
Copy Markdown
Contributor Author

CI failed: Full Test Suite Shard 4/4, Run Full Test Suite

Please investigate and fix these CI failures.

  • Check: Full Test Suite Shard 4/4
  • Result: failure
  • Commit: 8aab319a25e0 (8aab319a25e044035bcb1e2d3d45bcf84556dd15)
  • Run: View CI failure

Failure evidence

.github:11
Process completed with exit code 1.

.github:45965
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/


Depends on the failed job(s): Full Test Suite Shard 4/4. It may have failed only because they did; check them first.

Failure evidence

.github:68
Process completed with exit code 1.

.github:66
Full test suite shards finished with result 'failure'.

.github:4
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, actions/download-artifact@018cc2c. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/

@integry

integry commented Nov 29, 2026

Copy link
Copy Markdown
Owner

Live retest at 4973a0c: the sign-in link is fixed

Fly instance propr-dev-3868, Sprites runtime, no Docker. Image built from #3868 7d08e67 + this PR 4973a0c + #3886 de4c142.

Check Result
Badge on agents that were never signed in ✅ Not signed in (was "Authentication expired")
Coding agents → claude → Log in ✅ Routed to Sprites, login Sprite provisioned, CLI started
Sign-in link ✅ Full https://claude.com/cai/oauth/authorize?… link, 518 characters, with code, client_id, response_type, redirect_uri, scope, code_challenge, code_challenge_method and state (before: a 45-character ?z-… stub)
Opening the link ✅ claude.ai accepts it and goes to its sign-in page with the return address kept
Cancel login ✅

I didn't complete the Anthropic account sign-in, since that's the account owner's step. The pasted-credential path on Sprites is being re-run on this head in fly-e2e run 46289070352.

@propr-dev propr-dev Bot changed the title ⚠️❼ [3863 by Claude Opus 5.5] Agent credentials on Docker-less instances: paste credentials + interactive login on the remote runtime 🔨 [3863 by Claude Opus 5.5] Agent credentials on Docker-less instances: paste credentials + interactive login on the remote runtime Nov 29, 2026
@propr-dev

propr-dev Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor Author

ℹ️ Analyzed the follow-up request by @integry

Analysis Summary

I didn't change any code. Your retest confirms the fix in 4973a0c, and the comment doesn't ask for anything else on this branch.

Your results cover the blocker from the a75621c test:

  • Sign-in link: the stored session output now has the full 518-character https://claude.com/cai/oauth/authorize?… URL, with client_id, redirect_uri, code_challenge, state and the other parameters. Before, it was cut to a 45-character fragment.
  • Opening the link: claude.ai accepts it and keeps the return address.
  • Badge: agents that were never signed in now show Not signed in, not "Authentication expired".
  • Routing: Log in goes to Sprites, the login Sprite is provisioned, and cancelling the login works.

Two things are still open, and both are outside the code:

  • Live acceptance: someone with the Anthropic account has to finish the Claude sign-in on Sprites and then start a run to complete check (b) in the PR description.
  • Pasted credentials on Sprites: fly-e2e run 46289070352 hasn't been checked here. If it fails, post the failing step and I'll pick it up.

I made no visible change, so there are no new previews.

No code changes were necessary based on the current state of the branch.


🤖 Analysis Details

  • Model: Claude Opus 5.5 (medium)
  • Time: 3m 53s
  • Tokens: 42,733 (42,275 in / 458 out)
  • Cost: $0.16

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: 7259635418✓

integry commented Nov 29, 2026

Copy link
Copy Markdown
Owner

/ultrafix goal=8 max=10

@propr-dev propr-dev Bot changed the title 🔨 [3863 by Claude Opus 5.5] Agent credentials on Docker-less instances: paste credentials + interactive login on the remote runtime ⚠️❼ [3863 by Claude Opus 5.5] Agent credentials on Docker-less instances: paste credentials + interactive login on the remote runtime Nov 29, 2026
@propr-dev propr-dev Bot added the ultrafix label Nov 29, 2026
@propr-dev

propr-dev Bot commented Nov 29, 2026

Copy link
Copy Markdown
Contributor Author

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

First action: /review

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

@propr-dev propr-dev Bot changed the title ⚠️❼ [3863 by Claude Opus 5.5] Agent credentials on Docker-less instances: paste credentials + interactive login on the remote runtime 🔨 [3863 by Claude Opus 5.5] Agent credentials on Docker-less instances: paste credentials + interactive login on the remote runtime Nov 29, 2026
@propr-dev

propr-dev Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @integry

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Nov 29, 2026

Copy link
Copy Markdown
Contributor Author

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

Overall Evaluation

The PR implements pasted credentials, remote interactive login, and runtime-specific health checks with substantial coverage. It needs a localized correction before merge. The required live Fly acceptance runs also remain unverified in the supplied evidence.

✅ Credential publication — Pasted writes use the shared store lock, atomic replacement, mode 0600, and operator-mutation tracking to protect replacements and removals from older runs.

✅ Remote lifecycle coverage — Tests cover successful collection, cancellation during lock acquisition, capacity refusal, and remote resource destruction.

✅ Current checks pass — The authoritative head status reports 24 passed checks and no failures; historical lint and timeout failures are not current blockers.

Merge blockers

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

F20: 🔴 Preserve URLs across wrapped hyperlink labels

  • Category: correctness

  • Required behavior: Interactive login must expose a complete usable authorization URL when terminal rendering wraps the hyperlink label.

  • Evidence: packages/api/services/agentLoginTerminal.ts:closeHyperlink

    1. A login CLI emits an OSC 8 hyperlink whose target is a complete authorization URL, but whose visible label contains a newline within that URL.
    2. writeVisible emits the label, including that newline. closeHyperlink removes whitespace from the label for comparison, finds it equal to the target, and emits no fallback URL.
    3. The browser receives only the split URL. AgentLoginModal converts whitespace-delimited URL text into links, so the clickable authorization URL ends at the inserted newline and lacks the remaining parameters.

    The sanitizer explicitly intends to support wrapped labels, but its equality check suppresses the complete target precisely in this case. The added redraw test includes an overwritten label, which makes the comparison unequal and therefore does not exercise ordinary wrapping. static trace: sanitizer emission and the supplied terminal-output consumer. proposed regression: feed an OSC 8 target with an otherwise identical newline-wrapped label and assert that the output contains the complete target contiguously.

  • Minimum fix: Suppress the fallback only when the emitted label already contains the complete contiguous URL. Add coverage for a wrapped but otherwise unchanged label, including chunk boundaries.

Suggestions

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

S18: 🟢 Document credential API schemas

The new OpenAPI operations are registered correctly but remain x-undocumented, without request or response schemas. Documenting the credential-kind enum, write-only input, status response, and validation errors would help API consumers. This is optional because the objective requires working endpoints, not a fully documented public API contract.

Score

The implementation has strong credential-write safeguards and passing current checks, but authorization-link handling still has a correctness defect. Live acceptance evidence is also outstanding.

Score: 6/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 1m 12s
  • Tokens: 179,751 (178,317 in / 1,434 out)
  • Cost: $1.72

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 F20 S18

🤖 Review by ProPR

@propr-dev

propr-dev Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit bb2f88a

Addressed 1 AI review comment (IDs: 7259737235)

Addressed finding F20

Summary of Changes

I fixed F20: when a login CLI wraps a hyperlink's label across rows, the browser now gets the complete sign-in URL as one unbroken piece of text.

The fix (packages/api/services/agentLoginTerminal.ts): the old check stripped all whitespace from the label and compared it to the link's target. A label wrapped across rows passed that check, so the full URL was never written out and the dialog only made the first row clickable. A new helper, labelShowsTarget, now skips writing the URL out only when the label contains it unbroken and followed by whitespace or the end of the label. That boundary check matches how AgentLoginModal finds URLs, so a label like https://…/a. also gets the clean URL written after it.

Tests (packages/api/test/agentLoginTerminal.test.ts), two new cases:

  • Wrapped label: uses the recorded Claude authorize URL with its label split into 120-column rows and nothing else changed. Fed in chunks of 1, 2, 7, 119, 120, 121 and 4096 characters, the output shows the wrapped label and then the full URL in one piece, with every OAuth parameter checked.
  • URL plus trailing text: a label where the URL runs into trailing punctuation gets the URL written out again. A label that shows the URL followed by a space does not.

All 8 sanitizer tests pass. Both new tests fail when run against the previous version of the file. ESLint reports zero warnings on both files, and tsc reports no errors in them.

The existing check that an unwrapped label isn't repeated still passes. No other code changed in this PR does the same comparison: the sanitizer has a single caller, and the only other OSC 8 matches are the test transcripts. I didn't make a visual preview because the change only affects the text sent to the login dialog.

Review digest

Risk-tiered paths

  • High risk (1 file)
    • packages/api/services/agentLoginTerminal.ts (+17/−4): auth-looking path
  • Normal risk: none
  • Low risk (1 file)
    • packages/api/test/agentLoginTerminal.test.ts (+25/−0)

Diff size: 2 files changed, +42/−4 lines


🤖 Implementation Details

  • Model: Claude Opus 5.5 (medium)
  • Requested By: @propr-ultrafix
  • Time: 4m 44s
  • Tokens: 577,886 (573,399 in / 4,487 out)
  • Cost: $0.44

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 F20: when a login CLI wraps a hyperlink's label across rows, the browser now gets the complete sign-in URL as one unbroken piece of text.

**The fix** (`packages/api/services/agentLoginTerminal.ts`): the old check stripped all whitespace from the label and compared it to the link's target. A label wrapped across rows passed that check, so the full URL was never written out and the dialog only made the first row clickable. A new helper, `labelShowsTarget`, now skips writing the URL out only when the label contains it unbroken and followed by whitespace or the end of the label. That boundary check matches how `AgentLoginModal` finds URLs, so a label like `https://…/a.` also gets the clean URL written after it.

**Tests** (`packages/api/test/agentLoginTerminal.test.ts`), two new cases:
- **Wrapped label:** uses the recorded Claude authorize URL with its label split into 120-column rows and nothing else changed. Fed in chunks of 1, 2, 7, 119, 120, 121 and 4096 characters, the output shows the wrapped label and then the full URL in one piece, with every OAuth parameter checked.
- **URL plus trailing text:** a label where the URL runs into trailing punctuation gets the URL written out again. A label that shows the URL followed by a space does not.

All 8 sanitizer tests pass. Both new tests fail when run against the previous version of the file. ESLint reports zero warnings on both files, and `tsc` reports no errors in them.

The existing check that an unwrapped label isn't repeated still passes. No other code changed in this PR does the same comparison: the sanitizer has a single caller, and the only other OSC 8 matches are the test transcripts. I didn't make a visual preview because the change only affects the text sent to the login dialog.

PR: #3865
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 29, 2026 •

Copy link
Copy Markdown
Contributor Author

🔀 Resolved merge conflicts from 3758-epic-runtime-abstraction-sc0 into 3863/claude-opus-5-5-agent-credentials-on-dock-20261127-2255-6h9 in commit 93c90ec

Conflicting Files

  • docs/static/openapi/propr-api.yaml

Resolution Summary

Resolved the route coverage conflict in propr-api.yaml for PR #3865. The PR counted 338 operations after adding three agent credential operations, while the target branch counted 341 after adding six sign-in and reauthentication operations. The merged spec retains both sets and uses the totals calculated from the merged route registry: 344 operations, 95 documented and 249 marked x-undocumented.

I refreshed the local docs build copy, which contained the same conflict. The workspace scan found no remaining merge conflict markers. OpenAPI 3.1 validation and all 25 focused tests passed.

Git still reports the spec as unmerged because git add could not create the index lock on the read-only filesystem. The workspace file contains the verified resolution.


🤖 Resolution Details

  • Model: GPT-6.2 Sol
  • Time: 4m 5s

View Task Execution


System-triggered merge conflict resolution

Automatically resolved merge conflicts after merging target branch into PR branch.
Resolved conflicts in:
- docs/static/openapi/propr-api.yaml

PR: #3865
Model: GPT-6.2 Sol
@propr-dev

propr-dev Bot commented Nov 29, 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 29, 2026 •

Copy link
Copy Markdown
Contributor Author

🔀 Auto-merged 3758-epic-runtime-abstraction-sc0 into 3863/claude-opus-5-5-agent-credentials-on-dock-20261127-2255-6h9 (clean merge) in commit 13f97a3

No conflicts were found — the merge was verified by an AI agent.


🤖 Verification Details

  • Model: GPT-6.2 Sol
  • Time: 3m 8s

View Task Execution


System-triggered merge conflict resolution

…bstraction-sc0' into 3863/claude-opus-5-5-agent-credentials-on-dock-20261127-2255-6h9
@propr-dev

propr-dev Bot commented Nov 29, 2026

Copy link
Copy Markdown
Contributor Author

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

Overall Evaluation

The PR implements pasted credentials, remote interactive login, and runtime-aware health checks with substantial regression coverage. The supporting storage and lifecycle changes fit the objective.

✅ Protected credential writes — Pasted credentials are merged under the store lock, published with mode 0600, and returned only as status and optional last-four-character metadata.

✅ Refresh conflict protection — Operator mutation records prevent older runs from restoring removed credentials or overwriting replacements; tests cover overlapping publication and stale-lock takeover.

✅ Runtime-specific checks — Remote health checks bypass Docker image preparation and distinguish runtime failures from missing credentials.

No merge-blocking code defect was established from the supplied diff. However, merge readiness remains unverified because the explicitly requested live acceptance runs have no supplied evidence. Current-head checks are clean: 24 passed and 17 skipped. This review was static; no commands were run.

Merge blockers

No merge blockers.

Suggestions

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

S19: 🟢 Surface credential status failures

In propr-ui/src/pages/SettingsPage/AgentPastedCredentials.tsx, a failed getAgentCredentials request silently clears the status. Consider showing a retrieval error and retry action so users can distinguish unavailable status from an agent with no stored credentials. This improves feedback without changing credential storage correctness.

S20: 🟢 Document credential endpoint contracts

The new entries in docs/static/openapi/propr-api.yaml register the credential endpoints but leave their request and response bodies undocumented. Adding schemas for credential kinds, write-only values, status responses, and validation errors would help API consumers. The UI already uses explicit types, so this is an optional documentation improvement.

Score

The implementation has substantial targeted coverage and passing current-head checks, with no verified code blocker. The missing live evidence for pasted-key runs on both runtimes, interactive Claude login followed by a Sprite run, and a healthy agent card prevents calling it merge-ready.

Score: 7/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 1m 30s
  • Tokens: 180,400 (178,497 in / 1,903 out)
  • Cost: $1.77

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 S19 S20

🤖 Review by ProPR

@propr-dev

propr-dev Bot commented Nov 29, 2026

Copy link
Copy Markdown
Contributor Author

⚠️ Ultrafix stopped before reaching its goal. Requested goal: 8/10. Last score: 7/10. Stopped in cycle 2 of 10. The review has no actionable blockers, so no fix was scheduled. Manual review and merge are now required.

@propr-dev propr-dev Bot removed the ultrafix label Nov 29, 2026
@propr-dev propr-dev Bot changed the title 🔨 [3863 by Claude Opus 5.5] Agent credentials on Docker-less instances: paste credentials + interactive login on the remote runtime ⚠️❼ [3863 by Claude Opus 5.5] Agent credentials on Docker-less instances: paste credentials + interactive login on the remote runtime Nov 29, 2026
@integry
integry merged commit 02efc9d into 3758-epic-runtime-abstraction-sc0 Nov 29, 2026
44 checks passed
@propr-dev propr-dev Bot changed the title ⚠️❼ [3863 by Claude Opus 5.5] Agent credentials on Docker-less instances: paste credentials + interactive login on the remote runtime [3863 by Claude Opus 5.5] Agent credentials on Docker-less instances: paste credentials + interactive login on the remote runtime Nov 29, 2026
@integry

integry commented Nov 29, 2026

Copy link
Copy Markdown
Owner

Live retest at 13f97a3 (with the F20 fix) on the same Sprites instance: the login shows the full 518-character claude.com/cai/oauth/authorize link with all 8 parameters, and the visible text holds it as one unbroken URL. Merged at 7/10 per the maintainer's approval.

propr-dev Bot pushed a commit that referenced this pull request Nov 29, 2026
When Redis recovery blocks every Sprite slot, Claude login now reports why creates are paused, how many seconds remain, and when to retry in UTC. Waiting tasks log the same reason.

All 88 targeted tests passed, including the two-slot recovery regression. The core build and changed-file lint passed. I verified the login locally with #3865 and captured the dialog in Chromium. The local combination required resolving overlapping edits to `SpritePool.acquire`.

PR: #3886
Comment by: @integry (ID: 7261591109)
Model: GPT-6.2 Sol

ProPR-Agent: codex/gpt-6.2-sol
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