APP-4344 Propagate Oz lifecycle hook metadata through cloud workers - #137
Draft
warp-agent-staging[bot] wants to merge 5 commits into
Draft
APP-4344 Propagate Oz lifecycle hook metadata through cloud workers#137warp-agent-staging[bot] wants to merge 5 commits into
warp-agent-staging[bot] wants to merge 5 commits into
Conversation
Contributor
Author
|
This PR was generated with Warp. Comment |
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.



Implements the cloud-worker portion of APP-4344 from the approved Warp specs. It transports authenticated Oz lifecycle-hook capability and project-trust metadata to the embedded runtime without adding a worker-side hook executor.
Review guide
Start with
internal/types/oz_lifecycle_hooks.gofor the wire validation contract, theninternal/worker/worker.gofor pre-claim compatibility enforcement and argv construction. The backend changes prove the same argv, workspace, credential, and cancellation boundaries across Direct, Docker, Kubernetes, and command dispatch.What changed
oz_lifecycle_hooksassignment metadata withwarp.oz_hook.v1negotiation, canonical project trust identities, lowercase SHA-256 hashes, a 64-record cap, and an argv-safe 64 KiB serialized limit.TaskParamsand one dedicated--oz-lifecycle-hooks-context <JSON>argv pair; hook metadata never enters the task environment or routine logs.DispatchPayloadVersionto 2 and includes the non-secret context explicitly.Validation
go test ./internal/worker -run 'TestCommandBackendLifecycleHooksRequireCancelCommand|TestSanitizeArgsForLog' -count=1test -z "$(gofmt -s -l .)"go vet ./...go test ./internal/worker/...go test ./...go build ./...golangci-lint run --new-from-rev=origin/main— 0 issuesgit diff --checkThe unscoped
golangci-lint runstill reports five existing findings on untouched lines: threeerrcheckfindings ininternal/worker/worker_test.goand twostaticcheckfindings ininternal/worker/kubernetes_setup_events.go.Landing order
Land after the protocol definitions, MAA server gates, and Warp embedded-runtime/CLI consumer. This worker PR is the fourth cross-repository step because current embedded binaries do not accept
--oz-lifecycle-hooks-context.