Skip to content

feat(runtime): bootstrap revision configuration from durable bundles - #3515

Merged
EItanya merged 12 commits into
mainfrom
jetc/feat/bootstrap-config
Nov 6, 2026
Merged

EItanya merged 12 commits into
mainfrom
jetc/feat/bootstrap-config

Conversation

@supreme-gg-gg

@supreme-gg-gg supreme-gg-gg commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Closes #3468. Deliver compiled config and Agent Cards to runtimes through immutable Postgres-backed bundles instead of ActorTemplate env vars. This removes Substrate’s per-value env limit for config, with a combined bundle payload limit of 256 KiB (can be increased as needed in the future).

Golden runtimes fetch their bundle through an actor-authenticated bootstrap RPC, verify it, and save it durably before readiness. Sessions and forks inherit the pinned configuration; restarts and volume restores load it without contacting bootstrap (cached in durable dir).

Changes

  • Scope bootstrap authorization to the actor’s template using a dedicated JWT audience.
  • Publish bundles before template creation and protect preparation with expiring leases.
  • Include golden egress policy in template comparison and hashing.
  • Share bootstrap loading across Go harnesses, with equivalent Python support.

Requires bootstrap-capable runtime images; there is no legacy environment-payload fallback.

Signed-off-by: Jet Chiang <pokyuen.jetchiang-ext@solo.io>
Signed-off-by: Jet Chiang <pokyuen.jetchiang-ext@solo.io>
Signed-off-by: Jet Chiang <pokyuen.jetchiang-ext@solo.io>
Signed-off-by: Jet Chiang <pokyuen.jetchiang-ext@solo.io>
Signed-off-by: Jet Chiang <pokyuen.jetchiang-ext@solo.io>
@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Nov 4, 2026
@blacksmith-sh

This comment has been minimized.

Signed-off-by: Jet Chiang <pokyuen.jetchiang-ext@solo.io>
Signed-off-by: Jet Chiang <pokyuen.jetchiang-ext@solo.io>
@supreme-gg-gg
supreme-gg-gg marked this pull request as ready for review November 4, 2026 16:02
@supreme-gg-gg
supreme-gg-gg requested a review from a team as a code owner November 4, 2026 16:02
Comment thread go/adk/pkg/config/config_materialize.go Resolved
Comment thread go/adk/pkg/bootstrap/load.go Resolved
Comment thread go/core/internal/translator/revision.go Resolved
Signed-off-by: Jet Chiang <pokyuen.jetchiang-ext@solo.io>
@supreme-gg-gg

Copy link
Copy Markdown
Contributor Author

Addressed all the comments in e011377

@blacksmith-sh

This comment has been minimized.

Signed-off-by: Jet Chiang <pokyuen.jetchiang-ext@solo.io>
Comment thread go/core/internal/database/bootstrap.go Outdated
// bundle for the active desired source. Identical retries renew a two-minute lease;
// conflicting bytes and deleting revisions fail. The lease expires naturally so
// abandoned or ambiguous compute requests cannot race immediate collection.
func (c *Client) PublishBootstrapRevision(ctx context.Context, revision RuntimeRevision, bundle *runtimev1.BootstrapBundle) error {

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.

Do we need preparing_until at all? As far as I can tell it exists because the revision row and bundle are now written before CreateActorTemplate, which opens a window where GC can collect a revision whose template is still being created. But the service already returns Unavailable("binding is pending") until the template UID is recorded, and both loaders retry on Unavailable. If the bundle were inserted inside RecordRuntimeRevision (same transaction that already writes runtime_revision, agent_revision, and the UID), I think we could drop PublishBootstrapRevision, the lease, the GC "unpublished" branch, and the COALESCE(NULLIF(...)) UID guard. The only change I see is mapping a missing binding to Unavailable instead of PermissionDenied in Get. Along the same lines, GetBootstrapBinding + GetBootstrapBundle could probably be one query. Is there a case I'm missing that requires the row to exist before the template?

Comment left by Claude on behalf of @EItanya

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Agree with this suggestion, I've simplified that and also merged GetBootstrapBinding and GetBootstrapBundle

supreme-gg-gg and others added 3 commits November 6, 2026 00:29
Signed-off-by: Jet Chiang <pokyuen.jetchiang-ext@solo.io>
Signed-off-by: Eitan Yarmush <eitan.yarmush@solo.io>
Main added an exact assertion on the generated Substrate preview list.
Runtime bootstrap also enables GoldenEgressPolicy, so update the
expectation and document both gates for Helm users.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Eitan Yarmush <eitan.yarmush@solo.io>
@EItanya
EItanya enabled auto-merge November 6, 2026 15:35
@blacksmith-sh

This comment has been minimized.

@EItanya
EItanya added this pull request to the merge queue Nov 6, 2026
Merged via the queue into main with commit 3548b7a Nov 6, 2026
54 of 55 checks passed
@EItanya
EItanya deleted the jetc/feat/bootstrap-config branch November 6, 2026 16:01
dimetron added a commit to dimetron/kagent that referenced this pull request Nov 6, 2026
MaterializeFromEnv was replaced upstream in kagent-dev#3515.

Signed-off-by: Dmytro Rashko <dimetron@me.com>
ernoaapa added a commit to airohq/agent-harnesses that referenced this pull request Nov 9, 2026
kagent 1.0.0-rc3 no longer passes KAGENT_CONFIG_JSON and
KAGENT_AGENT_CARD_JSON to a runtime (kagent-dev/kagent#3515). It passes a
descriptor in KAGENT_BOOTSTRAP_JSON, and the runtime fetches the bundle
from the controller and keeps it on the durable /data volume. Without
this, the harness exits at start, Substrate's wakeup probe on :8081
never answers, and the judges' golden snapshots fail.

- Load the config and card with kagent's bootstrap package, as its own
  Claude harness does.
- Give /data to the runtime user in the image, as kagent's images do.
- The config test loads a bundle built with kagent's NewBundle.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] environment variable "KAGENT_CONFIG_JSON" is 36726 characters; Substrate supports at most 32768

2 participants

⌂ 换网址