Repository navigation
[dummy_ci 5/7] Add Cocoon JWT verifier, Firestore store, Cloud Tasks scheduler, and POST /webhook - #5233
Open
ievdokdm wants to merge 1 commit into
Open
[dummy_ci 5/7] Add Cocoon JWT verifier, Firestore store, Cloud Tasks scheduler, and POST /webhook#5233ievdokdm 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 introduces Firestore and Cloud Tasks provisioning to the dummy_ci service, implementing a webhook handler (POST /webhook) that verifies inbound EdDSA JWTs, persists task records in Firestore, and schedules delayed runs via Cloud Tasks. Feedback on these changes highlights a potential resource leak of the HTTP client when using the default verifier in createDummyCiHandler, a race condition in the webhook handler that could lead to duplicate task scheduling, and an opportunity to resolve this by utilizing deterministic task names for built-in Cloud Tasks deduplication.
ievdokdm
force-pushed
the
197798-5-dummy-ci-webhook
branch
from
December 4, 2026 00:37
67a51e2 to
e22e0f6
Compare
ievdokdm
force-pushed
the
197798-4-dummy-ci-jwks-endpoint
branch
from
December 4, 2026 00:37
c1dbd8a to
d8fdd6f
Compare
…scheduler, and POST /webhook
ievdokdm
force-pushed
the
197798-4-dummy-ci-jwks-endpoint
branch
from
December 4, 2026 01:07
d8fdd6f to
4cc5cc9
Compare
ievdokdm
force-pushed
the
197798-5-dummy-ci-webhook
branch
from
December 4, 2026 01:07
e22e0f6 to
20046ef
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 Cocoon Ed25519 JWT verification, Firestore task persistence, Cloud Tasks scheduling, and
POST /webhooktodummy_ci(RFC 610.0002 §§ 3.2.2, 4.1.3–4.1.8, 8.1.1).Summary
google_cloud_firestore(^0.5.5),google_cloud_tasks_v2(^0.1.0), andgoogle_cloud_protobuf(^0.5.5) todummy_ci/pubspec.yamland updatesdummy_ci/pubspec.lock.TaskStatus,TaskDetail,WebhookPayload,TaskRecord) and Firestore map codecs indummy_ci/lib/src/model/task_record.dart.JwksClient(lib/src/auth/jwks_client.dart) with 64 KB streaming body cap, 3s timeout, TTL caching, single-flight coalescing, and 30s unknown-kidforced-refresh cooldown.CocoonJwtVerifier(lib/src/auth/cocoon_jwt_verifier.dart) pinningEdDSAverification viajose_plusand enforcingtyp,kid,iss,aud,exp, andiatwith clock skew.TaskStore/FirestoreTaskStore(atomicDocumentReference.create(),get(),markTaskScheduled()) andTaskScheduler/CloudTasksScheduler(google_cloud_tasks_v2with UTCscheduleTimeandOidcToken), plus fakes inlib/src/fakes/exported vialib/testing.dart.WebhookHandler(POST /webhook) enforcingapplication/jwt, 64 KB body cap (413), JWT auth (401), payload schema (400), idempotent duplicate detection (409) with recovery whentask_scheduled == false, and200 {}without sending anin_progresscallback./webhookintoserver.dart,bin/server.dart, andtool/local_server.dart, and documents Firestore + Cloud Tasks provisioning & IAM bindings indummy_ci/README.md.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 expandeddart compile exe bin/server.dartdart --enable-asserts analyze.dartanddart run dev/cocoon_code_health/bin/check.dartTowards flutter/flutter#197798