Skip to content

Multiple app registrations per runner - #44

Merged
j0sh merged 1 commit into
mainfrom
ja/multi-apps
Nov 4, 2026
Merged

j0sh merged 1 commit into
mainfrom
ja/multi-apps

Conversation

@j0sh

@j0sh j0sh commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator

Accept atomic app snapshots with independent routes, versions, capacity, prices, and sessions. Keep authentication and O2R channels runner-scoped.

Preserve admitted work while apps drain and pin session configuration. Adapt scalar heartbeats to the same app model. Generate short app- IDs with collision retries and validate IDs before committing snapshots.

Add lifecycle, routing, payment, collision, and SDK compatibility coverage.

Accept atomic app snapshots with independent routes, versions, capacity,
prices, and sessions. Keep authentication and O2R channels runner-scoped.

Preserve admitted work while apps drain and pin session configuration.
Adapt scalar heartbeats to the same app model. Generate short app- IDs
with collision retries and validate IDs before committing snapshots.

Add lifecycle, routing, payment, collision, and SDK compatibility coverage.
Copilot AI balanced review requested due to automatic review settings November 4, 2026 04:46

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Interactions across paid admission, concurrent draining, and HTTP/SSE/WebSocket lifecycles require end-to-end validation with the pinned Go/Python SDKs beyond static review.

No open issues 🎉

What changed in this PR

This PR separates app registrations from runner ownership, allowing one authenticated runner to host multiple independently configured apps while retaining runner-scoped credentials and O2R channels.

Changes:

  • Adds atomic app snapshots, per-app routing and capacity, collision-aware ID generation, and scalar-heartbeat compatibility.
  • Preserves admitted sessions during app draining, pins session configuration, and binds payment quotes to registration lifetimes.
  • Adds lifecycle, routing, payment, and collision coverage; updates metrics and API documentation.
File Description
orchestrator/​trickle.go Tracks app ownership on channels.
orchestrator/​trickle_test.go Updates channel ownership and metrics assertions.
orchestrator/​regression_test.go Adapts channel regression tests to app ownership.
orchestrator/​registry.go Implements multi-app snapshots, draining, session pinning, and ID validation.
orchestrator/​proxy.go Uses app registrations for proxy discovery and validation.
orchestrator/​proxy_test.go Covers generated IDs across proxy configurations.
orchestrator/​pending_test.go Adapts pending-payment tests to app-scoped reservations.
orchestrator/​payment.go Scopes payment routes and reservations to apps.
orchestrator/​payment_test.go Tests payment isolation, draining, and stale-quote rejection.
orchestrator/​payment_engine.go Binds payment challenges to app registration lifetimes.
orchestrator/​metrics.go Attributes inventory, lifecycle, and payments to apps and owners.
orchestrator/​metrics_test.go Updates pinned session identity tests.
orchestrator/​lifecycle_test.go Tests stream preservation during app removal.
orchestrator/​http.go Routes requests and callbacks by app; keeps O2R runner-scoped.
orchestrator/​http_test.go Adds snapshot, ownership, capacity, pinning, and collision tests.
orchestrator/​discovery_test.go Checks discovery omits explicit identity fields.
orchestrator/​app_test.go Updates static configuration assertions for app storage.
internal/​observability/​metrics.go Adds app_id to shared identity labels.
docs/​orchestrator.md Documents pinned sessions, app proxies, and registration limits.
docs/​metrics.md Explains app-level metrics and runner-owner counts.
docs/​http-api.md Documents app snapshots and app-scoped routes.

Review effort: Balanced

@j0sh
j0sh merged commit 833dc2e into main Nov 4, 2026
10 checks passed
@j0sh
j0sh deleted the ja/multi-apps branch November 4, 2026 05:00
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.

2 participants