Skip to content

[chore] Clean up big-agents platform Part I - #4968

Merged
junaway merged 25 commits into
big-agentsfrom
chore/big-agents-platform-integration
Jun 30, 2026
Merged

[chore] Clean up big-agents platform Part I#4968
junaway merged 25 commits into
big-agentsfrom
chore/big-agents-platform-integration

Conversation

@junaway

@junaway junaway commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Context

This is Part I of the platform cleanup for big-agents: the breaking renames and the non-dev wiring that bring the merged agent-runner and durable mounts up across every deployment surface. It also fixes a root-cause defect that made durable mounts fail to sign credentials on any real S3-compatible store.

The store signed scoped runner credentials with S3 STS GetFederationToken. SeaweedFS (the bundled dev store) does not model GetFederationToken: it returns actionless tokens that the data plane then denies, so a git clone into a durable working directory dropped its FUSE channel and surfaced as ENOTCONN. The wiring also predated a second problem. Nothing about the object store was mounts-specific, yet its env namespace, adapter location, and key layout all read as "mounts' private storage."

Changes

STS now uses AssumeRoleWithWebIdentity, the only path SeaweedFS authorizes. The API acts as its own OIDC issuer. It holds an RSA private key, mints a short-lived RS256 web-identity token, and serves the matching public JWKS at /.well-known/jwks.json. SeaweedFS fetches that JWKS to verify the token on each sign. A bucket-wide role grants the store; a per-request inline session policy narrows each credential to one mount prefix, so effective permission is role intersect session. The API fails closed: it refuses to sign when it cannot build a prefix-scoped policy. The signing key is shared across API replicas (env var in prod, a documented local-dev fallback otherwise) so the store's cached JWKS never desyncs.

Before: one GetFederationToken call, no roles, denied on SeaweedFS.

After: AssumeRoleWithWebIdentity against the API's JWKS, scoped to agenta-store/mounts/<project_id>/<mount_id>/*.

geesefs now runs in the foreground as a runner-tracked child (-f). The detached daemon was reparented to init and died under write-heavy load, which was the proximate cause of the ENOTCONN. The mount path also force-unmounts a stale node before remount and verifies the mount is alive with a real I/O probe.

Store generalization (W6). AGENTA_MOUNTS_STORAGE_* becomes AGENTA_STORE_*. The adapter and STS signing move from core/mounts/ to a shared core/store/, and MountStorage becomes ObjectStore. Keys gain a mounts/ top-level prefix so a second store consumer can coexist. No backward-compat shim: nothing was deployed, so every old name is deleted in the same change.

Runner rename (W5). services/agent becomes services/runner and the sandbox-agent service becomes runner across compose, Helm, and Railway. Runner-infra env vars lose the AGENT infix (AGENTA_AGENT_RUNNER_* to AGENTA_RUNNER_*); agent-behaviour vars keep AGENTA_AGENT_*. The MCP flag aligns with the renamed template field (MCP_SERVERS to MCPS). The CI job becomes run-runner-tests.

Non-dev wiring (W4) across every surface. Dev compose bundles SeaweedFS configured for the OIDC IAM engine (pinned image, -volume.max=64, generated iam.json). gh/prod compose and the private platform repo use external S3 (STS native, no bundled store). Helm gets the full OIDC statefulset, JWT issuer and shared key injected into API pods only when the bundled store is enabled, schema entries, and example values. Railway gets a SeaweedFS wrapper image that generates iam.json and the JWT wiring it needs.

Docs (W7). The self-host store reference documents the web-identity mechanism, the complete AGENTA_STORE_* table, and the shared-key-across-replicas requirement. Architecture and networking pages cover the runner sidecar on :8765 and the bundle-or-external store toggle.

Tests / notes

  • Verified end to end against a freshly nuked-and-rebuilt EE dev stack: the JWKS endpoint serves the key, signing returns scoped credentials, a write to the mount's own prefix succeeds, and a write to another prefix is denied.
  • Runner suite green: 377 unit tests pass, tsc typecheck clean. API ruff format and ruff check clean.
  • Helm renders and lints with the bundled store enabled; the new jwtIssuer and jwtPrivateKey values pass schema validation.
  • The Railway store wiring is syntax and JSON validated but deploy-untested; there is no Railway environment in this setup. It mirrors the proven compose and Helm config.
  • The committed local-dev RSA key and the dummy SeaweedFS signing key are allowlisted in .gitleaks.toml by path and by value, not by exempting whole files.

jp-agenta and others added 12 commits June 30, 2026 12:23
…tract)

