Repository navigation
Define Service warm-delivery contract - #119
Merged
Merged
Conversation
Let Service Agents opt into sparse referenced work while keeping delivered audit records distinct from standing Pod-owning runs. Freeze the HTTP request and result semantics so runtime and controller implementations can proceed independently.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
| Filename | Overview |
|---|---|
| internal/runfactory/runfactory.go | Extends sparse resolution to delivery-enabled Services, snapshots the delivery marker, and rejects names reserved for standing runs. |
| internal/controller/agentrun_controller.go | Uses spec.delivery as the lifecycle discriminator so delivered runs fail closed while standing Service runs continue through Pod reconciliation. |
| api/v1alpha1/agent_types.go | Adds the Service-only runtime delivery capability and validates its relationship with the Service invocation template. |
| api/v1alpha1/agentrun_types.go | Adds an immutable delivery snapshot with validation tying its port to the resolved runtime capability. |
| pkg/delivery/v1alpha1/types.go | Defines the versioned warm-delivery request and target identity envelope. |
| SPEC.md | Documents the warm-delivery wire protocol, authenticated result response, identity checks, and lifecycle contract. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Sparse referenced AgentRun] --> B[Invocation admission]
B --> C{Referenced Agent mode}
C -->|Task| D[Resolved immutable Task snapshot]
C -->|Delivery-enabled Service| E[Resolved snapshot with spec.delivery]
D --> F[AgentRun reconciler]
F --> G[Create dedicated Pod]
E --> H[AgentRun reconciler]
H --> I[Remain Pending without dedicated Pod]
J[Service controller] --> K[Standing AgentRun without spec.delivery]
K --> F
Reviews (6): Last reviewed commit: "Allow standing Service runs to create Po..." | Re-trigger Greptile
Service Agents without warm delivery now fail with DeliveryDisabled, so retain WrongMode coverage with a Scheduled Agent and assert both admission classes explicitly.
Prevent admitted delivery records from occupying the canonical names the Service controller needs for initial creation and later recasts.
2 tasks done
Fail closed while the warm-delivery controller is absent so the contract can land without accidentally executing delivered work in a cold Pod.
Carry the verified Pod identity in the strict request contract and require hostname matching so a reassigned Pod IP cannot silently accept work for another runtime.
Define a per-Pod secret challenge-response so the controller can verify that a result came from the selected runtime without transmitting its credential over Pod HTTP.
Keep only delivered invocation snapshots out of the Pod path so the standing runtime remains available while the controller implementation is stacked.
This branch was successfully deployed
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.
Summary
Merge sequencing
This is the contract/API half of warm delivery. PR #120 activates the delivery-aware controller path. If #119 is deployed alone, delivered invocation snapshots fail closed in
Pendingand never spawn cold Pods.Complete referenced runs intentionally bypass sparse invocation admission. They do not enter Service recast accounting without a controller owner reference; #120 also verifies that ownership and excludes delivery snapshots from standing-run selection.
Test plan
make testmake verifyCloses #117