Skip to content

Randomize RuntimeDir to prevent concurrent run collisions#138

Merged
peterj merged 1 commit intoagentregistry-dev:mainfrom
joelklabo:fix/random-runtime-dir
Mar 5, 2026
Merged

Randomize RuntimeDir to prevent concurrent run collisions#138
peterj merged 1 commit intoagentregistry-dev:mainfrom
joelklabo:fix/random-runtime-dir

Conversation

@joelklabo
Copy link
Copy Markdown
Contributor

@joelklabo joelklabo commented Feb 8, 2026

Description

Fixes #126. Appends a random hex suffix to the default RuntimeDir (/tmp/arctl-runtime) so that concurrent arctl sessions each get their own docker compose and config directory.

  • When AGENT_REGISTRY_RUNTIME_DIR is not set: default becomes /tmp/arctl-runtime-<16 hex chars> (unique per invocation)
  • When AGENT_REGISTRY_RUNTIME_DIR is set: the user's explicit value is used as-is (no suffix)
  • Added 3 tests in config_test.go: suffix format, uniqueness between calls, and env var override

Change Type

/kind cleanup

NONE

Test plan

  • go test ./internal/registry/config/ -v — 3 new tests pass
  • go build ./... — full project builds cleanly
  • go vet ./internal/registry/config/ — clean

Fixes agentregistry-dev#126. When AGENT_REGISTRY_RUNTIME_DIR is not explicitly set, the
default /tmp/arctl-runtime path now gets a random hex suffix appended
(e.g. /tmp/arctl-runtime-a1b2c3d4e5f6g7h8). This prevents concurrent
arctl sessions from sharing the same docker compose and config directory.

When the env var is set explicitly, the user's value is used as-is.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@joelklabo joelklabo marked this pull request as ready for review February 9, 2026 17:21
@github-actions
Copy link
Copy Markdown

This pull request has been marked as stale due to no activity in the last 14 days. It will be closed in 3 days unless it is tagged "no stalebot" or other activity occurs.

@github-actions github-actions bot added the stale label Feb 24, 2026
@peterj
Copy link
Copy Markdown
Contributor

peterj commented Mar 5, 2026

closes #126

@peterj peterj added this pull request to the merge queue Mar 5, 2026
Merged via the queue into agentregistry-dev:main with commit 86b025b Mar 5, 2026
13 of 14 checks passed
christian-posta pushed a commit to christian-posta/agentregistry that referenced this pull request Mar 9, 2026
…try-dev#138)

# Description

Fixes agentregistry-dev#126. Appends a random hex suffix to the default `RuntimeDir`
(`/tmp/arctl-runtime`) so that concurrent `arctl` sessions each get
their own docker compose and config directory.

- When `AGENT_REGISTRY_RUNTIME_DIR` is **not set**: default becomes
`/tmp/arctl-runtime-<16 hex chars>` (unique per invocation)
- When `AGENT_REGISTRY_RUNTIME_DIR` **is set**: the user's explicit
value is used as-is (no suffix)
- Added 3 tests in `config_test.go`: suffix format, uniqueness between
calls, and env var override

# Change Type

/kind cleanup

```release-note
NONE
```

## Test plan

- [x] `go test ./internal/registry/config/ -v` — 3 new tests pass
- [x] `go build ./...` — full project builds cleanly
- [x] `go vet ./internal/registry/config/` — clean

Co-authored-by: klabo <[email protected]>
Co-authored-by: Claude Opus 4.6 <[email protected]>
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.

ensure the folder where docker compose and agent config are stored is random on each run

3 participants