Repository navigation
[dummy_ci 7/7] Add POST /complete-run worker, OIDC auth, Ed25519 KMS signer, and Cocoon callback - #5235
Open
ievdokdm wants to merge 1 commit into
Open
[dummy_ci 7/7] Add POST /complete-run worker, OIDC auth, Ed25519 KMS signer, and Cocoon callback#5235ievdokdm wants to merge 1 commit into
ievdokdm wants to merge 1 commit into
Conversation
This was referenced Dec 4, 2026
There was a problem hiding this comment.
Code Review
This pull request implements the end-to-end Pluggable CI callback flow for dummy_ci, including OIDC verification for inbound Cloud Tasks, synthetic terminal outcome generation, Ed25519 JWT signing via Cloud KMS, and callback delivery to Cocoon. Feedback suggests optimizing Ed25519JwtSigner by caching the resolved key version and JWK to avoid redundant KMS API calls. Additionally, CompleteRunHandler should propagate database update failures as retryable errors (e.g., 503 Service Unavailable) instead of silently swallowing them, ensuring eventual consistency when marking callbacks as delivered or settled.
ievdokdm
force-pushed
the
197798-6-dummy-ci-status-logs
branch
from
December 4, 2026 00:37
e22d890 to
a09848a
Compare
ievdokdm
force-pushed
the
197798-7-dummy-ci-complete-run
branch
from
December 4, 2026 00:37
1171217 to
0b7db5a
Compare
…signer, and Cocoon callback
ievdokdm
force-pushed
the
197798-6-dummy-ci-status-logs
branch
from
December 4, 2026 01:07
a09848a to
c33c25a
Compare
ievdokdm
force-pushed
the
197798-7-dummy-ci-complete-run
branch
from
December 4, 2026 01:07
0b7db5a to
afff686
Compare
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.
Adds the Cloud Tasks
POST /complete-runworker, Google RS256 OIDC authentication, Cloud KMS Ed25519 callback JWT signing, uniform-random terminal outcome generation, and Cocoon callback delivery todummy_ci(RFC 610.0002 §§ 3.2.5, 4.2, 8.1.2).Summary
OidcVerifier/GoogleOidcVerifier(lib/src/auth/oidc_verifier.dart) verifying Google RS256 OIDC JWTs againsthttps://www.googleapis.com/oauth2/v3/certs(iss,aud,exp/iatskew,email,email_verified), plusFakeOidcVerifierexported fromlib/testing.dart.Ed25519JwtSigner(lib/src/auth/ed25519_jwt_signer.dart) selecting the highest numeric enabled Cloud KMS key version, computing its RFC 7638kid, signing viaCloudKmsService.asymmetricSign, and omitting any top-levelversionclaim per RFC 4.2.1 / 8.1.2.OutcomeGenerator(lib/src/service/outcome_generator.dart) picking a uniform-random terminal outcome across all 6 RFC terminal states with logically aligned terminaldetails[]and Markdownmessage.CocoonCallbackClient(lib/src/service/cocoon_callback_client.dart) postingapplication/jwtwith a 30s timeout and classifying2xx(delivered),409/non-retryable4xx(permanent failure), and5xx/408/429/timeout/network errors (retryable failure).saveTerminalOutcomeandmarkCallbackDeliveredtoTaskStore/FirestoreTaskStore/FakeTaskStore.CompleteRunHandler(POST /complete-run) with OIDC auth, idempotent outcome persistence before callback delivery so retries never re-roll outcomes, and Cloud Tasks retry signaling (503on retryable errors,200on delivered/permanent/duplicate/missing)./complete-runintoserver.dartandtool/local_server.dart.test/e2e_flow_test.dartexercising the entire loop in-process (GET /api/v1/jwks-> signedPOST /webhook->GET /status->POST /complete-run-> verifying outbound callback JWT againstdummy_ci's own/api/v1/jwks->GET /status->GET /logs/<uid>/<testName>).dummy_ci/README.mdwith complete Cloud Run env var configuration, example Cocoon devpartner_configFirestore document, and end-to-end smoke-test instructions.Stack
dummy_ciCloud Run app, Dockerfile, and CIEd25519PublicJwkmodel and SPKI PEM/JWK parserCloudKmsService,FakeCloudKmsService, andDummyCiConfigGET /api/v1/jwksendpoint, server wiring, and local dev serverPOST /webhookGET /statusAPI and mockGET /logsendpointPOST /complete-runworker, OIDC auth, Ed25519 KMS signer, and Cocoon callbackTesting
dart pub get,dart format --set-exit-if-changed .,dart analyze --fatal-infos,dart test --test-randomize-ordering-seed=random --reporter expanded(85 tests passing, includinge2e_flow_test.dart)dart compile exe bin/server.dartdart --enable-asserts analyze.dart,dart run dev/cocoon_code_health/bin/check.dart, and license header verificationTowards flutter/flutter#197798