Skip to content

environment-railway v0.4.10: exec_session ephemeral node + log_storage proxy + singleton relay (REQ-052)#5

Merged
Shooksie merged 7 commits into
mainfrom
agent/v0.7.0/env-exec-session-release
Jul 17, 2026
Merged

environment-railway v0.4.10: exec_session ephemeral node + log_storage proxy + singleton relay (REQ-052)#5
Shooksie merged 7 commits into
mainfrom
agent/v0.7.0/env-exec-session-release

Conversation

@Shooksie

@Shooksie Shooksie commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Summary

REQ-052 lean-node (ephemeral remote-animus) support for the Railway environment plugin. Bumps the plugin to v0.4.10. 7 commits vs main.

0. environment/exec_session (REQ-052 remote-animus) — v0.4.5

  • Implements environment/exec_session: provision a Railway ephemeral node, run a session, stream back. Private-registry pull credentials for the run image (v0.4.6).

1. Role-routed parent servicing — log_storage proxies to log-storage-s3 (not postgres) — v0.4.9

  • Adds a SECOND parent-side PluginClient for the log-storage plugin (ANIMUS_ENV_UPSTREAM_LOG_BIN, default /app/.animus/plugins/animus-log-storage-s3).
  • A node's log_storage/* backend/call now routes to that log servicer; every other role (subject/config/queue/…) still hits animus-postgres. Uses the role-routed makeBackendCallHandler({ default, log_storage }) from animus-env-transport. Parent-side backend/call servicing added v0.4.7; advertises protocol_version v0.4.8.
  • Forwards the parent's S3 env to the log plugin: S3_BUCKET, S3_ACCESS_KEY_ID, S3_SECRET_ACCESS_KEY (required) + optional S3_ENDPOINT, S3_REGION, S3_PREFIX, S3_FORCE_PATH_STYLE. Never sent to the node.

2. gh works on the node — v0.4.9

Injects GH_TOKEN (= the GitHub token) alongside GITHUB_TOKEN, in both githubAppCredentials and harnessCredentialVars, so gh pr create authenticates.

3. Codex home default — v0.4.9

harnessCredentialVars defaults CODEX_OAUTH_HOME to /data/animus-state/codex-config when unset, so codex auth injects on nodes without extra portal config.

4. Shared singleton relay — v0.4.10 (NEW)

Connect to the shared singleton relay instead of binding the fixed port directly — pairs with the RelaySingleton in animus-env-transport PR #1, eliminating EADDRINUSE/port-leak on repeated exec_session.

New env vars

  • ANIMUS_ENV_UPSTREAM_LOG_BIN (+ the forwarded S3 vars documented in the manifest).

Depends on

animus-env-transport PR #1 (role-routed makeBackendCallHandler + RelaySingleton) — picked up via the local path-dep symlink. Land env-transport first.

Tests

npm run build + npm test green. logStorageEnv, GH_TOKEN, codex-default, and singleton-relay assertions added.

Release + plugins.lock/animus.toml repin + deploy handled separately (see REQ-052 consolidation plan). Do NOT merge before env-transport #1.

Shooksie added 7 commits July 15, 2026 21:41
Wire the remote-animus session method: env.runSession dispatches the subject
to the container's own animus via RelayServer.runSession and forwards its
journal events; the exec_session handler maps them onto ExecNotification
Journal frames and returns the terminal ExecSessionResponse.

(startCommand daemon-boot + encrypted secret bundle land with the image
rebuild / Phase C.) typecheck clean, 39 tests.

REQUIREMENT-052 / TASK-457.
Cherry-picks the exec_session role method (execSession handler → env.runSession
→ RelayServer.runSession, forwarding node journal events) onto the deployed
v0.4.4 line. Bundles the session-capable env-transport (runSession + journal
frames).
Add ANIMUS_ENV_REGISTRY_USERNAME/PASSWORD support so a private run image
(e.g. ghcr) can be pulled: thread registryCredentials through
createRunService -> serviceInstanceUpdate. Config reads both env vars;
applied only when both present.
Wire the RelayServer's onReverseRpc to a PluginClient spawning the parent-side
backend plugin (ANIMUS_ENV_UPSTREAM_BACKEND_BIN, e.g. animus-postgres) with the
parent's DATABASE_URL, so a lean node's proxied subject/config/queue/journal
role calls resolve against the parent DB. Config: upstreamBackendBin + databaseUrl
from env; declared ANIMUS_ENV_UPSTREAM_BACKEND_BIN + DATABASE_URL in the manifest.
Bundles env-transport fix: PluginClient now advertises protocol_version 1.1.0
on initialize, so the parent-side animus-postgres accepts proxied subject/
config/queue/journal calls (was -32600 'host did not advertise a protocol_version').
- Wire a second parent-side PluginClient for log-storage-s3
  (ANIMUS_ENV_UPSTREAM_LOG_BIN, default /app/.animus/plugins/animus-log-storage-s3)
  and route a node's log_storage/* backend/call to it, forwarding the parent's
  S3 env (S3_BUCKET/S3_ACCESS_KEY_ID/S3_SECRET_ACCESS_KEY + optional
  S3_ENDPOINT/S3_REGION/S3_PREFIX/S3_FORCE_PATH_STYLE); other roles still hit
  animus-postgres. Falls back to default when S3 env is absent.
- Inject GH_TOKEN (= the minted/passed GitHub token) alongside GITHUB_TOKEN in
  both githubAppCredentials and harnessCredentialVars so gh pr create works.
- harnessCredentialVars defaults CODEX_OAUTH_HOME to the durable portal path
  /data/animus-state/codex-config so codex works on nodes without portal config.
relay() now dials the always-on animus-env-relay singleton via RelayClient
(unix socket) rather than hosting an in-process RelayServer on the fixed port.
Removes the per-instance port bind (EADDRINUSE/leak/no-concurrency). Reverse-RPC
still serviced here against the parent's animus-postgres/log-storage. Removes the
two obsolete port-binding tests (now the singleton's concern).
@Shooksie Shooksie changed the title v0.4.9: log_storage proxy to log-storage-s3, GH_TOKEN for gh, codex default home environment-railway v0.4.10: exec_session ephemeral node + log_storage proxy + singleton relay (REQ-052) Jul 17, 2026
@Shooksie
Shooksie merged commit e4a2481 into main Jul 17, 2026
@Shooksie
Shooksie deleted the agent/v0.7.0/env-exec-session-release branch July 17, 2026 15:03
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.

1 participant