- git mv services/agent → services/runner (engine subdir sandbox_agent kept)
- compose/Helm/Railway service identity sandbox-agent → runner
- env: AGENTA_AGENT_RUNNER_* → AGENTA_RUNNER_*, AGENTA_AGENT_API_URL → AGENTA_RUNNER_API_URL
- env: AGENTA_AGENT_MCP_SERVERS_ENABLED → AGENTA_AGENT_MCPS_ENABLED, _HOST_ALLOWLIST → _MCPS_HOST_ALLOWLIST
- CI: run-services-node-unit-tests → run-runner-tests + real runner-integration/runner-acceptance jobs
- add tests/integration + tests/acceptance layers + vitest projects config

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- env AGENTA_MOUNTS_STORAGE_* → AGENTA_STORE_* (AGENTA_MOUNTS_TUNNEL_API kept, mounts-side)
- move adapter core/mounts/storage.py → core/store/storage.py (MountStorage → ObjectStore)
- MountsConfig depends on new StoreConfig; key prefix mounts/<project_id>/<mount_id>/
- STS scope policy follows the prefixed key; no dual-read fallback (break clean)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- gh compose (oss+ee): AGENTA_STORE_* passthrough + FUSE caps on runner (no bundled seaweed)
- Railway: SeaweedFS service + volume, private-domain endpoint (no ngrok)
- env examples + Helm example values store block

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- architecture/networking/configuration: runner :8765, local/daytona matrix, worker-records
- new upgrades/runner-and-store page; correct guides 07/08/09 to final names
- store: seaweedfs.enabled toggle, AGENTA_STORE_* block, per-tier matrix

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…rm-integration

# Conflicts:
#	hosting/docker-compose/ee/docker-compose.gh.yml
#	hosting/docker-compose/oss/docker-compose.gh.yml
#	hosting/railway/oss/scripts/configure.sh
…tform-integration

# Conflicts:
#	docs/docs/self-host/02-configuration.mdx
#	docs/docs/self-host/guides/07-deploy-the-agent-runner.mdx
#	docs/docs/self-host/guides/08-custom-agent-runner-images.mdx
#	docs/docs/self-host/infrastructure/01-architecture.mdx
Our renames (AGENTA_RUNNER_*, AGENTA_STORE_*, AGENTA_AGENT_MCPS_*) were never
deployed and have no fallback — listing them as deprecated-but-working is wrong.
Pre-existing deprecation rows (deployed vars with real fallback) are untouched.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Audit W2 gap: the public chart shipped every other worker (evaluations/events/
tracing/triggers/webhooks) but not worker-records. Mirror worker-triggers;
add agenta.workerRecords.{enabled,replicas} helpers (default on / 1 replica).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 30, 2026 11:17
@vercel

vercel Bot commented Jun 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agenta-documentation Ready Ready Preview, Comment Jun 30, 2026 6:11pm

Request Review

@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 2f557a28-444d-413f-9e31-fd365f879a05

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • ✅ Review completed - (🔄 Check again to review again)
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/big-agents-platform-integration

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@junaway
junaway marked this pull request as ready for review June 30, 2026 11:23
@dosubot dosubot Bot added size:XL This PR changes 500-999 lines, ignoring generated files. documentation Improvements or additions to documentation refactoring A code change that neither fixes a bug nor adds a feature labels Jun 30, 2026
jp-agenta and others added 4 commits June 30, 2026 14:11
- add worker-interactions Deployment + helpers (chart now ships all 7 workers)
- finish mounts.* -> store.* rename: helpers (agenta.store.enabled), .Values.store,
  commonEnv AGENTA_STORE_* emit, gate refs in runner/seaweedfs templates
- values.schema.json: add store.enabled + 3 missing worker keys + full store block
- values.yaml + oss/ee example values: document store block + new workers
- image agenta-agent-runner -> agenta-runner in _helpers

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- add Railway wrappers + deploy-script wiring for worker-interactions/records/triggers
- image agenta-agent-runner -> agenta-runner (Dockerfile, scripts, CI, package.json)
- deploy-from-images runner wrapper: ENV AGENTA_RUNNER_PORT (was PORT)
- stale services/agent path refs -> services/runner in docker/ comments+README+AGENTS

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ecks, env examples

- runner FUSE caps (SYS_ADMIN /dev/fuse apparmor) in oss/ee gh.local + oss gh.ssl
- services AGENTA_STORE_* passthrough in the same 3 variants
- worker-evaluations healthcheck across all 7 variants; ee traefik UI port
- AGENTA_STORE_SIGNING_KEY dev default; runner/ngrok vars in env examples
- image agenta-agent-runner -> agenta-runner in gh image defaults

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…h fixes

- list all 7 workers + cron in architecture/networking; k8s guide + toggles
- services port :80 -> :8080; postgres 16/18 -> 17
- store.* Helm keys; services/agent -> services/runner; agenta-runner image
- replace dead rolling-update service names; fix config-reference links
- scope bundled-SeaweedFS claim to dev compose (gh self-host uses external S3)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ddleware var

- values.schema.json: add agentRunner block (enabled/externalUrl/enableMcp/provider/logLevel/daytona)
- 02-configuration: add AGENTA_SERVICES_MIDDLEWARE_AUTH_ENABLED to the services table

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 30, 2026 12:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

