Skip to content

Forge 0.8.2: guild lifecycle, log and upload hardening, with 0.8.1 compatibility - #79

Merged
milliondreams merged 6 commits into
rustic-ai:mainfrom
milliondreams:build/forge-0.8.2
Nov 30, 2026
Merged

milliondreams merged 6 commits into
rustic-ai:mainfrom
milliondreams:build/forge-0.8.2

Conversation

@milliondreams

Copy link
Copy Markdown
Contributor

Forge 0.8.2: the guild lifecycle, agent log and upload hardening from #78, rebased onto 0.8.1, with fixes so guilds, agents and status stored by 0.8.1 keep working after the upgrade, and rusticai-core 1.5.1. This replaces #78.

Changes

From #78, rebased onto 0.8.1

  • Launch-time dependency profiles are stored in the agent row's dependency_profiles column instead of in its properties, where agents with a strict properties class rejected them. Spawning reads the stored agent row, not the queued payload. Agents stored by 0.8.1 have the old _forge_dependency_profiles property removed from the spec they are given, and their profiles are read from it.
  • Agent output is drained in chunks across the process, Docker and Bubblewrap supervisors, so a line over 64 KiB no longer stops the reader and blocks the agent. The warmup after each accepted spawn drops from 5 s to 0.1 s (FORGE_AGENT_ACCEPTED_WARMUP_SECONDS still overrides it).
  • Guild and agent file uploads stream through temporary files with a 100 MiB default limit (--max-file-upload-bytes, 413 above it). Leftover temporary files are removed at startup, and concurrent uploads of the same file are serialized.
  • NATS agent status keeps a lease per entry, so a 30 s lease no longer lasts the bucket's 300 s.

Compatibility with 0.8.1

  • Re-ensuring an agent stored by 0.8.1 compares the profiles it stored in its properties, so it is no longer a 409. Its profiles move to the column.
  • NATS status written by 0.8.1 nodes, which has no lease, stays live until the bucket TTL removes it instead of being deleted on read. During a rolling upgrade that deletion made the reconciler spawn the agent again.
  • NATS revision conflicts are detected with ErrKeyRevisionMismatch, which also matches replicated buckets.
  • The Python NATS status reader ignores entries whose lease has expired.
  • The guild manager starts an agent whose row already exists when it is not running, so an agent whose first launch failed is not left stopped.
  • Uploads store the base of the client's filename and ignore form fields other than file and file_meta, as 0.8.1 did. S3 writes are not conditional, since S3-compatible stores without conditional writes reject them.

Release

  • Requires rusticai-core>=1.5.1, for the clear error when a dependency cannot be resolved. Version 0.8.2.
  • The default runner package is pinned to rusticai-forge==<version>, so the 0.8.2 Python package must be published before the binary is used without FORGE_PYTHON_PKG.

Validation

  • Passed go vet ./..., the generated contract check, go test ./... and the Go build.
  • Passed ruff check, compileall, uv build, pytest tests/contract and the other Python tests, apart from test_forge_api_contract.py and the Redis integration test. Those fail locally because the server cannot find conf/forge-agent-registry.yaml, the same as on main.
  • Regenerating the TypeScript client gives no changes, and it builds.
  • golangci-lint was not run locally.
  • Each compatibility fix has a test that fails without it, except the S3 change, which needs a real S3-compatible store.

- Ensuring an agent compares its launch profiles with the ones stored
  by 0.8.1 in its properties, so re-ensuring it is no longer a 409, and
  moves them to the dependency_profiles column.
- NATS agent status written without a lease, by 0.8.1 nodes, stays live
  until the bucket TTL removes it instead of being deleted on read,
  which made the reconciler spawn the agent again.
- Revision conflicts on NATS status updates are detected with
  ErrKeyRevisionMismatch, which also matches replicated buckets.
- The Python NATS status reader ignores entries whose lease expired.
- The guild manager starts an agent whose row already exists when it is
  not running, so an agent whose first launch failed is not left stopped.
- Store the base of the client's filename, as 0.8.1 did, instead of
  rejecting a name that has a directory in it.
- Ignore form fields other than file and file_meta, as 0.8.1 did;
  uploaders may send their own. The body size limit still applies.
- Do not ask S3 for conditional writes. S3-compatible stores without
  them reject the request; S3 uploads keep relying on the Exists check.
- Correct the comments on the local upload lock and on rebuilding the
  Guild Manager's spawn request.
@milliondreams
milliondreams merged commit 5b49217 into rustic-ai:main Nov 30, 2026
13 checks passed
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