Repository navigation
Multiple app registrations per runner - #44
Merged
Merged
Conversation
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.
There was a problem hiding this comment.
🔵 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
This was referenced Nov 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.