jp-agenta and others added 2 commits June 30, 2026 14:40
…s mount leak)

Local durable cwd was mkdtemp'd fresh every turn, so each turn re-mounted the same
session store prefix onto a new path; the failed busy-unmount then leaked the old mount,
which later went stale and served ENOTCONN to file ops on the cwd (breaking tool relay).

- defaultLocalCwd keys off request.sessionId: one stable mountpoint per session, so the
  existing checkMounted guard short-circuits later turns (no re-mount, no leak).
- unmountStorage uses lazy unmount (fusermount -uz) so a still-busy mount detaches and
  reaps instead of failing 'Device or resource busy' and lingering.
- Daytona cwd unchanged: the remote sandbox (and its in-VM mount) is destroyed per run.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:XL This PR changes 500-999 lines, ignoring generated files. labels Jun 30, 2026
Copilot AI review requested due to automatic review settings June 30, 2026 13:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@dosubot dosubot Bot added size:XL This PR changes 500-999 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Jun 30, 2026
jp-agenta and others added 2 commits June 30, 2026 19:37
…ler key

The Railway bundled store ran the bare seaweedfs image with the default
entrypoint — no advanced IAM engine — so AssumeRoleWithWebIdentity (the only
STS path SeaweedFS authorizes) had nowhere to land and mounts could not sign.
This mirrors the compose/Helm fix onto Railway:

- New seaweedfs wrapper (hosting/railway/oss/seaweedfs/) bakes an entrypoint
  that generates s3.json + iam.json (OIDC provider -> the API's JWKS) and runs
  `weed server -volume.max=64 -s3.iam.config=...`. Image pinned to 4.37.
- deploy-from-images.sh renders + deploys the wrapper before the API.
- configure.sh wires AGENTA_STORE_JWT_ISSUER (api private URL, /api prefixed for
  SCRIPT_NAME) + a generated AGENTA_STORE_JWT_PRIVATE_KEY into the API, and the
  store-config env into the seaweedfs service.

Also removes the dead WEED_JWT_FILER_SIGNING_KEY from both dev compose files:
the advanced IAM engine reads sts.signingKey from iam.json, not the filer key.

Railway path is syntax + JSON validated but deploy-untested (no Railway env here).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 30, 2026 17:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@junaway

junaway commented Jun 30, 2026

Copy link
Copy Markdown
Contributor Author

What lands on big-agents with this merge

This is the Part I platform cleanup. It brings the merged agent runner and durable mounts up across every deployment surface and fixes the one defect that kept mounts from working on a real store. The store now signs scoped runner credentials with AssumeRoleWithWebIdentity instead of GetFederationToken, which SeaweedFS does not model. The API became its own OIDC issuer (it mints an RS256 web-identity token and serves the JWKS the store verifies it against), a bucket-wide role is narrowed per request by an inline session policy, and signing fails closed when no prefix-scoped policy can be built. geesefs also runs foreground as a runner-tracked child, which removes the ENOTCONN that a git clone into a durable cwd used to trigger.

Two breaking renames ride along, with no backward-compat because nothing is deployed. The mounts store generalizes into a shared platform store: AGENTA_MOUNTS_STORAGE_* becomes AGENTA_STORE_*, the adapter moves to core/store/ as ObjectStore, and keys gain a mounts/ prefix so a second consumer can coexist. The runner rename moves services/agent to services/runner, renames the sandbox-agent service to runner everywhere, drops the AGENT infix from runner-infra env vars, and aligns the MCP flag to MCPS. Non-dev wiring follows the settled per-tier choice: bundled SeaweedFS on compose-dev / Railway / k8s-when-enabled, external S3 on gh, preview, and live.

Verification ran end to end against a freshly nuked-and-rebuilt EE dev stack: JWKS served, signing returns scoped credentials, a write to the mount's own prefix succeeds, and a write to another prefix is denied. The runner suite is green (377 unit tests, typecheck clean), the API passes ruff, and Helm renders and lints with the bundled store on. One caveat for reviewers: the Railway store wiring is syntax and JSON validated but deploy-untested here, since there is no Railway environment in this setup; it mirrors the proven compose and Helm config. Platform-repo items (records worker, the streams:records exporter entry, the env templates) already landed in the private repo.

The runner rename moved the golden fixture to
services/runner/tests/fixtures/sessions/redis_contract.json, but this API
contract test still resolved the old services/agent path, so all 16 cases
errored with FileNotFoundError in CI (run-api-unit-tests). Update the path
and the two docstring references.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:XL This PR changes 500-999 lines, ignoring generated files. labels Jun 30, 2026
@junaway
junaway merged commit 21f62b2 into big-agents Jun 30, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation refactoring A code change that neither fixes a bug nor adds a feature size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants