Skip to content

fix(agent-server): omit acp/ credential dir from download-trajectory zip - #5551

Merged
simonrosenberg merged 2 commits into
mainfrom
fix-trajectory-acp-creds
Oct 6, 2026
Merged

simonrosenberg merged 2 commits into
mainfrom
fix-trajectory-acp-creds

Conversation

@simonrosenberg

@simonrosenberg simonrosenberg commented Oct 6, 2026 •

Copy link
Copy Markdown
Member

HUMAN:

Reviewed the diff and ran the new test with and without the change. Excluding acp/ wholesale rather than extending the key-name redactor, since each new ACP provider would otherwise need its own entries.


AGENT:

Why

download-trajectory zips the whole conversation directory, including acp/<provider>/, which holds runtime credential files for ACP agents. The existing redaction only masks a fixed set of LLM/AWS field names and Fernet-prefixed values in .json/.jsonl, so those files are shipped with their tokens and keys intact.

Summary

  • Skip the top-level acp/ directory when building the trajectory zip.
  • Add a regression test asserting the directory and its contents are absent while sibling files (including a similarly named acp_notes.json) are kept.

Issue Number

Fixes #5552

How to Test

uv run pytest tests/agent_server/test_file_router.py -q (86 passed). The new test_download_trajectory_omits_acp_credential_dir fails with the file_router.py change reverted and passes with it. Not exercised against a live ACP conversation.

Type

  • Bug fix

Notes

Excluding by directory keeps the fix independent of per-provider credential file names and key names.


🐳 Agent Server images for this PR — GHCR package, pull/run commands, and all pushed tags (click to expand)

• GHCR package: https://github.com/OpenHands/agent-sdk/pkgs/container/agent-server

Variants & Base Images

Variant Architectures Base Image Docs / Tags
java amd64, arm64 eclipse-temurin:17-jdk Link
python-slim amd64, arm64 python-node-runtime Link
python-minimal amd64, arm64 python-node-runtime Link
python amd64, arm64 python-node-runtime Link
golang amd64, arm64 golang:1.21-bookworm Link

Pull (multi-arch manifest)

# Each variant is a multi-arch manifest supporting both amd64 and arm64
docker pull ghcr.io/openhands/agent-server:c867c31-python

Run

docker run -it --rm \
  -p 8000:8000 \
  --name agent-server-c867c31-python \
  ghcr.io/openhands/agent-server:c867c31-python

All tags pushed for this build

