Repository navigation
fix: preserve persistent agent configuration across Docker namespaces - #3723
alex-furman wants to merge 14 commits into
Conversation
|
✅ Nightly unit-suite clean when this PR is merged into |
|
|
|
merge-train: held back from today's train. Thanks for this; the config-volume transport is well built, and the tests drive the real create path. One finding needs your call before it can ride. Blocking: the ent#313 failed-create cleanup is skipped for persistent agents on most failures. In Also worth addressing:
Migration fork: |
|
@vybe Addressed in bfe19cb4f and 45da3d472:
Validation includes failing-before regressions, 168 affected checks on the final corrections, independent re-review, actual Docker archive/startup checks, and PostgreSQL upgrades from base and either 0099 branch. Full provider-backed HTTP create/recovery acceptance is still unverified; the description records the boundaries. Please re-review the updated head when convenient. |
|
@vybe Following up with the latest integration and regression evidence. Your cleanup, credential overwrite, helper-image and conflict-handling concerns are addressed, as detailed above. The updated head ( The final full regression run reports 27,959 passed, 86 skipped, and zero failures or new regressions: https://github.com/Abilityai/trinity/actions/runs/39342293085/job/118373898459 The PR description records the validation and its limits; full provider-backed HTTP create/recovery acceptance remains unverified. Could you take another look when convenient and let us know whether anything else is needed for the merge train? |
|
@vybe Following up after integrating current Could you re-review this for the merge train? Please let us know if anything else is needed from our side. The PR description records the validation limits, including the unverified full provider-backed HTTP create/recovery workflow. |
|
merge-train (2026-11-04): re-validated at Two things to fix before it can ride:
Also worth fixing, not blocking on their own:
A fork push cannot clear |
Fixes #3722.
A containerized backend stages configuration in its own
/tmp, but Docker resolves bind sources on the daemon host. Persistent creation can therefore mount missing paths. This change uploads configuration through Docker's archive API into a per-agent volume mounted read-only at/config.The nullable
agent_ownership.config_storage_formatfield distinguishes legacy agents from newvolume-v1agents. Existing rows stay NULL; no host files are adopted or converted. Recovery requires the exact saved config volume name, config platform, immutable agent owner and matching installation identity before rotating credentials. Creation refuses an unresolved installation identity; this does not change legacy recovery or deletion compatibility. Rename retains the immutable volume base; ordinary recreation retains the read-only mount. Existing configuration volumes produce a named HTTP 409 and are never adopted or overwritten during creation.Creation settles provisioning and container workers before cleanup. Before container submission it never reclaims a same-name container or Redis state. After submission, unregistered failures use native provenance checks, including lost Docker replies; cancellation preserves a settled daemon conflict. Key rollback deletes only the key minted by that attempt. Registered ownership or an unreadable ownership lookup preserves resources for inspection. Volume cleanup verifies this attempt's exact creation claim and never forces removal.
All generated files, including
.env,.mcp.json, template config files and file credentials, are seeds: existing, empty and symlinked workspace files survive restarts. Archive staging uses the caller-validated local image selected for the agent (including custom or pinned images) without an extra pull. The obsolete startup call to an absentconfigure_agent.pyis removed; the server reads agent YAML directly. SQLite and PostgreSQL add the nullable marker. PostgreSQL downgrade refuses to discard populated markers, and a merge revision preserves both published 0099 histories.Suggested review order:
config_volume.py, creation/recovery incrud.pyandlifecycle.py, then schema/migrations. Much of the CRUD diff is indentation around staging cleanup.Current integration
8f263909ac6b7d33f513a6707a2ad8662c27b2d1targets official devc8f67cb857086a31f69d1dcc65d360bd94399ba1. The update preserves every published revision ID and parent link, keeps all SQLite entries, renames only this PR's colliding migration filenames, and adds no-op merge revision0117_merge_config_loop_hygiene. Current upstream lifecycle, endpoint-policy and kind-label changes are retained.Validation:
Limits: these checks do not establish a complete provider-backed HTTP create/recreate workflow. Ephemeral transport and legacy recovery retain their existing behavior. Unreadable ownership needs operator inspection. No production deployment is included.
Journey Impact: extends: J03
Mutation: the named-volume creation regression fails on unmodified current official dev and passes on this integration. Existing migration invariants reproduce duplicate filenames and multiple heads before reconciliation. Earlier cancellation/credential regression evidence covers unchanged paths; published migration histories are preserved rather than rewritten.