ghcr.io/openhands/agent-server:c867c31-golang-amd64
ghcr.io/openhands/agent-server:c867c3126b9f15ca7639dd2544cb657b1f6261f9-golang-amd64
ghcr.io/openhands/agent-server:fix-trajectory-acp-creds-golang-amd64
ghcr.io/openhands/agent-server:c867c31-golang_tag_1.21-bookworm-amd64
ghcr.io/openhands/agent-server:c867c31-golang-arm64
ghcr.io/openhands/agent-server:c867c3126b9f15ca7639dd2544cb657b1f6261f9-golang-arm64
ghcr.io/openhands/agent-server:fix-trajectory-acp-creds-golang-arm64
ghcr.io/openhands/agent-server:c867c31-golang_tag_1.21-bookworm-arm64
ghcr.io/openhands/agent-server:c867c31-java-amd64
ghcr.io/openhands/agent-server:c867c3126b9f15ca7639dd2544cb657b1f6261f9-java-amd64
ghcr.io/openhands/agent-server:fix-trajectory-acp-creds-java-amd64
ghcr.io/openhands/agent-server:c867c31-eclipse-temurin_tag_17-jdk-amd64
ghcr.io/openhands/agent-server:c867c31-java-arm64
ghcr.io/openhands/agent-server:c867c3126b9f15ca7639dd2544cb657b1f6261f9-java-arm64
ghcr.io/openhands/agent-server:fix-trajectory-acp-creds-java-arm64
ghcr.io/openhands/agent-server:c867c31-eclipse-temurin_tag_17-jdk-arm64
ghcr.io/openhands/agent-server:c867c31-python-amd64
ghcr.io/openhands/agent-server:c867c3126b9f15ca7639dd2544cb657b1f6261f9-python-amd64
ghcr.io/openhands/agent-server:fix-trajectory-acp-creds-python-amd64
ghcr.io/openhands/agent-server:c867c31-python-node-runtime-amd64
ghcr.io/openhands/agent-server:c867c31-python-arm64
ghcr.io/openhands/agent-server:c867c3126b9f15ca7639dd2544cb657b1f6261f9-python-arm64
ghcr.io/openhands/agent-server:fix-trajectory-acp-creds-python-arm64
ghcr.io/openhands/agent-server:c867c31-python-node-runtime-arm64
ghcr.io/openhands/agent-server:c867c31-python-minimal-amd64
ghcr.io/openhands/agent-server:c867c3126b9f15ca7639dd2544cb657b1f6261f9-python-minimal-amd64
ghcr.io/openhands/agent-server:fix-trajectory-acp-creds-python-minimal-amd64
ghcr.io/openhands/agent-server:c867c31-python-node-runtime-minimal-amd64
ghcr.io/openhands/agent-server:c867c31-python-minimal-arm64
ghcr.io/openhands/agent-server:c867c3126b9f15ca7639dd2544cb657b1f6261f9-python-minimal-arm64
ghcr.io/openhands/agent-server:fix-trajectory-acp-creds-python-minimal-arm64
ghcr.io/openhands/agent-server:c867c31-python-node-runtime-minimal-arm64
ghcr.io/openhands/agent-server:c867c31-python-slim-amd64
ghcr.io/openhands/agent-server:c867c3126b9f15ca7639dd2544cb657b1f6261f9-python-slim-amd64
ghcr.io/openhands/agent-server:fix-trajectory-acp-creds-python-slim-amd64
ghcr.io/openhands/agent-server:c867c31-python-node-runtime-slim-amd64
ghcr.io/openhands/agent-server:c867c31-python-slim-arm64
ghcr.io/openhands/agent-server:c867c3126b9f15ca7639dd2544cb657b1f6261f9-python-slim-arm64
ghcr.io/openhands/agent-server:fix-trajectory-acp-creds-python-slim-arm64
ghcr.io/openhands/agent-server:c867c31-python-node-runtime-slim-arm64
ghcr.io/openhands/agent-server:c867c31-golang
ghcr.io/openhands/agent-server:c867c3126b9f15ca7639dd2544cb657b1f6261f9-golang
ghcr.io/openhands/agent-server:fix-trajectory-acp-creds-golang
ghcr.io/openhands/agent-server:c867c31-golang_tag_1.21-bookworm
ghcr.io/openhands/agent-server:c867c31-java
ghcr.io/openhands/agent-server:c867c3126b9f15ca7639dd2544cb657b1f6261f9-java
ghcr.io/openhands/agent-server:fix-trajectory-acp-creds-java
ghcr.io/openhands/agent-server:c867c31-eclipse-temurin_tag_17-jdk
ghcr.io/openhands/agent-server:c867c31-python-minimal
ghcr.io/openhands/agent-server:c867c3126b9f15ca7639dd2544cb657b1f6261f9-python-minimal
ghcr.io/openhands/agent-server:fix-trajectory-acp-creds-python-minimal
ghcr.io/openhands/agent-server:c867c31-python-node-runtime-minimal
ghcr.io/openhands/agent-server:c867c31-python-slim
ghcr.io/openhands/agent-server:c867c3126b9f15ca7639dd2544cb657b1f6261f9-python-slim
ghcr.io/openhands/agent-server:fix-trajectory-acp-creds-python-slim
ghcr.io/openhands/agent-server:c867c31-python-node-runtime-slim
ghcr.io/openhands/agent-server:c867c31-python
ghcr.io/openhands/agent-server:c867c3126b9f15ca7639dd2544cb657b1f6261f9-python
ghcr.io/openhands/agent-server:fix-trajectory-acp-creds-python
ghcr.io/openhands/agent-server:c867c31-python-node-runtime

About Multi-Architecture Support

  • Each variant tag (e.g., c867c31-python) is a multi-arch manifest supporting both amd64 and arm64
  • Docker automatically pulls the correct architecture for your platform
  • Individual architecture tags (e.g., c867c31-python-amd64) are also available if needed

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor
  ✅ **PR Artifacts Cleaned Up**

  The `.pr/` directory is no longer present.

@github-actions

github-actions Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

REST API breakage checks (OpenAPI) — ✅ PASSED

Result: ✅ PASSED

Action log

@simonrosenberg
simonrosenberg requested a review from enyst October 6, 2026 12:27
@simonrosenberg simonrosenberg self-assigned this Oct 6, 2026

@enyst enyst left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh yes, totally fair solution, thank you!

@github-actions

github-actions Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Coverage

Coverage Report •
FileStmtsMissCoverMissing
openhands-agent-server/openhands/agent_server
   file_router.py4417583%108–110, 146–148, 180–182, 287, 290–291, 298–299, 337, 339–341, 390, 434–437, 443–445, 451–453, 465–466, 503, 571–573, 578, 582–584, 626–627, 636, 643, 664–666, 723–725, 752–753, 757–758, 766, 768–773, 776–778, 862–863, 867–868, 904, 1052–1054, 1058–1061
TOTAL479071912060% 

@simonrosenberg
simonrosenberg enabled auto-merge (squash) October 6, 2026 12:36
@simonrosenberg
simonrosenberg merged commit 250dd48 into main Oct 6, 2026
46 of 48 checks passed
@simonrosenberg
simonrosenberg deleted the fix-trajectory-acp-creds branch October 6, 2026 12:39
enyst added a commit that referenced this pull request Oct 6, 2026
…-zip-race

Keeps #5551's acp/ exclusion and this branch's temp-file and vanished-entry
handling in _create_zip_from_directory.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HmGfBq3KDFiJTDraPJFGTT
@github-actions github-actions Bot mentioned this pull request Oct 8, 2026
3 of 7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

download-trajectory archive includes ACP runtime credential files

2 participants