From 3e2cbd54f16ada8065546741d084314e1400784d Mon Sep 17 00:00:00 2001 From: donghyeon-ka Date: Mon, 28 Sep 2026 15:45:58 +0900 Subject: [PATCH] =?UTF-8?q?review-followup=20Wave=202.5=C2=B7Wave=203=20?= =?UTF-8?q?=EB=9D=BC=EC=9A=B4=EB=93=9C=201(P14=C2=B7P17):=20=EC=A0=95?= =?UTF-8?q?=ED=95=A9=EC=84=B1=20=EC=9E=94=EC=97=AC=2012=ED=96=89,=20gRPC?= =?UTF-8?q?=20=ED=94=8C=EB=9E=AB=ED=8F=BC=209=20leaf=C2=B7protobuf=20?= =?UTF-8?q?=ED=94=8C=EB=9F=AC=EA=B7=B8=EC=9D=B8+Buf?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - P14(W2): inbox archive 종단 상태 보존, GraphQL platform context 누락 경고, fileserver 전이·quota·진행 중 upload 삭제, 알림 profile 소실 재시도·lease fencing·body 읽기 기한, Mongo bulk write concern, Dynamic Target cross-origin 헤더(결정 23), S3 profile CONDITIONAL_RETIREMENT 주장 거부, sample 포스터 abort·reconcile 경합(결정 22) - P17(W3): gRPC 18→9 leaf(registry), .proto는 protobuf Gradle 플러그인 + Buf CI(결정 18), hyeonworks→caskeleton, 인증 식별자 Context 전달, 한계값 정합 검사, P5-new-2·3 결함 수정 - 오케스트레이터: 현황표 적용(완료 395·남음 359), 새 결함 행 9개, capability-status 「제거된 코드」 17행, 계획서 Wave 3 상세 Task, by_area.py NEW-15+ KeyError 수정 검증: ./gradlew check architectureCheck verifyDependencyLocks --continue 통과(597 task), ./gradlew -p optional-platforms ci 통과, CapabilityStatusDocumentTest 통과 Co-Authored-By: Claude Opus 5.5 (1M context) --- README.md | 4 +- ...PC-002-schema-governance-without-protoc.md | 13 +- ...-GRPC-003-three-axis-execution-evidence.md | 2 +- ...retry-ownership-and-durable-idempotency.md | 2 +- ...rver-streaming-single-writer-and-resume.md | 2 +- ...stable-discovery-and-kubernetes-routing.md | 4 +- docs/compatibility/grpc-support-matrix.md | 12 +- ...6-08-30-grpc-platform-adaptation-design.md | 7 + grpc-advanced/CLAUDE.md | 21 +- .../grpc-advanced-bootstrap/build.gradle | 14 - .../grpc-advanced-bootstrap/gradle.lockfile | 84 ---- .../grpc-advanced-compat/build.gradle | 12 +- .../GrpcIntegrationBridgePolicyTest.java | 2 +- .../compat/GrpcReactorContextBridgeTest.java | 2 +- .../{main => test}/resources/envoy/envoy.yaml | 0 .../grpc-advanced-diagnostics/build.gradle | 11 - .../grpc-advanced-edition/build.gradle | 12 - .../grpc-advanced-resilience/build.gradle | 13 - .../grpc-advanced-streaming/build.gradle | 12 - .../grpc-advanced-streaming/gradle.lockfile | 91 ---- grpc-advanced/grpc-advanced/build.gradle | 28 ++ .../gradle.lockfile | 0 .../bootstrap/GrpcAdvancedCapability.java | 0 ...pcAdvancedCapabilityDisabledException.java | 0 .../bootstrap/GrpcAdvancedFeatureFlags.java | 0 .../bootstrap/GrpcAdvancedModuleGuard.java | 0 .../bootstrap/GrpcCapabilityGrade.java | 0 .../GrpcChannelDiagnosticsPolicy.java | 0 .../GrpcChannelDiagnosticsSnapshot.java | 0 .../diagnostics/GrpcDiagnosticsRedactor.java | 0 .../discovery/GrpcCustomResolver.java | 0 .../discovery/GrpcEndpointCandidate.java | 0 .../discovery/GrpcEndpointSnapshot.java | 0 .../discovery/GrpcLoadBalancerDecision.java | 0 .../discovery/GrpcLoadBalancerPicker.java | 0 .../GrpcLoadBalancerSafetyPolicy.java | 0 .../discovery/GrpcResolverSafetyPolicy.java | 0 .../discovery/GrpcResolverUpdate.java | 0 .../edition/GrpcEdition2024Policy.java | 0 .../edition/GrpcEdition2026Status.java | 0 .../edition/GrpcEdition2026WatchReport.java | 0 .../GrpcEditionCompatibilityReport.java | 0 .../GrpcAdvancedPromotionDecision.java | 0 .../GrpcAdvancedPromotionEvidence.java | 0 .../release/GrpcAdvancedPromotionGate.java | 0 .../release/GrpcAdvancedSupportMatrix.java | 0 .../resilience/GrpcHedgingBudget.java | 0 .../resilience/GrpcHedgingEligibility.java | 0 .../resilience/GrpcHedgingPolicy.java | 0 .../resilience/GrpcHedgingResult.java | 0 .../streaming/GrpcBidiDirectionState.java | 0 .../streaming/GrpcBidiResumeState.java | 0 .../streaming/GrpcBidiSequenceTracker.java | 0 .../advanced/streaming/GrpcBidiSession.java | 0 .../GrpcClientMessageDeduplicator.java | 0 .../streaming/GrpcClientStreamCheckpoint.java | 0 .../streaming/GrpcClientStreamMessage.java | 0 .../streaming/GrpcClientStreamPolicy.java | 0 .../GrpcClientStreamResumeDecision.java | 0 .../streaming/GrpcClientStreamSessionId.java | 0 .../streaming/GrpcClientStreamState.java | 0 .../streaming/GrpcDemandController.java | 0 .../streaming/GrpcDemandDecision.java | 0 .../GrpcManualFlowControlPolicy.java | 0 .../advanced/xds/GrpcXdsFailurePolicy.java | 0 .../grpc/advanced/xds/GrpcXdsProfile.java | 0 .../advanced/xds/GrpcXdsResourceSnapshot.java | 0 .../GrpcAdvancedModuleGuardTest.java | 0 .../GrpcChannelDiagnosticsPolicyTest.java | 0 ...rpcDiagnosticsRedactorIdempotenceTest.java | 0 .../edition/GrpcEdition2024PolicyTest.java | 20 +- .../GrpcEdition2026WatchReportTest.java | 0 .../GrpcAdvancedPromotionGateTest.java | 0 .../GrpcHedgingEligibilityTest.java | 6 +- .../GrpcLoadBalancerSafetyPolicyTest.java | 0 .../GrpcResolverSafetyPolicyTest.java | 0 .../resilience/GrpcXdsProfileTest.java | 2 +- .../GrpcBidiSequenceTrackerTest.java | 0 .../GrpcClientMessageDeduplicatorTest.java | 0 .../streaming/GrpcClientStreamPolicyTest.java | 0 .../streaming/GrpcDemandControllerTest.java | 0 .../proto/edition2024/compatibility.proto | 4 +- .../resources/xds/control-plane-snapshot.json | 0 grpc/CLAUDE.md | 24 +- grpc/grpc-admin/build.gradle | 10 - grpc/grpc-admin/gradle.lockfile | 91 ---- grpc/grpc-client/build.gradle | 14 - grpc/grpc-client/gradle.lockfile | 91 ---- grpc/grpc-codegen/build.gradle | 14 - grpc/grpc-codegen/gradle.lockfile | 84 ---- .../grpc/codegen/GrpcBreakingCategory.java | 43 -- .../grpc/codegen/GrpcBufPolicy.java | 75 --- .../grpc/codegen/GrpcCodegenManifest.java | 81 ---- .../grpc/codegen/GrpcCodegenOutput.java | 58 --- .../grpc/codegen/GrpcConsumerFixture.java | 158 ------- .../grpc/codegen/GrpcDescriptorArtifact.java | 59 --- .../codegen/GrpcGeneratedPackagePolicy.java | 68 --- .../codegen/GrpcSchemaArtifactPublisher.java | 113 ----- .../grpc/codegen/GrpcSchemaBaseline.java | 37 -- .../grpc/codegen/GrpcBufPolicyTest.java | 88 ---- .../grpc/codegen/GrpcCodegenManifestTest.java | 78 --- .../codegen/GrpcDescriptorArtifactTest.java | 248 ---------- .../consumer-fixtures/v1/build.gradle.kts | 17 - .../java/fixture/DocumentClientFixture.java | 33 -- grpc/grpc-contract/buf.yaml | 22 + grpc/grpc-contract/build.gradle | 47 ++ .../grpc-contract}/gradle.lockfile | 23 +- .../caskeleton}/grpc/common/v1/error.proto | 4 +- .../caskeleton}/grpc/common/v1/stream.proto | 4 +- .../GrpcContractGeneratedCodeTest.java | 46 ++ .../grpc/api/context/GrpcMetadataBudget.java | 3 +- .../grpc/api/policy/GrpcMethodPolicy.java | 8 +- .../grpc/api/policy/GrpcTransportLimits.java | 21 + .../caskeleton/grpc/core/GrpcMethodName.java | 10 + .../caskeleton/grpc/core/GrpcStatusCode.java | 2 +- .../api/context/GrpcMetadataBudgetTest.java | 2 +- .../api/error/GrpcFailureContextTest.java | 6 +- .../api/ledger/GrpcOperationIdentityTest.java | 2 +- .../policy/GrpcMethodPolicyCatalogTest.java | 8 +- .../grpc/core/GrpcCoreIdentifiersTest.java | 29 +- .../evidence/GrpcExecutionEvidenceTest.java | 4 +- .../ledger/GrpcOperationLedgerContract.java | 2 +- grpc/grpc-discovery/build.gradle | 11 - grpc/grpc-discovery/gradle.lockfile | 91 ---- .../GrpcMetricCardinalityPolicyTest.java | 2 +- .../JpaGrpcOperationLedgerContractIT.java | 2 +- .../GrpcOperationLedgerRepositoryTest.java | 2 +- grpc/grpc-policy/build.gradle | 19 - grpc/grpc-policy/gradle.lockfile | 91 ---- .../grpc/streaming/GrpcStreamProfile.java | 47 -- grpc/grpc-proto-contract/build.gradle | 14 - grpc/grpc-proto-contract/gradle.lockfile | 84 ---- .../contract/GrpcProtoContractValidator.java | 447 ------------------ .../grpc/contract/GrpcProtoRuleViolation.java | 38 -- .../grpc/contract/GrpcProtoStyleManifest.java | 120 ----- .../src/main/resources/proto/buf.gen.yaml | 23 - .../src/main/resources/proto/buf.lock | 11 - .../src/main/resources/proto/buf.yaml | 18 - .../GrpcProtoContractValidatorTest.java | 324 ------------- grpc/grpc-runtime/build.gradle | 31 ++ .../grpc-runtime}/gradle.lockfile | 0 .../grpc/admin/GrpcAdminExposurePolicy.java | 0 .../grpc/admin/GrpcDrainCoordinator.java | 0 .../caskeleton/grpc/admin/GrpcDrainPhase.java | 0 .../grpc/admin/GrpcDrainPolicy.java | 0 .../grpc/admin/GrpcDrainResult.java | 0 .../grpc/admin/GrpcHealthPolicy.java | 0 .../grpc/admin/GrpcHealthState.java | 0 .../grpc/admin/GrpcPlatformSnapshot.java | 0 .../admin/GrpcPlatformSnapshotService.java | 0 .../admin/GrpcReflectionAccessDecision.java | 0 .../grpc/admin/GrpcReflectionMode.java | 0 .../grpc/admin/GrpcReflectionPolicy.java | 0 .../grpc/admin/GrpcServiceHealthRegistry.java | 0 .../client/GrpcCallCredentialProvider.java | 0 .../grpc/client/GrpcChannelDrainPolicy.java | 0 .../grpc/client/GrpcChannelGeneration.java | 0 .../client/GrpcChannelProfileValidator.java | 0 .../grpc/client/GrpcChannelRuntime.java | 0 .../client/GrpcChannelRuntimeRegistry.java | 0 .../grpc/client/GrpcClientCallContext.java | 0 .../grpc/client/GrpcClientMetadataPolicy.java | 0 .../grpc/client/GrpcLoadBalancingPolicy.java | 0 .../grpc/client/GrpcNamedChannelProfile.java | 9 +- .../grpc/client/GrpcStubDescriptor.java | 0 .../grpc/client/GrpcStubPolicyApplier.java | 0 .../grpc/client/GrpcTypedStubFactory.java | 0 .../grpc/context/GrpcContextBinder.java | 0 .../context/GrpcContextPropagationPolicy.java | 0 .../grpc/context/GrpcContextSnapshot.java | 0 .../deadline/GrpcCancellableOperation.java | 0 .../deadline/GrpcCancellationCoordinator.java | 0 .../grpc/deadline/GrpcCancellationReason.java | 0 .../grpc/deadline/GrpcDeadlineCalculator.java | 0 .../deadline/GrpcDeadlinePolicyValidator.java | 0 .../grpc/deadline/GrpcDependencyBudget.java | 0 .../GrpcDiscoveryPolicyValidator.java | 0 .../grpc/discovery/GrpcKubernetesProfile.java | 0 .../GrpcKubernetesProfileValidator.java | 0 .../discovery/GrpcKubernetesRoutingMode.java | 0 .../grpc/discovery/GrpcResolverProfile.java | 0 .../grpc/discovery/GrpcResolverType.java | 0 .../discovery/GrpcStableLoadBalancer.java | 0 .../grpc/error/GrpcErrorExposurePolicy.java | 0 .../grpc/error/GrpcErrorMapper.java | 0 .../grpc/error/GrpcRichErrorDetail.java | 0 .../grpc/error/GrpcStatusMapping.java | 0 .../idempotency/GrpcCompletionReconciler.java | 0 .../idempotency/GrpcCompletionResolution.java | 0 .../idempotency/GrpcIdempotencyDecision.java | 0 .../GrpcIdempotencyInterceptor.java | 0 .../grpc/idempotency/GrpcOperationStatus.java | 0 .../idempotency/GrpcOperationStatusQuery.java | 0 .../grpc/idempotency/GrpcOutcomeReplay.java | 0 .../idempotency/GrpcRequestFingerprint.java | 0 .../grpc/policy/GrpcCompressionProfile.java | 0 .../grpc/policy/GrpcMessageSizeProfile.java | 12 +- .../policy/GrpcPayloadBoundaryPolicy.java | 0 .../grpc/policy/GrpcSizeViolation.java | 0 .../resilience/GrpcMethodRetryConfig.java | 0 .../grpc/resilience/GrpcRetryBudget.java | 0 .../grpc/resilience/GrpcRetryCoordinator.java | 0 .../grpc/resilience/GrpcRetryDecision.java | 0 .../grpc/resilience/GrpcRetryEligibility.java | 0 .../grpc/resilience/GrpcRetryOwner.java | 0 .../GrpcRetryOwnershipValidator.java | 0 .../resilience/GrpcServiceConfigPolicy.java | 0 .../resilience/GrpcWaitForReadyDecision.java | 0 .../resilience/GrpcWaitForReadyProfile.java | 0 .../resilience/GrpcWaitForReadyValidator.java | 0 .../security/GrpcAuthenticationProfile.java | 0 .../security/GrpcCredentialGeneration.java | 0 .../GrpcCredentialRotationManager.java | 26 +- .../grpc/security/GrpcTlsProfile.java | 0 .../grpc/server/GrpcAdmissionController.java | 0 .../server/GrpcApplicationInvocation.java | 0 .../grpc/server/GrpcExecutorProfile.java | 0 .../grpc/server/GrpcNettyParityContract.java | 0 .../grpc/server/GrpcNettyVariant.java | 0 .../grpc/server/GrpcNettyVariantSelector.java | 0 .../grpc/server/GrpcResponseMapper.java | 0 .../server/GrpcServerInterceptorChain.java | 0 .../server/GrpcServerInterceptorOrder.java | 0 .../server/GrpcServerInterceptorStage.java | 0 .../grpc/server/GrpcServerProfile.java | 16 +- .../grpc/server/GrpcServerTransport.java | 0 .../grpc/server/GrpcServiceAdapter.java | 0 .../server/GrpcServiceAdapterDescriptor.java | 0 .../streaming/GrpcFlowControlDecision.java | 0 .../grpc/streaming/GrpcFlowControlPolicy.java | 0 .../grpc/streaming/GrpcResumeDecision.java | 0 .../grpc/streaming/GrpcResumeToken.java | 0 .../grpc/streaming/GrpcResumeTokenCodec.java | 0 .../streaming/GrpcSerializedStreamWriter.java | 0 .../streaming/GrpcSlowConsumerPolicy.java | 0 .../grpc/streaming/GrpcStreamAdmission.java | 0 .../grpc/streaming/GrpcStreamEnvelope.java | 0 .../grpc/streaming/GrpcStreamGapDetector.java | 0 .../grpc/streaming/GrpcStreamHeartbeat.java | 0 .../grpc/streaming/GrpcStreamId.java | 0 .../GrpcStreamLifecycleCoordinator.java | 0 .../streaming/GrpcStreamLifetimePolicy.java | 0 .../grpc/streaming/GrpcStreamSequence.java | 0 .../GrpcStreamTerminationReason.java | 0 .../grpc/streaming/GrpcStreamWriteResult.java | 0 .../grpc/streaming/GrpcStreamWriterState.java | 0 .../validation/GrpcTransportValidator.java | 0 .../validation/GrpcValidationInterceptor.java | 0 .../validation/GrpcValidationViolation.java | 0 .../grpc/admin/GrpcDrainCoordinatorTest.java | 2 +- .../GrpcPlatformSnapshotServiceTest.java | 2 +- .../grpc/admin/GrpcReflectionPolicyTest.java | 0 .../admin/GrpcServiceHealthRegistryTest.java | 4 +- .../GrpcChannelRuntimeRegistryTest.java | 0 .../client/GrpcClientMetadataPolicyTest.java | 2 +- .../client/GrpcNamedChannelProfileTest.java | 0 .../grpc/client/GrpcTypedStubFactoryTest.java | 2 +- .../grpc/context/GrpcContextBinderTest.java | 2 +- .../GrpcCancellationCoordinatorTest.java | 0 .../deadline/GrpcDeadlineCalculatorTest.java | 4 +- .../GrpcDiscoveryPolicyValidatorTest.java | 0 .../discovery/GrpcKubernetesProfileTest.java | 0 .../grpc/error/GrpcErrorMapperTest.java | 2 +- .../GrpcCompletionReconcilerTest.java | 2 +- .../GrpcIdempotencyInterceptorTest.java | 4 +- .../GrpcOutcomeReplayBoundTest.java | 0 .../policy/GrpcPayloadBoundaryPolicyTest.java | 0 .../resilience/GrpcRetryEligibilityTest.java | 6 +- .../GrpcRetryOwnershipValidatorTest.java | 8 +- .../GrpcWaitForReadyValidatorTest.java | 2 +- .../GrpcCredentialRotationManagerTest.java | 19 +- .../grpc/security/GrpcTlsProfileTest.java | 2 +- .../server/GrpcAdmissionControllerTest.java | 0 .../server/GrpcNettyVariantSelectorTest.java | 0 .../GrpcServerInterceptorOrderTest.java | 0 .../grpc/server/GrpcServerProfileTest.java | 0 .../grpc/server/GrpcServiceAdapterTest.java | 2 +- .../streaming/GrpcFlowControlPolicyTest.java | 0 .../streaming/GrpcResumeTokenCodecTest.java | 0 .../GrpcSerializedStreamWriterTest.java | 0 .../GrpcStreamAdmissionConcurrencyTest.java | 0 .../streaming/GrpcStreamEnvelopeTest.java | 12 - .../GrpcStreamLifetimePolicyTest.java | 0 .../GrpcValidationInterceptorTest.java | 2 +- grpc/grpc-server/build.gradle | 17 - grpc/grpc-server/gradle.lockfile | 91 ---- grpc/grpc-spring-boot-starter/build.gradle | 13 +- .../boot/GrpcPlatformAutoConfiguration.java | 22 +- .../boot/GrpcPlatformStartupValidator.java | 28 +- .../GrpcPlatformStartupValidatorTest.java | 79 +++- grpc/grpc-testkit/build.gradle | 8 +- .../grpc/release/GrpcStableReleaseGate.java | 12 +- .../performance/GrpcPerformanceLaneTest.java | 4 +- .../release/GrpcStableReleaseGateTest.java | 11 +- .../GrpcInProcessContractFixtureTest.java | 4 +- .../testkit/GrpcNettyContractProfileTest.java | 4 +- .../testkit/GrpcPackageOwnershipTest.java | 2 +- .../GrpcTransportEvidenceClassifierTest.java | 6 +- .../GrpcUnaryReliabilityContractTest.java | 6 +- 299 files changed, 563 insertions(+), 3368 deletions(-) delete mode 100644 grpc-advanced/grpc-advanced-bootstrap/build.gradle delete mode 100644 grpc-advanced/grpc-advanced-bootstrap/gradle.lockfile rename grpc-advanced/grpc-advanced-compat/src/{main => test}/resources/envoy/envoy.yaml (100%) delete mode 100644 grpc-advanced/grpc-advanced-diagnostics/build.gradle delete mode 100644 grpc-advanced/grpc-advanced-edition/build.gradle delete mode 100644 grpc-advanced/grpc-advanced-resilience/build.gradle delete mode 100644 grpc-advanced/grpc-advanced-streaming/build.gradle delete mode 100644 grpc-advanced/grpc-advanced-streaming/gradle.lockfile create mode 100644 grpc-advanced/grpc-advanced/build.gradle rename grpc-advanced/{grpc-advanced-diagnostics => grpc-advanced}/gradle.lockfile (100%) rename grpc-advanced/{grpc-advanced-bootstrap => grpc-advanced}/src/main/java/dev/caskeleton/grpc/advanced/bootstrap/GrpcAdvancedCapability.java (100%) rename grpc-advanced/{grpc-advanced-bootstrap => grpc-advanced}/src/main/java/dev/caskeleton/grpc/advanced/bootstrap/GrpcAdvancedCapabilityDisabledException.java (100%) rename grpc-advanced/{grpc-advanced-bootstrap => grpc-advanced}/src/main/java/dev/caskeleton/grpc/advanced/bootstrap/GrpcAdvancedFeatureFlags.java (100%) rename grpc-advanced/{grpc-advanced-bootstrap => grpc-advanced}/src/main/java/dev/caskeleton/grpc/advanced/bootstrap/GrpcAdvancedModuleGuard.java (100%) rename grpc-advanced/{grpc-advanced-bootstrap => grpc-advanced}/src/main/java/dev/caskeleton/grpc/advanced/bootstrap/GrpcCapabilityGrade.java (100%) rename grpc-advanced/{grpc-advanced-diagnostics => grpc-advanced}/src/main/java/dev/caskeleton/grpc/advanced/diagnostics/GrpcChannelDiagnosticsPolicy.java (100%) rename grpc-advanced/{grpc-advanced-diagnostics => grpc-advanced}/src/main/java/dev/caskeleton/grpc/advanced/diagnostics/GrpcChannelDiagnosticsSnapshot.java (100%) rename grpc-advanced/{grpc-advanced-diagnostics => grpc-advanced}/src/main/java/dev/caskeleton/grpc/advanced/diagnostics/GrpcDiagnosticsRedactor.java (100%) rename grpc-advanced/{grpc-advanced-resilience => grpc-advanced}/src/main/java/dev/caskeleton/grpc/advanced/discovery/GrpcCustomResolver.java (100%) rename grpc-advanced/{grpc-advanced-resilience => grpc-advanced}/src/main/java/dev/caskeleton/grpc/advanced/discovery/GrpcEndpointCandidate.java (100%) rename grpc-advanced/{grpc-advanced-resilience => grpc-advanced}/src/main/java/dev/caskeleton/grpc/advanced/discovery/GrpcEndpointSnapshot.java (100%) rename grpc-advanced/{grpc-advanced-resilience => grpc-advanced}/src/main/java/dev/caskeleton/grpc/advanced/discovery/GrpcLoadBalancerDecision.java (100%) rename grpc-advanced/{grpc-advanced-resilience => grpc-advanced}/src/main/java/dev/caskeleton/grpc/advanced/discovery/GrpcLoadBalancerPicker.java (100%) rename grpc-advanced/{grpc-advanced-resilience => grpc-advanced}/src/main/java/dev/caskeleton/grpc/advanced/discovery/GrpcLoadBalancerSafetyPolicy.java (100%) rename grpc-advanced/{grpc-advanced-resilience => grpc-advanced}/src/main/java/dev/caskeleton/grpc/advanced/discovery/GrpcResolverSafetyPolicy.java (100%) rename grpc-advanced/{grpc-advanced-resilience => grpc-advanced}/src/main/java/dev/caskeleton/grpc/advanced/discovery/GrpcResolverUpdate.java (100%) rename grpc-advanced/{grpc-advanced-edition => grpc-advanced}/src/main/java/dev/caskeleton/grpc/advanced/edition/GrpcEdition2024Policy.java (100%) rename grpc-advanced/{grpc-advanced-edition => grpc-advanced}/src/main/java/dev/caskeleton/grpc/advanced/edition/GrpcEdition2026Status.java (100%) rename grpc-advanced/{grpc-advanced-edition => grpc-advanced}/src/main/java/dev/caskeleton/grpc/advanced/edition/GrpcEdition2026WatchReport.java (100%) rename grpc-advanced/{grpc-advanced-edition => grpc-advanced}/src/main/java/dev/caskeleton/grpc/advanced/edition/GrpcEditionCompatibilityReport.java (100%) rename grpc-advanced/{grpc-advanced-bootstrap => grpc-advanced}/src/main/java/dev/caskeleton/grpc/advanced/release/GrpcAdvancedPromotionDecision.java (100%) rename grpc-advanced/{grpc-advanced-bootstrap => grpc-advanced}/src/main/java/dev/caskeleton/grpc/advanced/release/GrpcAdvancedPromotionEvidence.java (100%) rename grpc-advanced/{grpc-advanced-bootstrap => grpc-advanced}/src/main/java/dev/caskeleton/grpc/advanced/release/GrpcAdvancedPromotionGate.java (100%) rename grpc-advanced/{grpc-advanced-bootstrap => grpc-advanced}/src/main/java/dev/caskeleton/grpc/advanced/release/GrpcAdvancedSupportMatrix.java (100%) rename grpc-advanced/{grpc-advanced-resilience => grpc-advanced}/src/main/java/dev/caskeleton/grpc/advanced/resilience/GrpcHedgingBudget.java (100%) rename grpc-advanced/{grpc-advanced-resilience => grpc-advanced}/src/main/java/dev/caskeleton/grpc/advanced/resilience/GrpcHedgingEligibility.java (100%) rename grpc-advanced/{grpc-advanced-resilience => grpc-advanced}/src/main/java/dev/caskeleton/grpc/advanced/resilience/GrpcHedgingPolicy.java (100%) rename grpc-advanced/{grpc-advanced-resilience => grpc-advanced}/src/main/java/dev/caskeleton/grpc/advanced/resilience/GrpcHedgingResult.java (100%) rename grpc-advanced/{grpc-advanced-streaming => grpc-advanced}/src/main/java/dev/caskeleton/grpc/advanced/streaming/GrpcBidiDirectionState.java (100%) rename grpc-advanced/{grpc-advanced-streaming => grpc-advanced}/src/main/java/dev/caskeleton/grpc/advanced/streaming/GrpcBidiResumeState.java (100%) rename grpc-advanced/{grpc-advanced-streaming => grpc-advanced}/src/main/java/dev/caskeleton/grpc/advanced/streaming/GrpcBidiSequenceTracker.java (100%) rename grpc-advanced/{grpc-advanced-streaming => grpc-advanced}/src/main/java/dev/caskeleton/grpc/advanced/streaming/GrpcBidiSession.java (100%) rename grpc-advanced/{grpc-advanced-streaming => grpc-advanced}/src/main/java/dev/caskeleton/grpc/advanced/streaming/GrpcClientMessageDeduplicator.java (100%) rename grpc-advanced/{grpc-advanced-streaming => grpc-advanced}/src/main/java/dev/caskeleton/grpc/advanced/streaming/GrpcClientStreamCheckpoint.java (100%) rename grpc-advanced/{grpc-advanced-streaming => grpc-advanced}/src/main/java/dev/caskeleton/grpc/advanced/streaming/GrpcClientStreamMessage.java (100%) rename grpc-advanced/{grpc-advanced-streaming => grpc-advanced}/src/main/java/dev/caskeleton/grpc/advanced/streaming/GrpcClientStreamPolicy.java (100%) rename grpc-advanced/{grpc-advanced-streaming => grpc-advanced}/src/main/java/dev/caskeleton/grpc/advanced/streaming/GrpcClientStreamResumeDecision.java (100%) rename grpc-advanced/{grpc-advanced-streaming => grpc-advanced}/src/main/java/dev/caskeleton/grpc/advanced/streaming/GrpcClientStreamSessionId.java (100%) rename grpc-advanced/{grpc-advanced-streaming => grpc-advanced}/src/main/java/dev/caskeleton/grpc/advanced/streaming/GrpcClientStreamState.java (100%) rename grpc-advanced/{grpc-advanced-streaming => grpc-advanced}/src/main/java/dev/caskeleton/grpc/advanced/streaming/GrpcDemandController.java (100%) rename grpc-advanced/{grpc-advanced-streaming => grpc-advanced}/src/main/java/dev/caskeleton/grpc/advanced/streaming/GrpcDemandDecision.java (100%) rename grpc-advanced/{grpc-advanced-streaming => grpc-advanced}/src/main/java/dev/caskeleton/grpc/advanced/streaming/GrpcManualFlowControlPolicy.java (100%) rename grpc-advanced/{grpc-advanced-resilience => grpc-advanced}/src/main/java/dev/caskeleton/grpc/advanced/xds/GrpcXdsFailurePolicy.java (100%) rename grpc-advanced/{grpc-advanced-resilience => grpc-advanced}/src/main/java/dev/caskeleton/grpc/advanced/xds/GrpcXdsProfile.java (100%) rename grpc-advanced/{grpc-advanced-resilience => grpc-advanced}/src/main/java/dev/caskeleton/grpc/advanced/xds/GrpcXdsResourceSnapshot.java (100%) rename grpc-advanced/{grpc-advanced-bootstrap => grpc-advanced}/src/test/java/dev/caskeleton/grpc/advanced/bootstrap/GrpcAdvancedModuleGuardTest.java (100%) rename grpc-advanced/{grpc-advanced-diagnostics => grpc-advanced}/src/test/java/dev/caskeleton/grpc/advanced/diagnostics/GrpcChannelDiagnosticsPolicyTest.java (100%) rename grpc-advanced/{grpc-advanced-diagnostics => grpc-advanced}/src/test/java/dev/caskeleton/grpc/advanced/diagnostics/GrpcDiagnosticsRedactorIdempotenceTest.java (100%) rename grpc-advanced/{grpc-advanced-edition => grpc-advanced}/src/test/java/dev/caskeleton/grpc/advanced/edition/GrpcEdition2024PolicyTest.java (82%) rename grpc-advanced/{grpc-advanced-edition => grpc-advanced}/src/test/java/dev/caskeleton/grpc/advanced/edition/GrpcEdition2026WatchReportTest.java (100%) rename grpc-advanced/{grpc-advanced-bootstrap => grpc-advanced}/src/test/java/dev/caskeleton/grpc/advanced/release/GrpcAdvancedPromotionGateTest.java (100%) rename grpc-advanced/{grpc-advanced-resilience => grpc-advanced}/src/test/java/dev/caskeleton/grpc/advanced/resilience/GrpcHedgingEligibilityTest.java (96%) rename grpc-advanced/{grpc-advanced-resilience => grpc-advanced}/src/test/java/dev/caskeleton/grpc/advanced/resilience/GrpcLoadBalancerSafetyPolicyTest.java (100%) rename grpc-advanced/{grpc-advanced-resilience => grpc-advanced}/src/test/java/dev/caskeleton/grpc/advanced/resilience/GrpcResolverSafetyPolicyTest.java (100%) rename grpc-advanced/{grpc-advanced-resilience => grpc-advanced}/src/test/java/dev/caskeleton/grpc/advanced/resilience/GrpcXdsProfileTest.java (98%) rename grpc-advanced/{grpc-advanced-streaming => grpc-advanced}/src/test/java/dev/caskeleton/grpc/advanced/streaming/GrpcBidiSequenceTrackerTest.java (100%) rename grpc-advanced/{grpc-advanced-streaming => grpc-advanced}/src/test/java/dev/caskeleton/grpc/advanced/streaming/GrpcClientMessageDeduplicatorTest.java (100%) rename grpc-advanced/{grpc-advanced-streaming => grpc-advanced}/src/test/java/dev/caskeleton/grpc/advanced/streaming/GrpcClientStreamPolicyTest.java (100%) rename grpc-advanced/{grpc-advanced-streaming => grpc-advanced}/src/test/java/dev/caskeleton/grpc/advanced/streaming/GrpcDemandControllerTest.java (100%) rename grpc-advanced/{grpc-advanced-edition/src/main => grpc-advanced/src/test}/resources/proto/edition2024/compatibility.proto (90%) rename grpc-advanced/{grpc-advanced-diagnostics => grpc-advanced}/src/test/resources/xds/control-plane-snapshot.json (100%) delete mode 100644 grpc/grpc-admin/build.gradle delete mode 100644 grpc/grpc-admin/gradle.lockfile delete mode 100644 grpc/grpc-client/build.gradle delete mode 100644 grpc/grpc-client/gradle.lockfile delete mode 100644 grpc/grpc-codegen/build.gradle delete mode 100644 grpc/grpc-codegen/gradle.lockfile delete mode 100644 grpc/grpc-codegen/src/main/java/dev/caskeleton/grpc/codegen/GrpcBreakingCategory.java delete mode 100644 grpc/grpc-codegen/src/main/java/dev/caskeleton/grpc/codegen/GrpcBufPolicy.java delete mode 100644 grpc/grpc-codegen/src/main/java/dev/caskeleton/grpc/codegen/GrpcCodegenManifest.java delete mode 100644 grpc/grpc-codegen/src/main/java/dev/caskeleton/grpc/codegen/GrpcCodegenOutput.java delete mode 100644 grpc/grpc-codegen/src/main/java/dev/caskeleton/grpc/codegen/GrpcConsumerFixture.java delete mode 100644 grpc/grpc-codegen/src/main/java/dev/caskeleton/grpc/codegen/GrpcDescriptorArtifact.java delete mode 100644 grpc/grpc-codegen/src/main/java/dev/caskeleton/grpc/codegen/GrpcGeneratedPackagePolicy.java delete mode 100644 grpc/grpc-codegen/src/main/java/dev/caskeleton/grpc/codegen/GrpcSchemaArtifactPublisher.java delete mode 100644 grpc/grpc-codegen/src/main/java/dev/caskeleton/grpc/codegen/GrpcSchemaBaseline.java delete mode 100644 grpc/grpc-codegen/src/test/java/dev/caskeleton/grpc/codegen/GrpcBufPolicyTest.java delete mode 100644 grpc/grpc-codegen/src/test/java/dev/caskeleton/grpc/codegen/GrpcCodegenManifestTest.java delete mode 100644 grpc/grpc-codegen/src/test/java/dev/caskeleton/grpc/codegen/GrpcDescriptorArtifactTest.java delete mode 100644 grpc/grpc-codegen/src/test/resources/consumer-fixtures/v1/build.gradle.kts delete mode 100644 grpc/grpc-codegen/src/test/resources/consumer-fixtures/v1/src/main/java/fixture/DocumentClientFixture.java create mode 100644 grpc/grpc-contract/buf.yaml create mode 100644 grpc/grpc-contract/build.gradle rename {grpc-advanced/grpc-advanced-edition => grpc/grpc-contract}/gradle.lockfile (83%) rename grpc/{grpc-proto-contract/src/main/resources/proto/hyeonworks => grpc-contract/src/main/proto/caskeleton}/grpc/common/v1/error.proto (95%) rename grpc/{grpc-proto-contract/src/main/resources/proto/hyeonworks => grpc-contract/src/main/proto/caskeleton}/grpc/common/v1/stream.proto (95%) create mode 100644 grpc/grpc-contract/src/test/java/dev/caskeleton/grpc/contract/GrpcContractGeneratedCodeTest.java create mode 100644 grpc/grpc-core-api/src/main/java/dev/caskeleton/grpc/api/policy/GrpcTransportLimits.java delete mode 100644 grpc/grpc-discovery/build.gradle delete mode 100644 grpc/grpc-discovery/gradle.lockfile delete mode 100644 grpc/grpc-policy/build.gradle delete mode 100644 grpc/grpc-policy/gradle.lockfile delete mode 100644 grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/streaming/GrpcStreamProfile.java delete mode 100644 grpc/grpc-proto-contract/build.gradle delete mode 100644 grpc/grpc-proto-contract/gradle.lockfile delete mode 100644 grpc/grpc-proto-contract/src/main/java/dev/caskeleton/grpc/contract/GrpcProtoContractValidator.java delete mode 100644 grpc/grpc-proto-contract/src/main/java/dev/caskeleton/grpc/contract/GrpcProtoRuleViolation.java delete mode 100644 grpc/grpc-proto-contract/src/main/java/dev/caskeleton/grpc/contract/GrpcProtoStyleManifest.java delete mode 100644 grpc/grpc-proto-contract/src/main/resources/proto/buf.gen.yaml delete mode 100644 grpc/grpc-proto-contract/src/main/resources/proto/buf.lock delete mode 100644 grpc/grpc-proto-contract/src/main/resources/proto/buf.yaml delete mode 100644 grpc/grpc-proto-contract/src/test/java/dev/caskeleton/grpc/contract/GrpcProtoContractValidatorTest.java create mode 100644 grpc/grpc-runtime/build.gradle rename {grpc-advanced/grpc-advanced-resilience => grpc/grpc-runtime}/gradle.lockfile (100%) rename grpc/{grpc-admin => grpc-runtime}/src/main/java/dev/caskeleton/grpc/admin/GrpcAdminExposurePolicy.java (100%) rename grpc/{grpc-admin => grpc-runtime}/src/main/java/dev/caskeleton/grpc/admin/GrpcDrainCoordinator.java (100%) rename grpc/{grpc-admin => grpc-runtime}/src/main/java/dev/caskeleton/grpc/admin/GrpcDrainPhase.java (100%) rename grpc/{grpc-admin => grpc-runtime}/src/main/java/dev/caskeleton/grpc/admin/GrpcDrainPolicy.java (100%) rename grpc/{grpc-admin => grpc-runtime}/src/main/java/dev/caskeleton/grpc/admin/GrpcDrainResult.java (100%) rename grpc/{grpc-admin => grpc-runtime}/src/main/java/dev/caskeleton/grpc/admin/GrpcHealthPolicy.java (100%) rename grpc/{grpc-admin => grpc-runtime}/src/main/java/dev/caskeleton/grpc/admin/GrpcHealthState.java (100%) rename grpc/{grpc-admin => grpc-runtime}/src/main/java/dev/caskeleton/grpc/admin/GrpcPlatformSnapshot.java (100%) rename grpc/{grpc-admin => grpc-runtime}/src/main/java/dev/caskeleton/grpc/admin/GrpcPlatformSnapshotService.java (100%) rename grpc/{grpc-admin => grpc-runtime}/src/main/java/dev/caskeleton/grpc/admin/GrpcReflectionAccessDecision.java (100%) rename grpc/{grpc-admin => grpc-runtime}/src/main/java/dev/caskeleton/grpc/admin/GrpcReflectionMode.java (100%) rename grpc/{grpc-admin => grpc-runtime}/src/main/java/dev/caskeleton/grpc/admin/GrpcReflectionPolicy.java (100%) rename grpc/{grpc-admin => grpc-runtime}/src/main/java/dev/caskeleton/grpc/admin/GrpcServiceHealthRegistry.java (100%) rename grpc/{grpc-client => grpc-runtime}/src/main/java/dev/caskeleton/grpc/client/GrpcCallCredentialProvider.java (100%) rename grpc/{grpc-client => grpc-runtime}/src/main/java/dev/caskeleton/grpc/client/GrpcChannelDrainPolicy.java (100%) rename grpc/{grpc-client => grpc-runtime}/src/main/java/dev/caskeleton/grpc/client/GrpcChannelGeneration.java (100%) rename grpc/{grpc-client => grpc-runtime}/src/main/java/dev/caskeleton/grpc/client/GrpcChannelProfileValidator.java (100%) rename grpc/{grpc-client => grpc-runtime}/src/main/java/dev/caskeleton/grpc/client/GrpcChannelRuntime.java (100%) rename grpc/{grpc-client => grpc-runtime}/src/main/java/dev/caskeleton/grpc/client/GrpcChannelRuntimeRegistry.java (100%) rename grpc/{grpc-client => grpc-runtime}/src/main/java/dev/caskeleton/grpc/client/GrpcClientCallContext.java (100%) rename grpc/{grpc-client => grpc-runtime}/src/main/java/dev/caskeleton/grpc/client/GrpcClientMetadataPolicy.java (100%) rename grpc/{grpc-client => grpc-runtime}/src/main/java/dev/caskeleton/grpc/client/GrpcLoadBalancingPolicy.java (100%) rename grpc/{grpc-client => grpc-runtime}/src/main/java/dev/caskeleton/grpc/client/GrpcNamedChannelProfile.java (93%) rename grpc/{grpc-client => grpc-runtime}/src/main/java/dev/caskeleton/grpc/client/GrpcStubDescriptor.java (100%) rename grpc/{grpc-client => grpc-runtime}/src/main/java/dev/caskeleton/grpc/client/GrpcStubPolicyApplier.java (100%) rename grpc/{grpc-client => grpc-runtime}/src/main/java/dev/caskeleton/grpc/client/GrpcTypedStubFactory.java (100%) rename grpc/{grpc-policy => grpc-runtime}/src/main/java/dev/caskeleton/grpc/context/GrpcContextBinder.java (100%) rename grpc/{grpc-policy => grpc-runtime}/src/main/java/dev/caskeleton/grpc/context/GrpcContextPropagationPolicy.java (100%) rename grpc/{grpc-policy => grpc-runtime}/src/main/java/dev/caskeleton/grpc/context/GrpcContextSnapshot.java (100%) rename grpc/{grpc-policy => grpc-runtime}/src/main/java/dev/caskeleton/grpc/deadline/GrpcCancellableOperation.java (100%) rename grpc/{grpc-policy => grpc-runtime}/src/main/java/dev/caskeleton/grpc/deadline/GrpcCancellationCoordinator.java (100%) rename grpc/{grpc-policy => grpc-runtime}/src/main/java/dev/caskeleton/grpc/deadline/GrpcCancellationReason.java (100%) rename grpc/{grpc-policy => grpc-runtime}/src/main/java/dev/caskeleton/grpc/deadline/GrpcDeadlineCalculator.java (100%) rename grpc/{grpc-policy => grpc-runtime}/src/main/java/dev/caskeleton/grpc/deadline/GrpcDeadlinePolicyValidator.java (100%) rename grpc/{grpc-policy => grpc-runtime}/src/main/java/dev/caskeleton/grpc/deadline/GrpcDependencyBudget.java (100%) rename grpc/{grpc-discovery => grpc-runtime}/src/main/java/dev/caskeleton/grpc/discovery/GrpcDiscoveryPolicyValidator.java (100%) rename grpc/{grpc-discovery => grpc-runtime}/src/main/java/dev/caskeleton/grpc/discovery/GrpcKubernetesProfile.java (100%) rename grpc/{grpc-discovery => grpc-runtime}/src/main/java/dev/caskeleton/grpc/discovery/GrpcKubernetesProfileValidator.java (100%) rename grpc/{grpc-discovery => grpc-runtime}/src/main/java/dev/caskeleton/grpc/discovery/GrpcKubernetesRoutingMode.java (100%) rename grpc/{grpc-discovery => grpc-runtime}/src/main/java/dev/caskeleton/grpc/discovery/GrpcResolverProfile.java (100%) rename grpc/{grpc-discovery => grpc-runtime}/src/main/java/dev/caskeleton/grpc/discovery/GrpcResolverType.java (100%) rename grpc/{grpc-discovery => grpc-runtime}/src/main/java/dev/caskeleton/grpc/discovery/GrpcStableLoadBalancer.java (100%) rename grpc/{grpc-policy => grpc-runtime}/src/main/java/dev/caskeleton/grpc/error/GrpcErrorExposurePolicy.java (100%) rename grpc/{grpc-policy => grpc-runtime}/src/main/java/dev/caskeleton/grpc/error/GrpcErrorMapper.java (100%) rename grpc/{grpc-policy => grpc-runtime}/src/main/java/dev/caskeleton/grpc/error/GrpcRichErrorDetail.java (100%) rename grpc/{grpc-policy => grpc-runtime}/src/main/java/dev/caskeleton/grpc/error/GrpcStatusMapping.java (100%) rename grpc/{grpc-policy => grpc-runtime}/src/main/java/dev/caskeleton/grpc/idempotency/GrpcCompletionReconciler.java (100%) rename grpc/{grpc-policy => grpc-runtime}/src/main/java/dev/caskeleton/grpc/idempotency/GrpcCompletionResolution.java (100%) rename grpc/{grpc-policy => grpc-runtime}/src/main/java/dev/caskeleton/grpc/idempotency/GrpcIdempotencyDecision.java (100%) rename grpc/{grpc-policy => grpc-runtime}/src/main/java/dev/caskeleton/grpc/idempotency/GrpcIdempotencyInterceptor.java (100%) rename grpc/{grpc-policy => grpc-runtime}/src/main/java/dev/caskeleton/grpc/idempotency/GrpcOperationStatus.java (100%) rename grpc/{grpc-policy => grpc-runtime}/src/main/java/dev/caskeleton/grpc/idempotency/GrpcOperationStatusQuery.java (100%) rename grpc/{grpc-policy => grpc-runtime}/src/main/java/dev/caskeleton/grpc/idempotency/GrpcOutcomeReplay.java (100%) rename grpc/{grpc-policy => grpc-runtime}/src/main/java/dev/caskeleton/grpc/idempotency/GrpcRequestFingerprint.java (100%) rename grpc/{grpc-policy => grpc-runtime}/src/main/java/dev/caskeleton/grpc/policy/GrpcCompressionProfile.java (100%) rename grpc/{grpc-policy => grpc-runtime}/src/main/java/dev/caskeleton/grpc/policy/GrpcMessageSizeProfile.java (85%) rename grpc/{grpc-policy => grpc-runtime}/src/main/java/dev/caskeleton/grpc/policy/GrpcPayloadBoundaryPolicy.java (100%) rename grpc/{grpc-policy => grpc-runtime}/src/main/java/dev/caskeleton/grpc/policy/GrpcSizeViolation.java (100%) rename grpc/{grpc-policy => grpc-runtime}/src/main/java/dev/caskeleton/grpc/resilience/GrpcMethodRetryConfig.java (100%) rename grpc/{grpc-policy => grpc-runtime}/src/main/java/dev/caskeleton/grpc/resilience/GrpcRetryBudget.java (100%) rename grpc/{grpc-policy => grpc-runtime}/src/main/java/dev/caskeleton/grpc/resilience/GrpcRetryCoordinator.java (100%) rename grpc/{grpc-policy => grpc-runtime}/src/main/java/dev/caskeleton/grpc/resilience/GrpcRetryDecision.java (100%) rename grpc/{grpc-policy => grpc-runtime}/src/main/java/dev/caskeleton/grpc/resilience/GrpcRetryEligibility.java (100%) rename grpc/{grpc-policy => grpc-runtime}/src/main/java/dev/caskeleton/grpc/resilience/GrpcRetryOwner.java (100%) rename grpc/{grpc-policy => grpc-runtime}/src/main/java/dev/caskeleton/grpc/resilience/GrpcRetryOwnershipValidator.java (100%) rename grpc/{grpc-policy => grpc-runtime}/src/main/java/dev/caskeleton/grpc/resilience/GrpcServiceConfigPolicy.java (100%) rename grpc/{grpc-policy => grpc-runtime}/src/main/java/dev/caskeleton/grpc/resilience/GrpcWaitForReadyDecision.java (100%) rename grpc/{grpc-policy => grpc-runtime}/src/main/java/dev/caskeleton/grpc/resilience/GrpcWaitForReadyProfile.java (100%) rename grpc/{grpc-policy => grpc-runtime}/src/main/java/dev/caskeleton/grpc/resilience/GrpcWaitForReadyValidator.java (100%) rename grpc/{grpc-policy => grpc-runtime}/src/main/java/dev/caskeleton/grpc/security/GrpcAuthenticationProfile.java (100%) rename grpc/{grpc-policy => grpc-runtime}/src/main/java/dev/caskeleton/grpc/security/GrpcCredentialGeneration.java (100%) rename grpc/{grpc-policy => grpc-runtime}/src/main/java/dev/caskeleton/grpc/security/GrpcCredentialRotationManager.java (83%) rename grpc/{grpc-policy => grpc-runtime}/src/main/java/dev/caskeleton/grpc/security/GrpcTlsProfile.java (100%) rename grpc/{grpc-server => grpc-runtime}/src/main/java/dev/caskeleton/grpc/server/GrpcAdmissionController.java (100%) rename grpc/{grpc-server => grpc-runtime}/src/main/java/dev/caskeleton/grpc/server/GrpcApplicationInvocation.java (100%) rename grpc/{grpc-server => grpc-runtime}/src/main/java/dev/caskeleton/grpc/server/GrpcExecutorProfile.java (100%) rename grpc/{grpc-server => grpc-runtime}/src/main/java/dev/caskeleton/grpc/server/GrpcNettyParityContract.java (100%) rename grpc/{grpc-server => grpc-runtime}/src/main/java/dev/caskeleton/grpc/server/GrpcNettyVariant.java (100%) rename grpc/{grpc-server => grpc-runtime}/src/main/java/dev/caskeleton/grpc/server/GrpcNettyVariantSelector.java (100%) rename grpc/{grpc-server => grpc-runtime}/src/main/java/dev/caskeleton/grpc/server/GrpcResponseMapper.java (100%) rename grpc/{grpc-server => grpc-runtime}/src/main/java/dev/caskeleton/grpc/server/GrpcServerInterceptorChain.java (100%) rename grpc/{grpc-server => grpc-runtime}/src/main/java/dev/caskeleton/grpc/server/GrpcServerInterceptorOrder.java (100%) rename grpc/{grpc-server => grpc-runtime}/src/main/java/dev/caskeleton/grpc/server/GrpcServerInterceptorStage.java (100%) rename grpc/{grpc-server => grpc-runtime}/src/main/java/dev/caskeleton/grpc/server/GrpcServerProfile.java (85%) rename grpc/{grpc-server => grpc-runtime}/src/main/java/dev/caskeleton/grpc/server/GrpcServerTransport.java (100%) rename grpc/{grpc-server => grpc-runtime}/src/main/java/dev/caskeleton/grpc/server/GrpcServiceAdapter.java (100%) rename grpc/{grpc-server => grpc-runtime}/src/main/java/dev/caskeleton/grpc/server/GrpcServiceAdapterDescriptor.java (100%) rename grpc/{grpc-policy => grpc-runtime}/src/main/java/dev/caskeleton/grpc/streaming/GrpcFlowControlDecision.java (100%) rename grpc/{grpc-policy => grpc-runtime}/src/main/java/dev/caskeleton/grpc/streaming/GrpcFlowControlPolicy.java (100%) rename grpc/{grpc-policy => grpc-runtime}/src/main/java/dev/caskeleton/grpc/streaming/GrpcResumeDecision.java (100%) rename grpc/{grpc-policy => grpc-runtime}/src/main/java/dev/caskeleton/grpc/streaming/GrpcResumeToken.java (100%) rename grpc/{grpc-policy => grpc-runtime}/src/main/java/dev/caskeleton/grpc/streaming/GrpcResumeTokenCodec.java (100%) rename grpc/{grpc-policy => grpc-runtime}/src/main/java/dev/caskeleton/grpc/streaming/GrpcSerializedStreamWriter.java (100%) rename grpc/{grpc-policy => grpc-runtime}/src/main/java/dev/caskeleton/grpc/streaming/GrpcSlowConsumerPolicy.java (100%) rename grpc/{grpc-policy => grpc-runtime}/src/main/java/dev/caskeleton/grpc/streaming/GrpcStreamAdmission.java (100%) rename grpc/{grpc-policy => grpc-runtime}/src/main/java/dev/caskeleton/grpc/streaming/GrpcStreamEnvelope.java (100%) rename grpc/{grpc-policy => grpc-runtime}/src/main/java/dev/caskeleton/grpc/streaming/GrpcStreamGapDetector.java (100%) rename grpc/{grpc-policy => grpc-runtime}/src/main/java/dev/caskeleton/grpc/streaming/GrpcStreamHeartbeat.java (100%) rename grpc/{grpc-policy => grpc-runtime}/src/main/java/dev/caskeleton/grpc/streaming/GrpcStreamId.java (100%) rename grpc/{grpc-policy => grpc-runtime}/src/main/java/dev/caskeleton/grpc/streaming/GrpcStreamLifecycleCoordinator.java (100%) rename grpc/{grpc-policy => grpc-runtime}/src/main/java/dev/caskeleton/grpc/streaming/GrpcStreamLifetimePolicy.java (100%) rename grpc/{grpc-policy => grpc-runtime}/src/main/java/dev/caskeleton/grpc/streaming/GrpcStreamSequence.java (100%) rename grpc/{grpc-policy => grpc-runtime}/src/main/java/dev/caskeleton/grpc/streaming/GrpcStreamTerminationReason.java (100%) rename grpc/{grpc-policy => grpc-runtime}/src/main/java/dev/caskeleton/grpc/streaming/GrpcStreamWriteResult.java (100%) rename grpc/{grpc-policy => grpc-runtime}/src/main/java/dev/caskeleton/grpc/streaming/GrpcStreamWriterState.java (100%) rename grpc/{grpc-policy => grpc-runtime}/src/main/java/dev/caskeleton/grpc/validation/GrpcTransportValidator.java (100%) rename grpc/{grpc-policy => grpc-runtime}/src/main/java/dev/caskeleton/grpc/validation/GrpcValidationInterceptor.java (100%) rename grpc/{grpc-policy => grpc-runtime}/src/main/java/dev/caskeleton/grpc/validation/GrpcValidationViolation.java (100%) rename grpc/{grpc-admin => grpc-runtime}/src/test/java/dev/caskeleton/grpc/admin/GrpcDrainCoordinatorTest.java (98%) rename grpc/{grpc-admin => grpc-runtime}/src/test/java/dev/caskeleton/grpc/admin/GrpcPlatformSnapshotServiceTest.java (98%) rename grpc/{grpc-admin => grpc-runtime}/src/test/java/dev/caskeleton/grpc/admin/GrpcReflectionPolicyTest.java (100%) rename grpc/{grpc-admin => grpc-runtime}/src/test/java/dev/caskeleton/grpc/admin/GrpcServiceHealthRegistryTest.java (97%) rename grpc/{grpc-client => grpc-runtime}/src/test/java/dev/caskeleton/grpc/client/GrpcChannelRuntimeRegistryTest.java (100%) rename grpc/{grpc-client => grpc-runtime}/src/test/java/dev/caskeleton/grpc/client/GrpcClientMetadataPolicyTest.java (99%) rename grpc/{grpc-client => grpc-runtime}/src/test/java/dev/caskeleton/grpc/client/GrpcNamedChannelProfileTest.java (100%) rename grpc/{grpc-client => grpc-runtime}/src/test/java/dev/caskeleton/grpc/client/GrpcTypedStubFactoryTest.java (98%) rename grpc/{grpc-policy => grpc-runtime}/src/test/java/dev/caskeleton/grpc/context/GrpcContextBinderTest.java (99%) rename grpc/{grpc-policy => grpc-runtime}/src/test/java/dev/caskeleton/grpc/deadline/GrpcCancellationCoordinatorTest.java (100%) rename grpc/{grpc-policy => grpc-runtime}/src/test/java/dev/caskeleton/grpc/deadline/GrpcDeadlineCalculatorTest.java (97%) rename grpc/{grpc-discovery => grpc-runtime}/src/test/java/dev/caskeleton/grpc/discovery/GrpcDiscoveryPolicyValidatorTest.java (100%) rename grpc/{grpc-discovery => grpc-runtime}/src/test/java/dev/caskeleton/grpc/discovery/GrpcKubernetesProfileTest.java (100%) rename grpc/{grpc-policy => grpc-runtime}/src/test/java/dev/caskeleton/grpc/error/GrpcErrorMapperTest.java (99%) rename grpc/{grpc-policy => grpc-runtime}/src/test/java/dev/caskeleton/grpc/idempotency/GrpcCompletionReconcilerTest.java (98%) rename grpc/{grpc-policy => grpc-runtime}/src/test/java/dev/caskeleton/grpc/idempotency/GrpcIdempotencyInterceptorTest.java (98%) rename grpc/{grpc-policy => grpc-runtime}/src/test/java/dev/caskeleton/grpc/idempotency/GrpcOutcomeReplayBoundTest.java (100%) rename grpc/{grpc-policy => grpc-runtime}/src/test/java/dev/caskeleton/grpc/policy/GrpcPayloadBoundaryPolicyTest.java (100%) rename grpc/{grpc-policy => grpc-runtime}/src/test/java/dev/caskeleton/grpc/resilience/GrpcRetryEligibilityTest.java (98%) rename grpc/{grpc-policy => grpc-runtime}/src/test/java/dev/caskeleton/grpc/resilience/GrpcRetryOwnershipValidatorTest.java (96%) rename grpc/{grpc-policy => grpc-runtime}/src/test/java/dev/caskeleton/grpc/resilience/GrpcWaitForReadyValidatorTest.java (98%) rename grpc/{grpc-policy => grpc-runtime}/src/test/java/dev/caskeleton/grpc/security/GrpcCredentialRotationManagerTest.java (81%) rename grpc/{grpc-policy => grpc-runtime}/src/test/java/dev/caskeleton/grpc/security/GrpcTlsProfileTest.java (99%) rename grpc/{grpc-server => grpc-runtime}/src/test/java/dev/caskeleton/grpc/server/GrpcAdmissionControllerTest.java (100%) rename grpc/{grpc-server => grpc-runtime}/src/test/java/dev/caskeleton/grpc/server/GrpcNettyVariantSelectorTest.java (100%) rename grpc/{grpc-server => grpc-runtime}/src/test/java/dev/caskeleton/grpc/server/GrpcServerInterceptorOrderTest.java (100%) rename grpc/{grpc-server => grpc-runtime}/src/test/java/dev/caskeleton/grpc/server/GrpcServerProfileTest.java (100%) rename grpc/{grpc-server => grpc-runtime}/src/test/java/dev/caskeleton/grpc/server/GrpcServiceAdapterTest.java (99%) rename grpc/{grpc-policy => grpc-runtime}/src/test/java/dev/caskeleton/grpc/streaming/GrpcFlowControlPolicyTest.java (100%) rename grpc/{grpc-policy => grpc-runtime}/src/test/java/dev/caskeleton/grpc/streaming/GrpcResumeTokenCodecTest.java (100%) rename grpc/{grpc-policy => grpc-runtime}/src/test/java/dev/caskeleton/grpc/streaming/GrpcSerializedStreamWriterTest.java (100%) rename grpc/{grpc-policy => grpc-runtime}/src/test/java/dev/caskeleton/grpc/streaming/GrpcStreamAdmissionConcurrencyTest.java (100%) rename grpc/{grpc-policy => grpc-runtime}/src/test/java/dev/caskeleton/grpc/streaming/GrpcStreamEnvelopeTest.java (88%) rename grpc/{grpc-policy => grpc-runtime}/src/test/java/dev/caskeleton/grpc/streaming/GrpcStreamLifetimePolicyTest.java (100%) rename grpc/{grpc-policy => grpc-runtime}/src/test/java/dev/caskeleton/grpc/validation/GrpcValidationInterceptorTest.java (99%) delete mode 100644 grpc/grpc-server/build.gradle delete mode 100644 grpc/grpc-server/gradle.lockfile diff --git a/README.md b/README.md index cbd11f3..cd6ddeb 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Optional gRPC platforms -The default application does not depend on `grpc/*` or `grpc-advanced/*`, so those 18 projects are -kept out of the main multi-project build. This build preserves their existing project paths and +The default application does not depend on `grpc/*` or `grpc-advanced/*`, so those projects (the +registry entries with `"build": "optional-grpc"`) are kept out of the main multi-project build. This build preserves their existing project paths and internal project dependencies while making their configuration opt-in. ```bash diff --git a/docs/adr/ADR-GRPC-002-schema-governance-without-protoc.md b/docs/adr/ADR-GRPC-002-schema-governance-without-protoc.md index 560d494..5e3b523 100644 --- a/docs/adr/ADR-GRPC-002-schema-governance-without-protoc.md +++ b/docs/adr/ADR-GRPC-002-schema-governance-without-protoc.md @@ -1,8 +1,17 @@ # ADR-GRPC-002: Schema governance runs without protoc and without the Buf CLI -- Status: accepted +- Status: **superseded (2026-09-28)** by owner decision 18 of the 2026-09-25 review follow-up - Date: 2026-08-30 -- Scope: `:grpc:grpc-proto-contract`, `:grpc:grpc-codegen` +- Scope: `:grpc:grpc-proto-contract`, `:grpc:grpc-codegen` (both removed) + +> **Superseded.** The regex `.proto` validator and the Java re-implementation of Buf's rules were +> deleted. The schema now lives in `:grpc:grpc-contract` (`src/grpc/grpc-contract/src/main/proto`), +> compiled by the Gradle protobuf plugin (`com.google.protobuf`, version pinned in +> `src/gradle/libs.versions.toml`; protoc and the protobuf-java runtime are both `protobufGrpc`). +> Generated sources are excluded from Spotless, Checkstyle and Error Prone in that leaf only. +> `buf lint` and `buf breaking` (`src/grpc/grpc-contract/buf.yaml`, STANDARD lint, FILE breaking) +> run in CI, job `grpc-proto-buf` in `.github/workflows/ci-quality-gates.yml`. The proto organization +> is `caskeleton` (was `hyeonworks`). The text below is kept as the record of the original decision. ## Context diff --git a/docs/adr/ADR-GRPC-003-three-axis-execution-evidence.md b/docs/adr/ADR-GRPC-003-three-axis-execution-evidence.md index aff2a68..e4f6d50 100644 --- a/docs/adr/ADR-GRPC-003-three-axis-execution-evidence.md +++ b/docs/adr/ADR-GRPC-003-three-axis-execution-evidence.md @@ -2,7 +2,7 @@ - Status: accepted - Date: 2026-08-30 -- Scope: `:grpc:grpc-core-api`, `:grpc:grpc-policy`, `:grpc:grpc-testkit` +- Scope: `:grpc:grpc-core-api`, `:grpc:grpc-runtime` (was `grpc-policy`), `:grpc:grpc-testkit` ## Context diff --git a/docs/adr/ADR-GRPC-004-retry-ownership-and-durable-idempotency.md b/docs/adr/ADR-GRPC-004-retry-ownership-and-durable-idempotency.md index dafadad..a7e2ebf 100644 --- a/docs/adr/ADR-GRPC-004-retry-ownership-and-durable-idempotency.md +++ b/docs/adr/ADR-GRPC-004-retry-ownership-and-durable-idempotency.md @@ -2,7 +2,7 @@ - Status: accepted - Date: 2026-08-30 -- Scope: `:grpc:grpc-policy`, `:grpc:grpc-operation-ledger-jpa`, `:grpc:grpc-core-api` +- Scope: `:grpc:grpc-runtime` (was `grpc-policy`), `:grpc:grpc-operation-ledger-jpa`, `:grpc:grpc-core-api` ## Context diff --git a/docs/adr/ADR-GRPC-005-server-streaming-single-writer-and-resume.md b/docs/adr/ADR-GRPC-005-server-streaming-single-writer-and-resume.md index e6d885d..b648be9 100644 --- a/docs/adr/ADR-GRPC-005-server-streaming-single-writer-and-resume.md +++ b/docs/adr/ADR-GRPC-005-server-streaming-single-writer-and-resume.md @@ -2,7 +2,7 @@ - Status: accepted - Date: 2026-08-30 -- Scope: `:grpc:grpc-policy` +- Scope: `:grpc:grpc-runtime` (was `grpc-policy`) ## Context diff --git a/docs/adr/ADR-GRPC-006-stable-discovery-and-kubernetes-routing.md b/docs/adr/ADR-GRPC-006-stable-discovery-and-kubernetes-routing.md index 135abd9..3be4e14 100644 --- a/docs/adr/ADR-GRPC-006-stable-discovery-and-kubernetes-routing.md +++ b/docs/adr/ADR-GRPC-006-stable-discovery-and-kubernetes-routing.md @@ -2,7 +2,7 @@ - Status: accepted - Date: 2026-08-31 -- Scope: `:grpc:grpc-discovery`, `:grpc:grpc-client` +- Scope: `:grpc:grpc-runtime` (was `grpc-discovery`, `grpc-client`) ## Context @@ -63,6 +63,6 @@ declaration is a wrong statement somebody wrote down, and a missing one is a que `GrpcChannelProfileValidator` takes resolved counts where they are known at startup and skips the check where they are not, rather than guessing and failing on a name that cannot be resolved yet. -**xDS is reachable, and not by this route.** It lives in `grpc-advanced-resilience` behind its +**xDS is reachable, and not by this route.** It lives in `grpc-advanced` (package `resilience`/`xds`) behind its capability flag and its production approval, and `GrpcXdsStartupGuard.advertisableAsStableSupport()` returns false so the Stable support statement cannot widen quietly. See ADR-GRPC-ADV-001. diff --git a/docs/compatibility/grpc-support-matrix.md b/docs/compatibility/grpc-support-matrix.md index ab646de..0300565 100644 --- a/docs/compatibility/grpc-support-matrix.md +++ b/docs/compatibility/grpc-support-matrix.md @@ -53,13 +53,13 @@ tested the adapter and not the transport. | | Where it lives | | --- | --- | -| Client streaming, bidirectional streaming | `grpc-advanced-streaming` | -| Manual flow control | `grpc-advanced-streaming` | -| Hedging | `grpc-advanced-resilience` | -| Custom name resolver, custom load balancer | `grpc-advanced-resilience` | -| xDS | `grpc-advanced-resilience` | +| Client streaming, bidirectional streaming | `grpc-advanced` (`streaming`) | +| Manual flow control | `grpc-advanced` (`streaming`) | +| Hedging | `grpc-advanced` (`resilience`) | +| Custom name resolver, custom load balancer | `grpc-advanced` (`resilience`) | +| xDS | `grpc-advanced` (`resilience`) | | gRPC-Web, Servlet HTTP/2, Spring Integration, Reactor, Kotlin | `grpc-advanced-compat` | -| Channelz / CSDS diagnostics | `grpc-advanced-diagnostics` | +| Channelz / CSDS diagnostics | `grpc-advanced` (`diagnostics`) | ## Current release status diff --git a/docs/design/2026-08-30-grpc-platform-adaptation-design.md b/docs/design/2026-08-30-grpc-platform-adaptation-design.md index 5ff42cc..c7f2c24 100644 --- a/docs/design/2026-08-30-grpc-platform-adaptation-design.md +++ b/docs/design/2026-08-30-grpc-platform-adaptation-design.md @@ -39,6 +39,13 @@ src/adapter/inbound/grpc 기존 인바운드 전송 어댑터 ( 원본 모듈 경계 중 **이 저장소가 이미 다른 메커니즘으로 표현하는 것**만 합친다. 능력(capability)은 하나도 버리지 않는다. +> **2026-09-28 변경(리뷰 후속 S7-#3·S7-#13, 소유자 결정 18).** 아래 두 표는 채택 당시의 leaf 구성이다. +> 현재는 `grpc-policy`·`grpc-server`·`grpc-client`·`grpc-discovery`·`grpc-admin` → `grpc-runtime`, +> `grpc-proto-contract`·`grpc-codegen` → `grpc-contract`(protobuf Gradle 플러그인 + CI의 Buf, D5/D6 폐기 — +> ADR-GRPC-002 superseded), `grpc-advanced-bootstrap`·`-edition`·`-streaming`·`-resilience`·`-diagnostics` +> → `grpc-advanced`로 합쳐졌다. `grpc-advanced-compat`은 그대로다. 패키지 이름은 바뀌지 않았다. 현재 +> leaf 목록은 registry(`src/config/architecture/modules.json`)가 SSOT다. + ### Stable — `src/grpc/` | leaf | 원본 모듈 | 담는 Task | 의존 | diff --git a/grpc-advanced/CLAUDE.md b/grpc-advanced/CLAUDE.md index aab663d..c051e62 100644 --- a/grpc-advanced/CLAUDE.md +++ b/grpc-advanced/CLAUDE.md @@ -37,14 +37,19 @@ property key는 `ca-skeleton.grpc.advanced..enabled`이고 전부 ## Leaf별 담당 capability -| leaf | capability | -| --- | --- | -| `grpc-advanced-bootstrap` | capability grade, feature flag, module guard, capability별 promotion gate | -| `grpc-advanced-edition` | Protobuf Edition 2024 opt-in lane, Edition 2026 watch lane | -| `grpc-advanced-streaming` | client streaming(session/dedup/checkpoint), bidi(dual sequence), manual flow control | -| `grpc-advanced-resilience` | read-only hedging, custom name resolver SPI, custom load balancer SPI, proxyless xDS | -| `grpc-advanced-compat` | gRPC-Web, Spring Integration bridge, Reactor adapter, Kotlin coroutine 취소 bridge | -| `grpc-advanced-diagnostics` | Channelz/CSDS 진단 | +| leaf | 패키지(`dev.caskeleton.grpc.advanced.*`) | capability | +| --- | --- | --- | +| `grpc-advanced` | `bootstrap` | capability grade, feature flag, module guard, capability별 promotion gate | +| `grpc-advanced` | `edition` | Protobuf Edition 2024 opt-in lane, Edition 2026 watch lane | +| `grpc-advanced` | `streaming` | client streaming(session/dedup/checkpoint), bidi(dual sequence), manual flow control | +| `grpc-advanced` | `resilience`·`discovery`·`xds` | read-only hedging, custom name resolver SPI, custom load balancer SPI, proxyless xDS | +| `grpc-advanced` | `diagnostics` | Channelz/CSDS 진단 | +| `grpc-advanced-compat` | `web`·`integration`·`reactor`·`kotlin` | gRPC-Web, Spring Integration bridge, Reactor adapter, Kotlin coroutine 취소 bridge | + +`grpc-advanced-compat`만 따로 있는 이유는 Reactor·Spring Integration이라는 실제 의존성 경계다. 나머지 +다섯 capability는 framework 의존이 없어 한 leaf에 있다(2026-09-28까지는 leaf 다섯 개). capability별 +독립은 leaf 경계가 아니라 capability flag와 promotion 레코드가 보장한다. 참조 Envoy 설정은 jar에 싣지 +않는 테스트 fixture(`grpc-advanced-compat/src/test/resources/envoy/envoy.yaml`)다. ## Promotion은 capability별로 독립이다 diff --git a/grpc-advanced/grpc-advanced-bootstrap/build.gradle b/grpc-advanced/grpc-advanced-bootstrap/build.gradle deleted file mode 100644 index 347ed7d..0000000 --- a/grpc-advanced/grpc-advanced-bootstrap/build.gradle +++ /dev/null @@ -1,14 +0,0 @@ -plugins { - id 'ca.platform-module' -} - -// The Advanced boundary itself: capability grades, the `ca-skeleton.grpc.advanced.*` feature-flag -// contract, the module guard that refuses an unflagged capability, and the per-capability -// promotion gate. -// -// This leaf depends on Stable public types and never the other way round. The Stable starter's -// registry entry names no advanced id, so `verifyCleanArchitectureDependencies` is what makes -// "Advanced never leaks into Stable" a build failure rather than a review note. -dependencies { - api project(':grpc:grpc-core-api') -} diff --git a/grpc-advanced/grpc-advanced-bootstrap/gradle.lockfile b/grpc-advanced/grpc-advanced-bootstrap/gradle.lockfile deleted file mode 100644 index e2c9585..0000000 --- a/grpc-advanced/grpc-advanced-bootstrap/gradle.lockfile +++ /dev/null @@ -1,84 +0,0 @@ -# This is a Gradle generated file for dependency locking. -# Manual edits can break the build and are not advised. -# This file is expected to be part of source control. -com.github.ben-manes.caffeine:caffeine:3.2.4=annotationProcessor,testAnnotationProcessor -com.github.kevinstern:software-and-algorithms:1.0=annotationProcessor,testAnnotationProcessor -com.github.spotbugs:spotbugs-annotations:4.10.2=spotbugs -com.github.spotbugs:spotbugs:4.10.2=spotbugs -com.github.stephenc.jcip:jcip-annotations:1.0-1=spotbugs -com.google.auto.service:auto-service-annotations:1.0.1=annotationProcessor,testAnnotationProcessor -com.google.auto.value:auto-value-annotations:1.9=annotationProcessor,testAnnotationProcessor -com.google.auto:auto-common:1.2.2=annotationProcessor,testAnnotationProcessor -com.google.code.findbugs:jsr305:3.0.2=checkstyle,spotbugs -com.google.code.gson:gson:2.13.2=spotbugs -com.google.errorprone:error_prone_annotation:2.49.0=annotationProcessor,testAnnotationProcessor -com.google.errorprone:error_prone_annotations:2.41.0=spotbugs -com.google.errorprone:error_prone_annotations:2.47.0=checkstyle -com.google.errorprone:error_prone_annotations:2.49.0=annotationProcessor,testAnnotationProcessor -com.google.errorprone:error_prone_check_api:2.49.0=annotationProcessor,testAnnotationProcessor -com.google.errorprone:error_prone_core:2.49.0=annotationProcessor,testAnnotationProcessor -com.google.googlejavaformat:google-java-format:1.35.0=annotationProcessor,testAnnotationProcessor -com.google.guava:failureaccess:1.0.3=annotationProcessor,checkstyle,testAnnotationProcessor -com.google.guava:guava:33.5.0-jre=annotationProcessor,testAnnotationProcessor -com.google.guava:guava:33.6.0-jre=checkstyle -com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava=annotationProcessor,checkstyle,testAnnotationProcessor -com.google.j2objc:j2objc-annotations:3.1=annotationProcessor,checkstyle,testAnnotationProcessor -com.google.protobuf:protobuf-java:4.33.2=annotationProcessor,testAnnotationProcessor -com.h3xstream.findsecbugs:findsecbugs-plugin:1.14.0=spotbugsPlugins -com.puppycrawl.tools:checkstyle:13.5.0=checkstyle -commons-beanutils:commons-beanutils:1.11.0=checkstyle -commons-collections:commons-collections:3.2.2=checkstyle -commons-io:commons-io:2.21.0=spotbugs -info.picocli:picocli:4.7.7=checkstyle -io.github.eisop:dataflow-errorprone:3.41.0-eisop1=annotationProcessor,testAnnotationProcessor -io.github.java-diff-utils:java-diff-utils:4.12=annotationProcessor,testAnnotationProcessor -javax.inject:javax.inject:1=annotationProcessor,testAnnotationProcessor -jaxen:jaxen:2.0.6=spotbugs -net.bytebuddy:byte-buddy:1.17.8=testCompileClasspath,testRuntimeClasspath -net.sf.saxon:Saxon-HE:12.9=checkstyle,spotbugs -org.antlr:antlr4-runtime:4.13.2=checkstyle -org.apache.bcel:bcel:6.12.0=spotbugs -org.apache.commons:commons-lang3:3.20.0=checkstyle,spotbugs -org.apache.commons:commons-text:1.15.0=spotbugs -org.apache.commons:commons-text:1.3=checkstyle -org.apache.httpcomponents:httpclient:4.5.13=checkstyle -org.apache.httpcomponents:httpcore:4.4.16=checkstyle -org.apache.logging.log4j:log4j-api:2.25.5=spotbugs -org.apache.logging.log4j:log4j-core:2.25.5=spotbugs -org.apache.maven.doxia:doxia-core:1.12.0=checkstyle -org.apache.maven.doxia:doxia-logging-api:1.12.0=checkstyle -org.apache.maven.doxia:doxia-module-xdoc:1.12.0=checkstyle -org.apache.maven.doxia:doxia-sink-api:1.12.0=checkstyle -org.apache.xbean:xbean-reflect:3.7=checkstyle -org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath -org.assertj:assertj-core:3.27.7=testCompileClasspath,testRuntimeClasspath -org.codehaus.plexus:plexus-classworlds:2.6.0=checkstyle -org.codehaus.plexus:plexus-component-annotations:2.1.0=checkstyle -org.codehaus.plexus:plexus-container-default:2.1.0=checkstyle -org.codehaus.plexus:plexus-utils:3.3.0=checkstyle -org.dom4j:dom4j:2.2.0=spotbugs -org.javassist:javassist:3.28.0-GA=checkstyle -org.jspecify:jspecify:1.0.1=annotationProcessor,checkstyle,testAnnotationProcessor,testCompileClasspath -org.junit.jupiter:junit-jupiter-api:6.0.3=testCompileClasspath,testRuntimeClasspath -org.junit.jupiter:junit-jupiter-engine:6.0.3=testRuntimeClasspath -org.junit.jupiter:junit-jupiter-params:6.0.3=testCompileClasspath,testRuntimeClasspath -org.junit.jupiter:junit-jupiter:6.0.3=testCompileClasspath,testRuntimeClasspath -org.junit.platform:junit-platform-commons:6.0.3=testCompileClasspath,testRuntimeClasspath -org.junit.platform:junit-platform-engine:6.0.3=testRuntimeClasspath -org.junit.platform:junit-platform-launcher:6.0.3=testRuntimeClasspath -org.junit:junit-bom:6.0.3=testCompileClasspath,testRuntimeClasspath -org.junit:junit-bom:6.1.0=spotbugs -org.mockito:mockito-core:5.20.0=mockitoAgent -org.opentest4j:opentest4j:1.3.0=testCompileClasspath,testRuntimeClasspath -org.ow2.asm:asm-analysis:9.10.1=spotbugs -org.ow2.asm:asm-commons:9.10.1=spotbugs -org.ow2.asm:asm-tree:9.10.1=spotbugs -org.ow2.asm:asm-util:9.10.1=spotbugs -org.ow2.asm:asm:9.10.1=spotbugs -org.pcollections:pcollections:4.0.1=annotationProcessor,testAnnotationProcessor -org.reflections:reflections:0.10.2=checkstyle -org.slf4j:slf4j-api:2.0.18=spotbugs,spotbugsSlf4j -org.slf4j:slf4j-simple:2.0.17=spotbugsSlf4j -org.slf4j:slf4j-simple:2.0.18=checkstyle -org.xmlresolver:xmlresolver:5.3.3=checkstyle,spotbugs -empty=compileClasspath,runtimeClasspath diff --git a/grpc-advanced/grpc-advanced-compat/build.gradle b/grpc-advanced/grpc-advanced-compat/build.gradle index ec85357..bf0fccd 100644 --- a/grpc-advanced/grpc-advanced-compat/build.gradle +++ b/grpc-advanced/grpc-advanced-compat/build.gradle @@ -1,5 +1,7 @@ plugins { - id 'ca.platform-module' + // grpc-platform, not platform: grpc-runtime's io.grpc api dependencies are versionless and + // need the gRPC BOM on every classpath they reach. + id 'ca.grpc-platform-module' } // Compatibility bridges: gRPC-Web, the Spring Integration bridge, the Reactor adapter, and the @@ -7,12 +9,12 @@ plugins { // // No Kotlin source set (adaptation D7): this repository has no Kotlin toolchain, so the Kotlin side // is only the Java-side cancellation bridge; nothing here claims Kotlin support. +// +// The reference Envoy configuration is a test fixture (src/test/resources/envoy), not something +// this jar ships: a proxy configuration belongs to the deployment that runs the proxy. dependencies { api project(':grpc:grpc-core-api') - api project(':grpc:grpc-policy') - api project(':grpc:grpc-server') - api project(':grpc:grpc-client') - api project(':grpc-advanced:grpc-advanced-bootstrap') + api project(':grpc:grpc-runtime') // api: the Reactor adapter's public signatures are Mono/Flux, and the Integration gateways name // Spring Integration's Message. Hiding either would only stop an adopter compiling against the diff --git a/grpc-advanced/grpc-advanced-compat/src/test/java/dev/caskeleton/grpc/advanced/compat/GrpcIntegrationBridgePolicyTest.java b/grpc-advanced/grpc-advanced-compat/src/test/java/dev/caskeleton/grpc/advanced/compat/GrpcIntegrationBridgePolicyTest.java index 5474b67..b687080 100644 --- a/grpc-advanced/grpc-advanced-compat/src/test/java/dev/caskeleton/grpc/advanced/compat/GrpcIntegrationBridgePolicyTest.java +++ b/grpc-advanced/grpc-advanced-compat/src/test/java/dev/caskeleton/grpc/advanced/compat/GrpcIntegrationBridgePolicyTest.java @@ -27,7 +27,7 @@ class GrpcIntegrationBridgePolicyTest { private static final GrpcMetadataKey CORRELATION = GrpcMetadataKey.ascii("x-correlation-id"); private static final GrpcMethodName GET = - GrpcMethodName.parse("hyeonworks.document.v1.DocumentService/GetDocument"); + GrpcMethodName.parse("caskeleton.document.v1.DocumentService/GetDocument"); private static GrpcRequestContext requestContext() { return GrpcRequestContext.create( diff --git a/grpc-advanced/grpc-advanced-compat/src/test/java/dev/caskeleton/grpc/advanced/compat/GrpcReactorContextBridgeTest.java b/grpc-advanced/grpc-advanced-compat/src/test/java/dev/caskeleton/grpc/advanced/compat/GrpcReactorContextBridgeTest.java index fcc3059..ee4d99b 100644 --- a/grpc-advanced/grpc-advanced-compat/src/test/java/dev/caskeleton/grpc/advanced/compat/GrpcReactorContextBridgeTest.java +++ b/grpc-advanced/grpc-advanced-compat/src/test/java/dev/caskeleton/grpc/advanced/compat/GrpcReactorContextBridgeTest.java @@ -28,7 +28,7 @@ import reactor.util.context.Context; class GrpcReactorContextBridgeTest { private static final GrpcMethodName GET = - GrpcMethodName.parse("hyeonworks.document.v1.DocumentService/GetDocument"); + GrpcMethodName.parse("caskeleton.document.v1.DocumentService/GetDocument"); private static final Instant NOW = Instant.parse("2026-08-30T10:00:00Z"); private static GrpcContextSnapshot snapshot() { diff --git a/grpc-advanced/grpc-advanced-compat/src/main/resources/envoy/envoy.yaml b/grpc-advanced/grpc-advanced-compat/src/test/resources/envoy/envoy.yaml similarity index 100% rename from grpc-advanced/grpc-advanced-compat/src/main/resources/envoy/envoy.yaml rename to grpc-advanced/grpc-advanced-compat/src/test/resources/envoy/envoy.yaml diff --git a/grpc-advanced/grpc-advanced-diagnostics/build.gradle b/grpc-advanced/grpc-advanced-diagnostics/build.gradle deleted file mode 100644 index be5a1d2..0000000 --- a/grpc-advanced/grpc-advanced-diagnostics/build.gradle +++ /dev/null @@ -1,11 +0,0 @@ -plugins { - id 'ca.platform-module' -} - -// Channelz/CSDS diagnostics for administrators, with the redactor that keeps socket authority, -// credentials, certificate material, metadata and payload out of a snapshot. -dependencies { - api project(':grpc:grpc-core-api') - api project(':grpc:grpc-client') - api project(':grpc-advanced:grpc-advanced-bootstrap') -} diff --git a/grpc-advanced/grpc-advanced-edition/build.gradle b/grpc-advanced/grpc-advanced-edition/build.gradle deleted file mode 100644 index f85d0e8..0000000 --- a/grpc-advanced/grpc-advanced-edition/build.gradle +++ /dev/null @@ -1,12 +0,0 @@ -plugins { - id 'ca.platform-module' -} - -// Protobuf Edition lanes. Edition 2024 is an opt-in Advanced lane that must produce cross-consumer -// compile evidence before anything public moves onto it; Edition 2026 is a watch lane that records -// release/toolchain status. -dependencies { - api project(':grpc:grpc-core-api') - api project(':grpc:grpc-proto-contract') - api project(':grpc-advanced:grpc-advanced-bootstrap') -} diff --git a/grpc-advanced/grpc-advanced-resilience/build.gradle b/grpc-advanced/grpc-advanced-resilience/build.gradle deleted file mode 100644 index 1e56b2d..0000000 --- a/grpc-advanced/grpc-advanced-resilience/build.gradle +++ /dev/null @@ -1,13 +0,0 @@ -plugins { - id 'ca.platform-module' -} - -// Resilience and discovery capabilities that Stable refuses: read-only unary hedging, the custom -// name resolver SPI, the custom load balancer SPI, and the proxyless xDS experimental profile. -dependencies { - api project(':grpc:grpc-core-api') - api project(':grpc:grpc-policy') - api project(':grpc:grpc-client') - api project(':grpc:grpc-discovery') - api project(':grpc-advanced:grpc-advanced-bootstrap') -} diff --git a/grpc-advanced/grpc-advanced-streaming/build.gradle b/grpc-advanced/grpc-advanced-streaming/build.gradle deleted file mode 100644 index 2e5bbbd..0000000 --- a/grpc-advanced/grpc-advanced-streaming/build.gradle +++ /dev/null @@ -1,12 +0,0 @@ -plugins { - id 'ca.platform-module' -} - -// The streaming shapes the Stable plan deliberately excludes: client streaming sessions with -// dedup/checkpoint/resume, bidirectional sessions with independent per-direction sequences, and the -// manual flow-control approval API. -dependencies { - api project(':grpc:grpc-core-api') - api project(':grpc:grpc-policy') - api project(':grpc-advanced:grpc-advanced-bootstrap') -} diff --git a/grpc-advanced/grpc-advanced-streaming/gradle.lockfile b/grpc-advanced/grpc-advanced-streaming/gradle.lockfile deleted file mode 100644 index 9369e83..0000000 --- a/grpc-advanced/grpc-advanced-streaming/gradle.lockfile +++ /dev/null @@ -1,91 +0,0 @@ -# This is a Gradle generated file for dependency locking. -# Manual edits can break the build and are not advised. -# This file is expected to be part of source control. -com.github.ben-manes.caffeine:caffeine:3.2.4=annotationProcessor,testAnnotationProcessor -com.github.kevinstern:software-and-algorithms:1.0=annotationProcessor,testAnnotationProcessor -com.github.spotbugs:spotbugs-annotations:4.10.2=spotbugs -com.github.spotbugs:spotbugs:4.10.2=spotbugs -com.github.stephenc.jcip:jcip-annotations:1.0-1=spotbugs -com.google.auto.service:auto-service-annotations:1.0.1=annotationProcessor,testAnnotationProcessor -com.google.auto.value:auto-value-annotations:1.9=annotationProcessor,testAnnotationProcessor -com.google.auto:auto-common:1.2.2=annotationProcessor,testAnnotationProcessor -com.google.code.findbugs:jsr305:3.0.2=checkstyle,compileClasspath,runtimeClasspath,spotbugs,testCompileClasspath,testRuntimeClasspath -com.google.code.gson:gson:2.13.2=spotbugs -com.google.errorprone:error_prone_annotation:2.49.0=annotationProcessor,testAnnotationProcessor -com.google.errorprone:error_prone_annotations:2.28.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -com.google.errorprone:error_prone_annotations:2.41.0=spotbugs -com.google.errorprone:error_prone_annotations:2.47.0=checkstyle -com.google.errorprone:error_prone_annotations:2.49.0=annotationProcessor,testAnnotationProcessor -com.google.errorprone:error_prone_check_api:2.49.0=annotationProcessor,testAnnotationProcessor -com.google.errorprone:error_prone_core:2.49.0=annotationProcessor,testAnnotationProcessor -com.google.googlejavaformat:google-java-format:1.35.0=annotationProcessor,testAnnotationProcessor -com.google.guava:failureaccess:1.0.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -com.google.guava:failureaccess:1.0.3=annotationProcessor,checkstyle,testAnnotationProcessor -com.google.guava:guava:33.2.1-android=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -com.google.guava:guava:33.5.0-jre=annotationProcessor,testAnnotationProcessor -com.google.guava:guava:33.6.0-jre=checkstyle -com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava=annotationProcessor,checkstyle,compileClasspath,runtimeClasspath,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath -com.google.j2objc:j2objc-annotations:3.0.0=compileClasspath,testCompileClasspath -com.google.j2objc:j2objc-annotations:3.1=annotationProcessor,checkstyle,testAnnotationProcessor -com.google.protobuf:protobuf-java:4.33.2=annotationProcessor,testAnnotationProcessor -com.h3xstream.findsecbugs:findsecbugs-plugin:1.14.0=spotbugsPlugins -com.puppycrawl.tools:checkstyle:13.5.0=checkstyle -commons-beanutils:commons-beanutils:1.11.0=checkstyle -commons-collections:commons-collections:3.2.2=checkstyle -commons-io:commons-io:2.21.0=spotbugs -info.picocli:picocli:4.7.7=checkstyle -io.github.eisop:dataflow-errorprone:3.41.0-eisop1=annotationProcessor,testAnnotationProcessor -io.github.java-diff-utils:java-diff-utils:4.12=annotationProcessor,testAnnotationProcessor -io.grpc:grpc-api:1.68.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -io.grpc:grpc-stub:1.68.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -javax.inject:javax.inject:1=annotationProcessor,testAnnotationProcessor -jaxen:jaxen:2.0.6=spotbugs -net.bytebuddy:byte-buddy:1.17.8=testCompileClasspath,testRuntimeClasspath -net.sf.saxon:Saxon-HE:12.9=checkstyle,spotbugs -org.antlr:antlr4-runtime:4.13.2=checkstyle -org.apache.bcel:bcel:6.12.0=spotbugs -org.apache.commons:commons-lang3:3.20.0=checkstyle,spotbugs -org.apache.commons:commons-text:1.15.0=spotbugs -org.apache.commons:commons-text:1.3=checkstyle -org.apache.httpcomponents:httpclient:4.5.13=checkstyle -org.apache.httpcomponents:httpcore:4.4.16=checkstyle -org.apache.logging.log4j:log4j-api:2.25.5=spotbugs -org.apache.logging.log4j:log4j-core:2.25.5=spotbugs -org.apache.maven.doxia:doxia-core:1.12.0=checkstyle -org.apache.maven.doxia:doxia-logging-api:1.12.0=checkstyle -org.apache.maven.doxia:doxia-module-xdoc:1.12.0=checkstyle -org.apache.maven.doxia:doxia-sink-api:1.12.0=checkstyle -org.apache.xbean:xbean-reflect:3.7=checkstyle -org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath -org.assertj:assertj-core:3.27.7=testCompileClasspath,testRuntimeClasspath -org.checkerframework:checker-qual:3.42.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -org.codehaus.plexus:plexus-classworlds:2.6.0=checkstyle -org.codehaus.plexus:plexus-component-annotations:2.1.0=checkstyle -org.codehaus.plexus:plexus-container-default:2.1.0=checkstyle -org.codehaus.plexus:plexus-utils:3.3.0=checkstyle -org.dom4j:dom4j:2.2.0=spotbugs -org.javassist:javassist:3.28.0-GA=checkstyle -org.jspecify:jspecify:1.0.1=annotationProcessor,checkstyle,testAnnotationProcessor,testCompileClasspath -org.junit.jupiter:junit-jupiter-api:6.0.3=testCompileClasspath,testRuntimeClasspath -org.junit.jupiter:junit-jupiter-engine:6.0.3=testRuntimeClasspath -org.junit.jupiter:junit-jupiter-params:6.0.3=testCompileClasspath,testRuntimeClasspath -org.junit.jupiter:junit-jupiter:6.0.3=testCompileClasspath,testRuntimeClasspath -org.junit.platform:junit-platform-commons:6.0.3=testCompileClasspath,testRuntimeClasspath -org.junit.platform:junit-platform-engine:6.0.3=testRuntimeClasspath -org.junit.platform:junit-platform-launcher:6.0.3=testRuntimeClasspath -org.junit:junit-bom:6.0.3=testCompileClasspath,testRuntimeClasspath -org.junit:junit-bom:6.1.0=spotbugs -org.mockito:mockito-core:5.20.0=mockitoAgent -org.opentest4j:opentest4j:1.3.0=testCompileClasspath,testRuntimeClasspath -org.ow2.asm:asm-analysis:9.10.1=spotbugs -org.ow2.asm:asm-commons:9.10.1=spotbugs -org.ow2.asm:asm-tree:9.10.1=spotbugs -org.ow2.asm:asm-util:9.10.1=spotbugs -org.ow2.asm:asm:9.10.1=spotbugs -org.pcollections:pcollections:4.0.1=annotationProcessor,testAnnotationProcessor -org.reflections:reflections:0.10.2=checkstyle -org.slf4j:slf4j-api:2.0.18=spotbugs,spotbugsSlf4j -org.slf4j:slf4j-simple:2.0.17=spotbugsSlf4j -org.slf4j:slf4j-simple:2.0.18=checkstyle -org.xmlresolver:xmlresolver:5.3.3=checkstyle,spotbugs -empty= diff --git a/grpc-advanced/grpc-advanced/build.gradle b/grpc-advanced/grpc-advanced/build.gradle new file mode 100644 index 0000000..eaf898d --- /dev/null +++ b/grpc-advanced/grpc-advanced/build.gradle @@ -0,0 +1,28 @@ +plugins { + // grpc-platform, not platform: grpc-runtime's io.grpc api dependencies are versionless and + // need the gRPC BOM on every classpath they reach. + id 'ca.grpc-platform-module' +} + +// The capabilities the Stable platform deliberately excludes, each behind its own capability flag: +// +// bootstrap capability grades, the `ca-skeleton.grpc.advanced.*` feature-flag contract, the +// module guard that refuses an unflagged capability, the per-capability promotion +// gate +// edition Protobuf Edition 2024 opt-in lane and Edition 2026 watch lane +// streaming client streaming sessions (dedup/checkpoint/resume), bidirectional sessions with +// independent per-direction sequences, the manual flow-control approval API +// resilience read-only unary hedging, custom name resolver / load balancer SPIs, proxyless xDS +// diagnostics Channelz/CSDS snapshots and the redactor that keeps secrets out of them +// +// These were five leaves until 2026-09-28. None of them carried a framework dependency of its own, +// and the only rule the split enforced — Stable never reaches Advanced — is expressed by the +// registry through the two prefixes (`grpc:*` may not depend on `grpc-advanced:*`), not by how many +// advanced leaves exist. `grpc-advanced-compat` stays separate because Reactor and Spring +// Integration are a real dependency boundary. +// +// This leaf depends on Stable public types and never the other way round. +dependencies { + api project(':grpc:grpc-core-api') + api project(':grpc:grpc-runtime') +} diff --git a/grpc-advanced/grpc-advanced-diagnostics/gradle.lockfile b/grpc-advanced/grpc-advanced/gradle.lockfile similarity index 100% rename from grpc-advanced/grpc-advanced-diagnostics/gradle.lockfile rename to grpc-advanced/grpc-advanced/gradle.lockfile diff --git a/grpc-advanced/grpc-advanced-bootstrap/src/main/java/dev/caskeleton/grpc/advanced/bootstrap/GrpcAdvancedCapability.java b/grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/bootstrap/GrpcAdvancedCapability.java similarity index 100% rename from grpc-advanced/grpc-advanced-bootstrap/src/main/java/dev/caskeleton/grpc/advanced/bootstrap/GrpcAdvancedCapability.java rename to grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/bootstrap/GrpcAdvancedCapability.java diff --git a/grpc-advanced/grpc-advanced-bootstrap/src/main/java/dev/caskeleton/grpc/advanced/bootstrap/GrpcAdvancedCapabilityDisabledException.java b/grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/bootstrap/GrpcAdvancedCapabilityDisabledException.java similarity index 100% rename from grpc-advanced/grpc-advanced-bootstrap/src/main/java/dev/caskeleton/grpc/advanced/bootstrap/GrpcAdvancedCapabilityDisabledException.java rename to grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/bootstrap/GrpcAdvancedCapabilityDisabledException.java diff --git a/grpc-advanced/grpc-advanced-bootstrap/src/main/java/dev/caskeleton/grpc/advanced/bootstrap/GrpcAdvancedFeatureFlags.java b/grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/bootstrap/GrpcAdvancedFeatureFlags.java similarity index 100% rename from grpc-advanced/grpc-advanced-bootstrap/src/main/java/dev/caskeleton/grpc/advanced/bootstrap/GrpcAdvancedFeatureFlags.java rename to grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/bootstrap/GrpcAdvancedFeatureFlags.java diff --git a/grpc-advanced/grpc-advanced-bootstrap/src/main/java/dev/caskeleton/grpc/advanced/bootstrap/GrpcAdvancedModuleGuard.java b/grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/bootstrap/GrpcAdvancedModuleGuard.java similarity index 100% rename from grpc-advanced/grpc-advanced-bootstrap/src/main/java/dev/caskeleton/grpc/advanced/bootstrap/GrpcAdvancedModuleGuard.java rename to grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/bootstrap/GrpcAdvancedModuleGuard.java diff --git a/grpc-advanced/grpc-advanced-bootstrap/src/main/java/dev/caskeleton/grpc/advanced/bootstrap/GrpcCapabilityGrade.java b/grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/bootstrap/GrpcCapabilityGrade.java similarity index 100% rename from grpc-advanced/grpc-advanced-bootstrap/src/main/java/dev/caskeleton/grpc/advanced/bootstrap/GrpcCapabilityGrade.java rename to grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/bootstrap/GrpcCapabilityGrade.java diff --git a/grpc-advanced/grpc-advanced-diagnostics/src/main/java/dev/caskeleton/grpc/advanced/diagnostics/GrpcChannelDiagnosticsPolicy.java b/grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/diagnostics/GrpcChannelDiagnosticsPolicy.java similarity index 100% rename from grpc-advanced/grpc-advanced-diagnostics/src/main/java/dev/caskeleton/grpc/advanced/diagnostics/GrpcChannelDiagnosticsPolicy.java rename to grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/diagnostics/GrpcChannelDiagnosticsPolicy.java diff --git a/grpc-advanced/grpc-advanced-diagnostics/src/main/java/dev/caskeleton/grpc/advanced/diagnostics/GrpcChannelDiagnosticsSnapshot.java b/grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/diagnostics/GrpcChannelDiagnosticsSnapshot.java similarity index 100% rename from grpc-advanced/grpc-advanced-diagnostics/src/main/java/dev/caskeleton/grpc/advanced/diagnostics/GrpcChannelDiagnosticsSnapshot.java rename to grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/diagnostics/GrpcChannelDiagnosticsSnapshot.java diff --git a/grpc-advanced/grpc-advanced-diagnostics/src/main/java/dev/caskeleton/grpc/advanced/diagnostics/GrpcDiagnosticsRedactor.java b/grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/diagnostics/GrpcDiagnosticsRedactor.java similarity index 100% rename from grpc-advanced/grpc-advanced-diagnostics/src/main/java/dev/caskeleton/grpc/advanced/diagnostics/GrpcDiagnosticsRedactor.java rename to grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/diagnostics/GrpcDiagnosticsRedactor.java diff --git a/grpc-advanced/grpc-advanced-resilience/src/main/java/dev/caskeleton/grpc/advanced/discovery/GrpcCustomResolver.java b/grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/discovery/GrpcCustomResolver.java similarity index 100% rename from grpc-advanced/grpc-advanced-resilience/src/main/java/dev/caskeleton/grpc/advanced/discovery/GrpcCustomResolver.java rename to grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/discovery/GrpcCustomResolver.java diff --git a/grpc-advanced/grpc-advanced-resilience/src/main/java/dev/caskeleton/grpc/advanced/discovery/GrpcEndpointCandidate.java b/grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/discovery/GrpcEndpointCandidate.java similarity index 100% rename from grpc-advanced/grpc-advanced-resilience/src/main/java/dev/caskeleton/grpc/advanced/discovery/GrpcEndpointCandidate.java rename to grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/discovery/GrpcEndpointCandidate.java diff --git a/grpc-advanced/grpc-advanced-resilience/src/main/java/dev/caskeleton/grpc/advanced/discovery/GrpcEndpointSnapshot.java b/grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/discovery/GrpcEndpointSnapshot.java similarity index 100% rename from grpc-advanced/grpc-advanced-resilience/src/main/java/dev/caskeleton/grpc/advanced/discovery/GrpcEndpointSnapshot.java rename to grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/discovery/GrpcEndpointSnapshot.java diff --git a/grpc-advanced/grpc-advanced-resilience/src/main/java/dev/caskeleton/grpc/advanced/discovery/GrpcLoadBalancerDecision.java b/grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/discovery/GrpcLoadBalancerDecision.java similarity index 100% rename from grpc-advanced/grpc-advanced-resilience/src/main/java/dev/caskeleton/grpc/advanced/discovery/GrpcLoadBalancerDecision.java rename to grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/discovery/GrpcLoadBalancerDecision.java diff --git a/grpc-advanced/grpc-advanced-resilience/src/main/java/dev/caskeleton/grpc/advanced/discovery/GrpcLoadBalancerPicker.java b/grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/discovery/GrpcLoadBalancerPicker.java similarity index 100% rename from grpc-advanced/grpc-advanced-resilience/src/main/java/dev/caskeleton/grpc/advanced/discovery/GrpcLoadBalancerPicker.java rename to grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/discovery/GrpcLoadBalancerPicker.java diff --git a/grpc-advanced/grpc-advanced-resilience/src/main/java/dev/caskeleton/grpc/advanced/discovery/GrpcLoadBalancerSafetyPolicy.java b/grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/discovery/GrpcLoadBalancerSafetyPolicy.java similarity index 100% rename from grpc-advanced/grpc-advanced-resilience/src/main/java/dev/caskeleton/grpc/advanced/discovery/GrpcLoadBalancerSafetyPolicy.java rename to grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/discovery/GrpcLoadBalancerSafetyPolicy.java diff --git a/grpc-advanced/grpc-advanced-resilience/src/main/java/dev/caskeleton/grpc/advanced/discovery/GrpcResolverSafetyPolicy.java b/grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/discovery/GrpcResolverSafetyPolicy.java similarity index 100% rename from grpc-advanced/grpc-advanced-resilience/src/main/java/dev/caskeleton/grpc/advanced/discovery/GrpcResolverSafetyPolicy.java rename to grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/discovery/GrpcResolverSafetyPolicy.java diff --git a/grpc-advanced/grpc-advanced-resilience/src/main/java/dev/caskeleton/grpc/advanced/discovery/GrpcResolverUpdate.java b/grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/discovery/GrpcResolverUpdate.java similarity index 100% rename from grpc-advanced/grpc-advanced-resilience/src/main/java/dev/caskeleton/grpc/advanced/discovery/GrpcResolverUpdate.java rename to grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/discovery/GrpcResolverUpdate.java diff --git a/grpc-advanced/grpc-advanced-edition/src/main/java/dev/caskeleton/grpc/advanced/edition/GrpcEdition2024Policy.java b/grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/edition/GrpcEdition2024Policy.java similarity index 100% rename from grpc-advanced/grpc-advanced-edition/src/main/java/dev/caskeleton/grpc/advanced/edition/GrpcEdition2024Policy.java rename to grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/edition/GrpcEdition2024Policy.java diff --git a/grpc-advanced/grpc-advanced-edition/src/main/java/dev/caskeleton/grpc/advanced/edition/GrpcEdition2026Status.java b/grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/edition/GrpcEdition2026Status.java similarity index 100% rename from grpc-advanced/grpc-advanced-edition/src/main/java/dev/caskeleton/grpc/advanced/edition/GrpcEdition2026Status.java rename to grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/edition/GrpcEdition2026Status.java diff --git a/grpc-advanced/grpc-advanced-edition/src/main/java/dev/caskeleton/grpc/advanced/edition/GrpcEdition2026WatchReport.java b/grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/edition/GrpcEdition2026WatchReport.java similarity index 100% rename from grpc-advanced/grpc-advanced-edition/src/main/java/dev/caskeleton/grpc/advanced/edition/GrpcEdition2026WatchReport.java rename to grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/edition/GrpcEdition2026WatchReport.java diff --git a/grpc-advanced/grpc-advanced-edition/src/main/java/dev/caskeleton/grpc/advanced/edition/GrpcEditionCompatibilityReport.java b/grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/edition/GrpcEditionCompatibilityReport.java similarity index 100% rename from grpc-advanced/grpc-advanced-edition/src/main/java/dev/caskeleton/grpc/advanced/edition/GrpcEditionCompatibilityReport.java rename to grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/edition/GrpcEditionCompatibilityReport.java diff --git a/grpc-advanced/grpc-advanced-bootstrap/src/main/java/dev/caskeleton/grpc/advanced/release/GrpcAdvancedPromotionDecision.java b/grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/release/GrpcAdvancedPromotionDecision.java similarity index 100% rename from grpc-advanced/grpc-advanced-bootstrap/src/main/java/dev/caskeleton/grpc/advanced/release/GrpcAdvancedPromotionDecision.java rename to grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/release/GrpcAdvancedPromotionDecision.java diff --git a/grpc-advanced/grpc-advanced-bootstrap/src/main/java/dev/caskeleton/grpc/advanced/release/GrpcAdvancedPromotionEvidence.java b/grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/release/GrpcAdvancedPromotionEvidence.java similarity index 100% rename from grpc-advanced/grpc-advanced-bootstrap/src/main/java/dev/caskeleton/grpc/advanced/release/GrpcAdvancedPromotionEvidence.java rename to grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/release/GrpcAdvancedPromotionEvidence.java diff --git a/grpc-advanced/grpc-advanced-bootstrap/src/main/java/dev/caskeleton/grpc/advanced/release/GrpcAdvancedPromotionGate.java b/grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/release/GrpcAdvancedPromotionGate.java similarity index 100% rename from grpc-advanced/grpc-advanced-bootstrap/src/main/java/dev/caskeleton/grpc/advanced/release/GrpcAdvancedPromotionGate.java rename to grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/release/GrpcAdvancedPromotionGate.java diff --git a/grpc-advanced/grpc-advanced-bootstrap/src/main/java/dev/caskeleton/grpc/advanced/release/GrpcAdvancedSupportMatrix.java b/grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/release/GrpcAdvancedSupportMatrix.java similarity index 100% rename from grpc-advanced/grpc-advanced-bootstrap/src/main/java/dev/caskeleton/grpc/advanced/release/GrpcAdvancedSupportMatrix.java rename to grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/release/GrpcAdvancedSupportMatrix.java diff --git a/grpc-advanced/grpc-advanced-resilience/src/main/java/dev/caskeleton/grpc/advanced/resilience/GrpcHedgingBudget.java b/grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/resilience/GrpcHedgingBudget.java similarity index 100% rename from grpc-advanced/grpc-advanced-resilience/src/main/java/dev/caskeleton/grpc/advanced/resilience/GrpcHedgingBudget.java rename to grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/resilience/GrpcHedgingBudget.java diff --git a/grpc-advanced/grpc-advanced-resilience/src/main/java/dev/caskeleton/grpc/advanced/resilience/GrpcHedgingEligibility.java b/grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/resilience/GrpcHedgingEligibility.java similarity index 100% rename from grpc-advanced/grpc-advanced-resilience/src/main/java/dev/caskeleton/grpc/advanced/resilience/GrpcHedgingEligibility.java rename to grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/resilience/GrpcHedgingEligibility.java diff --git a/grpc-advanced/grpc-advanced-resilience/src/main/java/dev/caskeleton/grpc/advanced/resilience/GrpcHedgingPolicy.java b/grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/resilience/GrpcHedgingPolicy.java similarity index 100% rename from grpc-advanced/grpc-advanced-resilience/src/main/java/dev/caskeleton/grpc/advanced/resilience/GrpcHedgingPolicy.java rename to grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/resilience/GrpcHedgingPolicy.java diff --git a/grpc-advanced/grpc-advanced-resilience/src/main/java/dev/caskeleton/grpc/advanced/resilience/GrpcHedgingResult.java b/grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/resilience/GrpcHedgingResult.java similarity index 100% rename from grpc-advanced/grpc-advanced-resilience/src/main/java/dev/caskeleton/grpc/advanced/resilience/GrpcHedgingResult.java rename to grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/resilience/GrpcHedgingResult.java diff --git a/grpc-advanced/grpc-advanced-streaming/src/main/java/dev/caskeleton/grpc/advanced/streaming/GrpcBidiDirectionState.java b/grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/streaming/GrpcBidiDirectionState.java similarity index 100% rename from grpc-advanced/grpc-advanced-streaming/src/main/java/dev/caskeleton/grpc/advanced/streaming/GrpcBidiDirectionState.java rename to grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/streaming/GrpcBidiDirectionState.java diff --git a/grpc-advanced/grpc-advanced-streaming/src/main/java/dev/caskeleton/grpc/advanced/streaming/GrpcBidiResumeState.java b/grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/streaming/GrpcBidiResumeState.java similarity index 100% rename from grpc-advanced/grpc-advanced-streaming/src/main/java/dev/caskeleton/grpc/advanced/streaming/GrpcBidiResumeState.java rename to grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/streaming/GrpcBidiResumeState.java diff --git a/grpc-advanced/grpc-advanced-streaming/src/main/java/dev/caskeleton/grpc/advanced/streaming/GrpcBidiSequenceTracker.java b/grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/streaming/GrpcBidiSequenceTracker.java similarity index 100% rename from grpc-advanced/grpc-advanced-streaming/src/main/java/dev/caskeleton/grpc/advanced/streaming/GrpcBidiSequenceTracker.java rename to grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/streaming/GrpcBidiSequenceTracker.java diff --git a/grpc-advanced/grpc-advanced-streaming/src/main/java/dev/caskeleton/grpc/advanced/streaming/GrpcBidiSession.java b/grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/streaming/GrpcBidiSession.java similarity index 100% rename from grpc-advanced/grpc-advanced-streaming/src/main/java/dev/caskeleton/grpc/advanced/streaming/GrpcBidiSession.java rename to grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/streaming/GrpcBidiSession.java diff --git a/grpc-advanced/grpc-advanced-streaming/src/main/java/dev/caskeleton/grpc/advanced/streaming/GrpcClientMessageDeduplicator.java b/grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/streaming/GrpcClientMessageDeduplicator.java similarity index 100% rename from grpc-advanced/grpc-advanced-streaming/src/main/java/dev/caskeleton/grpc/advanced/streaming/GrpcClientMessageDeduplicator.java rename to grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/streaming/GrpcClientMessageDeduplicator.java diff --git a/grpc-advanced/grpc-advanced-streaming/src/main/java/dev/caskeleton/grpc/advanced/streaming/GrpcClientStreamCheckpoint.java b/grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/streaming/GrpcClientStreamCheckpoint.java similarity index 100% rename from grpc-advanced/grpc-advanced-streaming/src/main/java/dev/caskeleton/grpc/advanced/streaming/GrpcClientStreamCheckpoint.java rename to grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/streaming/GrpcClientStreamCheckpoint.java diff --git a/grpc-advanced/grpc-advanced-streaming/src/main/java/dev/caskeleton/grpc/advanced/streaming/GrpcClientStreamMessage.java b/grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/streaming/GrpcClientStreamMessage.java similarity index 100% rename from grpc-advanced/grpc-advanced-streaming/src/main/java/dev/caskeleton/grpc/advanced/streaming/GrpcClientStreamMessage.java rename to grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/streaming/GrpcClientStreamMessage.java diff --git a/grpc-advanced/grpc-advanced-streaming/src/main/java/dev/caskeleton/grpc/advanced/streaming/GrpcClientStreamPolicy.java b/grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/streaming/GrpcClientStreamPolicy.java similarity index 100% rename from grpc-advanced/grpc-advanced-streaming/src/main/java/dev/caskeleton/grpc/advanced/streaming/GrpcClientStreamPolicy.java rename to grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/streaming/GrpcClientStreamPolicy.java diff --git a/grpc-advanced/grpc-advanced-streaming/src/main/java/dev/caskeleton/grpc/advanced/streaming/GrpcClientStreamResumeDecision.java b/grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/streaming/GrpcClientStreamResumeDecision.java similarity index 100% rename from grpc-advanced/grpc-advanced-streaming/src/main/java/dev/caskeleton/grpc/advanced/streaming/GrpcClientStreamResumeDecision.java rename to grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/streaming/GrpcClientStreamResumeDecision.java diff --git a/grpc-advanced/grpc-advanced-streaming/src/main/java/dev/caskeleton/grpc/advanced/streaming/GrpcClientStreamSessionId.java b/grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/streaming/GrpcClientStreamSessionId.java similarity index 100% rename from grpc-advanced/grpc-advanced-streaming/src/main/java/dev/caskeleton/grpc/advanced/streaming/GrpcClientStreamSessionId.java rename to grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/streaming/GrpcClientStreamSessionId.java diff --git a/grpc-advanced/grpc-advanced-streaming/src/main/java/dev/caskeleton/grpc/advanced/streaming/GrpcClientStreamState.java b/grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/streaming/GrpcClientStreamState.java similarity index 100% rename from grpc-advanced/grpc-advanced-streaming/src/main/java/dev/caskeleton/grpc/advanced/streaming/GrpcClientStreamState.java rename to grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/streaming/GrpcClientStreamState.java diff --git a/grpc-advanced/grpc-advanced-streaming/src/main/java/dev/caskeleton/grpc/advanced/streaming/GrpcDemandController.java b/grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/streaming/GrpcDemandController.java similarity index 100% rename from grpc-advanced/grpc-advanced-streaming/src/main/java/dev/caskeleton/grpc/advanced/streaming/GrpcDemandController.java rename to grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/streaming/GrpcDemandController.java diff --git a/grpc-advanced/grpc-advanced-streaming/src/main/java/dev/caskeleton/grpc/advanced/streaming/GrpcDemandDecision.java b/grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/streaming/GrpcDemandDecision.java similarity index 100% rename from grpc-advanced/grpc-advanced-streaming/src/main/java/dev/caskeleton/grpc/advanced/streaming/GrpcDemandDecision.java rename to grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/streaming/GrpcDemandDecision.java diff --git a/grpc-advanced/grpc-advanced-streaming/src/main/java/dev/caskeleton/grpc/advanced/streaming/GrpcManualFlowControlPolicy.java b/grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/streaming/GrpcManualFlowControlPolicy.java similarity index 100% rename from grpc-advanced/grpc-advanced-streaming/src/main/java/dev/caskeleton/grpc/advanced/streaming/GrpcManualFlowControlPolicy.java rename to grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/streaming/GrpcManualFlowControlPolicy.java diff --git a/grpc-advanced/grpc-advanced-resilience/src/main/java/dev/caskeleton/grpc/advanced/xds/GrpcXdsFailurePolicy.java b/grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/xds/GrpcXdsFailurePolicy.java similarity index 100% rename from grpc-advanced/grpc-advanced-resilience/src/main/java/dev/caskeleton/grpc/advanced/xds/GrpcXdsFailurePolicy.java rename to grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/xds/GrpcXdsFailurePolicy.java diff --git a/grpc-advanced/grpc-advanced-resilience/src/main/java/dev/caskeleton/grpc/advanced/xds/GrpcXdsProfile.java b/grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/xds/GrpcXdsProfile.java similarity index 100% rename from grpc-advanced/grpc-advanced-resilience/src/main/java/dev/caskeleton/grpc/advanced/xds/GrpcXdsProfile.java rename to grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/xds/GrpcXdsProfile.java diff --git a/grpc-advanced/grpc-advanced-resilience/src/main/java/dev/caskeleton/grpc/advanced/xds/GrpcXdsResourceSnapshot.java b/grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/xds/GrpcXdsResourceSnapshot.java similarity index 100% rename from grpc-advanced/grpc-advanced-resilience/src/main/java/dev/caskeleton/grpc/advanced/xds/GrpcXdsResourceSnapshot.java rename to grpc-advanced/grpc-advanced/src/main/java/dev/caskeleton/grpc/advanced/xds/GrpcXdsResourceSnapshot.java diff --git a/grpc-advanced/grpc-advanced-bootstrap/src/test/java/dev/caskeleton/grpc/advanced/bootstrap/GrpcAdvancedModuleGuardTest.java b/grpc-advanced/grpc-advanced/src/test/java/dev/caskeleton/grpc/advanced/bootstrap/GrpcAdvancedModuleGuardTest.java similarity index 100% rename from grpc-advanced/grpc-advanced-bootstrap/src/test/java/dev/caskeleton/grpc/advanced/bootstrap/GrpcAdvancedModuleGuardTest.java rename to grpc-advanced/grpc-advanced/src/test/java/dev/caskeleton/grpc/advanced/bootstrap/GrpcAdvancedModuleGuardTest.java diff --git a/grpc-advanced/grpc-advanced-diagnostics/src/test/java/dev/caskeleton/grpc/advanced/diagnostics/GrpcChannelDiagnosticsPolicyTest.java b/grpc-advanced/grpc-advanced/src/test/java/dev/caskeleton/grpc/advanced/diagnostics/GrpcChannelDiagnosticsPolicyTest.java similarity index 100% rename from grpc-advanced/grpc-advanced-diagnostics/src/test/java/dev/caskeleton/grpc/advanced/diagnostics/GrpcChannelDiagnosticsPolicyTest.java rename to grpc-advanced/grpc-advanced/src/test/java/dev/caskeleton/grpc/advanced/diagnostics/GrpcChannelDiagnosticsPolicyTest.java diff --git a/grpc-advanced/grpc-advanced-diagnostics/src/test/java/dev/caskeleton/grpc/advanced/diagnostics/GrpcDiagnosticsRedactorIdempotenceTest.java b/grpc-advanced/grpc-advanced/src/test/java/dev/caskeleton/grpc/advanced/diagnostics/GrpcDiagnosticsRedactorIdempotenceTest.java similarity index 100% rename from grpc-advanced/grpc-advanced-diagnostics/src/test/java/dev/caskeleton/grpc/advanced/diagnostics/GrpcDiagnosticsRedactorIdempotenceTest.java rename to grpc-advanced/grpc-advanced/src/test/java/dev/caskeleton/grpc/advanced/diagnostics/GrpcDiagnosticsRedactorIdempotenceTest.java diff --git a/grpc-advanced/grpc-advanced-edition/src/test/java/dev/caskeleton/grpc/advanced/edition/GrpcEdition2024PolicyTest.java b/grpc-advanced/grpc-advanced/src/test/java/dev/caskeleton/grpc/advanced/edition/GrpcEdition2024PolicyTest.java similarity index 82% rename from grpc-advanced/grpc-advanced-edition/src/test/java/dev/caskeleton/grpc/advanced/edition/GrpcEdition2024PolicyTest.java rename to grpc-advanced/grpc-advanced/src/test/java/dev/caskeleton/grpc/advanced/edition/GrpcEdition2024PolicyTest.java index 79cd037..00b6f3e 100644 --- a/grpc-advanced/grpc-advanced-edition/src/test/java/dev/caskeleton/grpc/advanced/edition/GrpcEdition2024PolicyTest.java +++ b/grpc-advanced/grpc-advanced/src/test/java/dev/caskeleton/grpc/advanced/edition/GrpcEdition2024PolicyTest.java @@ -24,10 +24,10 @@ class GrpcEdition2024PolicyTest { void editionIsOptInPerModule() { GrpcEdition2024Policy policy = GrpcEdition2024Policy.notAdopted(); - assertThat(policy.allowedIn("grpc-proto-contract")).isFalse(); + assertThat(policy.allowedIn("grpc-contract")).isFalse(); assertThat( - new GrpcEdition2024Policy(Set.of("grpc-advanced-edition"), Set.of(), false) - .allowedIn("grpc-advanced-edition")) + new GrpcEdition2024Policy(Set.of("grpc-advanced"), Set.of(), false) + .allowedIn("grpc-advanced")) .isTrue(); } @@ -36,18 +36,14 @@ class GrpcEdition2024PolicyTest { void publicServicesNeedAPromotion() { GrpcEdition2024Policy withoutPromotion = new GrpcEdition2024Policy( - Set.of("grpc-advanced-edition"), - Set.of("hyeonworks.document.v1.DocumentService"), - false); + Set.of("grpc-advanced"), Set.of("caskeleton.document.v1.DocumentService"), false); GrpcEdition2024Policy withPromotion = new GrpcEdition2024Policy( - Set.of("grpc-advanced-edition"), - Set.of("hyeonworks.document.v1.DocumentService"), - true); + Set.of("grpc-advanced"), Set.of("caskeleton.document.v1.DocumentService"), true); - assertThat(withoutPromotion.serviceMayMove("hyeonworks.document.v1.DocumentService")).isFalse(); - assertThat(withPromotion.serviceMayMove("hyeonworks.document.v1.DocumentService")).isTrue(); - assertThat(withoutPromotion.serviceMayMove("hyeonworks.internal.v1.ScratchService")).isTrue(); + assertThat(withoutPromotion.serviceMayMove("caskeleton.document.v1.DocumentService")).isFalse(); + assertThat(withPromotion.serviceMayMove("caskeleton.document.v1.DocumentService")).isTrue(); + assertThat(withoutPromotion.serviceMayMove("caskeleton.internal.v1.ScratchService")).isTrue(); } @Test diff --git a/grpc-advanced/grpc-advanced-edition/src/test/java/dev/caskeleton/grpc/advanced/edition/GrpcEdition2026WatchReportTest.java b/grpc-advanced/grpc-advanced/src/test/java/dev/caskeleton/grpc/advanced/edition/GrpcEdition2026WatchReportTest.java similarity index 100% rename from grpc-advanced/grpc-advanced-edition/src/test/java/dev/caskeleton/grpc/advanced/edition/GrpcEdition2026WatchReportTest.java rename to grpc-advanced/grpc-advanced/src/test/java/dev/caskeleton/grpc/advanced/edition/GrpcEdition2026WatchReportTest.java diff --git a/grpc-advanced/grpc-advanced-bootstrap/src/test/java/dev/caskeleton/grpc/advanced/release/GrpcAdvancedPromotionGateTest.java b/grpc-advanced/grpc-advanced/src/test/java/dev/caskeleton/grpc/advanced/release/GrpcAdvancedPromotionGateTest.java similarity index 100% rename from grpc-advanced/grpc-advanced-bootstrap/src/test/java/dev/caskeleton/grpc/advanced/release/GrpcAdvancedPromotionGateTest.java rename to grpc-advanced/grpc-advanced/src/test/java/dev/caskeleton/grpc/advanced/release/GrpcAdvancedPromotionGateTest.java diff --git a/grpc-advanced/grpc-advanced-resilience/src/test/java/dev/caskeleton/grpc/advanced/resilience/GrpcHedgingEligibilityTest.java b/grpc-advanced/grpc-advanced/src/test/java/dev/caskeleton/grpc/advanced/resilience/GrpcHedgingEligibilityTest.java similarity index 96% rename from grpc-advanced/grpc-advanced-resilience/src/test/java/dev/caskeleton/grpc/advanced/resilience/GrpcHedgingEligibilityTest.java rename to grpc-advanced/grpc-advanced/src/test/java/dev/caskeleton/grpc/advanced/resilience/GrpcHedgingEligibilityTest.java index c0350c4..f9068f8 100644 --- a/grpc-advanced/grpc-advanced-resilience/src/test/java/dev/caskeleton/grpc/advanced/resilience/GrpcHedgingEligibilityTest.java +++ b/grpc-advanced/grpc-advanced/src/test/java/dev/caskeleton/grpc/advanced/resilience/GrpcHedgingEligibilityTest.java @@ -17,11 +17,11 @@ import org.junit.jupiter.api.Test; class GrpcHedgingEligibilityTest { private static final GrpcMethodName GET = - GrpcMethodName.parse("hyeonworks.document.v1.DocumentService/GetDocument"); + GrpcMethodName.parse("caskeleton.document.v1.DocumentService/GetDocument"); private static final GrpcMethodName CREATE = - GrpcMethodName.parse("hyeonworks.document.v1.DocumentService/CreateDocument"); + GrpcMethodName.parse("caskeleton.document.v1.DocumentService/CreateDocument"); private static final GrpcMethodName WATCH = - GrpcMethodName.parse("hyeonworks.document.v1.DocumentService/WatchDocuments"); + GrpcMethodName.parse("caskeleton.document.v1.DocumentService/WatchDocuments"); private static final GrpcDeadlineProfile TWO_SECONDS = GrpcDeadlineProfile.of(Duration.ofSeconds(2)); diff --git a/grpc-advanced/grpc-advanced-resilience/src/test/java/dev/caskeleton/grpc/advanced/resilience/GrpcLoadBalancerSafetyPolicyTest.java b/grpc-advanced/grpc-advanced/src/test/java/dev/caskeleton/grpc/advanced/resilience/GrpcLoadBalancerSafetyPolicyTest.java similarity index 100% rename from grpc-advanced/grpc-advanced-resilience/src/test/java/dev/caskeleton/grpc/advanced/resilience/GrpcLoadBalancerSafetyPolicyTest.java rename to grpc-advanced/grpc-advanced/src/test/java/dev/caskeleton/grpc/advanced/resilience/GrpcLoadBalancerSafetyPolicyTest.java diff --git a/grpc-advanced/grpc-advanced-resilience/src/test/java/dev/caskeleton/grpc/advanced/resilience/GrpcResolverSafetyPolicyTest.java b/grpc-advanced/grpc-advanced/src/test/java/dev/caskeleton/grpc/advanced/resilience/GrpcResolverSafetyPolicyTest.java similarity index 100% rename from grpc-advanced/grpc-advanced-resilience/src/test/java/dev/caskeleton/grpc/advanced/resilience/GrpcResolverSafetyPolicyTest.java rename to grpc-advanced/grpc-advanced/src/test/java/dev/caskeleton/grpc/advanced/resilience/GrpcResolverSafetyPolicyTest.java diff --git a/grpc-advanced/grpc-advanced-resilience/src/test/java/dev/caskeleton/grpc/advanced/resilience/GrpcXdsProfileTest.java b/grpc-advanced/grpc-advanced/src/test/java/dev/caskeleton/grpc/advanced/resilience/GrpcXdsProfileTest.java similarity index 98% rename from grpc-advanced/grpc-advanced-resilience/src/test/java/dev/caskeleton/grpc/advanced/resilience/GrpcXdsProfileTest.java rename to grpc-advanced/grpc-advanced/src/test/java/dev/caskeleton/grpc/advanced/resilience/GrpcXdsProfileTest.java index 6d2ffd7..4e89989 100644 --- a/grpc-advanced/grpc-advanced-resilience/src/test/java/dev/caskeleton/grpc/advanced/resilience/GrpcXdsProfileTest.java +++ b/grpc-advanced/grpc-advanced/src/test/java/dev/caskeleton/grpc/advanced/resilience/GrpcXdsProfileTest.java @@ -30,7 +30,7 @@ class GrpcXdsProfileTest { @Test @DisplayName("an xDS profile requires an xds target, a namespace, mesh retries and mTLS") void anXdsProfileRequiresItsFourConditions() { - assertThat(profile("hyeonworks/documents").target().getScheme()).isEqualTo("xds"); + assertThat(profile("caskeleton/documents").target().getScheme()).isEqualTo("xds"); assertThatThrownBy( () -> new GrpcXdsProfile( diff --git a/grpc-advanced/grpc-advanced-streaming/src/test/java/dev/caskeleton/grpc/advanced/streaming/GrpcBidiSequenceTrackerTest.java b/grpc-advanced/grpc-advanced/src/test/java/dev/caskeleton/grpc/advanced/streaming/GrpcBidiSequenceTrackerTest.java similarity index 100% rename from grpc-advanced/grpc-advanced-streaming/src/test/java/dev/caskeleton/grpc/advanced/streaming/GrpcBidiSequenceTrackerTest.java rename to grpc-advanced/grpc-advanced/src/test/java/dev/caskeleton/grpc/advanced/streaming/GrpcBidiSequenceTrackerTest.java diff --git a/grpc-advanced/grpc-advanced-streaming/src/test/java/dev/caskeleton/grpc/advanced/streaming/GrpcClientMessageDeduplicatorTest.java b/grpc-advanced/grpc-advanced/src/test/java/dev/caskeleton/grpc/advanced/streaming/GrpcClientMessageDeduplicatorTest.java similarity index 100% rename from grpc-advanced/grpc-advanced-streaming/src/test/java/dev/caskeleton/grpc/advanced/streaming/GrpcClientMessageDeduplicatorTest.java rename to grpc-advanced/grpc-advanced/src/test/java/dev/caskeleton/grpc/advanced/streaming/GrpcClientMessageDeduplicatorTest.java diff --git a/grpc-advanced/grpc-advanced-streaming/src/test/java/dev/caskeleton/grpc/advanced/streaming/GrpcClientStreamPolicyTest.java b/grpc-advanced/grpc-advanced/src/test/java/dev/caskeleton/grpc/advanced/streaming/GrpcClientStreamPolicyTest.java similarity index 100% rename from grpc-advanced/grpc-advanced-streaming/src/test/java/dev/caskeleton/grpc/advanced/streaming/GrpcClientStreamPolicyTest.java rename to grpc-advanced/grpc-advanced/src/test/java/dev/caskeleton/grpc/advanced/streaming/GrpcClientStreamPolicyTest.java diff --git a/grpc-advanced/grpc-advanced-streaming/src/test/java/dev/caskeleton/grpc/advanced/streaming/GrpcDemandControllerTest.java b/grpc-advanced/grpc-advanced/src/test/java/dev/caskeleton/grpc/advanced/streaming/GrpcDemandControllerTest.java similarity index 100% rename from grpc-advanced/grpc-advanced-streaming/src/test/java/dev/caskeleton/grpc/advanced/streaming/GrpcDemandControllerTest.java rename to grpc-advanced/grpc-advanced/src/test/java/dev/caskeleton/grpc/advanced/streaming/GrpcDemandControllerTest.java diff --git a/grpc-advanced/grpc-advanced-edition/src/main/resources/proto/edition2024/compatibility.proto b/grpc-advanced/grpc-advanced/src/test/resources/proto/edition2024/compatibility.proto similarity index 90% rename from grpc-advanced/grpc-advanced-edition/src/main/resources/proto/edition2024/compatibility.proto rename to grpc-advanced/grpc-advanced/src/test/resources/proto/edition2024/compatibility.proto index a01b652..0791ab3 100644 --- a/grpc-advanced/grpc-advanced-edition/src/main/resources/proto/edition2024/compatibility.proto +++ b/grpc-advanced/grpc-advanced/src/test/resources/proto/edition2024/compatibility.proto @@ -1,9 +1,9 @@ edition = "2024"; -package hyeonworks.grpc.edition.v1; +package caskeleton.grpc.edition.v1; option java_multiple_files = true; -option java_package = "hyeonworks.grpc.edition.v1.generated"; +option java_package = "caskeleton.grpc.edition.v1.generated"; // The Edition 2024 comparison fixture. // diff --git a/grpc-advanced/grpc-advanced-diagnostics/src/test/resources/xds/control-plane-snapshot.json b/grpc-advanced/grpc-advanced/src/test/resources/xds/control-plane-snapshot.json similarity index 100% rename from grpc-advanced/grpc-advanced-diagnostics/src/test/resources/xds/control-plane-snapshot.json rename to grpc-advanced/grpc-advanced/src/test/resources/xds/control-plane-snapshot.json diff --git a/grpc/CLAUDE.md b/grpc/CLAUDE.md index 604eb24..7bb05da 100644 --- a/grpc/CLAUDE.md +++ b/grpc/CLAUDE.md @@ -20,13 +20,8 @@ leaf의 정확한 id는 registry에서 읽는다. | Family | 역할 | 허용 framework | | --- | --- | --- | | `grpc-core-api` | 식별자, method policy, 실행 증거, 실패 모델, deadline, request context, operation ledger port | **Java stdlib만.** io.grpc / Spring / protobuf / DB 타입 금지 | -| `grpc-proto-contract` | `.proto` 스키마 소스와 style/schema 규칙 검증기 | Java stdlib만 | -| `grpc-codegen` | Buf governance, codegen manifest, descriptor 릴리스 아티팩트 | Java stdlib만 | -| `grpc-policy` | validation, context, status/rich error, TLS/credential, deadline/cancellation, retry, idempotency, streaming, size/compression | `io.grpc:grpc-api`, `grpc-stub`. Spring 금지 | -| `grpc-server` | application boundary rule, typed service adapter SPI, interceptor 순서, Netty profile | `io.grpc:grpc-api`, `grpc-stub`. Netty 자체 금지 — profile은 설정 모델이다 | -| `grpc-client` | named channel, runtime generation, typed stub factory, client metadata/credentials | `io.grpc:grpc-api`, `grpc-stub` | -| `grpc-discovery` | Static/DNS resolver, pick_first/round_robin, Kubernetes routing profile | Java stdlib만 | -| `grpc-admin` | health, reflection, drain, secret-free policy snapshot | Java stdlib만 | +| `grpc-contract` | `.proto` 스키마 소스(`src/main/proto`)와 protoc 생성 message. lint/breaking은 Buf(`buf.yaml`, CI job `grpc-proto-buf`) | `protobuf-java`(생성 코드 runtime)만. 규칙을 Java로 재구현하지 않는다 | +| `grpc-runtime` | policy(validation, context, status/rich error, TLS/credential, deadline/cancellation, retry, idempotency, streaming, size/compression) · server(typed service adapter SPI, interceptor 순서, Netty profile) · client(named channel, runtime generation, typed stub factory) · discovery(Static/DNS, pick_first/round_robin, Kubernetes routing) · admin(health, reflection, drain, policy snapshot) | `io.grpc:grpc-api`, `grpc-stub`. Spring·Netty 자체 금지 — Netty profile은 설정 모델이다 | | `grpc-observability` | bounded metric/trace convention | `io.micrometer:micrometer-core`만 | | `grpc-operation-ledger-jpa` | mutation idempotency의 durable 저장 | `jakarta.persistence`, `spring-data-jpa`. **port는 core-api에 있다** | | `grpc-spring-boot-starter` | 조립 경계, typed properties, startup validator | Spring Boot autoconfigure. 여기서만 | @@ -35,7 +30,16 @@ leaf의 정확한 id는 registry에서 읽는다. `grpc-core-api`가 io.grpc를 이름조차 부르지 않는다는 것이 이 family의 핵심 제약이다. 실행 증거와 실패 모델은 "전송이 무엇을 했는가"를 기술하는 계약이고, 그 계약 안에 전송 타입이 들어가면 계약이 전송의 일부가 된다. `GrpcStatusCode`가 io.grpc의 코드를 미러링하는 이유가 이것이고, 양방향 번역은 -`grpc-policy`의 `GrpcStatusMapping`이 단독으로 소유한다. +`grpc-runtime`의 `GrpcStatusMapping`이 단독으로 소유한다. + +기본 전송 한도(메시지 1 MiB, metadata 8 KiB)는 `grpc-core-api`의 `GrpcTransportLimits` 한 곳에 있고, +server profile·named channel profile·method size profile·method policy 기본값·metadata budget이 모두 +그 상수를 쓴다. `GrpcPlatformStartupValidator`는 method의 inbound 한도가 server profile 한도보다 크면 +기동을 거부한다. + +`.proto`의 proto 조직 이름은 `caskeleton`이다(`package caskeleton.grpc.common.v1`, 생성 Java 패키지 +`caskeleton.grpc.common.v1.generated` — 손으로 쓴 `dev.caskeleton`과 겹치지 않는다). 템플릿을 재사용할 +때 바꾸는 방법은 `AGENTS.md` 「템플릿 재사용 체크리스트」에 있다. ## 증거 등급 — testkit이 하나의 leaf인 이유 @@ -72,7 +76,7 @@ capability flag 뒤에 있다. `GrpcPlatformStartupValidator`가 Stable catalog ## Optional build에 있다는 것의 의미 `grpc:*`와 `grpc-advanced:*`는 기본 `ca-skeleton` settings에 include되지 않는다. 따라서 일반 -`:app-bootstrap:build`는 이 18개 project를 configure하지 않는다. 플랫폼 자체는 +`:app-bootstrap:build`는 이 project들을 configure하지 않는다(목록은 registry의 `"build": "optional-grpc"`). 플랫폼 자체는 `./gradlew -p optional-platforms ci`로 검증하고, application runtime에 실제 채택하려면 composition root가 명시적으로 dependency를 가져오는 별도 변경이 필요하다. @@ -85,7 +89,7 @@ soak/performance baseline을 자동으로 의미하지 않는다. 지원 범위 `messaging:*`의 MSG-015(bridge 부재)를 반복하지 않는 것이 이 family의 목표다. 계약상의 경로는 ```text -application-owned port → adapter:inbound:grpc (typed service adapter) → :grpc:grpc-server SPI +application-owned port → adapter:inbound:grpc (typed service adapter) → :grpc:grpc-runtime SPI ``` 이고 `GrpcServiceAdapter`가 그 SPI를 소유한다. inbound adapter가 outbound adapter·persistence에 diff --git a/grpc/grpc-admin/build.gradle b/grpc/grpc-admin/build.gradle deleted file mode 100644 index fafabf0..0000000 --- a/grpc/grpc-admin/build.gradle +++ /dev/null @@ -1,10 +0,0 @@ -plugins { - id 'ca.platform-module' -} - -// Operational surface: the standard health registry, the reflection exposure policy, the drain -// coordinator, and the secret-free runtime policy snapshot an administrator reads. -dependencies { - api project(':grpc:grpc-core-api') - api project(':grpc:grpc-server') -} diff --git a/grpc/grpc-admin/gradle.lockfile b/grpc/grpc-admin/gradle.lockfile deleted file mode 100644 index 9369e83..0000000 --- a/grpc/grpc-admin/gradle.lockfile +++ /dev/null @@ -1,91 +0,0 @@ -# This is a Gradle generated file for dependency locking. -# Manual edits can break the build and are not advised. -# This file is expected to be part of source control. -com.github.ben-manes.caffeine:caffeine:3.2.4=annotationProcessor,testAnnotationProcessor -com.github.kevinstern:software-and-algorithms:1.0=annotationProcessor,testAnnotationProcessor -com.github.spotbugs:spotbugs-annotations:4.10.2=spotbugs -com.github.spotbugs:spotbugs:4.10.2=spotbugs -com.github.stephenc.jcip:jcip-annotations:1.0-1=spotbugs -com.google.auto.service:auto-service-annotations:1.0.1=annotationProcessor,testAnnotationProcessor -com.google.auto.value:auto-value-annotations:1.9=annotationProcessor,testAnnotationProcessor -com.google.auto:auto-common:1.2.2=annotationProcessor,testAnnotationProcessor -com.google.code.findbugs:jsr305:3.0.2=checkstyle,compileClasspath,runtimeClasspath,spotbugs,testCompileClasspath,testRuntimeClasspath -com.google.code.gson:gson:2.13.2=spotbugs -com.google.errorprone:error_prone_annotation:2.49.0=annotationProcessor,testAnnotationProcessor -com.google.errorprone:error_prone_annotations:2.28.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -com.google.errorprone:error_prone_annotations:2.41.0=spotbugs -com.google.errorprone:error_prone_annotations:2.47.0=checkstyle -com.google.errorprone:error_prone_annotations:2.49.0=annotationProcessor,testAnnotationProcessor -com.google.errorprone:error_prone_check_api:2.49.0=annotationProcessor,testAnnotationProcessor -com.google.errorprone:error_prone_core:2.49.0=annotationProcessor,testAnnotationProcessor -com.google.googlejavaformat:google-java-format:1.35.0=annotationProcessor,testAnnotationProcessor -com.google.guava:failureaccess:1.0.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -com.google.guava:failureaccess:1.0.3=annotationProcessor,checkstyle,testAnnotationProcessor -com.google.guava:guava:33.2.1-android=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -com.google.guava:guava:33.5.0-jre=annotationProcessor,testAnnotationProcessor -com.google.guava:guava:33.6.0-jre=checkstyle -com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava=annotationProcessor,checkstyle,compileClasspath,runtimeClasspath,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath -com.google.j2objc:j2objc-annotations:3.0.0=compileClasspath,testCompileClasspath -com.google.j2objc:j2objc-annotations:3.1=annotationProcessor,checkstyle,testAnnotationProcessor -com.google.protobuf:protobuf-java:4.33.2=annotationProcessor,testAnnotationProcessor -com.h3xstream.findsecbugs:findsecbugs-plugin:1.14.0=spotbugsPlugins -com.puppycrawl.tools:checkstyle:13.5.0=checkstyle -commons-beanutils:commons-beanutils:1.11.0=checkstyle -commons-collections:commons-collections:3.2.2=checkstyle -commons-io:commons-io:2.21.0=spotbugs -info.picocli:picocli:4.7.7=checkstyle -io.github.eisop:dataflow-errorprone:3.41.0-eisop1=annotationProcessor,testAnnotationProcessor -io.github.java-diff-utils:java-diff-utils:4.12=annotationProcessor,testAnnotationProcessor -io.grpc:grpc-api:1.68.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -io.grpc:grpc-stub:1.68.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -javax.inject:javax.inject:1=annotationProcessor,testAnnotationProcessor -jaxen:jaxen:2.0.6=spotbugs -net.bytebuddy:byte-buddy:1.17.8=testCompileClasspath,testRuntimeClasspath -net.sf.saxon:Saxon-HE:12.9=checkstyle,spotbugs -org.antlr:antlr4-runtime:4.13.2=checkstyle -org.apache.bcel:bcel:6.12.0=spotbugs -org.apache.commons:commons-lang3:3.20.0=checkstyle,spotbugs -org.apache.commons:commons-text:1.15.0=spotbugs -org.apache.commons:commons-text:1.3=checkstyle -org.apache.httpcomponents:httpclient:4.5.13=checkstyle -org.apache.httpcomponents:httpcore:4.4.16=checkstyle -org.apache.logging.log4j:log4j-api:2.25.5=spotbugs -org.apache.logging.log4j:log4j-core:2.25.5=spotbugs -org.apache.maven.doxia:doxia-core:1.12.0=checkstyle -org.apache.maven.doxia:doxia-logging-api:1.12.0=checkstyle -org.apache.maven.doxia:doxia-module-xdoc:1.12.0=checkstyle -org.apache.maven.doxia:doxia-sink-api:1.12.0=checkstyle -org.apache.xbean:xbean-reflect:3.7=checkstyle -org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath -org.assertj:assertj-core:3.27.7=testCompileClasspath,testRuntimeClasspath -org.checkerframework:checker-qual:3.42.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -org.codehaus.plexus:plexus-classworlds:2.6.0=checkstyle -org.codehaus.plexus:plexus-component-annotations:2.1.0=checkstyle -org.codehaus.plexus:plexus-container-default:2.1.0=checkstyle -org.codehaus.plexus:plexus-utils:3.3.0=checkstyle -org.dom4j:dom4j:2.2.0=spotbugs -org.javassist:javassist:3.28.0-GA=checkstyle -org.jspecify:jspecify:1.0.1=annotationProcessor,checkstyle,testAnnotationProcessor,testCompileClasspath -org.junit.jupiter:junit-jupiter-api:6.0.3=testCompileClasspath,testRuntimeClasspath -org.junit.jupiter:junit-jupiter-engine:6.0.3=testRuntimeClasspath -org.junit.jupiter:junit-jupiter-params:6.0.3=testCompileClasspath,testRuntimeClasspath -org.junit.jupiter:junit-jupiter:6.0.3=testCompileClasspath,testRuntimeClasspath -org.junit.platform:junit-platform-commons:6.0.3=testCompileClasspath,testRuntimeClasspath -org.junit.platform:junit-platform-engine:6.0.3=testRuntimeClasspath -org.junit.platform:junit-platform-launcher:6.0.3=testRuntimeClasspath -org.junit:junit-bom:6.0.3=testCompileClasspath,testRuntimeClasspath -org.junit:junit-bom:6.1.0=spotbugs -org.mockito:mockito-core:5.20.0=mockitoAgent -org.opentest4j:opentest4j:1.3.0=testCompileClasspath,testRuntimeClasspath -org.ow2.asm:asm-analysis:9.10.1=spotbugs -org.ow2.asm:asm-commons:9.10.1=spotbugs -org.ow2.asm:asm-tree:9.10.1=spotbugs -org.ow2.asm:asm-util:9.10.1=spotbugs -org.ow2.asm:asm:9.10.1=spotbugs -org.pcollections:pcollections:4.0.1=annotationProcessor,testAnnotationProcessor -org.reflections:reflections:0.10.2=checkstyle -org.slf4j:slf4j-api:2.0.18=spotbugs,spotbugsSlf4j -org.slf4j:slf4j-simple:2.0.17=spotbugsSlf4j -org.slf4j:slf4j-simple:2.0.18=checkstyle -org.xmlresolver:xmlresolver:5.3.3=checkstyle,spotbugs -empty= diff --git a/grpc/grpc-client/build.gradle b/grpc/grpc-client/build.gradle deleted file mode 100644 index 3ea3d8d..0000000 --- a/grpc/grpc-client/build.gradle +++ /dev/null @@ -1,14 +0,0 @@ -plugins { - id 'ca.grpc-platform-module' -} - -// Client runtime: named channel profiles, channel runtime generations with drain, the typed stub -// factory that refuses to hand a raw Channel to application code, and client metadata/credentials. - -dependencies { - api project(':grpc:grpc-core-api') - api project(':grpc:grpc-policy') - - api "io.grpc:grpc-api" - api "io.grpc:grpc-stub" -} diff --git a/grpc/grpc-client/gradle.lockfile b/grpc/grpc-client/gradle.lockfile deleted file mode 100644 index 9369e83..0000000 --- a/grpc/grpc-client/gradle.lockfile +++ /dev/null @@ -1,91 +0,0 @@ -# This is a Gradle generated file for dependency locking. -# Manual edits can break the build and are not advised. -# This file is expected to be part of source control. -com.github.ben-manes.caffeine:caffeine:3.2.4=annotationProcessor,testAnnotationProcessor -com.github.kevinstern:software-and-algorithms:1.0=annotationProcessor,testAnnotationProcessor -com.github.spotbugs:spotbugs-annotations:4.10.2=spotbugs -com.github.spotbugs:spotbugs:4.10.2=spotbugs -com.github.stephenc.jcip:jcip-annotations:1.0-1=spotbugs -com.google.auto.service:auto-service-annotations:1.0.1=annotationProcessor,testAnnotationProcessor -com.google.auto.value:auto-value-annotations:1.9=annotationProcessor,testAnnotationProcessor -com.google.auto:auto-common:1.2.2=annotationProcessor,testAnnotationProcessor -com.google.code.findbugs:jsr305:3.0.2=checkstyle,compileClasspath,runtimeClasspath,spotbugs,testCompileClasspath,testRuntimeClasspath -com.google.code.gson:gson:2.13.2=spotbugs -com.google.errorprone:error_prone_annotation:2.49.0=annotationProcessor,testAnnotationProcessor -com.google.errorprone:error_prone_annotations:2.28.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -com.google.errorprone:error_prone_annotations:2.41.0=spotbugs -com.google.errorprone:error_prone_annotations:2.47.0=checkstyle -com.google.errorprone:error_prone_annotations:2.49.0=annotationProcessor,testAnnotationProcessor -com.google.errorprone:error_prone_check_api:2.49.0=annotationProcessor,testAnnotationProcessor -com.google.errorprone:error_prone_core:2.49.0=annotationProcessor,testAnnotationProcessor -com.google.googlejavaformat:google-java-format:1.35.0=annotationProcessor,testAnnotationProcessor -com.google.guava:failureaccess:1.0.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -com.google.guava:failureaccess:1.0.3=annotationProcessor,checkstyle,testAnnotationProcessor -com.google.guava:guava:33.2.1-android=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -com.google.guava:guava:33.5.0-jre=annotationProcessor,testAnnotationProcessor -com.google.guava:guava:33.6.0-jre=checkstyle -com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava=annotationProcessor,checkstyle,compileClasspath,runtimeClasspath,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath -com.google.j2objc:j2objc-annotations:3.0.0=compileClasspath,testCompileClasspath -com.google.j2objc:j2objc-annotations:3.1=annotationProcessor,checkstyle,testAnnotationProcessor -com.google.protobuf:protobuf-java:4.33.2=annotationProcessor,testAnnotationProcessor -com.h3xstream.findsecbugs:findsecbugs-plugin:1.14.0=spotbugsPlugins -com.puppycrawl.tools:checkstyle:13.5.0=checkstyle -commons-beanutils:commons-beanutils:1.11.0=checkstyle -commons-collections:commons-collections:3.2.2=checkstyle -commons-io:commons-io:2.21.0=spotbugs -info.picocli:picocli:4.7.7=checkstyle -io.github.eisop:dataflow-errorprone:3.41.0-eisop1=annotationProcessor,testAnnotationProcessor -io.github.java-diff-utils:java-diff-utils:4.12=annotationProcessor,testAnnotationProcessor -io.grpc:grpc-api:1.68.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -io.grpc:grpc-stub:1.68.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -javax.inject:javax.inject:1=annotationProcessor,testAnnotationProcessor -jaxen:jaxen:2.0.6=spotbugs -net.bytebuddy:byte-buddy:1.17.8=testCompileClasspath,testRuntimeClasspath -net.sf.saxon:Saxon-HE:12.9=checkstyle,spotbugs -org.antlr:antlr4-runtime:4.13.2=checkstyle -org.apache.bcel:bcel:6.12.0=spotbugs -org.apache.commons:commons-lang3:3.20.0=checkstyle,spotbugs -org.apache.commons:commons-text:1.15.0=spotbugs -org.apache.commons:commons-text:1.3=checkstyle -org.apache.httpcomponents:httpclient:4.5.13=checkstyle -org.apache.httpcomponents:httpcore:4.4.16=checkstyle -org.apache.logging.log4j:log4j-api:2.25.5=spotbugs -org.apache.logging.log4j:log4j-core:2.25.5=spotbugs -org.apache.maven.doxia:doxia-core:1.12.0=checkstyle -org.apache.maven.doxia:doxia-logging-api:1.12.0=checkstyle -org.apache.maven.doxia:doxia-module-xdoc:1.12.0=checkstyle -org.apache.maven.doxia:doxia-sink-api:1.12.0=checkstyle -org.apache.xbean:xbean-reflect:3.7=checkstyle -org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath -org.assertj:assertj-core:3.27.7=testCompileClasspath,testRuntimeClasspath -org.checkerframework:checker-qual:3.42.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -org.codehaus.plexus:plexus-classworlds:2.6.0=checkstyle -org.codehaus.plexus:plexus-component-annotations:2.1.0=checkstyle -org.codehaus.plexus:plexus-container-default:2.1.0=checkstyle -org.codehaus.plexus:plexus-utils:3.3.0=checkstyle -org.dom4j:dom4j:2.2.0=spotbugs -org.javassist:javassist:3.28.0-GA=checkstyle -org.jspecify:jspecify:1.0.1=annotationProcessor,checkstyle,testAnnotationProcessor,testCompileClasspath -org.junit.jupiter:junit-jupiter-api:6.0.3=testCompileClasspath,testRuntimeClasspath -org.junit.jupiter:junit-jupiter-engine:6.0.3=testRuntimeClasspath -org.junit.jupiter:junit-jupiter-params:6.0.3=testCompileClasspath,testRuntimeClasspath -org.junit.jupiter:junit-jupiter:6.0.3=testCompileClasspath,testRuntimeClasspath -org.junit.platform:junit-platform-commons:6.0.3=testCompileClasspath,testRuntimeClasspath -org.junit.platform:junit-platform-engine:6.0.3=testRuntimeClasspath -org.junit.platform:junit-platform-launcher:6.0.3=testRuntimeClasspath -org.junit:junit-bom:6.0.3=testCompileClasspath,testRuntimeClasspath -org.junit:junit-bom:6.1.0=spotbugs -org.mockito:mockito-core:5.20.0=mockitoAgent -org.opentest4j:opentest4j:1.3.0=testCompileClasspath,testRuntimeClasspath -org.ow2.asm:asm-analysis:9.10.1=spotbugs -org.ow2.asm:asm-commons:9.10.1=spotbugs -org.ow2.asm:asm-tree:9.10.1=spotbugs -org.ow2.asm:asm-util:9.10.1=spotbugs -org.ow2.asm:asm:9.10.1=spotbugs -org.pcollections:pcollections:4.0.1=annotationProcessor,testAnnotationProcessor -org.reflections:reflections:0.10.2=checkstyle -org.slf4j:slf4j-api:2.0.18=spotbugs,spotbugsSlf4j -org.slf4j:slf4j-simple:2.0.17=spotbugsSlf4j -org.slf4j:slf4j-simple:2.0.18=checkstyle -org.xmlresolver:xmlresolver:5.3.3=checkstyle,spotbugs -empty= diff --git a/grpc/grpc-codegen/build.gradle b/grpc/grpc-codegen/build.gradle deleted file mode 100644 index f45471a..0000000 --- a/grpc/grpc-codegen/build.gradle +++ /dev/null @@ -1,14 +0,0 @@ -plugins { - id 'ca.platform-module' -} - -// Contract governance: Buf format/lint/breaking policy, the single codegen owner declaration, and -// the descriptor/schema-hash release artifact with its consumer-compile gate. -// -// The Buf rules are implemented here rather than shelled out to the Buf CLI (adaptation D5): the -// CLI is not present in this toolchain, and a gate that silently no-ops when a binary is missing is -// worse than one that computes the same judgement from the committed schema. -dependencies { - api project(':grpc:grpc-core-api') - api project(':grpc:grpc-proto-contract') -} diff --git a/grpc/grpc-codegen/gradle.lockfile b/grpc/grpc-codegen/gradle.lockfile deleted file mode 100644 index e2c9585..0000000 --- a/grpc/grpc-codegen/gradle.lockfile +++ /dev/null @@ -1,84 +0,0 @@ -# This is a Gradle generated file for dependency locking. -# Manual edits can break the build and are not advised. -# This file is expected to be part of source control. -com.github.ben-manes.caffeine:caffeine:3.2.4=annotationProcessor,testAnnotationProcessor -com.github.kevinstern:software-and-algorithms:1.0=annotationProcessor,testAnnotationProcessor -com.github.spotbugs:spotbugs-annotations:4.10.2=spotbugs -com.github.spotbugs:spotbugs:4.10.2=spotbugs -com.github.stephenc.jcip:jcip-annotations:1.0-1=spotbugs -com.google.auto.service:auto-service-annotations:1.0.1=annotationProcessor,testAnnotationProcessor -com.google.auto.value:auto-value-annotations:1.9=annotationProcessor,testAnnotationProcessor -com.google.auto:auto-common:1.2.2=annotationProcessor,testAnnotationProcessor -com.google.code.findbugs:jsr305:3.0.2=checkstyle,spotbugs -com.google.code.gson:gson:2.13.2=spotbugs -com.google.errorprone:error_prone_annotation:2.49.0=annotationProcessor,testAnnotationProcessor -com.google.errorprone:error_prone_annotations:2.41.0=spotbugs -com.google.errorprone:error_prone_annotations:2.47.0=checkstyle -com.google.errorprone:error_prone_annotations:2.49.0=annotationProcessor,testAnnotationProcessor -com.google.errorprone:error_prone_check_api:2.49.0=annotationProcessor,testAnnotationProcessor -com.google.errorprone:error_prone_core:2.49.0=annotationProcessor,testAnnotationProcessor -com.google.googlejavaformat:google-java-format:1.35.0=annotationProcessor,testAnnotationProcessor -com.google.guava:failureaccess:1.0.3=annotationProcessor,checkstyle,testAnnotationProcessor -com.google.guava:guava:33.5.0-jre=annotationProcessor,testAnnotationProcessor -com.google.guava:guava:33.6.0-jre=checkstyle -com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava=annotationProcessor,checkstyle,testAnnotationProcessor -com.google.j2objc:j2objc-annotations:3.1=annotationProcessor,checkstyle,testAnnotationProcessor -com.google.protobuf:protobuf-java:4.33.2=annotationProcessor,testAnnotationProcessor -com.h3xstream.findsecbugs:findsecbugs-plugin:1.14.0=spotbugsPlugins -com.puppycrawl.tools:checkstyle:13.5.0=checkstyle -commons-beanutils:commons-beanutils:1.11.0=checkstyle -commons-collections:commons-collections:3.2.2=checkstyle -commons-io:commons-io:2.21.0=spotbugs -info.picocli:picocli:4.7.7=checkstyle -io.github.eisop:dataflow-errorprone:3.41.0-eisop1=annotationProcessor,testAnnotationProcessor -io.github.java-diff-utils:java-diff-utils:4.12=annotationProcessor,testAnnotationProcessor -javax.inject:javax.inject:1=annotationProcessor,testAnnotationProcessor -jaxen:jaxen:2.0.6=spotbugs -net.bytebuddy:byte-buddy:1.17.8=testCompileClasspath,testRuntimeClasspath -net.sf.saxon:Saxon-HE:12.9=checkstyle,spotbugs -org.antlr:antlr4-runtime:4.13.2=checkstyle -org.apache.bcel:bcel:6.12.0=spotbugs -org.apache.commons:commons-lang3:3.20.0=checkstyle,spotbugs -org.apache.commons:commons-text:1.15.0=spotbugs -org.apache.commons:commons-text:1.3=checkstyle -org.apache.httpcomponents:httpclient:4.5.13=checkstyle -org.apache.httpcomponents:httpcore:4.4.16=checkstyle -org.apache.logging.log4j:log4j-api:2.25.5=spotbugs -org.apache.logging.log4j:log4j-core:2.25.5=spotbugs -org.apache.maven.doxia:doxia-core:1.12.0=checkstyle -org.apache.maven.doxia:doxia-logging-api:1.12.0=checkstyle -org.apache.maven.doxia:doxia-module-xdoc:1.12.0=checkstyle -org.apache.maven.doxia:doxia-sink-api:1.12.0=checkstyle -org.apache.xbean:xbean-reflect:3.7=checkstyle -org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath -org.assertj:assertj-core:3.27.7=testCompileClasspath,testRuntimeClasspath -org.codehaus.plexus:plexus-classworlds:2.6.0=checkstyle -org.codehaus.plexus:plexus-component-annotations:2.1.0=checkstyle -org.codehaus.plexus:plexus-container-default:2.1.0=checkstyle -org.codehaus.plexus:plexus-utils:3.3.0=checkstyle -org.dom4j:dom4j:2.2.0=spotbugs -org.javassist:javassist:3.28.0-GA=checkstyle -org.jspecify:jspecify:1.0.1=annotationProcessor,checkstyle,testAnnotationProcessor,testCompileClasspath -org.junit.jupiter:junit-jupiter-api:6.0.3=testCompileClasspath,testRuntimeClasspath -org.junit.jupiter:junit-jupiter-engine:6.0.3=testRuntimeClasspath -org.junit.jupiter:junit-jupiter-params:6.0.3=testCompileClasspath,testRuntimeClasspath -org.junit.jupiter:junit-jupiter:6.0.3=testCompileClasspath,testRuntimeClasspath -org.junit.platform:junit-platform-commons:6.0.3=testCompileClasspath,testRuntimeClasspath -org.junit.platform:junit-platform-engine:6.0.3=testRuntimeClasspath -org.junit.platform:junit-platform-launcher:6.0.3=testRuntimeClasspath -org.junit:junit-bom:6.0.3=testCompileClasspath,testRuntimeClasspath -org.junit:junit-bom:6.1.0=spotbugs -org.mockito:mockito-core:5.20.0=mockitoAgent -org.opentest4j:opentest4j:1.3.0=testCompileClasspath,testRuntimeClasspath -org.ow2.asm:asm-analysis:9.10.1=spotbugs -org.ow2.asm:asm-commons:9.10.1=spotbugs -org.ow2.asm:asm-tree:9.10.1=spotbugs -org.ow2.asm:asm-util:9.10.1=spotbugs -org.ow2.asm:asm:9.10.1=spotbugs -org.pcollections:pcollections:4.0.1=annotationProcessor,testAnnotationProcessor -org.reflections:reflections:0.10.2=checkstyle -org.slf4j:slf4j-api:2.0.18=spotbugs,spotbugsSlf4j -org.slf4j:slf4j-simple:2.0.17=spotbugsSlf4j -org.slf4j:slf4j-simple:2.0.18=checkstyle -org.xmlresolver:xmlresolver:5.3.3=checkstyle,spotbugs -empty=compileClasspath,runtimeClasspath diff --git a/grpc/grpc-codegen/src/main/java/dev/caskeleton/grpc/codegen/GrpcBreakingCategory.java b/grpc/grpc-codegen/src/main/java/dev/caskeleton/grpc/codegen/GrpcBreakingCategory.java deleted file mode 100644 index cdff661..0000000 --- a/grpc/grpc-codegen/src/main/java/dev/caskeleton/grpc/codegen/GrpcBreakingCategory.java +++ /dev/null @@ -1,43 +0,0 @@ -package dev.caskeleton.grpc.codegen; - -/** - * The Buf breaking-change categories, ordered from strictest to loosest. - * - *

The Stable gate is {@link #FILE}, and the reason is the pair of properties below: only FILE - * and PACKAGE detect a change that keeps the wire format identical while breaking every generated - * consumer's compile. A team that gates on WIRE ships a field rename, watches its own integration - * tests pass, and finds out at the consumer's next build. - */ -public enum GrpcBreakingCategory { - /** Strictest: also catches file moves, package moves and Java option changes. */ - FILE(true, true), - /** Catches type and field source breaks within a package, but not a file move. */ - PACKAGE(true, false), - /** Wire plus JSON name compatibility. Source breaks pass. */ - WIRE_JSON(false, false), - /** Binary wire compatibility only. Source breaks pass. */ - WIRE(false, false); - - private final boolean detectsSourceBreak; - private final boolean detectsFileMove; - - GrpcBreakingCategory(boolean detectsSourceBreak, boolean detectsFileMove) { - this.detectsSourceBreak = detectsSourceBreak; - this.detectsFileMove = detectsFileMove; - } - - /** Whether this category fails a change that stops a generated consumer compiling. */ - public boolean detectsSourceBreak() { - return detectsSourceBreak; - } - - /** Whether this category fails a file or package relocation. */ - public boolean detectsFileMove() { - return detectsFileMove; - } - - /** The category the Stable public API is gated on. */ - public static GrpcBreakingCategory stableGate() { - return FILE; - } -} diff --git a/grpc/grpc-codegen/src/main/java/dev/caskeleton/grpc/codegen/GrpcBufPolicy.java b/grpc/grpc-codegen/src/main/java/dev/caskeleton/grpc/codegen/GrpcBufPolicy.java deleted file mode 100644 index 113fd66..0000000 --- a/grpc/grpc-codegen/src/main/java/dev/caskeleton/grpc/codegen/GrpcBufPolicy.java +++ /dev/null @@ -1,75 +0,0 @@ -package dev.caskeleton.grpc.codegen; - -import java.util.List; -import java.util.Set; - -/** - * The schema governance this repository runs, as a value the build and the tests both read. - * - *

Buf's CLI is not part of this toolchain (adaptation D5), so the four lifecycle task names - * below are the contract a CI environment fulfils and {@code GrpcProtoContractValidator} is what - * actually fails a build here. Keeping the task names in the policy rather than only in a workflow - * file means a missing stage is a test failure rather than a stage nobody noticed was gone. - */ -public record GrpcBufPolicy( - GrpcBreakingCategory breakingCategory, - boolean formatEnforced, - boolean lintEnforced, - GrpcSchemaBaseline baseline) { - - /** The lifecycle stages a compliant schema pipeline runs, in order. */ - private static final List REQUIRED_TASKS = - List.of("bufFormatCheck", "bufLint", "bufBuild", "bufBreaking"); - - /** Refuses a policy that would let a source break through. */ - public GrpcBufPolicy { - if (breakingCategory == null) { - throw new IllegalArgumentException("a Buf policy needs a breaking category"); - } - if (baseline == null) { - throw new IllegalArgumentException( - "a Buf policy needs a released baseline to compare against"); - } - if (!breakingCategory.detectsSourceBreak()) { - throw new IllegalArgumentException( - "the Stable public API may not be gated on " - + breakingCategory - + ": wire compatibility alone lets a rename through as compatible while every " - + "generated consumer stops compiling"); - } - if (!formatEnforced || !lintEnforced) { - throw new IllegalArgumentException( - "format and lint are not optional; a schema that is not linted is a schema whose style " - + "rules are whatever the last author preferred"); - } - } - - /** The Stable policy: FILE breaking, format and lint enforced. */ - public static GrpcBufPolicy stable(GrpcSchemaBaseline baseline) { - return new GrpcBufPolicy(GrpcBreakingCategory.stableGate(), true, true, baseline); - } - - /** The lifecycle task names a compliant pipeline registers. */ - public static List requiredTasks() { - return REQUIRED_TASKS; - } - - /** - * The task names missing from {@code registeredTasks}. - * - * @return an empty set when the pipeline is complete - */ - public static Set missingTasks(Set registeredTasks) { - if (registeredTasks == null) { - throw new IllegalArgumentException("the registered task set must not be null"); - } - return REQUIRED_TASKS.stream() - .filter(task -> !registeredTasks.contains(task)) - .collect(java.util.stream.Collectors.toUnmodifiableSet()); - } - - /** Whether a candidate schema hash may be released without a breaking review. */ - public boolean unchangedFromBaseline(String candidateSchemaHash) { - return baseline.matches(candidateSchemaHash); - } -} diff --git a/grpc/grpc-codegen/src/main/java/dev/caskeleton/grpc/codegen/GrpcCodegenManifest.java b/grpc/grpc-codegen/src/main/java/dev/caskeleton/grpc/codegen/GrpcCodegenManifest.java deleted file mode 100644 index 38fb194..0000000 --- a/grpc/grpc-codegen/src/main/java/dev/caskeleton/grpc/codegen/GrpcCodegenManifest.java +++ /dev/null @@ -1,81 +0,0 @@ -package dev.caskeleton.grpc.codegen; - -/** - * Who generates Java from the schema, with what versions, into where. - * - *

One owner, named. Two generators for one schema is the state in which a type exists twice with - * different options and the classpath decides which one a consumer gets; refusing a second owner is - * cheaper than diagnosing that. - * - *

Both version sources are required to be the managed BOM rather than a literal. A pinned - * protobuf version beside a BOM-managed gRPC version is how the runtime and the generator drift - * into a combination nobody tested, and the symptom is a {@code NoSuchMethodError} in generated - * code. - */ -public record GrpcCodegenManifest( - String codegenOwner, - String protobufVersionSource, - String grpcJavaVersionSource, - GrpcCodegenOutput output, - GrpcGeneratedPackagePolicy packagePolicy) { - - /** The only accepted version source: whatever the build's managed platform resolves. */ - public static final String MANAGED_VERSION_SOURCE = "managed-platform"; - - /** Refuses a second owner, a literal version, or overlapping package namespaces. */ - public GrpcCodegenManifest { - if (codegenOwner == null || codegenOwner.isBlank()) { - throw new IllegalArgumentException("code generation needs exactly one named owner"); - } - if (output == null || packagePolicy == null) { - throw new IllegalArgumentException("a codegen manifest needs an output and a package policy"); - } - requireManagedVersion(protobufVersionSource, "protobuf"); - requireManagedVersion(grpcJavaVersionSource, "grpc-java"); - packagePolicy.requireDisjoint(); - } - - private static void requireManagedVersion(String source, String what) { - if (!MANAGED_VERSION_SOURCE.equals(source)) { - throw new IllegalArgumentException( - what - + " version must come from the managed platform, not from a literal declaration; got '" - + source - + "'. A pinned generator beside a managed runtime is a combination nobody tested."); - } - } - - /** - * This repository's manifest. - * - *

The owner is the Gradle protobuf plugin. It does not run in this build yet — adaptation D6 - * records why, and this manifest is what a future decision to turn it on has to satisfy rather - * than replace. - */ - public static GrpcCodegenManifest caSkeleton() { - return new GrpcCodegenManifest( - "gradle-protobuf-plugin", - MANAGED_VERSION_SOURCE, - MANAGED_VERSION_SOURCE, - GrpcCodegenOutput.standard(), - new GrpcGeneratedPackagePolicy( - java.util.Set.of("dev.caskeleton"), - java.util.Set.of("hyeonworks.grpc.common.v1.generated"))); - } - - /** - * Fails when a second generator claims the same schema. - * - * @throws IllegalStateException when {@code otherOwner} is not this manifest's owner - */ - public void requireSoleOwner(String otherOwner) { - if (!codegenOwner.equals(otherOwner)) { - throw new IllegalStateException( - "Java code generation for this schema is owned by '" - + codegenOwner - + "'; '" - + otherOwner - + "' may not also generate it"); - } - } -} diff --git a/grpc/grpc-codegen/src/main/java/dev/caskeleton/grpc/codegen/GrpcCodegenOutput.java b/grpc/grpc-codegen/src/main/java/dev/caskeleton/grpc/codegen/GrpcCodegenOutput.java deleted file mode 100644 index 719efdd..0000000 --- a/grpc/grpc-codegen/src/main/java/dev/caskeleton/grpc/codegen/GrpcCodegenOutput.java +++ /dev/null @@ -1,58 +0,0 @@ -package dev.caskeleton.grpc.codegen; - -/** - * Where generated artifacts land. - * - *

Everything here is required to be inside a build directory. A generator that writes into a - * source tree produces files that get committed, then edited, then silently reverted by the next - * regeneration — and the diff that reverts them looks like the generator working correctly. - */ -public record GrpcCodegenOutput( - String javaOutputDirectory, - String grpcJavaOutputDirectory, - String descriptorSetPath, - boolean includeSourceInfo) { - - private static final String BUILD_ROOT = "build/"; - - /** Requires every path to be build-directory relative. */ - public GrpcCodegenOutput { - requireBuildRelative(javaOutputDirectory, "java output directory"); - requireBuildRelative(grpcJavaOutputDirectory, "grpc-java output directory"); - requireBuildRelative(descriptorSetPath, "descriptor set path"); - if (!descriptorSetPath.endsWith(".desc") && !descriptorSetPath.endsWith(".binpb")) { - throw new IllegalArgumentException( - "a descriptor set is a serialized FileDescriptorSet; expected a .desc or .binpb path, got '" - + descriptorSetPath - + "'"); - } - } - - private static void requireBuildRelative(String path, String what) { - if (path == null || path.isBlank()) { - throw new IllegalArgumentException(what + " must not be blank"); - } - if (path.startsWith("/") || path.contains("..")) { - throw new IllegalArgumentException( - what + " must be a project-relative path without '..'; got '" + path + "'"); - } - if (!path.startsWith(BUILD_ROOT)) { - throw new IllegalArgumentException( - what - + " must be under '" - + BUILD_ROOT - + "'; generated sources in a source tree get committed and then edited. Got '" - + path - + "'"); - } - } - - /** This repository's layout. */ - public static GrpcCodegenOutput standard() { - return new GrpcCodegenOutput( - "build/generated/source/proto/main/java", - "build/generated/source/proto/main/grpc", - "build/generated/descriptor/stable-schema.desc", - true); - } -} diff --git a/grpc/grpc-codegen/src/main/java/dev/caskeleton/grpc/codegen/GrpcConsumerFixture.java b/grpc/grpc-codegen/src/main/java/dev/caskeleton/grpc/codegen/GrpcConsumerFixture.java deleted file mode 100644 index 189cbfe..0000000 --- a/grpc/grpc-codegen/src/main/java/dev/caskeleton/grpc/codegen/GrpcConsumerFixture.java +++ /dev/null @@ -1,158 +0,0 @@ -package dev.caskeleton.grpc.codegen; - -import java.util.ArrayList; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Set; - -/** - * A previously released consumer, described by exactly what it compiles against. - * - *

This is the check a wire-compatibility gate cannot make. A field rename, a service move to a - * new package, or a change to {@code java_package} keeps every serialized message valid and stops - * every generated client compiling — and the only way to notice before the consumer does is to keep - * a record of what the consumer names and compare a candidate schema against it. - */ -public record GrpcConsumerFixture( - String name, - String schemaVersion, - Set requiredServicePaths, - Set requiredMethodPaths, - Set requiredJavaPackages) { - - /** What kind of source break a consumer hit. Reported separately, never merged into one count. */ - public enum BreakKind { - /** A service the consumer names is gone or moved. */ - SERVICE_PATH, - /** A method the consumer calls is gone or renamed. */ - METHOD_PATH, - /** The Java package the consumer imports from moved. */ - JAVA_PACKAGE - } - - /** One thing a consumer needs that a candidate schema no longer provides. */ - public record SourceBreak(BreakKind kind, String missing) { - /** Requires both halves. */ - public SourceBreak { - if (kind == null || missing == null || missing.isBlank()) { - throw new IllegalArgumentException("a source break names its kind and what went missing"); - } - } - } - - /** Copies every requirement set. */ - public GrpcConsumerFixture { - if (name == null || name.isBlank()) { - throw new IllegalArgumentException("a consumer fixture needs a name"); - } - if (schemaVersion == null || schemaVersion.isBlank()) { - throw new IllegalArgumentException( - "a consumer fixture names the schema version it was built against"); - } - if (requiredServicePaths == null - || requiredMethodPaths == null - || requiredJavaPackages == null) { - throw new IllegalArgumentException("a consumer fixture states all three requirement sets"); - } - requiredServicePaths = Set.copyOf(requiredServicePaths); - requiredMethodPaths = Set.copyOf(requiredMethodPaths); - requiredJavaPackages = Set.copyOf(requiredJavaPackages); - } - - /** - * Derives a fixture from a released consumer's own source. - * - *

Read from the consumer rather than declared beside it, because a hand-written requirement - * list is a second copy of what the client already says and the copy is the one that stops being - * updated. Three rules, all mechanical: - * - *

    - *
  • a generated Java package is any package a {@code fixture} class imports from; - *
  • a service is a {@code Grpc} import, mapped back to {@code .} with - * the generated-package suffix removed; - *
  • a method is a {@code stub.(} call, mapped to {@code /}. - *
- * - *

It is an approximation of compiling the fixture, which is what the plan asks for and what - * ADR-GRPC-002 records this repository cannot do yet. It is a useful approximation because it - * fails on exactly the changes a compile would fail on: a renamed method, a moved service, a - * relocated Java package. - * - * @param generatedPackageSuffix the segment appended to a proto package for generated code, e.g. - * {@code generated}; removed to recover the schema's own service path - */ - public static GrpcConsumerFixture fromJavaSource( - String name, String schemaVersion, String javaSource, String generatedPackageSuffix) { - if (javaSource == null || javaSource.isBlank()) { - throw new IllegalArgumentException("a consumer fixture needs its source text"); - } - if (generatedPackageSuffix == null || generatedPackageSuffix.isBlank()) { - throw new IllegalArgumentException("the generated package suffix is required"); - } - - java.util.Set javaPackages = new LinkedHashSet<>(); - java.util.Set servicePaths = new LinkedHashSet<>(); - java.util.regex.Matcher imports = - java.util.regex.Pattern.compile( - "^\\s*import\\s+([\\w.]+)\\.(\\w+);", java.util.regex.Pattern.MULTILINE) - .matcher(javaSource); - while (imports.find()) { - String importedPackage = imports.group(1); - String importedType = imports.group(2); - if (!importedPackage.endsWith("." + generatedPackageSuffix)) { - continue; - } - javaPackages.add(importedPackage); - if (importedType.endsWith("Grpc")) { - String protoPackage = - importedPackage.substring( - 0, importedPackage.length() - generatedPackageSuffix.length() - 1); - servicePaths.add( - protoPackage - + "." - + importedType.substring(0, importedType.length() - "Grpc".length())); - } - } - - java.util.Set methodPaths = new LinkedHashSet<>(); - java.util.regex.Matcher calls = - java.util.regex.Pattern.compile("\\bstub\\.(\\w+)\\s*\\(").matcher(javaSource); - while (calls.find()) { - String method = calls.group(1); - String upperCamel = Character.toUpperCase(method.charAt(0)) + method.substring(1); - servicePaths.forEach(service -> methodPaths.add(service + "/" + upperCamel)); - } - - if (servicePaths.isEmpty() || methodPaths.isEmpty()) { - throw new IllegalArgumentException( - "no service or method could be derived from '" - + name - + "'; a fixture that requires nothing cannot detect a break"); - } - return new GrpcConsumerFixture(name, schemaVersion, servicePaths, methodPaths, javaPackages); - } - - /** - * What this consumer would fail to compile against {@code candidate}. - * - * @return an empty list when the consumer still compiles - */ - public List breaksAgainst(GrpcDescriptorArtifact candidate) { - if (candidate == null) { - throw new IllegalArgumentException("a compatibility check needs a candidate artifact"); - } - List breaks = new ArrayList<>(); - collect(breaks, BreakKind.SERVICE_PATH, requiredServicePaths, candidate.servicePaths()); - collect(breaks, BreakKind.METHOD_PATH, requiredMethodPaths, candidate.methodPaths()); - collect( - breaks, BreakKind.JAVA_PACKAGE, requiredJavaPackages, candidate.generatedJavaPackages()); - return List.copyOf(breaks); - } - - private static void collect( - List breaks, BreakKind kind, Set required, Set available) { - Set missing = new LinkedHashSet<>(required); - missing.removeAll(available); - missing.stream().sorted().forEach(entry -> breaks.add(new SourceBreak(kind, entry))); - } -} diff --git a/grpc/grpc-codegen/src/main/java/dev/caskeleton/grpc/codegen/GrpcDescriptorArtifact.java b/grpc/grpc-codegen/src/main/java/dev/caskeleton/grpc/codegen/GrpcDescriptorArtifact.java deleted file mode 100644 index c6a1c39..0000000 --- a/grpc/grpc-codegen/src/main/java/dev/caskeleton/grpc/codegen/GrpcDescriptorArtifact.java +++ /dev/null @@ -1,59 +0,0 @@ -package dev.caskeleton.grpc.codegen; - -import java.util.Set; - -/** - * One immutable release of the schema: what it contains, and the hashes that prove which bytes it - * was built from. - * - *

Service and method paths are carried explicitly, not derived on demand, because they are what - * a consumer compatibility check compares. A descriptor that only carries a digest can say - * "something changed" and nothing else, which is the answer least useful to the person who has to - * decide whether to release. - */ -public record GrpcDescriptorArtifact( - String schemaVersion, - String schemaHash, - String descriptorSetDigest, - String bufImageDigest, - String policyVersion, - Set servicePaths, - Set methodPaths, - Set generatedJavaPackages) { - - /** Requires an immutable version, three digests and a non-empty surface. */ - public GrpcDescriptorArtifact { - if (schemaVersion == null || schemaVersion.isBlank() || schemaVersion.endsWith("-SNAPSHOT")) { - throw new IllegalArgumentException( - "a schema artifact publishes an immutable version; got '" + schemaVersion + "'"); - } - requireDigest(schemaHash, "schema hash"); - requireDigest(descriptorSetDigest, "descriptor set digest"); - requireDigest(bufImageDigest, "buf image digest"); - if (policyVersion == null || policyVersion.isBlank()) { - throw new IllegalArgumentException( - "a schema artifact records the policy version it was judged under"); - } - if (servicePaths == null || methodPaths == null || generatedJavaPackages == null) { - throw new IllegalArgumentException( - "a schema artifact carries its service, method and package surface"); - } - if (methodPaths.isEmpty()) { - throw new IllegalArgumentException("a schema artifact with no methods describes nothing"); - } - servicePaths = Set.copyOf(servicePaths); - methodPaths = Set.copyOf(methodPaths); - generatedJavaPackages = Set.copyOf(generatedJavaPackages); - } - - private static void requireDigest(String digest, String what) { - if (digest == null || !digest.startsWith("sha256:") || digest.length() < 15) { - throw new IllegalArgumentException(what + " must be 'sha256:'; got '" + digest + "'"); - } - } - - /** Whether this artifact is byte-identical to {@code baseline}. */ - public boolean unchangedFrom(GrpcSchemaBaseline baseline) { - return baseline.matches(schemaHash); - } -} diff --git a/grpc/grpc-codegen/src/main/java/dev/caskeleton/grpc/codegen/GrpcGeneratedPackagePolicy.java b/grpc/grpc-codegen/src/main/java/dev/caskeleton/grpc/codegen/GrpcGeneratedPackagePolicy.java deleted file mode 100644 index fd74568..0000000 --- a/grpc/grpc-codegen/src/main/java/dev/caskeleton/grpc/codegen/GrpcGeneratedPackagePolicy.java +++ /dev/null @@ -1,68 +0,0 @@ -package dev.caskeleton.grpc.codegen; - -import java.util.ArrayList; -import java.util.List; -import java.util.Set; - -/** - * Keeps generated Java packages and hand-written ones apart. - * - *

An overlap is not a style problem. Generated code is deleted and rewritten on every build, so - * a hand-written class that shares its package is one clean build away from being either - * overwritten or, more often, from making the generator's output unbuildable in a way that reads as - * a compiler bug. Splitting the namespaces makes the ownership of every file legible from its - * package alone. - */ -public record GrpcGeneratedPackagePolicy( - Set handWrittenPackages, Set generatedPackages) { - - /** Copies both sets. */ - public GrpcGeneratedPackagePolicy { - if (handWrittenPackages == null || generatedPackages == null) { - throw new IllegalArgumentException("both package sets must be present"); - } - if (generatedPackages.isEmpty()) { - throw new IllegalArgumentException("a codegen policy names at least one generated package"); - } - handWrittenPackages = Set.copyOf(handWrittenPackages); - generatedPackages = Set.copyOf(generatedPackages); - } - - /** - * Every overlap between the two namespaces, described. - * - * @return an empty list when the namespaces are disjoint - */ - public List overlaps() { - List overlaps = new ArrayList<>(); - for (String generated : generatedPackages) { - for (String handWritten : handWrittenPackages) { - if (generated.equals(handWritten) - || generated.startsWith(handWritten + ".") - || handWritten.startsWith(generated + ".")) { - overlaps.add( - "generated package '" - + generated - + "' overlaps hand-written package '" - + handWritten - + "'"); - } - } - } - overlaps.sort(java.util.Comparator.naturalOrder()); - return List.copyOf(overlaps); - } - - /** - * Fails when the namespaces overlap. - * - * @throws IllegalStateException naming every overlap - */ - public void requireDisjoint() { - List overlaps = overlaps(); - if (!overlaps.isEmpty()) { - throw new IllegalStateException( - "generated and hand-written Java packages must be disjoint: " + overlaps); - } - } -} diff --git a/grpc/grpc-codegen/src/main/java/dev/caskeleton/grpc/codegen/GrpcSchemaArtifactPublisher.java b/grpc/grpc-codegen/src/main/java/dev/caskeleton/grpc/codegen/GrpcSchemaArtifactPublisher.java deleted file mode 100644 index 225894c..0000000 --- a/grpc/grpc-codegen/src/main/java/dev/caskeleton/grpc/codegen/GrpcSchemaArtifactPublisher.java +++ /dev/null @@ -1,113 +0,0 @@ -package dev.caskeleton.grpc.codegen; - -import java.util.ArrayList; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; - -/** - * Decides whether a candidate schema may be published, and refuses to let a released version change - * underneath its consumers. - * - *

Two rules, and the second is the one that gets skipped in a hurry: a consumer fixture that no - * longer compiles blocks the release. Publishing anyway and telling the consumers is not the same - * thing — by then the artifact exists, somebody has resolved it, and the fix is a new version - * rather than a decision not to make the change. - */ -public final class GrpcSchemaArtifactPublisher { - - private final GrpcBufPolicy policy; - private final Map publishedHashesByVersion = new LinkedHashMap<>(); - - /** Binds a publisher to the governance policy it enforces. */ - public GrpcSchemaArtifactPublisher(GrpcBufPolicy policy) { - if (policy == null) { - throw new IllegalArgumentException("a publisher needs a Buf policy"); - } - this.policy = policy; - } - - /** Whether a candidate may be published, and if not, why not. */ - public record PublishDecision(boolean allowed, List blockers) { - /** Copies the blocker list. */ - public PublishDecision { - if (blockers == null) { - throw new IllegalArgumentException( - "a publish decision lists its blockers, even when empty"); - } - blockers = List.copyOf(blockers); - if (allowed && !blockers.isEmpty()) { - throw new IllegalArgumentException("an allowed publish has no blockers"); - } - if (!allowed && blockers.isEmpty()) { - throw new IllegalArgumentException("a refused publish says why"); - } - } - } - - /** - * Evaluates a candidate against the policy and every consumer fixture. - * - * @param fixtures the previously released consumers this schema must keep compiling - */ - public PublishDecision evaluate( - GrpcDescriptorArtifact candidate, List fixtures) { - if (candidate == null || fixtures == null) { - throw new IllegalArgumentException("evaluation needs a candidate and a fixture list"); - } - List blockers = new ArrayList<>(); - - String alreadyPublished = publishedHashesByVersion.get(candidate.schemaVersion()); - if (alreadyPublished != null && !alreadyPublished.equals(candidate.schemaHash())) { - blockers.add( - "version '" - + candidate.schemaVersion() - + "' is already published with a different schema hash; a released schema version is " - + "immutable"); - } - if (!policy.breakingCategory().detectsSourceBreak()) { - blockers.add("the active breaking category does not detect source breaks"); - } - for (GrpcConsumerFixture fixture : fixtures) { - for (GrpcConsumerFixture.SourceBreak sourceBreak : fixture.breaksAgainst(candidate)) { - blockers.add( - "consumer '" - + fixture.name() - + "' (" - + fixture.schemaVersion() - + ") loses " - + sourceBreak.kind() - + " '" - + sourceBreak.missing() - + "'"); - } - } - return new PublishDecision(blockers.isEmpty(), blockers); - } - - /** - * Records a successful publish. - * - * @throws IllegalStateException when the decision refused it - */ - public void publish(GrpcDescriptorArtifact candidate, PublishDecision decision) { - if (decision == null || !decision.allowed()) { - throw new IllegalStateException( - "refusing to publish '" - + (candidate == null ? "null" : candidate.schemaVersion()) - + "': " - + (decision == null ? "no decision" : decision.blockers())); - } - publishedHashesByVersion.put(candidate.schemaVersion(), candidate.schemaHash()); - } - - /** The hash published for {@code version}, or null when nothing was. */ - public String publishedHash(String version) { - return publishedHashesByVersion.get(version); - } - - /** The governance policy in force. */ - public GrpcBufPolicy policy() { - return policy; - } -} diff --git a/grpc/grpc-codegen/src/main/java/dev/caskeleton/grpc/codegen/GrpcSchemaBaseline.java b/grpc/grpc-codegen/src/main/java/dev/caskeleton/grpc/codegen/GrpcSchemaBaseline.java deleted file mode 100644 index c0468ba..0000000 --- a/grpc/grpc-codegen/src/main/java/dev/caskeleton/grpc/codegen/GrpcSchemaBaseline.java +++ /dev/null @@ -1,37 +0,0 @@ -package dev.caskeleton.grpc.codegen; - -import java.time.Instant; - -/** - * The released schema a breaking check compares against. - * - *

Pinned to a released artifact rather than to a branch, and that is the whole point. Comparing - * against the previous commit answers "did this commit break anything", which is not the question: - * a breaking change introduced two commits ago and refined since then passes every commit-to-commit - * check while being broken against everything that has actually been deployed. - */ -public record GrpcSchemaBaseline(String version, String schemaHash, Instant releasedAt) { - - /** Requires an immutable version, a hash and a release moment. */ - public GrpcSchemaBaseline { - if (version == null || version.isBlank()) { - throw new IllegalArgumentException("a schema baseline needs a released version"); - } - if (version.endsWith("-SNAPSHOT")) { - throw new IllegalArgumentException( - "a breaking baseline must be an immutable release, not '" + version + "'"); - } - if (schemaHash == null || !schemaHash.startsWith("sha256:") || schemaHash.length() < 15) { - throw new IllegalArgumentException( - "a schema baseline needs a 'sha256:' hash; got '" + schemaHash + "'"); - } - if (releasedAt == null) { - throw new IllegalArgumentException("a schema baseline needs a release timestamp"); - } - } - - /** Whether {@code candidateHash} is byte-identical to this baseline. */ - public boolean matches(String candidateHash) { - return schemaHash.equals(candidateHash); - } -} diff --git a/grpc/grpc-codegen/src/test/java/dev/caskeleton/grpc/codegen/GrpcBufPolicyTest.java b/grpc/grpc-codegen/src/test/java/dev/caskeleton/grpc/codegen/GrpcBufPolicyTest.java deleted file mode 100644 index efb2756..0000000 --- a/grpc/grpc-codegen/src/test/java/dev/caskeleton/grpc/codegen/GrpcBufPolicyTest.java +++ /dev/null @@ -1,88 +0,0 @@ -package dev.caskeleton.grpc.codegen; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.core.api.Assertions.assertThatThrownBy; - -import java.time.Instant; -import java.util.Set; -import org.junit.jupiter.api.DisplayName; -import org.junit.jupiter.api.Test; - -class GrpcBufPolicyTest { - - private static final GrpcSchemaBaseline BASELINE = - new GrpcSchemaBaseline( - "1.4.0", - "sha256:0f1e2d3c4b5a69788796a5b4c3d2e1f00f1e2d3c4b5a69788796a5b4c3d2e1f0", - Instant.parse("2026-08-01T00:00:00Z")); - - @Test - @DisplayName("the Stable public API is gated on the FILE breaking category") - void stablePublicApiUsesTheFileCategory() { - GrpcBufPolicy policy = GrpcBufPolicy.stable(BASELINE); - - assertThat(policy.breakingCategory()).isEqualTo(GrpcBreakingCategory.FILE); - assertThat(GrpcBreakingCategory.stableGate()).isEqualTo(GrpcBreakingCategory.FILE); - assertThat(policy.breakingCategory().detectsSourceBreak()).isTrue(); - assertThat(policy.breakingCategory().detectsFileMove()).isTrue(); - } - - @Test - @DisplayName("wire-only compatibility may not gate the Stable public API") - void wireOnlyCompatibilityIsRefused() { - assertThatThrownBy(() -> new GrpcBufPolicy(GrpcBreakingCategory.WIRE, true, true, BASELINE)) - .isInstanceOf(IllegalArgumentException.class) - .hasMessageContaining("stops compiling"); - assertThatThrownBy( - () -> new GrpcBufPolicy(GrpcBreakingCategory.WIRE_JSON, true, true, BASELINE)) - .isInstanceOf(IllegalArgumentException.class); - assertThat(GrpcBreakingCategory.WIRE.detectsSourceBreak()).isFalse(); - assertThat(GrpcBreakingCategory.PACKAGE.detectsFileMove()).isFalse(); - } - - @Test - @DisplayName("format and lint are not optional") - void formatAndLintAreNotOptional() { - assertThatThrownBy(() -> new GrpcBufPolicy(GrpcBreakingCategory.FILE, false, true, BASELINE)) - .isInstanceOf(IllegalArgumentException.class); - assertThatThrownBy(() -> new GrpcBufPolicy(GrpcBreakingCategory.FILE, true, false, BASELINE)) - .isInstanceOf(IllegalArgumentException.class); - } - - @Test - @DisplayName("the four lifecycle stages are named, and a missing one is reported") - void lifecycleStagesAreNamedAndChecked() { - assertThat(GrpcBufPolicy.requiredTasks()) - .containsExactly("bufFormatCheck", "bufLint", "bufBuild", "bufBreaking"); - assertThat(GrpcBufPolicy.missingTasks(Set.of("bufFormatCheck", "bufLint", "bufBuild"))) - .containsExactly("bufBreaking"); - assertThat(GrpcBufPolicy.missingTasks(Set.copyOf(GrpcBufPolicy.requiredTasks()))).isEmpty(); - } - - @Test - @DisplayName("the breaking baseline is a released version, never a snapshot") - void baselineIsAnImmutableRelease() { - assertThatThrownBy( - () -> - new GrpcSchemaBaseline( - "1.5.0-SNAPSHOT", - "sha256:0f1e2d3c4b5a69788796a5b4c3d2e1f00f1e2d3c4b5a69788796a5b4c3d2e1f0", - Instant.parse("2026-08-01T00:00:00Z"))) - .isInstanceOf(IllegalArgumentException.class) - .hasMessageContaining("immutable release"); - assertThatThrownBy( - () -> - new GrpcSchemaBaseline( - "1.5.0", "not-a-digest", Instant.parse("2026-08-01T00:00:00Z"))) - .isInstanceOf(IllegalArgumentException.class); - } - - @Test - @DisplayName("an unchanged schema hash needs no breaking review") - void unchangedSchemaNeedsNoBreakingReview() { - GrpcBufPolicy policy = GrpcBufPolicy.stable(BASELINE); - - assertThat(policy.unchangedFromBaseline(BASELINE.schemaHash())).isTrue(); - assertThat(policy.unchangedFromBaseline("sha256:ffffffffffffffffffffffffffffffff")).isFalse(); - } -} diff --git a/grpc/grpc-codegen/src/test/java/dev/caskeleton/grpc/codegen/GrpcCodegenManifestTest.java b/grpc/grpc-codegen/src/test/java/dev/caskeleton/grpc/codegen/GrpcCodegenManifestTest.java deleted file mode 100644 index c579df3..0000000 --- a/grpc/grpc-codegen/src/test/java/dev/caskeleton/grpc/codegen/GrpcCodegenManifestTest.java +++ /dev/null @@ -1,78 +0,0 @@ -package dev.caskeleton.grpc.codegen; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.core.api.Assertions.assertThatThrownBy; - -import java.util.Set; -import org.junit.jupiter.api.DisplayName; -import org.junit.jupiter.api.Test; - -class GrpcCodegenManifestTest { - - @Test - @DisplayName("Java code generation has exactly one owner, and a second is refused") - void codeGenerationHasOneOwner() { - GrpcCodegenManifest manifest = GrpcCodegenManifest.caSkeleton(); - - manifest.requireSoleOwner("gradle-protobuf-plugin"); - assertThatThrownBy(() -> manifest.requireSoleOwner("hand-rolled-protoc-exec")) - .isInstanceOf(IllegalStateException.class) - .hasMessageContaining("hand-rolled-protoc-exec"); - } - - @Test - @DisplayName("generator versions come from the managed platform, never from a literal") - void generatorVersionsComeFromTheManagedPlatform() { - assertThatThrownBy( - () -> - new GrpcCodegenManifest( - "gradle-protobuf-plugin", - "3.25.5", - GrpcCodegenManifest.MANAGED_VERSION_SOURCE, - GrpcCodegenOutput.standard(), - new GrpcGeneratedPackagePolicy( - Set.of("dev.caskeleton"), Set.of("hyeonworks.grpc.common.v1.generated")))) - .isInstanceOf(IllegalArgumentException.class) - .hasMessageContaining("protobuf version must come from the managed platform"); - } - - @Test - @DisplayName("generated sources land under build/, never in a source tree") - void generatedSourcesLandUnderBuild() { - assertThatThrownBy( - () -> new GrpcCodegenOutput("src/main/java", "build/g", "build/x.desc", true)) - .isInstanceOf(IllegalArgumentException.class) - .hasMessageContaining("must be under 'build/'"); - assertThatThrownBy(() -> new GrpcCodegenOutput("build/a", "build/b", "build/schema.txt", true)) - .isInstanceOf(IllegalArgumentException.class) - .hasMessageContaining("FileDescriptorSet"); - assertThat(GrpcCodegenOutput.standard().includeSourceInfo()).isTrue(); - } - - @Test - @DisplayName("a generated package inside a hand-written one fails the manifest") - void generatedAndHandWrittenPackagesMustBeDisjoint() { - GrpcGeneratedPackagePolicy overlapping = - new GrpcGeneratedPackagePolicy( - Set.of("dev.caskeleton"), Set.of("dev.caskeleton.grpc.generated")); - - assertThat(overlapping.overlaps()).hasSize(1); - assertThatThrownBy(overlapping::requireDisjoint) - .isInstanceOf(IllegalStateException.class) - .hasMessageContaining("dev.caskeleton.grpc.generated"); - assertThat( - new GrpcGeneratedPackagePolicy( - Set.of("dev.caskeleton"), Set.of("hyeonworks.grpc.common.v1.generated")) - .overlaps()) - .isEmpty(); - } - - @Test - @DisplayName("an overlap is caught in both directions") - void overlapIsSymmetric() { - GrpcGeneratedPackagePolicy generatedIsAnAncestor = - new GrpcGeneratedPackagePolicy(Set.of("hyeonworks.grpc.hand"), Set.of("hyeonworks.grpc")); - - assertThat(generatedIsAnAncestor.overlaps()).hasSize(1); - } -} diff --git a/grpc/grpc-codegen/src/test/java/dev/caskeleton/grpc/codegen/GrpcDescriptorArtifactTest.java b/grpc/grpc-codegen/src/test/java/dev/caskeleton/grpc/codegen/GrpcDescriptorArtifactTest.java deleted file mode 100644 index fb25a9a..0000000 --- a/grpc/grpc-codegen/src/test/java/dev/caskeleton/grpc/codegen/GrpcDescriptorArtifactTest.java +++ /dev/null @@ -1,248 +0,0 @@ -package dev.caskeleton.grpc.codegen; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.core.api.Assertions.assertThatThrownBy; - -import java.time.Instant; -import java.util.List; -import java.util.Set; -import org.junit.jupiter.api.DisplayName; -import org.junit.jupiter.api.Test; - -class GrpcDescriptorArtifactTest { - - private static final String DIGEST_A = - "sha256:0f1e2d3c4b5a69788796a5b4c3d2e1f00f1e2d3c4b5a69788796a5b4c3d2e1f0"; - private static final String DIGEST_B = - "sha256:1122334455667788990011223344556677889900112233445566778899001122"; - - private static final GrpcSchemaBaseline BASELINE = - new GrpcSchemaBaseline("1.4.0", DIGEST_A, Instant.parse("2026-08-01T00:00:00Z")); - - private static GrpcDescriptorArtifact artifact( - String version, String hash, Set methods, Set javaPackages) { - return new GrpcDescriptorArtifact( - version, - hash, - DIGEST_A, - DIGEST_B, - "grpc-stable-policy-1", - Set.of("hyeonworks.document.v1.DocumentService"), - methods, - javaPackages); - } - - private static final Set METHODS = - Set.of( - "hyeonworks.document.v1.DocumentService/GetDocument", - "hyeonworks.document.v1.DocumentService/CreateDocument"); - private static final Set PACKAGES = Set.of("hyeonworks.document.v1.generated"); - - private static String resource(String path) { - try (java.io.InputStream stream = - GrpcDescriptorArtifactTest.class.getClassLoader().getResourceAsStream(path)) { - if (stream == null) { - throw new IllegalStateException("missing test resource " + path); - } - return new String(stream.readAllBytes(), java.nio.charset.StandardCharsets.UTF_8); - } catch (java.io.IOException e) { - throw new java.io.UncheckedIOException(e); - } - } - - @Test - @DisplayName("a schema artifact publishes an immutable version and three digests") - void artifactCarriesAnImmutableVersionAndDigests() { - GrpcDescriptorArtifact candidate = artifact("1.5.0", DIGEST_B, METHODS, PACKAGES); - - assertThat(candidate.schemaVersion()).isEqualTo("1.5.0"); - assertThat(candidate.unchangedFrom(BASELINE)).isFalse(); - assertThat(artifact("1.4.0", DIGEST_A, METHODS, PACKAGES).unchangedFrom(BASELINE)).isTrue(); - assertThatThrownBy(() -> artifact("1.5.0-SNAPSHOT", DIGEST_B, METHODS, PACKAGES)) - .isInstanceOf(IllegalArgumentException.class) - .hasMessageContaining("immutable version"); - assertThatThrownBy(() -> artifact("1.5.0", "nope", METHODS, PACKAGES)) - .isInstanceOf(IllegalArgumentException.class); - } - - @Test - @DisplayName("service, method and Java package breaks are reported separately") - void sourceBreaksAreReportedByKind() { - GrpcConsumerFixture consumer = - new GrpcConsumerFixture( - "document-client-v1", - "1.4.0", - Set.of("hyeonworks.document.v1.DocumentService"), - METHODS, - PACKAGES); - GrpcDescriptorArtifact renamedEverything = - new GrpcDescriptorArtifact( - "1.5.0", - DIGEST_B, - DIGEST_A, - DIGEST_B, - "grpc-stable-policy-1", - Set.of("hyeonworks.document.v2.DocumentService"), - Set.of("hyeonworks.document.v2.DocumentService/GetDocument"), - Set.of("hyeonworks.document.v2.generated")); - - List breaks = consumer.breaksAgainst(renamedEverything); - - assertThat(breaks) - .extracting(GrpcConsumerFixture.SourceBreak::kind) - .containsExactlyInAnyOrder( - GrpcConsumerFixture.BreakKind.SERVICE_PATH, - GrpcConsumerFixture.BreakKind.METHOD_PATH, - GrpcConsumerFixture.BreakKind.METHOD_PATH, - GrpcConsumerFixture.BreakKind.JAVA_PACKAGE); - } - - @Test - @DisplayName("a consumer that still compiles reports no break") - void compatibleSchemaBreaksNothing() { - GrpcConsumerFixture consumer = - new GrpcConsumerFixture( - "document-client-v1", - "1.4.0", - Set.of("hyeonworks.document.v1.DocumentService"), - METHODS, - PACKAGES); - Set widened = - Set.of( - "hyeonworks.document.v1.DocumentService/GetDocument", - "hyeonworks.document.v1.DocumentService/CreateDocument", - "hyeonworks.document.v1.DocumentService/ArchiveDocument"); - - assertThat(consumer.breaksAgainst(artifact("1.5.0", DIGEST_B, widened, PACKAGES))).isEmpty(); - } - - @Test - @DisplayName("the committed v1 consumer fixture states its own requirements") - void theCommittedFixtureStatesItsOwnRequirements() { - GrpcConsumerFixture derived = - GrpcConsumerFixture.fromJavaSource( - "document-client-v1", - "1.4.0", - resource("consumer-fixtures/v1/src/main/java/fixture/DocumentClientFixture.java"), - "generated"); - - assertThat(derived.requiredServicePaths()) - .containsExactly("hyeonworks.document.v1.DocumentService"); - assertThat(derived.requiredMethodPaths()) - .containsExactlyInAnyOrder( - "hyeonworks.document.v1.DocumentService/GetDocument", - "hyeonworks.document.v1.DocumentService/CreateDocument"); - assertThat(derived.requiredJavaPackages()).containsExactly("hyeonworks.document.v1.generated"); - } - - @Test - @DisplayName("a schema that renames a method the committed fixture calls blocks the release") - void renamingAMethodTheFixtureCallsBlocksTheRelease() { - GrpcConsumerFixture derived = - GrpcConsumerFixture.fromJavaSource( - "document-client-v1", - "1.4.0", - resource("consumer-fixtures/v1/src/main/java/fixture/DocumentClientFixture.java"), - "generated"); - GrpcDescriptorArtifact renamed = - new GrpcDescriptorArtifact( - "1.5.0", - DIGEST_B, - DIGEST_A, - DIGEST_B, - "grpc-stable-policy-1", - Set.of("hyeonworks.document.v1.DocumentService"), - Set.of( - "hyeonworks.document.v1.DocumentService/GetDocument", - "hyeonworks.document.v1.DocumentService/CreateDocumentV2"), - Set.of("hyeonworks.document.v1.generated")); - - GrpcSchemaArtifactPublisher publisher = - new GrpcSchemaArtifactPublisher(GrpcBufPolicy.stable(BASELINE)); - - assertThat(publisher.evaluate(renamed, List.of(derived)).blockers()) - .anySatisfy(blocker -> assertThat(blocker).contains("CreateDocument")); - } - - @Test - @DisplayName("a fixture that requires nothing is refused rather than passing every schema") - void aFixtureThatRequiresNothingIsRefused() { - assertThatThrownBy( - () -> - GrpcConsumerFixture.fromJavaSource( - "empty-client", "1.4.0", "package fixture;\n\nclass Empty {}\n", "generated")) - .isInstanceOf(IllegalArgumentException.class) - .hasMessageContaining("cannot detect a break"); - } - - @Test - @DisplayName("the fixture's own build file pins the schema version it was built against") - void theFixturePinsItsSchemaVersion() { - assertThat(resource("consumer-fixtures/v1/build.gradle.kts")) - .contains("grpc-schema-artifact:1.4.0") - .contains("floats to the latest version"); - } - - @Test - @DisplayName("a consumer fixture failure blocks the release") - void consumerFixtureFailureBlocksTheRelease() { - GrpcSchemaArtifactPublisher publisher = - new GrpcSchemaArtifactPublisher(GrpcBufPolicy.stable(BASELINE)); - GrpcConsumerFixture consumer = - new GrpcConsumerFixture( - "document-client-v1", - "1.4.0", - Set.of("hyeonworks.document.v1.DocumentService"), - METHODS, - PACKAGES); - GrpcDescriptorArtifact dropsAMethod = - artifact( - "1.5.0", - DIGEST_B, - Set.of("hyeonworks.document.v1.DocumentService/GetDocument"), - PACKAGES); - - GrpcSchemaArtifactPublisher.PublishDecision decision = - publisher.evaluate(dropsAMethod, List.of(consumer)); - - assertThat(decision.allowed()).isFalse(); - assertThat(decision.blockers()) - .anySatisfy( - blocker -> - assertThat(blocker).contains("document-client-v1").contains("CreateDocument")); - assertThatThrownBy(() -> publisher.publish(dropsAMethod, decision)) - .isInstanceOf(IllegalStateException.class); - } - - @Test - @DisplayName("a released version may not be republished with different bytes") - void releasedVersionsAreImmutable() { - GrpcSchemaArtifactPublisher publisher = - new GrpcSchemaArtifactPublisher(GrpcBufPolicy.stable(BASELINE)); - GrpcDescriptorArtifact first = artifact("1.5.0", DIGEST_B, METHODS, PACKAGES); - - GrpcSchemaArtifactPublisher.PublishDecision allowed = publisher.evaluate(first, List.of()); - assertThat(allowed.allowed()).isTrue(); - publisher.publish(first, allowed); - assertThat(publisher.publishedHash("1.5.0")).isEqualTo(DIGEST_B); - - GrpcDescriptorArtifact sameVersionDifferentBytes = - artifact("1.5.0", DIGEST_A, METHODS, PACKAGES); - - assertThat(publisher.evaluate(sameVersionDifferentBytes, List.of()).blockers()) - .anySatisfy(blocker -> assertThat(blocker).contains("immutable")); - } - - @Test - @DisplayName("republishing identical bytes under the same version is allowed") - void identicalRepublishIsAllowed() { - GrpcSchemaArtifactPublisher publisher = - new GrpcSchemaArtifactPublisher(GrpcBufPolicy.stable(BASELINE)); - GrpcDescriptorArtifact artifact = artifact("1.5.0", DIGEST_B, METHODS, PACKAGES); - - publisher.publish(artifact, publisher.evaluate(artifact, List.of())); - - assertThat(publisher.evaluate(artifact, List.of()).allowed()).isTrue(); - assertThat(publisher.policy().breakingCategory()).isEqualTo(GrpcBreakingCategory.FILE); - } -} diff --git a/grpc/grpc-codegen/src/test/resources/consumer-fixtures/v1/build.gradle.kts b/grpc/grpc-codegen/src/test/resources/consumer-fixtures/v1/build.gradle.kts deleted file mode 100644 index 3351027..0000000 --- a/grpc/grpc-codegen/src/test/resources/consumer-fixtures/v1/build.gradle.kts +++ /dev/null @@ -1,17 +0,0 @@ -// The v1 consumer fixture's own build file, kept as a test resource. -// -// It is not part of this repository's Gradle build. Its purpose is to record what a released -// consumer actually depended on — the schema artifact version and nothing else — so that when -// protoc generation is switched on (ADR-GRPC-002) this directory can be compiled as-is against a -// candidate schema, which is the check GrpcConsumerFixture currently approximates from source text. -plugins { - `java-library` -} - -dependencies { - // The released schema artifact, pinned. A fixture that floats to the latest version cannot - // detect a break, because it is always built against the schema it is meant to be testing. - implementation("dev.caskeleton.grpc:grpc-schema-artifact:1.4.0") - implementation("io.grpc:grpc-stub") - implementation("io.grpc:grpc-protobuf") -} diff --git a/grpc/grpc-codegen/src/test/resources/consumer-fixtures/v1/src/main/java/fixture/DocumentClientFixture.java b/grpc/grpc-codegen/src/test/resources/consumer-fixtures/v1/src/main/java/fixture/DocumentClientFixture.java deleted file mode 100644 index 45394dc..0000000 --- a/grpc/grpc-codegen/src/test/resources/consumer-fixtures/v1/src/main/java/fixture/DocumentClientFixture.java +++ /dev/null @@ -1,33 +0,0 @@ -package fixture; - -import hyeonworks.document.v1.generated.CreateDocumentRequest; -import hyeonworks.document.v1.generated.DocumentServiceGrpc; -import hyeonworks.document.v1.generated.GetDocumentRequest; - -/** - * A previously released consumer, kept as a fixture rather than as a dependency. - * - *

This file is a test resource, not a compiled source. It records exactly what the v1 client - * named — the generated package it imported from, the service class it referenced and the methods it - * called — so a candidate schema can be checked against a real client's surface instead of against a - * requirement list somebody typed by hand and will forget to update. - * - *

{@code GrpcConsumerFixture.fromJavaSource} derives those three sets from this text. Adding a - * call here widens what a release must keep; that is the intent. - */ -public final class DocumentClientFixture { - - private final DocumentServiceGrpc.DocumentServiceBlockingStub stub; - - public DocumentClientFixture(DocumentServiceGrpc.DocumentServiceBlockingStub stub) { - this.stub = stub; - } - - public String read(String documentId) { - return stub.getDocument(GetDocumentRequest.newBuilder().setId(documentId).build()).getTitle(); - } - - public String create(String title) { - return stub.createDocument(CreateDocumentRequest.newBuilder().setTitle(title).build()).getId(); - } -} diff --git a/grpc/grpc-contract/buf.yaml b/grpc/grpc-contract/buf.yaml new file mode 100644 index 0000000..5565f6e --- /dev/null +++ b/grpc/grpc-contract/buf.yaml @@ -0,0 +1,22 @@ +# Buf module configuration for the Stable gRPC schema. +# +# Buf owns lint and breaking-change policy for src/main/proto; protoc (the Gradle protobuf plugin in +# build.gradle) owns compilation. CI runs both `buf lint` and `buf breaking` from this directory — +# see the `grpc-proto-buf` job in .github/workflows/ci-quality-gates.yml. +# +# cd src/grpc/grpc-contract +# buf lint +# buf breaking --against '#subdir=src/grpc/grpc-contract' +# +# No dependencies: the only imports are protoc's own well-known types (google/protobuf/*.proto). +version: v2 +modules: + - path: src/main/proto +lint: + use: + - STANDARD +breaking: + # FILE, not WIRE or WIRE_JSON. Wire compatibility alone would let a field rename or a Java package + # move through as "compatible" while every generated consumer stops compiling. + use: + - FILE diff --git a/grpc/grpc-contract/build.gradle b/grpc/grpc-contract/build.gradle new file mode 100644 index 0000000..8e93d9a --- /dev/null +++ b/grpc/grpc-contract/build.gradle @@ -0,0 +1,47 @@ +plugins { + id 'ca.platform-module' + alias(libs.plugins.protobuf) +} + +// The Stable schema: the `.proto` sources under src/main/proto and the Java that protoc generates +// from them. +// +// protoc, not a hand-written parser, decides whether the schema is valid, and Buf (buf.yaml next to +// this file) owns lint and breaking-change policy. Buf runs in CI — `.github/workflows/ +// ci-quality-gates.yml` job `grpc-proto-buf` — because it is a native binary and not a Maven +// artifact; this build does not re-implement its rules. Until 2026-09-28 this leaf was +// grpc-proto-contract + grpc-codegen, which did both with regular expressions (owner decision 18). +// +// Generated code lands under build/, in the package each file's `java_package` names +// (`caskeleton.*.generated`), which is disjoint from the hand-written `dev.caskeleton` root. +// Messages only: the schema declares no service yet, so there is no grpc-java stub to generate. +dependencies { + // api: every generated message extends com.google.protobuf.GeneratedMessageV3. + api libs.protobuf.java.grpc +} + +protobuf { + protoc { + artifact = libs.protoc.get().toString() + } +} + +// The plugin resolves protoc through a configuration it creates when generateProto runs, after +// resolveAndLockAll has taken its snapshot. The coordinate is an exact catalog version (libs.protoc), +// so a lock entry would restate it; locking is switched off for that tool locator only. +configurations.matching { it.name.startsWith('protobufToolsLocator_') }.configureEach { + resolutionStrategy.deactivateDependencyLocking() +} + +// Generated sources answer to protoc, not to the repository's formatter, lint or bug patterns. +spotless { + java { + target 'src/*/java/**/*.java' + } +} +tasks.named('checkstyleMain') { + exclude '**/generated/**' +} +tasks.withType(JavaCompile).configureEach { + options.errorprone.excludedPaths = '.*/build/generated/.*' +} diff --git a/grpc-advanced/grpc-advanced-edition/gradle.lockfile b/grpc/grpc-contract/gradle.lockfile similarity index 83% rename from grpc-advanced/grpc-advanced-edition/gradle.lockfile rename to grpc/grpc-contract/gradle.lockfile index e2c9585..beb6fc2 100644 --- a/grpc-advanced/grpc-advanced-edition/gradle.lockfile +++ b/grpc/grpc-contract/gradle.lockfile @@ -23,6 +23,7 @@ com.google.guava:guava:33.5.0-jre=annotationProcessor,testAnnotationProcessor com.google.guava:guava:33.6.0-jre=checkstyle com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava=annotationProcessor,checkstyle,testAnnotationProcessor com.google.j2objc:j2objc-annotations:3.1=annotationProcessor,checkstyle,testAnnotationProcessor +com.google.protobuf:protobuf-java:3.25.5=compileClasspath,compileProtoPath,runtimeClasspath,testCompileClasspath,testCompileProtoPath,testRuntimeClasspath com.google.protobuf:protobuf-java:4.33.2=annotationProcessor,testAnnotationProcessor com.h3xstream.findsecbugs:findsecbugs-plugin:1.14.0=spotbugsPlugins com.puppycrawl.tools:checkstyle:13.5.0=checkstyle @@ -34,7 +35,7 @@ io.github.eisop:dataflow-errorprone:3.41.0-eisop1=annotationProcessor,testAnnota io.github.java-diff-utils:java-diff-utils:4.12=annotationProcessor,testAnnotationProcessor javax.inject:javax.inject:1=annotationProcessor,testAnnotationProcessor jaxen:jaxen:2.0.6=spotbugs -net.bytebuddy:byte-buddy:1.17.8=testCompileClasspath,testRuntimeClasspath +net.bytebuddy:byte-buddy:1.17.8=testCompileClasspath,testCompileProtoPath,testRuntimeClasspath net.sf.saxon:Saxon-HE:12.9=checkstyle,spotbugs org.antlr:antlr4-runtime:4.13.2=checkstyle org.apache.bcel:bcel:6.12.0=spotbugs @@ -51,7 +52,7 @@ org.apache.maven.doxia:doxia-module-xdoc:1.12.0=checkstyle org.apache.maven.doxia:doxia-sink-api:1.12.0=checkstyle org.apache.xbean:xbean-reflect:3.7=checkstyle org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath -org.assertj:assertj-core:3.27.7=testCompileClasspath,testRuntimeClasspath +org.assertj:assertj-core:3.27.7=testCompileClasspath,testCompileProtoPath,testRuntimeClasspath org.codehaus.plexus:plexus-classworlds:2.6.0=checkstyle org.codehaus.plexus:plexus-component-annotations:2.1.0=checkstyle org.codehaus.plexus:plexus-container-default:2.1.0=checkstyle @@ -59,17 +60,17 @@ org.codehaus.plexus:plexus-utils:3.3.0=checkstyle org.dom4j:dom4j:2.2.0=spotbugs org.javassist:javassist:3.28.0-GA=checkstyle org.jspecify:jspecify:1.0.1=annotationProcessor,checkstyle,testAnnotationProcessor,testCompileClasspath -org.junit.jupiter:junit-jupiter-api:6.0.3=testCompileClasspath,testRuntimeClasspath -org.junit.jupiter:junit-jupiter-engine:6.0.3=testRuntimeClasspath -org.junit.jupiter:junit-jupiter-params:6.0.3=testCompileClasspath,testRuntimeClasspath -org.junit.jupiter:junit-jupiter:6.0.3=testCompileClasspath,testRuntimeClasspath -org.junit.platform:junit-platform-commons:6.0.3=testCompileClasspath,testRuntimeClasspath -org.junit.platform:junit-platform-engine:6.0.3=testRuntimeClasspath +org.junit.jupiter:junit-jupiter-api:6.0.3=testCompileClasspath,testCompileProtoPath,testRuntimeClasspath +org.junit.jupiter:junit-jupiter-engine:6.0.3=testCompileProtoPath,testRuntimeClasspath +org.junit.jupiter:junit-jupiter-params:6.0.3=testCompileClasspath,testCompileProtoPath,testRuntimeClasspath +org.junit.jupiter:junit-jupiter:6.0.3=testCompileClasspath,testCompileProtoPath,testRuntimeClasspath +org.junit.platform:junit-platform-commons:6.0.3=testCompileClasspath,testCompileProtoPath,testRuntimeClasspath +org.junit.platform:junit-platform-engine:6.0.3=testCompileProtoPath,testRuntimeClasspath org.junit.platform:junit-platform-launcher:6.0.3=testRuntimeClasspath -org.junit:junit-bom:6.0.3=testCompileClasspath,testRuntimeClasspath +org.junit:junit-bom:6.0.3=testCompileClasspath,testCompileProtoPath,testRuntimeClasspath org.junit:junit-bom:6.1.0=spotbugs org.mockito:mockito-core:5.20.0=mockitoAgent -org.opentest4j:opentest4j:1.3.0=testCompileClasspath,testRuntimeClasspath +org.opentest4j:opentest4j:1.3.0=testCompileClasspath,testCompileProtoPath,testRuntimeClasspath org.ow2.asm:asm-analysis:9.10.1=spotbugs org.ow2.asm:asm-commons:9.10.1=spotbugs org.ow2.asm:asm-tree:9.10.1=spotbugs @@ -81,4 +82,4 @@ org.slf4j:slf4j-api:2.0.18=spotbugs,spotbugsSlf4j org.slf4j:slf4j-simple:2.0.17=spotbugsSlf4j org.slf4j:slf4j-simple:2.0.18=checkstyle org.xmlresolver:xmlresolver:5.3.3=checkstyle,spotbugs -empty=compileClasspath,runtimeClasspath +empty=protobuf,testProtobuf diff --git a/grpc/grpc-proto-contract/src/main/resources/proto/hyeonworks/grpc/common/v1/error.proto b/grpc/grpc-contract/src/main/proto/caskeleton/grpc/common/v1/error.proto similarity index 95% rename from grpc/grpc-proto-contract/src/main/resources/proto/hyeonworks/grpc/common/v1/error.proto rename to grpc/grpc-contract/src/main/proto/caskeleton/grpc/common/v1/error.proto index e28a028..b8324ee 100644 --- a/grpc/grpc-proto-contract/src/main/resources/proto/hyeonworks/grpc/common/v1/error.proto +++ b/grpc/grpc-contract/src/main/proto/caskeleton/grpc/common/v1/error.proto @@ -1,9 +1,9 @@ syntax = "proto3"; -package hyeonworks.grpc.common.v1; +package caskeleton.grpc.common.v1; option java_multiple_files = true; -option java_package = "hyeonworks.grpc.common.v1.generated"; +option java_package = "caskeleton.grpc.common.v1.generated"; option java_outer_classname = "ErrorProto"; import "google/protobuf/duration.proto"; diff --git a/grpc/grpc-proto-contract/src/main/resources/proto/hyeonworks/grpc/common/v1/stream.proto b/grpc/grpc-contract/src/main/proto/caskeleton/grpc/common/v1/stream.proto similarity index 95% rename from grpc/grpc-proto-contract/src/main/resources/proto/hyeonworks/grpc/common/v1/stream.proto rename to grpc/grpc-contract/src/main/proto/caskeleton/grpc/common/v1/stream.proto index 67bf8a3..f2c5e81 100644 --- a/grpc/grpc-proto-contract/src/main/resources/proto/hyeonworks/grpc/common/v1/stream.proto +++ b/grpc/grpc-contract/src/main/proto/caskeleton/grpc/common/v1/stream.proto @@ -1,9 +1,9 @@ syntax = "proto3"; -package hyeonworks.grpc.common.v1; +package caskeleton.grpc.common.v1; option java_multiple_files = true; -option java_package = "hyeonworks.grpc.common.v1.generated"; +option java_package = "caskeleton.grpc.common.v1.generated"; option java_outer_classname = "StreamProto"; // The Stable server-streaming envelope. diff --git a/grpc/grpc-contract/src/test/java/dev/caskeleton/grpc/contract/GrpcContractGeneratedCodeTest.java b/grpc/grpc-contract/src/test/java/dev/caskeleton/grpc/contract/GrpcContractGeneratedCodeTest.java new file mode 100644 index 0000000..0a67e16 --- /dev/null +++ b/grpc/grpc-contract/src/test/java/dev/caskeleton/grpc/contract/GrpcContractGeneratedCodeTest.java @@ -0,0 +1,46 @@ +package dev.caskeleton.grpc.contract; + +import static org.assertj.core.api.Assertions.assertThat; + +import caskeleton.grpc.common.v1.generated.StreamEnvelope; +import caskeleton.grpc.common.v1.generated.StreamMessageKind; +import caskeleton.grpc.common.v1.generated.StreamTerminationReason; +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Test; + +class GrpcContractGeneratedCodeTest { + + @Test + @DisplayName("protoc가 생성한 stream envelope은 wire bytes로 왕복하고 명시적 presence를 유지한다") + void generatedStreamEnvelopeRoundTripsThroughWireBytesKeepingExplicitPresence() throws Exception { + // given + StreamEnvelope sent = + StreamEnvelope.newBuilder() + .setStreamId("stream-1") + .setSequence(7L) + .setKind(StreamMessageKind.STREAM_MESSAGE_KIND_TERMINATION) + .setTerminationReason(StreamTerminationReason.STREAM_TERMINATION_REASON_SERVER_DRAIN) + .build(); + + // when + StreamEnvelope received = StreamEnvelope.parseFrom(sent.toByteArray()); + + // then + assertThat(received).isEqualTo(sent); + assertThat(received.hasTerminationReason()).isTrue(); + assertThat(received.hasResumeToken()).isFalse(); + } + + @Test + @DisplayName("생성 코드의 proto 패키지와 Java 패키지는 조직 이름 caskeleton 아래에 있고 손으로 쓴 dev.caskeleton과 겹치지 않는다") + void generatedCodeLivesUnderTheCaskeletonProtoPackageAndOutsideTheHandWrittenRoot() { + // when + String protoPackage = StreamEnvelope.getDescriptor().getFile().getPackage(); + + // then + assertThat(protoPackage).isEqualTo("caskeleton.grpc.common.v1"); + assertThat(StreamEnvelope.class.getPackageName()) + .isEqualTo("caskeleton.grpc.common.v1.generated") + .doesNotStartWith("dev.caskeleton"); + } +} diff --git a/grpc/grpc-core-api/src/main/java/dev/caskeleton/grpc/api/context/GrpcMetadataBudget.java b/grpc/grpc-core-api/src/main/java/dev/caskeleton/grpc/api/context/GrpcMetadataBudget.java index 99befcd..865f061 100644 --- a/grpc/grpc-core-api/src/main/java/dev/caskeleton/grpc/api/context/GrpcMetadataBudget.java +++ b/grpc/grpc-core-api/src/main/java/dev/caskeleton/grpc/api/context/GrpcMetadataBudget.java @@ -1,5 +1,6 @@ package dev.caskeleton.grpc.api.context; +import dev.caskeleton.grpc.api.policy.GrpcTransportLimits; import java.util.Map; /** @@ -30,7 +31,7 @@ public record GrpcMetadataBudget(int maxTotalBytes, int maxUserDefinedBytes, int /** The platform default: 8 KiB total, 4 KiB of it user-defined, at most 32 entries. */ public static GrpcMetadataBudget standard() { - return new GrpcMetadataBudget(8192, 4096, 32); + return new GrpcMetadataBudget(GrpcTransportLimits.DEFAULT_MAX_METADATA_BYTES, 4096, 32); } /** diff --git a/grpc/grpc-core-api/src/main/java/dev/caskeleton/grpc/api/policy/GrpcMethodPolicy.java b/grpc/grpc-core-api/src/main/java/dev/caskeleton/grpc/api/policy/GrpcMethodPolicy.java index 019a69d..3a6f872 100644 --- a/grpc/grpc-core-api/src/main/java/dev/caskeleton/grpc/api/policy/GrpcMethodPolicy.java +++ b/grpc/grpc-core-api/src/main/java/dev/caskeleton/grpc/api/policy/GrpcMethodPolicy.java @@ -75,8 +75,8 @@ public record GrpcMethodPolicy( deadline, WaitForReadyPolicy.DISABLED, true, - 4 * 1024 * 1024, - 4 * 1024 * 1024); + GrpcTransportLimits.DEFAULT_MAX_MESSAGE_BYTES, + GrpcTransportLimits.DEFAULT_MAX_MESSAGE_BYTES); } /** A state-changing unary method that refuses explicit retry. */ @@ -89,8 +89,8 @@ public record GrpcMethodPolicy( deadline, WaitForReadyPolicy.DISABLED, false, - 4 * 1024 * 1024, - 4 * 1024 * 1024); + GrpcTransportLimits.DEFAULT_MAX_MESSAGE_BYTES, + GrpcTransportLimits.DEFAULT_MAX_MESSAGE_BYTES); } /** Whether this method may be hedged. */ diff --git a/grpc/grpc-core-api/src/main/java/dev/caskeleton/grpc/api/policy/GrpcTransportLimits.java b/grpc/grpc-core-api/src/main/java/dev/caskeleton/grpc/api/policy/GrpcTransportLimits.java new file mode 100644 index 0000000..c8eab4d --- /dev/null +++ b/grpc/grpc-core-api/src/main/java/dev/caskeleton/grpc/api/policy/GrpcTransportLimits.java @@ -0,0 +1,21 @@ +package dev.caskeleton.grpc.api.policy; + +/** + * The platform's default transport bounds, stated once. + * + *

The server profile, the named channel profiles, the per-method size profile, the method policy + * defaults and the metadata budget all start from these numbers. They used to be five copies of the + * same literals, and a copy that drifts is a method that promises a message size its server + * rejects; {@code GrpcPlatformStartupValidator} refuses that combination, and it can only do so + * cheaply when the defaults agree by construction. + */ +public final class GrpcTransportLimits { + + /** Largest message a Stable method accepts or sends by default: 1 MiB. */ + public static final int DEFAULT_MAX_MESSAGE_BYTES = 1024 * 1024; + + /** Hard total for one call's metadata: 8 KiB. */ + public static final int DEFAULT_MAX_METADATA_BYTES = 8192; + + private GrpcTransportLimits() {} +} diff --git a/grpc/grpc-core-api/src/main/java/dev/caskeleton/grpc/core/GrpcMethodName.java b/grpc/grpc-core-api/src/main/java/dev/caskeleton/grpc/core/GrpcMethodName.java index 1db06d2..26528fb 100644 --- a/grpc/grpc-core-api/src/main/java/dev/caskeleton/grpc/core/GrpcMethodName.java +++ b/grpc/grpc-core-api/src/main/java/dev/caskeleton/grpc/core/GrpcMethodName.java @@ -25,6 +25,16 @@ public record GrpcMethodName(GrpcServiceName service, String method) { throw new IllegalArgumentException( "method must be an UpperCamelCase proto method name; got '" + method + "'"); } + // The same bound parse() applies to the whole name, so both ways of making a method name + // accept exactly the same set of names. + int fullLength = service.value().length() + 1 + method.length(); + if (fullLength > GrpcIdentifiers.MAX_LENGTH) { + throw new IllegalArgumentException( + "full method name must be at most " + + GrpcIdentifiers.MAX_LENGTH + + " characters; got " + + fullLength); + } } /** diff --git a/grpc/grpc-core-api/src/main/java/dev/caskeleton/grpc/core/GrpcStatusCode.java b/grpc/grpc-core-api/src/main/java/dev/caskeleton/grpc/core/GrpcStatusCode.java index 23e44d9..3c1a632 100644 --- a/grpc/grpc-core-api/src/main/java/dev/caskeleton/grpc/core/GrpcStatusCode.java +++ b/grpc/grpc-core-api/src/main/java/dev/caskeleton/grpc/core/GrpcStatusCode.java @@ -5,7 +5,7 @@ package dev.caskeleton.grpc.core; * *

The mirror is the point. The Stable plan requires the evidence and failure model to be * framework-free, and a failure context that names {@code io.grpc.Status} would put the transport - * inside the contract that exists to describe what the transport did. {@code grpc-policy} owns the + * inside the contract that exists to describe what the transport did. {@code grpc-runtime} owns the * translation in both directions and is tested against the real enum. */ public enum GrpcStatusCode { diff --git a/grpc/grpc-core-api/src/test/java/dev/caskeleton/grpc/api/context/GrpcMetadataBudgetTest.java b/grpc/grpc-core-api/src/test/java/dev/caskeleton/grpc/api/context/GrpcMetadataBudgetTest.java index 4a4851d..8241a1d 100644 --- a/grpc/grpc-core-api/src/test/java/dev/caskeleton/grpc/api/context/GrpcMetadataBudgetTest.java +++ b/grpc/grpc-core-api/src/test/java/dev/caskeleton/grpc/api/context/GrpcMetadataBudgetTest.java @@ -18,7 +18,7 @@ import org.junit.jupiter.api.Test; class GrpcMetadataBudgetTest { private static final GrpcMethodName GET = - GrpcMethodName.parse("hyeonworks.document.v1.DocumentService/GetDocument"); + GrpcMethodName.parse("caskeleton.document.v1.DocumentService/GetDocument"); private static final GrpcMetadataKey CORRELATION = GrpcMetadataKey.ascii("x-correlation-id"); private static final GrpcMetadataKey IDEMPOTENCY = GrpcMetadataKey.ascii("x-idempotency-key"); diff --git a/grpc/grpc-core-api/src/test/java/dev/caskeleton/grpc/api/error/GrpcFailureContextTest.java b/grpc/grpc-core-api/src/test/java/dev/caskeleton/grpc/api/error/GrpcFailureContextTest.java index 930a743..c56aff7 100644 --- a/grpc/grpc-core-api/src/test/java/dev/caskeleton/grpc/api/error/GrpcFailureContextTest.java +++ b/grpc/grpc-core-api/src/test/java/dev/caskeleton/grpc/api/error/GrpcFailureContextTest.java @@ -18,9 +18,9 @@ import org.junit.jupiter.api.Test; class GrpcFailureContextTest { private static final GrpcMethodName CREATE = - GrpcMethodName.parse("hyeonworks.document.v1.DocumentService/CreateDocument"); + GrpcMethodName.parse("caskeleton.document.v1.DocumentService/CreateDocument"); private static final GrpcMethodName WATCH = - GrpcMethodName.parse("hyeonworks.document.v1.DocumentService/WatchDocuments"); + GrpcMethodName.parse("caskeleton.document.v1.DocumentService/WatchDocuments"); private static GrpcExecutionEvidence sentButUnanswered() { return new GrpcExecutionEvidence( @@ -99,7 +99,7 @@ class GrpcFailureContextTest { String summary = context.redactedSummary(); assertThat(summary) - .contains("hyeonworks.document.v1.DocumentService/CreateDocument") + .contains("caskeleton.document.v1.DocumentService/CreateDocument") .contains("DEADLINE_EXCEEDED") .contains("COMPLETION_UNKNOWN") .contains("RESOLVE_FIRST") diff --git a/grpc/grpc-core-api/src/test/java/dev/caskeleton/grpc/api/ledger/GrpcOperationIdentityTest.java b/grpc/grpc-core-api/src/test/java/dev/caskeleton/grpc/api/ledger/GrpcOperationIdentityTest.java index c210e21..2701a08 100644 --- a/grpc/grpc-core-api/src/test/java/dev/caskeleton/grpc/api/ledger/GrpcOperationIdentityTest.java +++ b/grpc/grpc-core-api/src/test/java/dev/caskeleton/grpc/api/ledger/GrpcOperationIdentityTest.java @@ -10,7 +10,7 @@ import org.junit.jupiter.api.Test; class GrpcOperationIdentityTest { private static final GrpcMethodName CREATE = - GrpcMethodName.parse("hyeonworks.document.v1.DocumentService/CreateDocument"); + GrpcMethodName.parse("caskeleton.document.v1.DocumentService/CreateDocument"); private static final String KEY_HASH = "sha256:aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899"; diff --git a/grpc/grpc-core-api/src/test/java/dev/caskeleton/grpc/api/policy/GrpcMethodPolicyCatalogTest.java b/grpc/grpc-core-api/src/test/java/dev/caskeleton/grpc/api/policy/GrpcMethodPolicyCatalogTest.java index fc52643..738c871 100644 --- a/grpc/grpc-core-api/src/test/java/dev/caskeleton/grpc/api/policy/GrpcMethodPolicyCatalogTest.java +++ b/grpc/grpc-core-api/src/test/java/dev/caskeleton/grpc/api/policy/GrpcMethodPolicyCatalogTest.java @@ -14,11 +14,11 @@ import org.junit.jupiter.api.Test; class GrpcMethodPolicyCatalogTest { private static final GrpcMethodName GET = - GrpcMethodName.parse("hyeonworks.document.v1.DocumentService/GetDocument"); + GrpcMethodName.parse("caskeleton.document.v1.DocumentService/GetDocument"); private static final GrpcMethodName CREATE = - GrpcMethodName.parse("hyeonworks.document.v1.DocumentService/CreateDocument"); + GrpcMethodName.parse("caskeleton.document.v1.DocumentService/CreateDocument"); private static final GrpcMethodName WATCH = - GrpcMethodName.parse("hyeonworks.document.v1.DocumentService/WatchDocuments"); + GrpcMethodName.parse("caskeleton.document.v1.DocumentService/WatchDocuments"); private static final GrpcDeadlineProfile TWO_SECONDS = GrpcDeadlineProfile.of(Duration.ofSeconds(2)); @@ -178,6 +178,6 @@ class GrpcMethodPolicyCatalogTest { assertThat(catalog.methods()) .extracting(GrpcMethodName::canonical) - .containsExactly("hyeonworks.document.v1.DocumentService/GetDocument"); + .containsExactly("caskeleton.document.v1.DocumentService/GetDocument"); } } diff --git a/grpc/grpc-core-api/src/test/java/dev/caskeleton/grpc/core/GrpcCoreIdentifiersTest.java b/grpc/grpc-core-api/src/test/java/dev/caskeleton/grpc/core/GrpcCoreIdentifiersTest.java index 08ce0a8..7940d71 100644 --- a/grpc/grpc-core-api/src/test/java/dev/caskeleton/grpc/core/GrpcCoreIdentifiersTest.java +++ b/grpc/grpc-core-api/src/test/java/dev/caskeleton/grpc/core/GrpcCoreIdentifiersTest.java @@ -2,6 +2,7 @@ package dev.caskeleton.grpc.core; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; +import static org.assertj.core.api.Assertions.catchThrowable; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; @@ -14,12 +15,12 @@ class GrpcCoreIdentifiersTest { @DisplayName("a full method name round-trips through its canonical form") void methodNameRoundTripsThroughCanonicalForm() { GrpcMethodName parsed = - GrpcMethodName.parse("hyeonworks.document.v1.DocumentService/GetDocument"); + GrpcMethodName.parse("caskeleton.document.v1.DocumentService/GetDocument"); - assertThat(parsed.canonical()).isEqualTo("hyeonworks.document.v1.DocumentService/GetDocument"); + assertThat(parsed.canonical()).isEqualTo("caskeleton.document.v1.DocumentService/GetDocument"); assertThat(parsed.method()).isEqualTo("GetDocument"); assertThat(parsed.service().simpleName()).isEqualTo("DocumentService"); - assertThat(parsed.service().protoPackage()).isEqualTo("hyeonworks.document.v1"); + assertThat(parsed.service().protoPackage()).isEqualTo("caskeleton.document.v1"); assertThat(GrpcMethodName.parse(parsed.canonical())).isEqualTo(parsed); } @@ -27,9 +28,9 @@ class GrpcCoreIdentifiersTest { @ValueSource( strings = { "DocumentService/Get", - "hyeonworks.document.v1.DocumentService", - "hyeonworks.document.v1.DocumentService/Get/Extra", - "hyeonworks.document.v1.DocumentService/getDocument" + "caskeleton.document.v1.DocumentService", + "caskeleton.document.v1.DocumentService/Get/Extra", + "caskeleton.document.v1.DocumentService/getDocument" }) @DisplayName("a name that is not exactly package.Service/Method is refused") void nonCanonicalMethodNamesAreRefused(String candidate) { @@ -37,6 +38,22 @@ class GrpcCoreIdentifiersTest { .isInstanceOf(IllegalArgumentException.class); } + @Test + @DisplayName("생성자로 만든 full method name도 parse와 같은 256자 한도를 넘으면 거부된다") + void constructedMethodNameLongerThanTheParseLimitIsRefused() { + // given + GrpcServiceName service = new GrpcServiceName("pkg.v1." + "S".repeat(200)); + String method = "M".repeat(100); + + // when + Throwable thrown = catchThrowable(() -> new GrpcMethodName(service, method)); + + // then + assertThat(thrown) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage("full method name must be at most 256 characters; got 308"); + } + @ParameterizedTest @ValueSource(strings = {"", "svc name", "Has Space", "tab\tseparated"}) @DisplayName("blank, whitespace and control-character identifiers are refused") diff --git a/grpc/grpc-core-api/src/test/java/dev/caskeleton/grpc/evidence/GrpcExecutionEvidenceTest.java b/grpc/grpc-core-api/src/test/java/dev/caskeleton/grpc/evidence/GrpcExecutionEvidenceTest.java index c2cbf52..4b3b528 100644 --- a/grpc/grpc-core-api/src/test/java/dev/caskeleton/grpc/evidence/GrpcExecutionEvidenceTest.java +++ b/grpc/grpc-core-api/src/test/java/dev/caskeleton/grpc/evidence/GrpcExecutionEvidenceTest.java @@ -11,9 +11,9 @@ import org.junit.jupiter.api.Test; class GrpcExecutionEvidenceTest { private static final GrpcMethodName CREATE = - GrpcMethodName.parse("hyeonworks.document.v1.DocumentService/CreateDocument"); + GrpcMethodName.parse("caskeleton.document.v1.DocumentService/CreateDocument"); private static final GrpcMethodName WATCH = - GrpcMethodName.parse("hyeonworks.document.v1.DocumentService/WatchDocuments"); + GrpcMethodName.parse("caskeleton.document.v1.DocumentService/WatchDocuments"); @Test @DisplayName("seeing response headers never promotes the business axis to a confirmed commit") diff --git a/grpc/grpc-core-api/src/testFixtures/java/dev/caskeleton/grpc/api/ledger/GrpcOperationLedgerContract.java b/grpc/grpc-core-api/src/testFixtures/java/dev/caskeleton/grpc/api/ledger/GrpcOperationLedgerContract.java index ebc1110..1ff769c 100644 --- a/grpc/grpc-core-api/src/testFixtures/java/dev/caskeleton/grpc/api/ledger/GrpcOperationLedgerContract.java +++ b/grpc/grpc-core-api/src/testFixtures/java/dev/caskeleton/grpc/api/ledger/GrpcOperationLedgerContract.java @@ -26,7 +26,7 @@ public abstract class GrpcOperationLedgerContract { private static final GrpcOperationIdentity ID = new GrpcOperationIdentity( "tenant-1.actor-1", - GrpcMethodName.parse("hyeonworks.document.v1.DocumentService/CreateDocument"), + GrpcMethodName.parse("caskeleton.document.v1.DocumentService/CreateDocument"), "sha256:aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899"); private static final String FINGERPRINT = "sha256:0f1e2d3c4b5a69788796a5b4c3d2e1f00f1e2d3c4b5a69788796a5b4c3d2e1f0"; diff --git a/grpc/grpc-discovery/build.gradle b/grpc/grpc-discovery/build.gradle deleted file mode 100644 index bee89e7..0000000 --- a/grpc/grpc-discovery/build.gradle +++ /dev/null @@ -1,11 +0,0 @@ -plugins { - id 'ca.platform-module' -} - -// Stable discovery: Static/DNS resolvers, pick_first/round_robin load balancing, and the -// Kubernetes VIP / headless / mesh routing profiles. Custom resolvers, custom load balancers and -// xDS are Advanced and are refused here by GrpcDiscoveryPolicyValidator. -dependencies { - api project(':grpc:grpc-core-api') - api project(':grpc:grpc-client') -} diff --git a/grpc/grpc-discovery/gradle.lockfile b/grpc/grpc-discovery/gradle.lockfile deleted file mode 100644 index 9369e83..0000000 --- a/grpc/grpc-discovery/gradle.lockfile +++ /dev/null @@ -1,91 +0,0 @@ -# This is a Gradle generated file for dependency locking. -# Manual edits can break the build and are not advised. -# This file is expected to be part of source control. -com.github.ben-manes.caffeine:caffeine:3.2.4=annotationProcessor,testAnnotationProcessor -com.github.kevinstern:software-and-algorithms:1.0=annotationProcessor,testAnnotationProcessor -com.github.spotbugs:spotbugs-annotations:4.10.2=spotbugs -com.github.spotbugs:spotbugs:4.10.2=spotbugs -com.github.stephenc.jcip:jcip-annotations:1.0-1=spotbugs -com.google.auto.service:auto-service-annotations:1.0.1=annotationProcessor,testAnnotationProcessor -com.google.auto.value:auto-value-annotations:1.9=annotationProcessor,testAnnotationProcessor -com.google.auto:auto-common:1.2.2=annotationProcessor,testAnnotationProcessor -com.google.code.findbugs:jsr305:3.0.2=checkstyle,compileClasspath,runtimeClasspath,spotbugs,testCompileClasspath,testRuntimeClasspath -com.google.code.gson:gson:2.13.2=spotbugs -com.google.errorprone:error_prone_annotation:2.49.0=annotationProcessor,testAnnotationProcessor -com.google.errorprone:error_prone_annotations:2.28.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -com.google.errorprone:error_prone_annotations:2.41.0=spotbugs -com.google.errorprone:error_prone_annotations:2.47.0=checkstyle -com.google.errorprone:error_prone_annotations:2.49.0=annotationProcessor,testAnnotationProcessor -com.google.errorprone:error_prone_check_api:2.49.0=annotationProcessor,testAnnotationProcessor -com.google.errorprone:error_prone_core:2.49.0=annotationProcessor,testAnnotationProcessor -com.google.googlejavaformat:google-java-format:1.35.0=annotationProcessor,testAnnotationProcessor -com.google.guava:failureaccess:1.0.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -com.google.guava:failureaccess:1.0.3=annotationProcessor,checkstyle,testAnnotationProcessor -com.google.guava:guava:33.2.1-android=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -com.google.guava:guava:33.5.0-jre=annotationProcessor,testAnnotationProcessor -com.google.guava:guava:33.6.0-jre=checkstyle -com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava=annotationProcessor,checkstyle,compileClasspath,runtimeClasspath,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath -com.google.j2objc:j2objc-annotations:3.0.0=compileClasspath,testCompileClasspath -com.google.j2objc:j2objc-annotations:3.1=annotationProcessor,checkstyle,testAnnotationProcessor -com.google.protobuf:protobuf-java:4.33.2=annotationProcessor,testAnnotationProcessor -com.h3xstream.findsecbugs:findsecbugs-plugin:1.14.0=spotbugsPlugins -com.puppycrawl.tools:checkstyle:13.5.0=checkstyle -commons-beanutils:commons-beanutils:1.11.0=checkstyle -commons-collections:commons-collections:3.2.2=checkstyle -commons-io:commons-io:2.21.0=spotbugs -info.picocli:picocli:4.7.7=checkstyle -io.github.eisop:dataflow-errorprone:3.41.0-eisop1=annotationProcessor,testAnnotationProcessor -io.github.java-diff-utils:java-diff-utils:4.12=annotationProcessor,testAnnotationProcessor -io.grpc:grpc-api:1.68.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -io.grpc:grpc-stub:1.68.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -javax.inject:javax.inject:1=annotationProcessor,testAnnotationProcessor -jaxen:jaxen:2.0.6=spotbugs -net.bytebuddy:byte-buddy:1.17.8=testCompileClasspath,testRuntimeClasspath -net.sf.saxon:Saxon-HE:12.9=checkstyle,spotbugs -org.antlr:antlr4-runtime:4.13.2=checkstyle -org.apache.bcel:bcel:6.12.0=spotbugs -org.apache.commons:commons-lang3:3.20.0=checkstyle,spotbugs -org.apache.commons:commons-text:1.15.0=spotbugs -org.apache.commons:commons-text:1.3=checkstyle -org.apache.httpcomponents:httpclient:4.5.13=checkstyle -org.apache.httpcomponents:httpcore:4.4.16=checkstyle -org.apache.logging.log4j:log4j-api:2.25.5=spotbugs -org.apache.logging.log4j:log4j-core:2.25.5=spotbugs -org.apache.maven.doxia:doxia-core:1.12.0=checkstyle -org.apache.maven.doxia:doxia-logging-api:1.12.0=checkstyle -org.apache.maven.doxia:doxia-module-xdoc:1.12.0=checkstyle -org.apache.maven.doxia:doxia-sink-api:1.12.0=checkstyle -org.apache.xbean:xbean-reflect:3.7=checkstyle -org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath -org.assertj:assertj-core:3.27.7=testCompileClasspath,testRuntimeClasspath -org.checkerframework:checker-qual:3.42.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -org.codehaus.plexus:plexus-classworlds:2.6.0=checkstyle -org.codehaus.plexus:plexus-component-annotations:2.1.0=checkstyle -org.codehaus.plexus:plexus-container-default:2.1.0=checkstyle -org.codehaus.plexus:plexus-utils:3.3.0=checkstyle -org.dom4j:dom4j:2.2.0=spotbugs -org.javassist:javassist:3.28.0-GA=checkstyle -org.jspecify:jspecify:1.0.1=annotationProcessor,checkstyle,testAnnotationProcessor,testCompileClasspath -org.junit.jupiter:junit-jupiter-api:6.0.3=testCompileClasspath,testRuntimeClasspath -org.junit.jupiter:junit-jupiter-engine:6.0.3=testRuntimeClasspath -org.junit.jupiter:junit-jupiter-params:6.0.3=testCompileClasspath,testRuntimeClasspath -org.junit.jupiter:junit-jupiter:6.0.3=testCompileClasspath,testRuntimeClasspath -org.junit.platform:junit-platform-commons:6.0.3=testCompileClasspath,testRuntimeClasspath -org.junit.platform:junit-platform-engine:6.0.3=testRuntimeClasspath -org.junit.platform:junit-platform-launcher:6.0.3=testRuntimeClasspath -org.junit:junit-bom:6.0.3=testCompileClasspath,testRuntimeClasspath -org.junit:junit-bom:6.1.0=spotbugs -org.mockito:mockito-core:5.20.0=mockitoAgent -org.opentest4j:opentest4j:1.3.0=testCompileClasspath,testRuntimeClasspath -org.ow2.asm:asm-analysis:9.10.1=spotbugs -org.ow2.asm:asm-commons:9.10.1=spotbugs -org.ow2.asm:asm-tree:9.10.1=spotbugs -org.ow2.asm:asm-util:9.10.1=spotbugs -org.ow2.asm:asm:9.10.1=spotbugs -org.pcollections:pcollections:4.0.1=annotationProcessor,testAnnotationProcessor -org.reflections:reflections:0.10.2=checkstyle -org.slf4j:slf4j-api:2.0.18=spotbugs,spotbugsSlf4j -org.slf4j:slf4j-simple:2.0.17=spotbugsSlf4j -org.slf4j:slf4j-simple:2.0.18=checkstyle -org.xmlresolver:xmlresolver:5.3.3=checkstyle,spotbugs -empty= diff --git a/grpc/grpc-observability/src/test/java/dev/caskeleton/grpc/observability/GrpcMetricCardinalityPolicyTest.java b/grpc/grpc-observability/src/test/java/dev/caskeleton/grpc/observability/GrpcMetricCardinalityPolicyTest.java index f8231bd..6cb5ebd 100644 --- a/grpc/grpc-observability/src/test/java/dev/caskeleton/grpc/observability/GrpcMetricCardinalityPolicyTest.java +++ b/grpc/grpc-observability/src/test/java/dev/caskeleton/grpc/observability/GrpcMetricCardinalityPolicyTest.java @@ -17,7 +17,7 @@ import org.junit.jupiter.api.Test; class GrpcMetricCardinalityPolicyTest { private static final GrpcMethodName GET = - GrpcMethodName.parse("hyeonworks.document.v1.DocumentService/GetDocument"); + GrpcMethodName.parse("caskeleton.document.v1.DocumentService/GetDocument"); private static GrpcRpcObservation observation(int attempts, GrpcCompletionOutcome outcome) { return new GrpcRpcObservation( diff --git a/grpc/grpc-operation-ledger-jpa/src/integrationTest/java/dev/caskeleton/grpc/ledger/JpaGrpcOperationLedgerContractIT.java b/grpc/grpc-operation-ledger-jpa/src/integrationTest/java/dev/caskeleton/grpc/ledger/JpaGrpcOperationLedgerContractIT.java index 0a17279..2d1e6b2 100644 --- a/grpc/grpc-operation-ledger-jpa/src/integrationTest/java/dev/caskeleton/grpc/ledger/JpaGrpcOperationLedgerContractIT.java +++ b/grpc/grpc-operation-ledger-jpa/src/integrationTest/java/dev/caskeleton/grpc/ledger/JpaGrpcOperationLedgerContractIT.java @@ -98,7 +98,7 @@ class JpaGrpcOperationLedgerContractIT extends GrpcOperationLedgerContract { GrpcOperationIdentity id = new GrpcOperationIdentity( "tenant-1.actor-1", - GrpcMethodName.parse("hyeonworks.document.v1.DocumentService/CreateDocument"), + GrpcMethodName.parse("caskeleton.document.v1.DocumentService/CreateDocument"), "sha256:aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899"); String fingerprint = "sha256:0f1e2d3c4b5a69788796a5b4c3d2e1f00f1e2d3c4b5a69788796a5b4c3d2e1f0"; Instant now = Instant.parse("2026-09-25T10:00:00Z"); diff --git a/grpc/grpc-operation-ledger-jpa/src/test/java/dev/caskeleton/grpc/ledger/GrpcOperationLedgerRepositoryTest.java b/grpc/grpc-operation-ledger-jpa/src/test/java/dev/caskeleton/grpc/ledger/GrpcOperationLedgerRepositoryTest.java index 84862d5..8da7c64 100644 --- a/grpc/grpc-operation-ledger-jpa/src/test/java/dev/caskeleton/grpc/ledger/GrpcOperationLedgerRepositoryTest.java +++ b/grpc/grpc-operation-ledger-jpa/src/test/java/dev/caskeleton/grpc/ledger/GrpcOperationLedgerRepositoryTest.java @@ -24,7 +24,7 @@ import org.junit.jupiter.api.Test; class GrpcOperationLedgerRepositoryTest { private static final GrpcMethodName CREATE = - GrpcMethodName.parse("hyeonworks.document.v1.DocumentService/CreateDocument"); + GrpcMethodName.parse("caskeleton.document.v1.DocumentService/CreateDocument"); private static final Instant NOW = Instant.parse("2026-08-30T10:00:00Z"); private static final String FINGERPRINT = "sha256:0f1e2d3c4b5a69788796a5b4c3d2e1f00f1e2d3c4b5a69788796a5b4c3d2e1f0"; diff --git a/grpc/grpc-policy/build.gradle b/grpc/grpc-policy/build.gradle deleted file mode 100644 index 6d3694e..0000000 --- a/grpc/grpc-policy/build.gradle +++ /dev/null @@ -1,19 +0,0 @@ -plugins { - id 'ca.grpc-platform-module' -} - -// Validation, context propagation, status/rich-error mapping, TLS/credential profiles, deadline -// and cancellation, retry ownership and eligibility, idempotency and completion recovery, server -// streaming, payload size and compression. - -dependencies { - api project(':grpc:grpc-core-api') - - // api: interceptors, context binders and the error mapper name io.grpc types in public - // signatures, so an adopter cannot compile against this module without them. - api "io.grpc:grpc-api" - api "io.grpc:grpc-stub" - - // The shared operation-ledger fake, held to the same contract as the JPA adapter. - testImplementation testFixtures(project(':grpc:grpc-core-api')) -} diff --git a/grpc/grpc-policy/gradle.lockfile b/grpc/grpc-policy/gradle.lockfile deleted file mode 100644 index 9369e83..0000000 --- a/grpc/grpc-policy/gradle.lockfile +++ /dev/null @@ -1,91 +0,0 @@ -# This is a Gradle generated file for dependency locking. -# Manual edits can break the build and are not advised. -# This file is expected to be part of source control. -com.github.ben-manes.caffeine:caffeine:3.2.4=annotationProcessor,testAnnotationProcessor -com.github.kevinstern:software-and-algorithms:1.0=annotationProcessor,testAnnotationProcessor -com.github.spotbugs:spotbugs-annotations:4.10.2=spotbugs -com.github.spotbugs:spotbugs:4.10.2=spotbugs -com.github.stephenc.jcip:jcip-annotations:1.0-1=spotbugs -com.google.auto.service:auto-service-annotations:1.0.1=annotationProcessor,testAnnotationProcessor -com.google.auto.value:auto-value-annotations:1.9=annotationProcessor,testAnnotationProcessor -com.google.auto:auto-common:1.2.2=annotationProcessor,testAnnotationProcessor -com.google.code.findbugs:jsr305:3.0.2=checkstyle,compileClasspath,runtimeClasspath,spotbugs,testCompileClasspath,testRuntimeClasspath -com.google.code.gson:gson:2.13.2=spotbugs -com.google.errorprone:error_prone_annotation:2.49.0=annotationProcessor,testAnnotationProcessor -com.google.errorprone:error_prone_annotations:2.28.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -com.google.errorprone:error_prone_annotations:2.41.0=spotbugs -com.google.errorprone:error_prone_annotations:2.47.0=checkstyle -com.google.errorprone:error_prone_annotations:2.49.0=annotationProcessor,testAnnotationProcessor -com.google.errorprone:error_prone_check_api:2.49.0=annotationProcessor,testAnnotationProcessor -com.google.errorprone:error_prone_core:2.49.0=annotationProcessor,testAnnotationProcessor -com.google.googlejavaformat:google-java-format:1.35.0=annotationProcessor,testAnnotationProcessor -com.google.guava:failureaccess:1.0.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -com.google.guava:failureaccess:1.0.3=annotationProcessor,checkstyle,testAnnotationProcessor -com.google.guava:guava:33.2.1-android=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -com.google.guava:guava:33.5.0-jre=annotationProcessor,testAnnotationProcessor -com.google.guava:guava:33.6.0-jre=checkstyle -com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava=annotationProcessor,checkstyle,compileClasspath,runtimeClasspath,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath -com.google.j2objc:j2objc-annotations:3.0.0=compileClasspath,testCompileClasspath -com.google.j2objc:j2objc-annotations:3.1=annotationProcessor,checkstyle,testAnnotationProcessor -com.google.protobuf:protobuf-java:4.33.2=annotationProcessor,testAnnotationProcessor -com.h3xstream.findsecbugs:findsecbugs-plugin:1.14.0=spotbugsPlugins -com.puppycrawl.tools:checkstyle:13.5.0=checkstyle -commons-beanutils:commons-beanutils:1.11.0=checkstyle -commons-collections:commons-collections:3.2.2=checkstyle -commons-io:commons-io:2.21.0=spotbugs -info.picocli:picocli:4.7.7=checkstyle -io.github.eisop:dataflow-errorprone:3.41.0-eisop1=annotationProcessor,testAnnotationProcessor -io.github.java-diff-utils:java-diff-utils:4.12=annotationProcessor,testAnnotationProcessor -io.grpc:grpc-api:1.68.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -io.grpc:grpc-stub:1.68.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -javax.inject:javax.inject:1=annotationProcessor,testAnnotationProcessor -jaxen:jaxen:2.0.6=spotbugs -net.bytebuddy:byte-buddy:1.17.8=testCompileClasspath,testRuntimeClasspath -net.sf.saxon:Saxon-HE:12.9=checkstyle,spotbugs -org.antlr:antlr4-runtime:4.13.2=checkstyle -org.apache.bcel:bcel:6.12.0=spotbugs -org.apache.commons:commons-lang3:3.20.0=checkstyle,spotbugs -org.apache.commons:commons-text:1.15.0=spotbugs -org.apache.commons:commons-text:1.3=checkstyle -org.apache.httpcomponents:httpclient:4.5.13=checkstyle -org.apache.httpcomponents:httpcore:4.4.16=checkstyle -org.apache.logging.log4j:log4j-api:2.25.5=spotbugs -org.apache.logging.log4j:log4j-core:2.25.5=spotbugs -org.apache.maven.doxia:doxia-core:1.12.0=checkstyle -org.apache.maven.doxia:doxia-logging-api:1.12.0=checkstyle -org.apache.maven.doxia:doxia-module-xdoc:1.12.0=checkstyle -org.apache.maven.doxia:doxia-sink-api:1.12.0=checkstyle -org.apache.xbean:xbean-reflect:3.7=checkstyle -org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath -org.assertj:assertj-core:3.27.7=testCompileClasspath,testRuntimeClasspath -org.checkerframework:checker-qual:3.42.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -org.codehaus.plexus:plexus-classworlds:2.6.0=checkstyle -org.codehaus.plexus:plexus-component-annotations:2.1.0=checkstyle -org.codehaus.plexus:plexus-container-default:2.1.0=checkstyle -org.codehaus.plexus:plexus-utils:3.3.0=checkstyle -org.dom4j:dom4j:2.2.0=spotbugs -org.javassist:javassist:3.28.0-GA=checkstyle -org.jspecify:jspecify:1.0.1=annotationProcessor,checkstyle,testAnnotationProcessor,testCompileClasspath -org.junit.jupiter:junit-jupiter-api:6.0.3=testCompileClasspath,testRuntimeClasspath -org.junit.jupiter:junit-jupiter-engine:6.0.3=testRuntimeClasspath -org.junit.jupiter:junit-jupiter-params:6.0.3=testCompileClasspath,testRuntimeClasspath -org.junit.jupiter:junit-jupiter:6.0.3=testCompileClasspath,testRuntimeClasspath -org.junit.platform:junit-platform-commons:6.0.3=testCompileClasspath,testRuntimeClasspath -org.junit.platform:junit-platform-engine:6.0.3=testRuntimeClasspath -org.junit.platform:junit-platform-launcher:6.0.3=testRuntimeClasspath -org.junit:junit-bom:6.0.3=testCompileClasspath,testRuntimeClasspath -org.junit:junit-bom:6.1.0=spotbugs -org.mockito:mockito-core:5.20.0=mockitoAgent -org.opentest4j:opentest4j:1.3.0=testCompileClasspath,testRuntimeClasspath -org.ow2.asm:asm-analysis:9.10.1=spotbugs -org.ow2.asm:asm-commons:9.10.1=spotbugs -org.ow2.asm:asm-tree:9.10.1=spotbugs -org.ow2.asm:asm-util:9.10.1=spotbugs -org.ow2.asm:asm:9.10.1=spotbugs -org.pcollections:pcollections:4.0.1=annotationProcessor,testAnnotationProcessor -org.reflections:reflections:0.10.2=checkstyle -org.slf4j:slf4j-api:2.0.18=spotbugs,spotbugsSlf4j -org.slf4j:slf4j-simple:2.0.17=spotbugsSlf4j -org.slf4j:slf4j-simple:2.0.18=checkstyle -org.xmlresolver:xmlresolver:5.3.3=checkstyle,spotbugs -empty= diff --git a/grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/streaming/GrpcStreamProfile.java b/grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/streaming/GrpcStreamProfile.java deleted file mode 100644 index f999c26..0000000 --- a/grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/streaming/GrpcStreamProfile.java +++ /dev/null @@ -1,47 +0,0 @@ -package dev.caskeleton.grpc.streaming; - -/** - * How one streaming method behaves before any message is sent. - * - *

{@code liveEventsBeforeSnapshotComplete} is the setting worth arguing about. Delivering live - * events while the snapshot is still being sent gives the client fresher data and an ordering it - * cannot reconstruct: it may see the update to a row before the row itself. Buffering them is - * correct and costs memory bounded by the snapshot duration. Neither is right for every method, - * which is why this is a per-method decision rather than a platform default. - */ -public record GrpcStreamProfile( - boolean snapshotFirst, - boolean liveEventsBeforeSnapshotComplete, - boolean resumable, - int maxBufferedMessages, - long maxBufferedBytes) { - - /** Refuses an incoherent profile. */ - public GrpcStreamProfile { - if (maxBufferedMessages < 1) { - throw new IllegalArgumentException("a stream buffers at least one message"); - } - if (maxBufferedBytes < 1L) { - throw new IllegalArgumentException("a stream needs a positive byte bound"); - } - if (liveEventsBeforeSnapshotComplete && !snapshotFirst) { - throw new IllegalArgumentException( - "a profile without a snapshot cannot describe what happens before the snapshot completes"); - } - } - - /** - * The Stable default: snapshot first, live events buffered until it completes, resumable. - * - *

Buffering is the default because the alternative delivers an update to a row before the row, - * and a client that has to tolerate that is a client doing the platform's ordering work. - */ - public static GrpcStreamProfile snapshotThenLive() { - return new GrpcStreamProfile(true, false, true, 256, 8L * 1024L * 1024L); - } - - /** A live-only stream with no snapshot phase. */ - public static GrpcStreamProfile liveOnly() { - return new GrpcStreamProfile(false, false, true, 256, 8L * 1024L * 1024L); - } -} diff --git a/grpc/grpc-proto-contract/build.gradle b/grpc/grpc-proto-contract/build.gradle deleted file mode 100644 index d2c9d36..0000000 --- a/grpc/grpc-proto-contract/build.gradle +++ /dev/null @@ -1,14 +0,0 @@ -plugins { - id 'ca.platform-module' -} - -// Schema source of truth: the `.proto` files plus the rule engine that judges them. -// -// No protobuf plugin and no protoc invocation here — see -// docs/superpowers/specs/2026-08-30-grpc-platform-adaptation-design.md D6. The validator reads -// `.proto` text and enforces the Stable style manifest (proto3 + explicit optional, package -// versioning, reserved history, enum zero suffix, WKT allowlist), which is the invariant the plan -// owns; running protoc is a separate, gated decision. -dependencies { - api project(':grpc:grpc-core-api') -} diff --git a/grpc/grpc-proto-contract/gradle.lockfile b/grpc/grpc-proto-contract/gradle.lockfile deleted file mode 100644 index e2c9585..0000000 --- a/grpc/grpc-proto-contract/gradle.lockfile +++ /dev/null @@ -1,84 +0,0 @@ -# This is a Gradle generated file for dependency locking. -# Manual edits can break the build and are not advised. -# This file is expected to be part of source control. -com.github.ben-manes.caffeine:caffeine:3.2.4=annotationProcessor,testAnnotationProcessor -com.github.kevinstern:software-and-algorithms:1.0=annotationProcessor,testAnnotationProcessor -com.github.spotbugs:spotbugs-annotations:4.10.2=spotbugs -com.github.spotbugs:spotbugs:4.10.2=spotbugs -com.github.stephenc.jcip:jcip-annotations:1.0-1=spotbugs -com.google.auto.service:auto-service-annotations:1.0.1=annotationProcessor,testAnnotationProcessor -com.google.auto.value:auto-value-annotations:1.9=annotationProcessor,testAnnotationProcessor -com.google.auto:auto-common:1.2.2=annotationProcessor,testAnnotationProcessor -com.google.code.findbugs:jsr305:3.0.2=checkstyle,spotbugs -com.google.code.gson:gson:2.13.2=spotbugs -com.google.errorprone:error_prone_annotation:2.49.0=annotationProcessor,testAnnotationProcessor -com.google.errorprone:error_prone_annotations:2.41.0=spotbugs -com.google.errorprone:error_prone_annotations:2.47.0=checkstyle -com.google.errorprone:error_prone_annotations:2.49.0=annotationProcessor,testAnnotationProcessor -com.google.errorprone:error_prone_check_api:2.49.0=annotationProcessor,testAnnotationProcessor -com.google.errorprone:error_prone_core:2.49.0=annotationProcessor,testAnnotationProcessor -com.google.googlejavaformat:google-java-format:1.35.0=annotationProcessor,testAnnotationProcessor -com.google.guava:failureaccess:1.0.3=annotationProcessor,checkstyle,testAnnotationProcessor -com.google.guava:guava:33.5.0-jre=annotationProcessor,testAnnotationProcessor -com.google.guava:guava:33.6.0-jre=checkstyle -com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava=annotationProcessor,checkstyle,testAnnotationProcessor -com.google.j2objc:j2objc-annotations:3.1=annotationProcessor,checkstyle,testAnnotationProcessor -com.google.protobuf:protobuf-java:4.33.2=annotationProcessor,testAnnotationProcessor -com.h3xstream.findsecbugs:findsecbugs-plugin:1.14.0=spotbugsPlugins -com.puppycrawl.tools:checkstyle:13.5.0=checkstyle -commons-beanutils:commons-beanutils:1.11.0=checkstyle -commons-collections:commons-collections:3.2.2=checkstyle -commons-io:commons-io:2.21.0=spotbugs -info.picocli:picocli:4.7.7=checkstyle -io.github.eisop:dataflow-errorprone:3.41.0-eisop1=annotationProcessor,testAnnotationProcessor -io.github.java-diff-utils:java-diff-utils:4.12=annotationProcessor,testAnnotationProcessor -javax.inject:javax.inject:1=annotationProcessor,testAnnotationProcessor -jaxen:jaxen:2.0.6=spotbugs -net.bytebuddy:byte-buddy:1.17.8=testCompileClasspath,testRuntimeClasspath -net.sf.saxon:Saxon-HE:12.9=checkstyle,spotbugs -org.antlr:antlr4-runtime:4.13.2=checkstyle -org.apache.bcel:bcel:6.12.0=spotbugs -org.apache.commons:commons-lang3:3.20.0=checkstyle,spotbugs -org.apache.commons:commons-text:1.15.0=spotbugs -org.apache.commons:commons-text:1.3=checkstyle -org.apache.httpcomponents:httpclient:4.5.13=checkstyle -org.apache.httpcomponents:httpcore:4.4.16=checkstyle -org.apache.logging.log4j:log4j-api:2.25.5=spotbugs -org.apache.logging.log4j:log4j-core:2.25.5=spotbugs -org.apache.maven.doxia:doxia-core:1.12.0=checkstyle -org.apache.maven.doxia:doxia-logging-api:1.12.0=checkstyle -org.apache.maven.doxia:doxia-module-xdoc:1.12.0=checkstyle -org.apache.maven.doxia:doxia-sink-api:1.12.0=checkstyle -org.apache.xbean:xbean-reflect:3.7=checkstyle -org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath -org.assertj:assertj-core:3.27.7=testCompileClasspath,testRuntimeClasspath -org.codehaus.plexus:plexus-classworlds:2.6.0=checkstyle -org.codehaus.plexus:plexus-component-annotations:2.1.0=checkstyle -org.codehaus.plexus:plexus-container-default:2.1.0=checkstyle -org.codehaus.plexus:plexus-utils:3.3.0=checkstyle -org.dom4j:dom4j:2.2.0=spotbugs -org.javassist:javassist:3.28.0-GA=checkstyle -org.jspecify:jspecify:1.0.1=annotationProcessor,checkstyle,testAnnotationProcessor,testCompileClasspath -org.junit.jupiter:junit-jupiter-api:6.0.3=testCompileClasspath,testRuntimeClasspath -org.junit.jupiter:junit-jupiter-engine:6.0.3=testRuntimeClasspath -org.junit.jupiter:junit-jupiter-params:6.0.3=testCompileClasspath,testRuntimeClasspath -org.junit.jupiter:junit-jupiter:6.0.3=testCompileClasspath,testRuntimeClasspath -org.junit.platform:junit-platform-commons:6.0.3=testCompileClasspath,testRuntimeClasspath -org.junit.platform:junit-platform-engine:6.0.3=testRuntimeClasspath -org.junit.platform:junit-platform-launcher:6.0.3=testRuntimeClasspath -org.junit:junit-bom:6.0.3=testCompileClasspath,testRuntimeClasspath -org.junit:junit-bom:6.1.0=spotbugs -org.mockito:mockito-core:5.20.0=mockitoAgent -org.opentest4j:opentest4j:1.3.0=testCompileClasspath,testRuntimeClasspath -org.ow2.asm:asm-analysis:9.10.1=spotbugs -org.ow2.asm:asm-commons:9.10.1=spotbugs -org.ow2.asm:asm-tree:9.10.1=spotbugs -org.ow2.asm:asm-util:9.10.1=spotbugs -org.ow2.asm:asm:9.10.1=spotbugs -org.pcollections:pcollections:4.0.1=annotationProcessor,testAnnotationProcessor -org.reflections:reflections:0.10.2=checkstyle -org.slf4j:slf4j-api:2.0.18=spotbugs,spotbugsSlf4j -org.slf4j:slf4j-simple:2.0.17=spotbugsSlf4j -org.slf4j:slf4j-simple:2.0.18=checkstyle -org.xmlresolver:xmlresolver:5.3.3=checkstyle,spotbugs -empty=compileClasspath,runtimeClasspath diff --git a/grpc/grpc-proto-contract/src/main/java/dev/caskeleton/grpc/contract/GrpcProtoContractValidator.java b/grpc/grpc-proto-contract/src/main/java/dev/caskeleton/grpc/contract/GrpcProtoContractValidator.java deleted file mode 100644 index 94dd631..0000000 --- a/grpc/grpc-proto-contract/src/main/java/dev/caskeleton/grpc/contract/GrpcProtoContractValidator.java +++ /dev/null @@ -1,447 +0,0 @@ -package dev.caskeleton.grpc.contract; - -import java.util.ArrayDeque; -import java.util.ArrayList; -import java.util.Deque; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -/** - * Judges committed {@code .proto} sources against {@link GrpcProtoStyleManifest} and the schema's - * own removal history. - * - *

A line scanner, not a Protobuf parser, and that is a deliberate limit rather than a shortcut. - * Everything this checks is a property of the source text a reviewer reads — the syntax line, the - * package, the two Java options, the zero enum value, the {@code reserved} declarations, the - * imports, the {@code map} fields, explicit presence. Semantics that need a compiled descriptor - * belong to {@code grpc-codegen}'s descriptor artifact, which is where a real {@code protoc} run - * would be consumed. - * - *

The removal history is an input rather than something inferred, because it cannot be inferred: - * a field that is simply gone from the current source is indistinguishable from one that never - * existed. Recording removals and checking them against {@code reserved} is the only way the "do - * not reuse a field number" rule survives the commit that deletes the field. - */ -public final class GrpcProtoContractValidator { - - /** Rule ids, so a build log and a review checklist use the same names. */ - public static final String RULE_PROTO3_SYNTAX = "PROTO3_SYNTAX"; - - /** The package must be {@code organization.domain.vMAJOR}. */ - public static final String RULE_PACKAGE_VERSIONED = "PACKAGE_VERSIONED"; - - /** {@code option java_multiple_files = true} must be present. */ - public static final String RULE_JAVA_MULTIPLE_FILES = "JAVA_MULTIPLE_FILES"; - - /** The generated Java package must not collide with a hand-written one. */ - public static final String RULE_JAVA_PACKAGE_SEPARATE = "JAVA_PACKAGE_SEPARATE"; - - /** An enum's zero value must end in {@code _UNSPECIFIED}. */ - public static final String RULE_ENUM_ZERO_UNSPECIFIED = "ENUM_ZERO_UNSPECIFIED"; - - /** A removed field number or name must be {@code reserved}. */ - public static final String RULE_RESERVED_HISTORY = "RESERVED_HISTORY"; - - /** A {@code google.protobuf} import must be on the allowlist. */ - public static final String RULE_WELL_KNOWN_TYPE_ALLOWLIST = "WELL_KNOWN_TYPE_ALLOWLIST"; - - /** A {@code map} field must be on the allowlist. */ - public static final String RULE_MAP_ALLOWLIST = "MAP_ALLOWLIST"; - - /** A field the manifest marks presence-required must be declared {@code optional}. */ - public static final String RULE_EXPLICIT_PRESENCE = "EXPLICIT_PRESENCE"; - - private static final Pattern SYNTAX = Pattern.compile("^\\s*syntax\\s*=\\s*\"([^\"]+)\"\\s*;"); - private static final Pattern PACKAGE = Pattern.compile("^\\s*package\\s+([A-Za-z0-9_.]+)\\s*;"); - private static final Pattern IMPORT = - Pattern.compile("^\\s*import\\s+(?:public\\s+|weak\\s+)?\"([^\"]+)\"\\s*;"); - private static final Pattern OPTION = - Pattern.compile("^\\s*option\\s+([A-Za-z0-9_]+)\\s*=\\s*(.+?)\\s*;"); - private static final Pattern SCOPE_OPEN = - Pattern.compile("^\\s*(message|enum|service|oneof)\\s+([A-Za-z0-9_]+)\\s*\\{"); - private static final Pattern ENUM_VALUE = - Pattern.compile("^\\s*([A-Za-z0-9_]+)\\s*=\\s*(-?\\d+)\\s*(?:\\[[^\\]]*\\])?\\s*;"); - private static final Pattern MAP_FIELD = - Pattern.compile("^\\s*map\\s*<[^>]+>\\s+([A-Za-z0-9_]+)\\s*=\\s*(\\d+)"); - private static final Pattern FIELD = - Pattern.compile( - "^\\s*(optional\\s+|repeated\\s+)?([A-Za-z0-9_.]+)\\s+([A-Za-z0-9_]+)\\s*=\\s*(\\d+)"); - private static final Pattern RESERVED_NUMBERS = - Pattern.compile("^\\s*reserved\\s+([^\";]*\\d[^\";]*);"); - private static final Pattern RESERVED_NAMES = - Pattern.compile("^\\s*reserved\\s+(\"[^;]*\")\\s*;"); - private static final Pattern QUOTED_NAME = Pattern.compile("\"([A-Za-z0-9_]+)\""); - private static final Pattern NUMBER = Pattern.compile("\\d+"); - private static final Pattern LINE_COMMENT = Pattern.compile("//.*$"); - - private final GrpcProtoStyleManifest manifest; - - /** Binds a validator to the manifest it judges against. */ - public GrpcProtoContractValidator(GrpcProtoStyleManifest manifest) { - if (manifest == null) { - throw new IllegalArgumentException("a validator needs a style manifest"); - } - this.manifest = manifest; - } - - /** - * What was removed from a schema, and therefore what must stay reserved. - * - *

Keys are message names as written in the file, nested ones qualified with a dot — {@code - * PreconditionFailure.Violation}. - */ - public record SchemaHistory( - Map> removedFieldNumbers, Map> removedFieldNames) { - - /** Copies both maps. */ - public SchemaHistory { - if (removedFieldNumbers == null || removedFieldNames == null) { - throw new IllegalArgumentException("a schema history needs both removal maps"); - } - removedFieldNumbers = copyOf(removedFieldNumbers); - removedFieldNames = copyOf(removedFieldNames); - } - - private static Map> copyOf(Map> source) { - Map> copy = new LinkedHashMap<>(); - source.forEach((key, value) -> copy.put(key, Set.copyOf(value))); - return Map.copyOf(copy); - } - - /** A schema nothing has been removed from yet. */ - public static SchemaHistory empty() { - return new SchemaHistory(Map.of(), Map.of()); - } - } - - /** Validates one file against the manifest, with no removal history to check. */ - public List validate(String fileName, String source) { - return validate(fileName, source, SchemaHistory.empty()); - } - - /** - * Validates one file against the manifest and its removal history. - * - * @return every violation found, in source order; empty when the file is compliant - */ - public List validate( - String fileName, String source, SchemaHistory history) { - if (fileName == null || fileName.isBlank()) { - throw new IllegalArgumentException("a proto file needs a name"); - } - if (source == null) { - throw new IllegalArgumentException("a proto file needs source text"); - } - if (history == null) { - throw new IllegalArgumentException("a schema history must be present; use empty()"); - } - - List violations = new ArrayList<>(); - Scan scan = scan(fileName, source, violations); - - checkFileHeader(fileName, scan, violations); - checkRemovalHistory(fileName, scan, history, violations); - return List.copyOf(violations); - } - - private void checkFileHeader( - String fileName, Scan scan, List violations) { - if (!"proto3".equals(scan.syntax)) { - violations.add( - GrpcProtoRuleViolation.ofFile( - RULE_PROTO3_SYNTAX, - fileName, - "Stable schema source must declare syntax = \"proto3\"; found " - + (scan.syntax == null ? "no syntax declaration" : "'" + scan.syntax + "'"))); - } - String expectedPrefix = manifest.organization() + "."; - if (scan.protoPackage == null) { - violations.add( - GrpcProtoRuleViolation.ofFile( - RULE_PACKAGE_VERSIONED, fileName, "no package declaration")); - } else if (!scan.protoPackage.startsWith(expectedPrefix) - || !scan.protoPackage.matches(".*\\.v[1-9]\\d*$")) { - violations.add( - new GrpcProtoRuleViolation( - RULE_PACKAGE_VERSIONED, - fileName, - scan.packageLine, - "package must be '" - + manifest.organization() - + "..v'; got '" - + scan.protoPackage - + "'")); - } - if (!"true".equals(scan.options.get("java_multiple_files"))) { - violations.add( - GrpcProtoRuleViolation.ofFile( - RULE_JAVA_MULTIPLE_FILES, - fileName, - "option java_multiple_files = true is required; one outer class per file hides every " - + "generated type behind a name the schema never mentions")); - } - String javaPackage = unquote(scan.options.get("java_package")); - if (javaPackage == null || javaPackage.isBlank()) { - violations.add( - GrpcProtoRuleViolation.ofFile( - RULE_JAVA_PACKAGE_SEPARATE, fileName, "option java_package is required")); - } else { - for (String handWritten : manifest.handWrittenJavaPackages()) { - if (javaPackage.equals(handWritten) || javaPackage.startsWith(handWritten + ".")) { - violations.add( - GrpcProtoRuleViolation.ofFile( - RULE_JAVA_PACKAGE_SEPARATE, - fileName, - "generated java_package '" - + javaPackage - + "' is inside hand-written package '" - + handWritten - + "'; generated and hand-written types must not share a package")); - } - } - } - } - - private static void checkRemovalHistory( - String fileName, Scan scan, SchemaHistory history, List violations) { - history - .removedFieldNumbers() - .forEach( - (message, numbers) -> { - Set reserved = scan.reservedNumbers.getOrDefault(message, Set.of()); - Set missing = new LinkedHashSet<>(numbers); - missing.removeAll(reserved); - if (!missing.isEmpty()) { - violations.add( - GrpcProtoRuleViolation.ofFile( - RULE_RESERVED_HISTORY, - fileName, - "message '" - + message - + "' removed field numbers " - + missing.stream().sorted().toList() - + " without reserving them; the next field added would reuse a number " - + "an old client still writes")); - } - }); - history - .removedFieldNames() - .forEach( - (message, names) -> { - Set reserved = scan.reservedNames.getOrDefault(message, Set.of()); - Set missing = new LinkedHashSet<>(names); - missing.removeAll(reserved); - if (!missing.isEmpty()) { - violations.add( - GrpcProtoRuleViolation.ofFile( - RULE_RESERVED_HISTORY, - fileName, - "message '" - + message - + "' removed field names " - + missing.stream().sorted().toList() - + " without reserving them; reusing the name changes the JSON contract")); - } - }); - } - - private Scan scan(String fileName, String source, List violations) { - Scan scan = new Scan(); - Deque scopeKinds = new ArrayDeque<>(); - Deque scopeNames = new ArrayDeque<>(); - int lineNumber = 0; - - for (String rawLine : source.lines().toList()) { - lineNumber++; - String line = LINE_COMMENT.matcher(rawLine).replaceAll(""); - if (line.isBlank()) { - continue; - } - - Matcher syntax = SYNTAX.matcher(line); - if (syntax.find()) { - scan.syntax = syntax.group(1); - continue; - } - Matcher packageMatcher = PACKAGE.matcher(line); - if (packageMatcher.find()) { - scan.protoPackage = packageMatcher.group(1); - scan.packageLine = lineNumber; - continue; - } - Matcher importMatcher = IMPORT.matcher(line); - if (importMatcher.find()) { - String importPath = importMatcher.group(1); - if (!manifest.wellKnownTypeAllowed(importPath)) { - violations.add( - new GrpcProtoRuleViolation( - RULE_WELL_KNOWN_TYPE_ALLOWLIST, - fileName, - lineNumber, - "import '" - + importPath - + "' is not on the well-known type allowlist; Any and Struct erase the " - + "schema they are supposed to describe, so each use is granted by name")); - } - continue; - } - Matcher option = OPTION.matcher(line); - if (option.find() && scopeKinds.isEmpty()) { - scan.options.put(option.group(1), option.group(2)); - continue; - } - - Matcher scopeOpen = SCOPE_OPEN.matcher(line); - if (scopeOpen.find()) { - scopeKinds.push(scopeOpen.group(1)); - scopeNames.push(qualify(scopeNames, scopeOpen.group(2))); - continue; - } - if (line.strip().startsWith("}")) { - if (!scopeKinds.isEmpty()) { - scopeKinds.pop(); - scopeNames.pop(); - } - continue; - } - if (scopeKinds.isEmpty()) { - continue; - } - - String scopeKind = scopeKinds.peek(); - String scopeName = scopeNames.peek(); - if ("enum".equals(scopeKind)) { - scanEnumValue(fileName, line, lineNumber, scopeName, violations); - } else if ("message".equals(scopeKind) || "oneof".equals(scopeKind)) { - scanMessageMember(fileName, line, lineNumber, scopeName, scan, violations); - } - } - return scan; - } - - private static void scanEnumValue( - String fileName, - String line, - int lineNumber, - String enumName, - List violations) { - Matcher value = ENUM_VALUE.matcher(line); - if (!value.find()) { - return; - } - if (!"0".equals(value.group(2))) { - return; - } - String name = value.group(1); - if (!name.endsWith("_UNSPECIFIED")) { - violations.add( - new GrpcProtoRuleViolation( - RULE_ENUM_ZERO_UNSPECIFIED, - fileName, - lineNumber, - "enum '" - + enumName - + "' zero value is '" - + name - + "'; proto3 gives an unset field the zero value, so a meaningful name there is " - + "indistinguishable from a field nobody set")); - } - } - - private void scanMessageMember( - String fileName, - String line, - int lineNumber, - String messageName, - Scan scan, - List violations) { - Matcher reservedNames = RESERVED_NAMES.matcher(line); - if (reservedNames.find()) { - Matcher quoted = QUOTED_NAME.matcher(reservedNames.group(1)); - while (quoted.find()) { - scan.reservedNames - .computeIfAbsent(messageName, key -> new LinkedHashSet<>()) - .add(quoted.group(1)); - } - return; - } - Matcher reservedNumbers = RESERVED_NUMBERS.matcher(line); - if (reservedNumbers.find()) { - Matcher number = NUMBER.matcher(reservedNumbers.group(1)); - while (number.find()) { - scan.reservedNumbers - .computeIfAbsent(messageName, key -> new LinkedHashSet<>()) - .add(Integer.valueOf(number.group())); - } - return; - } - - Matcher mapField = MAP_FIELD.matcher(line); - if (mapField.find()) { - String qualified = messageName + "." + mapField.group(1); - if (!manifest.mapAllowed(qualified)) { - violations.add( - new GrpcProtoRuleViolation( - RULE_MAP_ALLOWLIST, - fileName, - lineNumber, - "map field '" - + qualified - + "' is not on the allowlist; a map is an unversioned key space that no " - + "breaking-change check can reason about")); - } - return; - } - - Matcher field = FIELD.matcher(line); - if (!field.find()) { - return; - } - String modifier = field.group(1) == null ? "" : field.group(1).strip(); - String fieldName = field.group(3); - if (manifest.presenceRequired(messageName, fieldName) && !"optional".equals(modifier)) { - violations.add( - new GrpcProtoRuleViolation( - RULE_EXPLICIT_PRESENCE, - fileName, - lineNumber, - "field '" - + messageName - + "." - + fieldName - + "' needs presence and must be declared optional; without it, absent and " - + "default-valued are the same message on the wire")); - } - } - - private static String qualify(Deque scopeNames, String name) { - String parent = scopeNames.peek(); - return parent == null ? name : parent + "." + name; - } - - private static String unquote(String value) { - if (value == null) { - return null; - } - String stripped = value.strip(); - if (stripped.length() >= 2 && stripped.startsWith("\"") && stripped.endsWith("\"")) { - return stripped.substring(1, stripped.length() - 1); - } - return stripped; - } - - /** Everything one pass over a file collected. */ - private static final class Scan { - private String syntax; - private String protoPackage; - private int packageLine; - private final Map options = new LinkedHashMap<>(); - private final Map> reservedNumbers = new LinkedHashMap<>(); - private final Map> reservedNames = new LinkedHashMap<>(); - } -} diff --git a/grpc/grpc-proto-contract/src/main/java/dev/caskeleton/grpc/contract/GrpcProtoRuleViolation.java b/grpc/grpc-proto-contract/src/main/java/dev/caskeleton/grpc/contract/GrpcProtoRuleViolation.java deleted file mode 100644 index d9b7ce9..0000000 --- a/grpc/grpc-proto-contract/src/main/java/dev/caskeleton/grpc/contract/GrpcProtoRuleViolation.java +++ /dev/null @@ -1,38 +0,0 @@ -package dev.caskeleton.grpc.contract; - -/** - * One schema rule broken, at one place. - * - *

Returned rather than thrown, and carrying a line number, because a schema review is a list. A - * validator that throws on the first violation turns "this file breaks four rules" into four - * separate runs, and the author fixes them one at a time without ever seeing the shape of the - * problem. - */ -public record GrpcProtoRuleViolation(String rule, String file, int line, String detail) { - - /** Requires a named rule, a file and a one-based line. */ - public GrpcProtoRuleViolation { - if (rule == null || rule.isBlank()) { - throw new IllegalArgumentException("a violation names the rule it broke"); - } - if (file == null || file.isBlank()) { - throw new IllegalArgumentException("a violation names the file it is in"); - } - if (detail == null || detail.isBlank()) { - throw new IllegalArgumentException("a violation explains itself"); - } - if (line < 0) { - throw new IllegalArgumentException("line must not be negative"); - } - } - - /** A violation about a whole file rather than a line in it. */ - public static GrpcProtoRuleViolation ofFile(String rule, String file, String detail) { - return new GrpcProtoRuleViolation(rule, file, 0, detail); - } - - /** {@code file:line rule — detail}, the form a build log is read in. */ - public String describe() { - return file + (line > 0 ? ":" + line : "") + " " + rule + " — " + detail; - } -} diff --git a/grpc/grpc-proto-contract/src/main/java/dev/caskeleton/grpc/contract/GrpcProtoStyleManifest.java b/grpc/grpc-proto-contract/src/main/java/dev/caskeleton/grpc/contract/GrpcProtoStyleManifest.java deleted file mode 100644 index 7e4040d..0000000 --- a/grpc/grpc-proto-contract/src/main/java/dev/caskeleton/grpc/contract/GrpcProtoStyleManifest.java +++ /dev/null @@ -1,120 +0,0 @@ -package dev.caskeleton.grpc.contract; - -import java.util.Map; -import java.util.Set; - -/** - * The schema rules this repository has decided on, as data rather than as prose in a review - * checklist. - * - *

Three of the five fields are allowlists, and that shape is the decision: {@code Any}, {@code - * Struct} and {@code map} are not banned, they are things you have to ask for by name. A ban gets - * worked around; an allowlist entry gets read by the next person to open the manifest and carries - * the field it was granted for. - */ -public record GrpcProtoStyleManifest( - String organization, - Set handWrittenJavaPackages, - Set wellKnownTypeAllowlist, - Set mapFieldAllowlist, - Map> presenceRequiredFields) { - - /** The well-known types every schema may use without asking. */ - private static final Set ALWAYS_ALLOWED_WELL_KNOWN_TYPES = - Set.of( - "google/protobuf/timestamp.proto", - "google/protobuf/duration.proto", - "google/protobuf/field_mask.proto", - "google/protobuf/empty.proto", - "google/protobuf/wrappers.proto"); - - /** Copies every collection so a manifest cannot widen after it has been reviewed. */ - public GrpcProtoStyleManifest { - if (organization == null || organization.isBlank()) { - throw new IllegalArgumentException("a style manifest names the owning organization"); - } - if (handWrittenJavaPackages == null - || wellKnownTypeAllowlist == null - || mapFieldAllowlist == null - || presenceRequiredFields == null) { - throw new IllegalArgumentException("every manifest allowlist must be present"); - } - handWrittenJavaPackages = Set.copyOf(handWrittenJavaPackages); - wellKnownTypeAllowlist = Set.copyOf(wellKnownTypeAllowlist); - mapFieldAllowlist = Set.copyOf(mapFieldAllowlist); - presenceRequiredFields = - presenceRequiredFields.entrySet().stream() - .collect( - java.util.stream.Collectors.toUnmodifiableMap( - Map.Entry::getKey, entry -> Set.copyOf(entry.getValue()))); - } - - /** - * This repository's manifest. - * - *

The hand-written package is {@code dev.caskeleton.grpc}: generated code must land somewhere - * else, because a generated class and a hand-written one in the same package are - * indistinguishable to a reader and the generated one gets edited exactly once before somebody - * regenerates. - */ - public static GrpcProtoStyleManifest caSkeleton() { - return new GrpcProtoStyleManifest( - "hyeonworks", - Set.of("dev.caskeleton"), - ALWAYS_ALLOWED_WELL_KNOWN_TYPES, - Set.of(), - Map.of()); - } - - /** Whether {@code importPath} may be imported. */ - public boolean wellKnownTypeAllowed(String importPath) { - return !importPath.startsWith("google/protobuf/") - || wellKnownTypeAllowlist.contains(importPath); - } - - /** Whether a {@code map} field is allowed at {@code message.field}. */ - public boolean mapAllowed(String qualifiedField) { - return mapFieldAllowlist.contains(qualifiedField); - } - - /** Whether {@code field} of {@code message} must be declared {@code optional}. */ - public boolean presenceRequired(String message, String field) { - return presenceRequiredFields.getOrDefault(message, Set.of()).contains(field); - } - - /** A copy of this manifest that also allows the given well-known type imports. */ - public GrpcProtoStyleManifest allowingWellKnownTypes(Set additionalImports) { - java.util.Set widened = new java.util.LinkedHashSet<>(wellKnownTypeAllowlist); - widened.addAll(additionalImports); - return new GrpcProtoStyleManifest( - organization, handWrittenJavaPackages, widened, mapFieldAllowlist, presenceRequiredFields); - } - - /** A copy of this manifest that also allows the given {@code message.field} map fields. */ - public GrpcProtoStyleManifest allowingMapFields(Set qualifiedFields) { - java.util.Set widened = new java.util.LinkedHashSet<>(mapFieldAllowlist); - widened.addAll(qualifiedFields); - return new GrpcProtoStyleManifest( - organization, - handWrittenJavaPackages, - wellKnownTypeAllowlist, - widened, - presenceRequiredFields); - } - - /** A copy of this manifest that also requires explicit presence on the given fields. */ - public GrpcProtoStyleManifest requiringPresence(String message, Set fields) { - java.util.Map> widened = - new java.util.LinkedHashMap<>(presenceRequiredFields); - widened.merge( - message, - Set.copyOf(fields), - (existing, added) -> { - java.util.Set merged = new java.util.LinkedHashSet<>(existing); - merged.addAll(added); - return merged; - }); - return new GrpcProtoStyleManifest( - organization, handWrittenJavaPackages, wellKnownTypeAllowlist, mapFieldAllowlist, widened); - } -} diff --git a/grpc/grpc-proto-contract/src/main/resources/proto/buf.gen.yaml b/grpc/grpc-proto-contract/src/main/resources/proto/buf.gen.yaml deleted file mode 100644 index a357d27..0000000 --- a/grpc/grpc-proto-contract/src/main/resources/proto/buf.gen.yaml +++ /dev/null @@ -1,23 +0,0 @@ -# What a Buf-driven generation would emit, recorded even though this build does not run it. -# -# No protoc runs here (ADR-GRPC-002), so this file is a specification rather than a step. It exists -# because the three decisions it encodes are the ones GrpcCodegenManifest enforces from Java, and a -# reader who wants to know what "the single codegen owner produces" means should find one answer -# rather than two: -# -# - generated Java lands under build/, never in a source tree; -# - the generated package is disjoint from the hand-written dev.caskeleton root; -# - plugin versions come from the managed platform, so no version literal appears below. -version: v2 -managed: - enabled: true - override: - - file_option: java_multiple_files - value: true - - file_option: java_package_suffix - value: generated -plugins: - - remote: buf.build/protocolbuffers/java - out: build/generated/source/proto/main/java - - remote: buf.build/grpc/java - out: build/generated/source/proto/main/grpc diff --git a/grpc/grpc-proto-contract/src/main/resources/proto/buf.lock b/grpc/grpc-proto-contract/src/main/resources/proto/buf.lock deleted file mode 100644 index dc72df5..0000000 --- a/grpc/grpc-proto-contract/src/main/resources/proto/buf.lock +++ /dev/null @@ -1,11 +0,0 @@ -# Buf dependency lock. -# -# Empty by design: the Stable schema imports nothing outside itself. The well-known types this -# platform allows (timestamp, duration, field_mask, empty, wrappers) ship with protoc rather than -# coming from a Buf module, and GrpcProtoStyleManifest refuses any other google.protobuf import -# without an explicit allowlist entry. -# -# The file is committed rather than omitted so that adding a first dependency is a visible diff in a -# file that already exists, instead of a new file nobody reviews. -version: v2 -deps: [] diff --git a/grpc/grpc-proto-contract/src/main/resources/proto/buf.yaml b/grpc/grpc-proto-contract/src/main/resources/proto/buf.yaml deleted file mode 100644 index 22b2a1d..0000000 --- a/grpc/grpc-proto-contract/src/main/resources/proto/buf.yaml +++ /dev/null @@ -1,18 +0,0 @@ -# Buf module configuration for the Stable schema. -# -# The rules named here are also implemented in GrpcProtoContractValidator, which is what actually -# fails this repository's build: the Buf CLI is not part of this toolchain, and a gate that silently -# passes when a binary is missing is worse than one that computes the same judgement from the -# committed schema. This file stays accurate so that running `buf lint` / `buf breaking` in an -# environment that has the CLI reaches the same verdict. -version: v2 -modules: - - path: . -lint: - use: - - STANDARD -breaking: - # FILE, not WIRE or WIRE_JSON. Wire compatibility alone would let a field rename or a Java package - # move through as "compatible" while every generated consumer stops compiling. - use: - - FILE diff --git a/grpc/grpc-proto-contract/src/test/java/dev/caskeleton/grpc/contract/GrpcProtoContractValidatorTest.java b/grpc/grpc-proto-contract/src/test/java/dev/caskeleton/grpc/contract/GrpcProtoContractValidatorTest.java deleted file mode 100644 index 6d19090..0000000 --- a/grpc/grpc-proto-contract/src/test/java/dev/caskeleton/grpc/contract/GrpcProtoContractValidatorTest.java +++ /dev/null @@ -1,324 +0,0 @@ -package dev.caskeleton.grpc.contract; - -import static org.assertj.core.api.Assertions.assertThat; - -import java.io.IOException; -import java.io.InputStream; -import java.io.UncheckedIOException; -import java.nio.charset.StandardCharsets; -import java.util.List; -import java.util.Map; -import java.util.Set; -import org.junit.jupiter.api.DisplayName; -import org.junit.jupiter.api.Test; - -class GrpcProtoContractValidatorTest { - - private final GrpcProtoContractValidator validator = - new GrpcProtoContractValidator(GrpcProtoStyleManifest.caSkeleton()); - - private static String committedSchema(String resourcePath) { - try (InputStream stream = - GrpcProtoContractValidatorTest.class.getClassLoader().getResourceAsStream(resourcePath)) { - if (stream == null) { - throw new IllegalStateException("missing committed schema resource: " + resourcePath); - } - return new String(stream.readAllBytes(), StandardCharsets.UTF_8); - } catch (IOException e) { - throw new UncheckedIOException(e); - } - } - - @Test - @DisplayName("the committed Stable schema passes every style rule") - void committedSchemaIsCompliant() { - List files = - List.of( - "proto/hyeonworks/grpc/common/v1/error.proto", - "proto/hyeonworks/grpc/common/v1/stream.proto"); - - for (String file : files) { - List violations = validator.validate(file, committedSchema(file)); - assertThat(violations) - .describedAs( - "violations in %s: %s", - file, violations.stream().map(GrpcProtoRuleViolation::describe).toList()) - .isEmpty(); - } - } - - @Test - @DisplayName("the committed Buf configuration states the same rules the validator enforces") - void theBufConfigurationAgreesWithTheValidator() { - String bufYaml = committedSchema("proto/buf.yaml"); - String bufGen = committedSchema("proto/buf.gen.yaml"); - String bufLock = committedSchema("proto/buf.lock"); - - // FILE, not WIRE: the category the Stable gate is fixed at. - assertThat(bufYaml).contains("use:").contains("- FILE").contains("- STANDARD"); - // Generation lands under build/ and into a package the hand-written root does not occupy. - assertThat(bufGen) - .contains("build/generated/source/proto/main/java") - .contains("build/generated/source/proto/main/grpc") - .contains("java_package_suffix") - // Never into a source tree: generated code that lands in src/ gets committed and then - // edited. The prose above the plugins block names dev.caskeleton as the package to stay out - // of, so the check is on the emitted paths rather than on the word. - .doesNotContain("out: src/"); - // No version literal: the managed platform owns plugin versions. - assertThat(bufGen).doesNotContain("version: v1"); - assertThat(bufLock).contains("deps: []"); - } - - @Test - @DisplayName("proto2 source is refused") - void proto2SourceIsRefused() { - String source = - """ - syntax = "proto2"; - package hyeonworks.document.v1; - option java_multiple_files = true; - option java_package = "hyeonworks.document.v1.generated"; - """; - - assertThat(validator.validate("legacy.proto", source)) - .extracting(GrpcProtoRuleViolation::rule) - .contains(GrpcProtoContractValidator.RULE_PROTO3_SYNTAX); - } - - @Test - @DisplayName("an unversioned package is refused") - void unversionedPackageIsRefused() { - String source = - """ - syntax = "proto3"; - package hyeonworks.document; - option java_multiple_files = true; - option java_package = "hyeonworks.document.generated"; - """; - - assertThat(validator.validate("document.proto", source)) - .extracting(GrpcProtoRuleViolation::rule) - .contains(GrpcProtoContractValidator.RULE_PACKAGE_VERSIONED); - } - - @Test - @DisplayName("a generated java_package inside a hand-written package is refused") - void generatedPackageMayNotCollideWithHandWrittenCode() { - String source = - """ - syntax = "proto3"; - package hyeonworks.document.v1; - option java_multiple_files = true; - option java_package = "dev.caskeleton.grpc.document"; - """; - - assertThat(validator.validate("document.proto", source)) - .extracting(GrpcProtoRuleViolation::rule) - .contains(GrpcProtoContractValidator.RULE_JAVA_PACKAGE_SEPARATE); - } - - @Test - @DisplayName("a missing java_multiple_files option is refused") - void javaMultipleFilesIsRequired() { - String source = - """ - syntax = "proto3"; - package hyeonworks.document.v1; - option java_package = "hyeonworks.document.v1.generated"; - """; - - assertThat(validator.validate("document.proto", source)) - .extracting(GrpcProtoRuleViolation::rule) - .contains(GrpcProtoContractValidator.RULE_JAVA_MULTIPLE_FILES); - } - - @Test - @DisplayName("an enum zero value without the _UNSPECIFIED suffix is refused, with its line") - void enumZeroValueNeedsTheUnspecifiedSuffix() { - String source = - """ - syntax = "proto3"; - package hyeonworks.document.v1; - option java_multiple_files = true; - option java_package = "hyeonworks.document.v1.generated"; - - enum DocumentState { - DRAFT = 0; - PUBLISHED = 1; - } - """; - - List violations = validator.validate("document.proto", source); - - assertThat(violations) - .singleElement() - .satisfies( - violation -> { - assertThat(violation.rule()) - .isEqualTo(GrpcProtoContractValidator.RULE_ENUM_ZERO_UNSPECIFIED); - assertThat(violation.line()).isEqualTo(7); - assertThat(violation.detail()).contains("DocumentState").contains("DRAFT"); - }); - } - - @Test - @DisplayName("a removed field number that is not reserved fails, and reserving it passes") - void removedFieldNumbersMustStayReserved() { - String withoutReserved = - """ - syntax = "proto3"; - package hyeonworks.document.v1; - option java_multiple_files = true; - option java_package = "hyeonworks.document.v1.generated"; - - message Document { - string id = 1; - string title = 4; - } - """; - GrpcProtoContractValidator.SchemaHistory history = - new GrpcProtoContractValidator.SchemaHistory( - Map.of("Document", Set.of(2, 3)), Map.of("Document", Set.of("legacy_body"))); - - assertThat(validator.validate("document.proto", withoutReserved, history)) - .extracting(GrpcProtoRuleViolation::rule) - .containsOnly(GrpcProtoContractValidator.RULE_RESERVED_HISTORY); - - String withReserved = - """ - syntax = "proto3"; - package hyeonworks.document.v1; - option java_multiple_files = true; - option java_package = "hyeonworks.document.v1.generated"; - - message Document { - reserved 2, 3; - reserved "legacy_body"; - string id = 1; - string title = 4; - } - """; - - assertThat(validator.validate("document.proto", withReserved, history)).isEmpty(); - } - - @Test - @DisplayName("Any and Struct need an explicit allowlist entry; Timestamp does not") - void anyAndStructAreAllowlistedByName() { - String source = - """ - syntax = "proto3"; - package hyeonworks.document.v1; - import "google/protobuf/timestamp.proto"; - import "google/protobuf/any.proto"; - option java_multiple_files = true; - option java_package = "hyeonworks.document.v1.generated"; - """; - - assertThat(validator.validate("document.proto", source)) - .singleElement() - .satisfies( - violation -> { - assertThat(violation.rule()) - .isEqualTo(GrpcProtoContractValidator.RULE_WELL_KNOWN_TYPE_ALLOWLIST); - assertThat(violation.detail()).contains("google/protobuf/any.proto"); - }); - - GrpcProtoContractValidator widened = - new GrpcProtoContractValidator( - GrpcProtoStyleManifest.caSkeleton() - .allowingWellKnownTypes(Set.of("google/protobuf/any.proto"))); - assertThat(widened.validate("document.proto", source)).isEmpty(); - } - - @Test - @DisplayName("a map field needs an allowlist entry naming the message and field") - void mapFieldsAreAllowlistedByName() { - String source = - """ - syntax = "proto3"; - package hyeonworks.document.v1; - option java_multiple_files = true; - option java_package = "hyeonworks.document.v1.generated"; - - message Document { - map labels = 1; - } - """; - - assertThat(validator.validate("document.proto", source)) - .extracting(GrpcProtoRuleViolation::rule) - .containsOnly(GrpcProtoContractValidator.RULE_MAP_ALLOWLIST); - - GrpcProtoContractValidator widened = - new GrpcProtoContractValidator( - GrpcProtoStyleManifest.caSkeleton().allowingMapFields(Set.of("Document.labels"))); - assertThat(widened.validate("document.proto", source)).isEmpty(); - } - - @Test - @DisplayName("a presence-required field must be declared optional") - void presenceRequiredFieldsMustBeOptional() { - String source = - """ - syntax = "proto3"; - package hyeonworks.document.v1; - option java_multiple_files = true; - option java_package = "hyeonworks.document.v1.generated"; - - message Document { - string id = 1; - string title = 2; - } - """; - GrpcProtoContractValidator strict = - new GrpcProtoContractValidator( - GrpcProtoStyleManifest.caSkeleton().requiringPresence("Document", Set.of("title"))); - - assertThat(strict.validate("document.proto", source)) - .singleElement() - .satisfies( - violation -> { - assertThat(violation.rule()) - .isEqualTo(GrpcProtoContractValidator.RULE_EXPLICIT_PRESENCE); - assertThat(violation.detail()).contains("Document.title"); - }); - - String withOptional = source.replace(" string title = 2;", " optional string title = 2;"); - assertThat(strict.validate("document.proto", withOptional)).isEmpty(); - } - - @Test - @DisplayName("nested messages are qualified, so a rule names the type it means") - void nestedMessagesAreQualified() { - String source = - """ - syntax = "proto3"; - package hyeonworks.document.v1; - option java_multiple_files = true; - option java_package = "hyeonworks.document.v1.generated"; - - message Outer { - message Inner { - map labels = 1; - } - } - """; - - assertThat(validator.validate("document.proto", source)) - .singleElement() - .satisfies(violation -> assertThat(violation.detail()).contains("Outer.Inner.labels")); - } - - @Test - @DisplayName("a violation renders as file:line rule — detail") - void violationRendersForABuildLog() { - GrpcProtoRuleViolation violation = - new GrpcProtoRuleViolation("RULE_X", "document.proto", 12, "something is wrong"); - - assertThat(violation.describe()).isEqualTo("document.proto:12 RULE_X — something is wrong"); - assertThat(GrpcProtoRuleViolation.ofFile("RULE_Y", "document.proto", "whole file").describe()) - .isEqualTo("document.proto RULE_Y — whole file"); - } -} diff --git a/grpc/grpc-runtime/build.gradle b/grpc/grpc-runtime/build.gradle new file mode 100644 index 0000000..350747d --- /dev/null +++ b/grpc/grpc-runtime/build.gradle @@ -0,0 +1,31 @@ +plugins { + id 'ca.grpc-platform-module' +} + +// The Stable runtime: one leaf for one dependency boundary (io.grpc api/stub). +// +// policy validation, context propagation, status/rich-error mapping, TLS/credential profiles, +// deadline and cancellation, retry ownership, idempotency and completion recovery, +// server streaming, payload size and compression +// server the typed service adapter SPI, the interceptor order contract, and the Netty +// server/executor/admission profiles (configuration models, not Netty wiring) +// client named channel profiles, channel runtime generations with drain, the typed stub +// factory that refuses to hand a raw Channel to application code +// discovery Static/DNS resolvers, pick_first/round_robin, Kubernetes routing profiles +// admin health registry, reflection exposure policy, drain coordinator, policy snapshot +// +// These were five leaves until 2026-09-28; they shared one framework boundary and depended on each +// other in a line, so the split bought no enforceable rule. Package names were kept so no import +// changed. Real Netty lives in `grpc-testkit`'s certification lanes. + +dependencies { + api project(':grpc:grpc-core-api') + + // api: interceptors, context binders, the error mapper and the stub factory name io.grpc types + // in public signatures, so an adopter cannot compile against this module without them. + api "io.grpc:grpc-api" + api "io.grpc:grpc-stub" + + // The shared operation-ledger fake, held to the same contract as the JPA adapter. + testImplementation testFixtures(project(':grpc:grpc-core-api')) +} diff --git a/grpc-advanced/grpc-advanced-resilience/gradle.lockfile b/grpc/grpc-runtime/gradle.lockfile similarity index 100% rename from grpc-advanced/grpc-advanced-resilience/gradle.lockfile rename to grpc/grpc-runtime/gradle.lockfile diff --git a/grpc/grpc-admin/src/main/java/dev/caskeleton/grpc/admin/GrpcAdminExposurePolicy.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/admin/GrpcAdminExposurePolicy.java similarity index 100% rename from grpc/grpc-admin/src/main/java/dev/caskeleton/grpc/admin/GrpcAdminExposurePolicy.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/admin/GrpcAdminExposurePolicy.java diff --git a/grpc/grpc-admin/src/main/java/dev/caskeleton/grpc/admin/GrpcDrainCoordinator.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/admin/GrpcDrainCoordinator.java similarity index 100% rename from grpc/grpc-admin/src/main/java/dev/caskeleton/grpc/admin/GrpcDrainCoordinator.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/admin/GrpcDrainCoordinator.java diff --git a/grpc/grpc-admin/src/main/java/dev/caskeleton/grpc/admin/GrpcDrainPhase.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/admin/GrpcDrainPhase.java similarity index 100% rename from grpc/grpc-admin/src/main/java/dev/caskeleton/grpc/admin/GrpcDrainPhase.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/admin/GrpcDrainPhase.java diff --git a/grpc/grpc-admin/src/main/java/dev/caskeleton/grpc/admin/GrpcDrainPolicy.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/admin/GrpcDrainPolicy.java similarity index 100% rename from grpc/grpc-admin/src/main/java/dev/caskeleton/grpc/admin/GrpcDrainPolicy.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/admin/GrpcDrainPolicy.java diff --git a/grpc/grpc-admin/src/main/java/dev/caskeleton/grpc/admin/GrpcDrainResult.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/admin/GrpcDrainResult.java similarity index 100% rename from grpc/grpc-admin/src/main/java/dev/caskeleton/grpc/admin/GrpcDrainResult.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/admin/GrpcDrainResult.java diff --git a/grpc/grpc-admin/src/main/java/dev/caskeleton/grpc/admin/GrpcHealthPolicy.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/admin/GrpcHealthPolicy.java similarity index 100% rename from grpc/grpc-admin/src/main/java/dev/caskeleton/grpc/admin/GrpcHealthPolicy.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/admin/GrpcHealthPolicy.java diff --git a/grpc/grpc-admin/src/main/java/dev/caskeleton/grpc/admin/GrpcHealthState.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/admin/GrpcHealthState.java similarity index 100% rename from grpc/grpc-admin/src/main/java/dev/caskeleton/grpc/admin/GrpcHealthState.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/admin/GrpcHealthState.java diff --git a/grpc/grpc-admin/src/main/java/dev/caskeleton/grpc/admin/GrpcPlatformSnapshot.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/admin/GrpcPlatformSnapshot.java similarity index 100% rename from grpc/grpc-admin/src/main/java/dev/caskeleton/grpc/admin/GrpcPlatformSnapshot.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/admin/GrpcPlatformSnapshot.java diff --git a/grpc/grpc-admin/src/main/java/dev/caskeleton/grpc/admin/GrpcPlatformSnapshotService.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/admin/GrpcPlatformSnapshotService.java similarity index 100% rename from grpc/grpc-admin/src/main/java/dev/caskeleton/grpc/admin/GrpcPlatformSnapshotService.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/admin/GrpcPlatformSnapshotService.java diff --git a/grpc/grpc-admin/src/main/java/dev/caskeleton/grpc/admin/GrpcReflectionAccessDecision.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/admin/GrpcReflectionAccessDecision.java similarity index 100% rename from grpc/grpc-admin/src/main/java/dev/caskeleton/grpc/admin/GrpcReflectionAccessDecision.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/admin/GrpcReflectionAccessDecision.java diff --git a/grpc/grpc-admin/src/main/java/dev/caskeleton/grpc/admin/GrpcReflectionMode.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/admin/GrpcReflectionMode.java similarity index 100% rename from grpc/grpc-admin/src/main/java/dev/caskeleton/grpc/admin/GrpcReflectionMode.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/admin/GrpcReflectionMode.java diff --git a/grpc/grpc-admin/src/main/java/dev/caskeleton/grpc/admin/GrpcReflectionPolicy.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/admin/GrpcReflectionPolicy.java similarity index 100% rename from grpc/grpc-admin/src/main/java/dev/caskeleton/grpc/admin/GrpcReflectionPolicy.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/admin/GrpcReflectionPolicy.java diff --git a/grpc/grpc-admin/src/main/java/dev/caskeleton/grpc/admin/GrpcServiceHealthRegistry.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/admin/GrpcServiceHealthRegistry.java similarity index 100% rename from grpc/grpc-admin/src/main/java/dev/caskeleton/grpc/admin/GrpcServiceHealthRegistry.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/admin/GrpcServiceHealthRegistry.java diff --git a/grpc/grpc-client/src/main/java/dev/caskeleton/grpc/client/GrpcCallCredentialProvider.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/client/GrpcCallCredentialProvider.java similarity index 100% rename from grpc/grpc-client/src/main/java/dev/caskeleton/grpc/client/GrpcCallCredentialProvider.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/client/GrpcCallCredentialProvider.java diff --git a/grpc/grpc-client/src/main/java/dev/caskeleton/grpc/client/GrpcChannelDrainPolicy.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/client/GrpcChannelDrainPolicy.java similarity index 100% rename from grpc/grpc-client/src/main/java/dev/caskeleton/grpc/client/GrpcChannelDrainPolicy.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/client/GrpcChannelDrainPolicy.java diff --git a/grpc/grpc-client/src/main/java/dev/caskeleton/grpc/client/GrpcChannelGeneration.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/client/GrpcChannelGeneration.java similarity index 100% rename from grpc/grpc-client/src/main/java/dev/caskeleton/grpc/client/GrpcChannelGeneration.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/client/GrpcChannelGeneration.java diff --git a/grpc/grpc-client/src/main/java/dev/caskeleton/grpc/client/GrpcChannelProfileValidator.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/client/GrpcChannelProfileValidator.java similarity index 100% rename from grpc/grpc-client/src/main/java/dev/caskeleton/grpc/client/GrpcChannelProfileValidator.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/client/GrpcChannelProfileValidator.java diff --git a/grpc/grpc-client/src/main/java/dev/caskeleton/grpc/client/GrpcChannelRuntime.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/client/GrpcChannelRuntime.java similarity index 100% rename from grpc/grpc-client/src/main/java/dev/caskeleton/grpc/client/GrpcChannelRuntime.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/client/GrpcChannelRuntime.java diff --git a/grpc/grpc-client/src/main/java/dev/caskeleton/grpc/client/GrpcChannelRuntimeRegistry.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/client/GrpcChannelRuntimeRegistry.java similarity index 100% rename from grpc/grpc-client/src/main/java/dev/caskeleton/grpc/client/GrpcChannelRuntimeRegistry.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/client/GrpcChannelRuntimeRegistry.java diff --git a/grpc/grpc-client/src/main/java/dev/caskeleton/grpc/client/GrpcClientCallContext.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/client/GrpcClientCallContext.java similarity index 100% rename from grpc/grpc-client/src/main/java/dev/caskeleton/grpc/client/GrpcClientCallContext.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/client/GrpcClientCallContext.java diff --git a/grpc/grpc-client/src/main/java/dev/caskeleton/grpc/client/GrpcClientMetadataPolicy.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/client/GrpcClientMetadataPolicy.java similarity index 100% rename from grpc/grpc-client/src/main/java/dev/caskeleton/grpc/client/GrpcClientMetadataPolicy.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/client/GrpcClientMetadataPolicy.java diff --git a/grpc/grpc-client/src/main/java/dev/caskeleton/grpc/client/GrpcLoadBalancingPolicy.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/client/GrpcLoadBalancingPolicy.java similarity index 100% rename from grpc/grpc-client/src/main/java/dev/caskeleton/grpc/client/GrpcLoadBalancingPolicy.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/client/GrpcLoadBalancingPolicy.java diff --git a/grpc/grpc-client/src/main/java/dev/caskeleton/grpc/client/GrpcNamedChannelProfile.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/client/GrpcNamedChannelProfile.java similarity index 93% rename from grpc/grpc-client/src/main/java/dev/caskeleton/grpc/client/GrpcNamedChannelProfile.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/client/GrpcNamedChannelProfile.java index 959d2f4..1a2075a 100644 --- a/grpc/grpc-client/src/main/java/dev/caskeleton/grpc/client/GrpcNamedChannelProfile.java +++ b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/client/GrpcNamedChannelProfile.java @@ -1,5 +1,6 @@ package dev.caskeleton.grpc.client; +import dev.caskeleton.grpc.api.policy.GrpcTransportLimits; import dev.caskeleton.grpc.core.GrpcChannelProfileName; import dev.caskeleton.grpc.resilience.GrpcRetryOwner; import dev.caskeleton.grpc.security.GrpcTlsProfile; @@ -77,8 +78,8 @@ public record GrpcNamedChannelProfile( GrpcLoadBalancingPolicy.PICK_FIRST, retryOwner, tls, - 1024L * 1024L, - 8192, + GrpcTransportLimits.DEFAULT_MAX_MESSAGE_BYTES, + GrpcTransportLimits.DEFAULT_MAX_METADATA_BYTES, Duration.ofSeconds(30), false); } @@ -92,8 +93,8 @@ public record GrpcNamedChannelProfile( GrpcLoadBalancingPolicy.ROUND_ROBIN, retryOwner, tls, - 1024L * 1024L, - 8192, + GrpcTransportLimits.DEFAULT_MAX_MESSAGE_BYTES, + GrpcTransportLimits.DEFAULT_MAX_METADATA_BYTES, Duration.ofSeconds(30), false); } diff --git a/grpc/grpc-client/src/main/java/dev/caskeleton/grpc/client/GrpcStubDescriptor.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/client/GrpcStubDescriptor.java similarity index 100% rename from grpc/grpc-client/src/main/java/dev/caskeleton/grpc/client/GrpcStubDescriptor.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/client/GrpcStubDescriptor.java diff --git a/grpc/grpc-client/src/main/java/dev/caskeleton/grpc/client/GrpcStubPolicyApplier.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/client/GrpcStubPolicyApplier.java similarity index 100% rename from grpc/grpc-client/src/main/java/dev/caskeleton/grpc/client/GrpcStubPolicyApplier.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/client/GrpcStubPolicyApplier.java diff --git a/grpc/grpc-client/src/main/java/dev/caskeleton/grpc/client/GrpcTypedStubFactory.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/client/GrpcTypedStubFactory.java similarity index 100% rename from grpc/grpc-client/src/main/java/dev/caskeleton/grpc/client/GrpcTypedStubFactory.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/client/GrpcTypedStubFactory.java diff --git a/grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/context/GrpcContextBinder.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/context/GrpcContextBinder.java similarity index 100% rename from grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/context/GrpcContextBinder.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/context/GrpcContextBinder.java diff --git a/grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/context/GrpcContextPropagationPolicy.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/context/GrpcContextPropagationPolicy.java similarity index 100% rename from grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/context/GrpcContextPropagationPolicy.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/context/GrpcContextPropagationPolicy.java diff --git a/grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/context/GrpcContextSnapshot.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/context/GrpcContextSnapshot.java similarity index 100% rename from grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/context/GrpcContextSnapshot.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/context/GrpcContextSnapshot.java diff --git a/grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/deadline/GrpcCancellableOperation.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/deadline/GrpcCancellableOperation.java similarity index 100% rename from grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/deadline/GrpcCancellableOperation.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/deadline/GrpcCancellableOperation.java diff --git a/grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/deadline/GrpcCancellationCoordinator.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/deadline/GrpcCancellationCoordinator.java similarity index 100% rename from grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/deadline/GrpcCancellationCoordinator.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/deadline/GrpcCancellationCoordinator.java diff --git a/grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/deadline/GrpcCancellationReason.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/deadline/GrpcCancellationReason.java similarity index 100% rename from grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/deadline/GrpcCancellationReason.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/deadline/GrpcCancellationReason.java diff --git a/grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/deadline/GrpcDeadlineCalculator.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/deadline/GrpcDeadlineCalculator.java similarity index 100% rename from grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/deadline/GrpcDeadlineCalculator.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/deadline/GrpcDeadlineCalculator.java diff --git a/grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/deadline/GrpcDeadlinePolicyValidator.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/deadline/GrpcDeadlinePolicyValidator.java similarity index 100% rename from grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/deadline/GrpcDeadlinePolicyValidator.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/deadline/GrpcDeadlinePolicyValidator.java diff --git a/grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/deadline/GrpcDependencyBudget.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/deadline/GrpcDependencyBudget.java similarity index 100% rename from grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/deadline/GrpcDependencyBudget.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/deadline/GrpcDependencyBudget.java diff --git a/grpc/grpc-discovery/src/main/java/dev/caskeleton/grpc/discovery/GrpcDiscoveryPolicyValidator.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/discovery/GrpcDiscoveryPolicyValidator.java similarity index 100% rename from grpc/grpc-discovery/src/main/java/dev/caskeleton/grpc/discovery/GrpcDiscoveryPolicyValidator.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/discovery/GrpcDiscoveryPolicyValidator.java diff --git a/grpc/grpc-discovery/src/main/java/dev/caskeleton/grpc/discovery/GrpcKubernetesProfile.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/discovery/GrpcKubernetesProfile.java similarity index 100% rename from grpc/grpc-discovery/src/main/java/dev/caskeleton/grpc/discovery/GrpcKubernetesProfile.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/discovery/GrpcKubernetesProfile.java diff --git a/grpc/grpc-discovery/src/main/java/dev/caskeleton/grpc/discovery/GrpcKubernetesProfileValidator.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/discovery/GrpcKubernetesProfileValidator.java similarity index 100% rename from grpc/grpc-discovery/src/main/java/dev/caskeleton/grpc/discovery/GrpcKubernetesProfileValidator.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/discovery/GrpcKubernetesProfileValidator.java diff --git a/grpc/grpc-discovery/src/main/java/dev/caskeleton/grpc/discovery/GrpcKubernetesRoutingMode.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/discovery/GrpcKubernetesRoutingMode.java similarity index 100% rename from grpc/grpc-discovery/src/main/java/dev/caskeleton/grpc/discovery/GrpcKubernetesRoutingMode.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/discovery/GrpcKubernetesRoutingMode.java diff --git a/grpc/grpc-discovery/src/main/java/dev/caskeleton/grpc/discovery/GrpcResolverProfile.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/discovery/GrpcResolverProfile.java similarity index 100% rename from grpc/grpc-discovery/src/main/java/dev/caskeleton/grpc/discovery/GrpcResolverProfile.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/discovery/GrpcResolverProfile.java diff --git a/grpc/grpc-discovery/src/main/java/dev/caskeleton/grpc/discovery/GrpcResolverType.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/discovery/GrpcResolverType.java similarity index 100% rename from grpc/grpc-discovery/src/main/java/dev/caskeleton/grpc/discovery/GrpcResolverType.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/discovery/GrpcResolverType.java diff --git a/grpc/grpc-discovery/src/main/java/dev/caskeleton/grpc/discovery/GrpcStableLoadBalancer.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/discovery/GrpcStableLoadBalancer.java similarity index 100% rename from grpc/grpc-discovery/src/main/java/dev/caskeleton/grpc/discovery/GrpcStableLoadBalancer.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/discovery/GrpcStableLoadBalancer.java diff --git a/grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/error/GrpcErrorExposurePolicy.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/error/GrpcErrorExposurePolicy.java similarity index 100% rename from grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/error/GrpcErrorExposurePolicy.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/error/GrpcErrorExposurePolicy.java diff --git a/grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/error/GrpcErrorMapper.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/error/GrpcErrorMapper.java similarity index 100% rename from grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/error/GrpcErrorMapper.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/error/GrpcErrorMapper.java diff --git a/grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/error/GrpcRichErrorDetail.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/error/GrpcRichErrorDetail.java similarity index 100% rename from grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/error/GrpcRichErrorDetail.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/error/GrpcRichErrorDetail.java diff --git a/grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/error/GrpcStatusMapping.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/error/GrpcStatusMapping.java similarity index 100% rename from grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/error/GrpcStatusMapping.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/error/GrpcStatusMapping.java diff --git a/grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/idempotency/GrpcCompletionReconciler.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/idempotency/GrpcCompletionReconciler.java similarity index 100% rename from grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/idempotency/GrpcCompletionReconciler.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/idempotency/GrpcCompletionReconciler.java diff --git a/grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/idempotency/GrpcCompletionResolution.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/idempotency/GrpcCompletionResolution.java similarity index 100% rename from grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/idempotency/GrpcCompletionResolution.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/idempotency/GrpcCompletionResolution.java diff --git a/grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/idempotency/GrpcIdempotencyDecision.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/idempotency/GrpcIdempotencyDecision.java similarity index 100% rename from grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/idempotency/GrpcIdempotencyDecision.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/idempotency/GrpcIdempotencyDecision.java diff --git a/grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/idempotency/GrpcIdempotencyInterceptor.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/idempotency/GrpcIdempotencyInterceptor.java similarity index 100% rename from grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/idempotency/GrpcIdempotencyInterceptor.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/idempotency/GrpcIdempotencyInterceptor.java diff --git a/grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/idempotency/GrpcOperationStatus.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/idempotency/GrpcOperationStatus.java similarity index 100% rename from grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/idempotency/GrpcOperationStatus.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/idempotency/GrpcOperationStatus.java diff --git a/grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/idempotency/GrpcOperationStatusQuery.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/idempotency/GrpcOperationStatusQuery.java similarity index 100% rename from grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/idempotency/GrpcOperationStatusQuery.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/idempotency/GrpcOperationStatusQuery.java diff --git a/grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/idempotency/GrpcOutcomeReplay.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/idempotency/GrpcOutcomeReplay.java similarity index 100% rename from grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/idempotency/GrpcOutcomeReplay.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/idempotency/GrpcOutcomeReplay.java diff --git a/grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/idempotency/GrpcRequestFingerprint.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/idempotency/GrpcRequestFingerprint.java similarity index 100% rename from grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/idempotency/GrpcRequestFingerprint.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/idempotency/GrpcRequestFingerprint.java diff --git a/grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/policy/GrpcCompressionProfile.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/policy/GrpcCompressionProfile.java similarity index 100% rename from grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/policy/GrpcCompressionProfile.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/policy/GrpcCompressionProfile.java diff --git a/grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/policy/GrpcMessageSizeProfile.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/policy/GrpcMessageSizeProfile.java similarity index 85% rename from grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/policy/GrpcMessageSizeProfile.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/policy/GrpcMessageSizeProfile.java index 28fd2de..6b7c503 100644 --- a/grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/policy/GrpcMessageSizeProfile.java +++ b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/policy/GrpcMessageSizeProfile.java @@ -1,5 +1,7 @@ package dev.caskeleton.grpc.policy; +import dev.caskeleton.grpc.api.policy.GrpcTransportLimits; + /** * A method's size bounds, chosen rather than inherited. * @@ -40,7 +42,13 @@ public record GrpcMessageSizeProfile( /** The Stable default for an ordinary RPC: 1 MiB messages, no compression. */ public static GrpcMessageSizeProfile standard() { return new GrpcMessageSizeProfile( - 1024L * 1024L, 1024L * 1024L, 8192L, 1000, 8192, 8, GrpcCompressionProfile.IDENTITY); + GrpcTransportLimits.DEFAULT_MAX_MESSAGE_BYTES, + GrpcTransportLimits.DEFAULT_MAX_MESSAGE_BYTES, + GrpcTransportLimits.DEFAULT_MAX_METADATA_BYTES, + 1000, + 8192, + 8, + GrpcCompressionProfile.IDENTITY); } /** An explicitly reviewed large-message profile: 8 MiB, gzip. */ @@ -48,7 +56,7 @@ public record GrpcMessageSizeProfile( return new GrpcMessageSizeProfile( 8L * 1024L * 1024L, 8L * 1024L * 1024L, - 8192L, + GrpcTransportLimits.DEFAULT_MAX_METADATA_BYTES, 10_000, 65_536, 12, diff --git a/grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/policy/GrpcPayloadBoundaryPolicy.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/policy/GrpcPayloadBoundaryPolicy.java similarity index 100% rename from grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/policy/GrpcPayloadBoundaryPolicy.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/policy/GrpcPayloadBoundaryPolicy.java diff --git a/grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/policy/GrpcSizeViolation.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/policy/GrpcSizeViolation.java similarity index 100% rename from grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/policy/GrpcSizeViolation.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/policy/GrpcSizeViolation.java diff --git a/grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/resilience/GrpcMethodRetryConfig.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/resilience/GrpcMethodRetryConfig.java similarity index 100% rename from grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/resilience/GrpcMethodRetryConfig.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/resilience/GrpcMethodRetryConfig.java diff --git a/grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/resilience/GrpcRetryBudget.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/resilience/GrpcRetryBudget.java similarity index 100% rename from grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/resilience/GrpcRetryBudget.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/resilience/GrpcRetryBudget.java diff --git a/grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/resilience/GrpcRetryCoordinator.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/resilience/GrpcRetryCoordinator.java similarity index 100% rename from grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/resilience/GrpcRetryCoordinator.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/resilience/GrpcRetryCoordinator.java diff --git a/grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/resilience/GrpcRetryDecision.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/resilience/GrpcRetryDecision.java similarity index 100% rename from grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/resilience/GrpcRetryDecision.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/resilience/GrpcRetryDecision.java diff --git a/grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/resilience/GrpcRetryEligibility.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/resilience/GrpcRetryEligibility.java similarity index 100% rename from grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/resilience/GrpcRetryEligibility.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/resilience/GrpcRetryEligibility.java diff --git a/grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/resilience/GrpcRetryOwner.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/resilience/GrpcRetryOwner.java similarity index 100% rename from grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/resilience/GrpcRetryOwner.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/resilience/GrpcRetryOwner.java diff --git a/grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/resilience/GrpcRetryOwnershipValidator.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/resilience/GrpcRetryOwnershipValidator.java similarity index 100% rename from grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/resilience/GrpcRetryOwnershipValidator.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/resilience/GrpcRetryOwnershipValidator.java diff --git a/grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/resilience/GrpcServiceConfigPolicy.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/resilience/GrpcServiceConfigPolicy.java similarity index 100% rename from grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/resilience/GrpcServiceConfigPolicy.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/resilience/GrpcServiceConfigPolicy.java diff --git a/grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/resilience/GrpcWaitForReadyDecision.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/resilience/GrpcWaitForReadyDecision.java similarity index 100% rename from grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/resilience/GrpcWaitForReadyDecision.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/resilience/GrpcWaitForReadyDecision.java diff --git a/grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/resilience/GrpcWaitForReadyProfile.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/resilience/GrpcWaitForReadyProfile.java similarity index 100% rename from grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/resilience/GrpcWaitForReadyProfile.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/resilience/GrpcWaitForReadyProfile.java diff --git a/grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/resilience/GrpcWaitForReadyValidator.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/resilience/GrpcWaitForReadyValidator.java similarity index 100% rename from grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/resilience/GrpcWaitForReadyValidator.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/resilience/GrpcWaitForReadyValidator.java diff --git a/grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/security/GrpcAuthenticationProfile.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/security/GrpcAuthenticationProfile.java similarity index 100% rename from grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/security/GrpcAuthenticationProfile.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/security/GrpcAuthenticationProfile.java diff --git a/grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/security/GrpcCredentialGeneration.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/security/GrpcCredentialGeneration.java similarity index 100% rename from grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/security/GrpcCredentialGeneration.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/security/GrpcCredentialGeneration.java diff --git a/grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/security/GrpcCredentialRotationManager.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/security/GrpcCredentialRotationManager.java similarity index 83% rename from grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/security/GrpcCredentialRotationManager.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/security/GrpcCredentialRotationManager.java index dc13a6c..69991cf 100644 --- a/grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/security/GrpcCredentialRotationManager.java +++ b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/security/GrpcCredentialRotationManager.java @@ -121,8 +121,28 @@ public final class GrpcCredentialRotationManager { return observed.drainDeadline() != null && !now.isBefore(observed.drainDeadline()); } - /** Forgets the draining generation once its work has finished or been cancelled. */ - public void completeDrain() { - state.updateAndGet(observed -> new State(observed.current(), null, null)); + /** + * Forgets {@code drained} once its work has finished or been cancelled. + * + *

Names the generation because a drain completes asynchronously: by the time the caller that + * drained generation N reports back, a later rotation may already be draining N+1, and clearing + * "whatever is draining now" would end that newer drain before its calls finished. + * + * @return whether {@code drained} was the draining generation and has now been forgotten; false + * when a later rotation already replaced it + */ + public boolean completeDrain(GrpcCredentialGeneration drained) { + if (drained == null) { + throw new IllegalArgumentException("a completed drain names the generation it drained"); + } + while (true) { + State observed = state.get(); + if (observed.draining() == null || observed.draining().generation() != drained.generation()) { + return false; + } + if (state.compareAndSet(observed, new State(observed.current(), null, null))) { + return true; + } + } } } diff --git a/grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/security/GrpcTlsProfile.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/security/GrpcTlsProfile.java similarity index 100% rename from grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/security/GrpcTlsProfile.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/security/GrpcTlsProfile.java diff --git a/grpc/grpc-server/src/main/java/dev/caskeleton/grpc/server/GrpcAdmissionController.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/server/GrpcAdmissionController.java similarity index 100% rename from grpc/grpc-server/src/main/java/dev/caskeleton/grpc/server/GrpcAdmissionController.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/server/GrpcAdmissionController.java diff --git a/grpc/grpc-server/src/main/java/dev/caskeleton/grpc/server/GrpcApplicationInvocation.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/server/GrpcApplicationInvocation.java similarity index 100% rename from grpc/grpc-server/src/main/java/dev/caskeleton/grpc/server/GrpcApplicationInvocation.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/server/GrpcApplicationInvocation.java diff --git a/grpc/grpc-server/src/main/java/dev/caskeleton/grpc/server/GrpcExecutorProfile.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/server/GrpcExecutorProfile.java similarity index 100% rename from grpc/grpc-server/src/main/java/dev/caskeleton/grpc/server/GrpcExecutorProfile.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/server/GrpcExecutorProfile.java diff --git a/grpc/grpc-server/src/main/java/dev/caskeleton/grpc/server/GrpcNettyParityContract.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/server/GrpcNettyParityContract.java similarity index 100% rename from grpc/grpc-server/src/main/java/dev/caskeleton/grpc/server/GrpcNettyParityContract.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/server/GrpcNettyParityContract.java diff --git a/grpc/grpc-server/src/main/java/dev/caskeleton/grpc/server/GrpcNettyVariant.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/server/GrpcNettyVariant.java similarity index 100% rename from grpc/grpc-server/src/main/java/dev/caskeleton/grpc/server/GrpcNettyVariant.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/server/GrpcNettyVariant.java diff --git a/grpc/grpc-server/src/main/java/dev/caskeleton/grpc/server/GrpcNettyVariantSelector.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/server/GrpcNettyVariantSelector.java similarity index 100% rename from grpc/grpc-server/src/main/java/dev/caskeleton/grpc/server/GrpcNettyVariantSelector.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/server/GrpcNettyVariantSelector.java diff --git a/grpc/grpc-server/src/main/java/dev/caskeleton/grpc/server/GrpcResponseMapper.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/server/GrpcResponseMapper.java similarity index 100% rename from grpc/grpc-server/src/main/java/dev/caskeleton/grpc/server/GrpcResponseMapper.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/server/GrpcResponseMapper.java diff --git a/grpc/grpc-server/src/main/java/dev/caskeleton/grpc/server/GrpcServerInterceptorChain.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/server/GrpcServerInterceptorChain.java similarity index 100% rename from grpc/grpc-server/src/main/java/dev/caskeleton/grpc/server/GrpcServerInterceptorChain.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/server/GrpcServerInterceptorChain.java diff --git a/grpc/grpc-server/src/main/java/dev/caskeleton/grpc/server/GrpcServerInterceptorOrder.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/server/GrpcServerInterceptorOrder.java similarity index 100% rename from grpc/grpc-server/src/main/java/dev/caskeleton/grpc/server/GrpcServerInterceptorOrder.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/server/GrpcServerInterceptorOrder.java diff --git a/grpc/grpc-server/src/main/java/dev/caskeleton/grpc/server/GrpcServerInterceptorStage.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/server/GrpcServerInterceptorStage.java similarity index 100% rename from grpc/grpc-server/src/main/java/dev/caskeleton/grpc/server/GrpcServerInterceptorStage.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/server/GrpcServerInterceptorStage.java diff --git a/grpc/grpc-server/src/main/java/dev/caskeleton/grpc/server/GrpcServerProfile.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/server/GrpcServerProfile.java similarity index 85% rename from grpc/grpc-server/src/main/java/dev/caskeleton/grpc/server/GrpcServerProfile.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/server/GrpcServerProfile.java index 6c75ff8..c6c03ef 100644 --- a/grpc/grpc-server/src/main/java/dev/caskeleton/grpc/server/GrpcServerProfile.java +++ b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/server/GrpcServerProfile.java @@ -1,5 +1,6 @@ package dev.caskeleton.grpc.server; +import dev.caskeleton.grpc.api.policy.GrpcTransportLimits; import java.time.Duration; /** @@ -65,10 +66,19 @@ public record GrpcServerProfile( /** The Stable default profile on shaded Netty. */ public static GrpcServerProfile stableNetty(GrpcExecutorProfile executor) { + return stable(GrpcServerTransport.NETTY_SHADED, executor); + } + + /** + * The Stable default profile on {@code transport}: the platform's default message and metadata + * bounds ({@link GrpcTransportLimits}) and keep-alive/connection-age settings. + */ + public static GrpcServerProfile stable( + GrpcServerTransport transport, GrpcExecutorProfile executor) { return new GrpcServerProfile( - GrpcServerTransport.NETTY_SHADED, - 1024L * 1024L, - 8192, + transport, + GrpcTransportLimits.DEFAULT_MAX_MESSAGE_BYTES, + GrpcTransportLimits.DEFAULT_MAX_METADATA_BYTES, Duration.ofSeconds(30), Duration.ofSeconds(10), Duration.ofSeconds(30), diff --git a/grpc/grpc-server/src/main/java/dev/caskeleton/grpc/server/GrpcServerTransport.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/server/GrpcServerTransport.java similarity index 100% rename from grpc/grpc-server/src/main/java/dev/caskeleton/grpc/server/GrpcServerTransport.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/server/GrpcServerTransport.java diff --git a/grpc/grpc-server/src/main/java/dev/caskeleton/grpc/server/GrpcServiceAdapter.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/server/GrpcServiceAdapter.java similarity index 100% rename from grpc/grpc-server/src/main/java/dev/caskeleton/grpc/server/GrpcServiceAdapter.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/server/GrpcServiceAdapter.java diff --git a/grpc/grpc-server/src/main/java/dev/caskeleton/grpc/server/GrpcServiceAdapterDescriptor.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/server/GrpcServiceAdapterDescriptor.java similarity index 100% rename from grpc/grpc-server/src/main/java/dev/caskeleton/grpc/server/GrpcServiceAdapterDescriptor.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/server/GrpcServiceAdapterDescriptor.java diff --git a/grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/streaming/GrpcFlowControlDecision.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/streaming/GrpcFlowControlDecision.java similarity index 100% rename from grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/streaming/GrpcFlowControlDecision.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/streaming/GrpcFlowControlDecision.java diff --git a/grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/streaming/GrpcFlowControlPolicy.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/streaming/GrpcFlowControlPolicy.java similarity index 100% rename from grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/streaming/GrpcFlowControlPolicy.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/streaming/GrpcFlowControlPolicy.java diff --git a/grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/streaming/GrpcResumeDecision.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/streaming/GrpcResumeDecision.java similarity index 100% rename from grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/streaming/GrpcResumeDecision.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/streaming/GrpcResumeDecision.java diff --git a/grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/streaming/GrpcResumeToken.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/streaming/GrpcResumeToken.java similarity index 100% rename from grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/streaming/GrpcResumeToken.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/streaming/GrpcResumeToken.java diff --git a/grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/streaming/GrpcResumeTokenCodec.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/streaming/GrpcResumeTokenCodec.java similarity index 100% rename from grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/streaming/GrpcResumeTokenCodec.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/streaming/GrpcResumeTokenCodec.java diff --git a/grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/streaming/GrpcSerializedStreamWriter.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/streaming/GrpcSerializedStreamWriter.java similarity index 100% rename from grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/streaming/GrpcSerializedStreamWriter.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/streaming/GrpcSerializedStreamWriter.java diff --git a/grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/streaming/GrpcSlowConsumerPolicy.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/streaming/GrpcSlowConsumerPolicy.java similarity index 100% rename from grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/streaming/GrpcSlowConsumerPolicy.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/streaming/GrpcSlowConsumerPolicy.java diff --git a/grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/streaming/GrpcStreamAdmission.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/streaming/GrpcStreamAdmission.java similarity index 100% rename from grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/streaming/GrpcStreamAdmission.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/streaming/GrpcStreamAdmission.java diff --git a/grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/streaming/GrpcStreamEnvelope.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/streaming/GrpcStreamEnvelope.java similarity index 100% rename from grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/streaming/GrpcStreamEnvelope.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/streaming/GrpcStreamEnvelope.java diff --git a/grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/streaming/GrpcStreamGapDetector.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/streaming/GrpcStreamGapDetector.java similarity index 100% rename from grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/streaming/GrpcStreamGapDetector.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/streaming/GrpcStreamGapDetector.java diff --git a/grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/streaming/GrpcStreamHeartbeat.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/streaming/GrpcStreamHeartbeat.java similarity index 100% rename from grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/streaming/GrpcStreamHeartbeat.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/streaming/GrpcStreamHeartbeat.java diff --git a/grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/streaming/GrpcStreamId.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/streaming/GrpcStreamId.java similarity index 100% rename from grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/streaming/GrpcStreamId.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/streaming/GrpcStreamId.java diff --git a/grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/streaming/GrpcStreamLifecycleCoordinator.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/streaming/GrpcStreamLifecycleCoordinator.java similarity index 100% rename from grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/streaming/GrpcStreamLifecycleCoordinator.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/streaming/GrpcStreamLifecycleCoordinator.java diff --git a/grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/streaming/GrpcStreamLifetimePolicy.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/streaming/GrpcStreamLifetimePolicy.java similarity index 100% rename from grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/streaming/GrpcStreamLifetimePolicy.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/streaming/GrpcStreamLifetimePolicy.java diff --git a/grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/streaming/GrpcStreamSequence.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/streaming/GrpcStreamSequence.java similarity index 100% rename from grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/streaming/GrpcStreamSequence.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/streaming/GrpcStreamSequence.java diff --git a/grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/streaming/GrpcStreamTerminationReason.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/streaming/GrpcStreamTerminationReason.java similarity index 100% rename from grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/streaming/GrpcStreamTerminationReason.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/streaming/GrpcStreamTerminationReason.java diff --git a/grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/streaming/GrpcStreamWriteResult.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/streaming/GrpcStreamWriteResult.java similarity index 100% rename from grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/streaming/GrpcStreamWriteResult.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/streaming/GrpcStreamWriteResult.java diff --git a/grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/streaming/GrpcStreamWriterState.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/streaming/GrpcStreamWriterState.java similarity index 100% rename from grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/streaming/GrpcStreamWriterState.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/streaming/GrpcStreamWriterState.java diff --git a/grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/validation/GrpcTransportValidator.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/validation/GrpcTransportValidator.java similarity index 100% rename from grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/validation/GrpcTransportValidator.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/validation/GrpcTransportValidator.java diff --git a/grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/validation/GrpcValidationInterceptor.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/validation/GrpcValidationInterceptor.java similarity index 100% rename from grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/validation/GrpcValidationInterceptor.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/validation/GrpcValidationInterceptor.java diff --git a/grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/validation/GrpcValidationViolation.java b/grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/validation/GrpcValidationViolation.java similarity index 100% rename from grpc/grpc-policy/src/main/java/dev/caskeleton/grpc/validation/GrpcValidationViolation.java rename to grpc/grpc-runtime/src/main/java/dev/caskeleton/grpc/validation/GrpcValidationViolation.java diff --git a/grpc/grpc-admin/src/test/java/dev/caskeleton/grpc/admin/GrpcDrainCoordinatorTest.java b/grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/admin/GrpcDrainCoordinatorTest.java similarity index 98% rename from grpc/grpc-admin/src/test/java/dev/caskeleton/grpc/admin/GrpcDrainCoordinatorTest.java rename to grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/admin/GrpcDrainCoordinatorTest.java index de93009..4f64728 100644 --- a/grpc/grpc-admin/src/test/java/dev/caskeleton/grpc/admin/GrpcDrainCoordinatorTest.java +++ b/grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/admin/GrpcDrainCoordinatorTest.java @@ -13,7 +13,7 @@ import org.junit.jupiter.api.Test; class GrpcDrainCoordinatorTest { private static final Instant START = Instant.parse("2026-08-30T10:00:00Z"); - private static final String DOCUMENTS = "hyeonworks.document.v1.DocumentService"; + private static final String DOCUMENTS = "caskeleton.document.v1.DocumentService"; private final AtomicInteger unaryCalls = new AtomicInteger(); private final AtomicInteger streams = new AtomicInteger(); diff --git a/grpc/grpc-admin/src/test/java/dev/caskeleton/grpc/admin/GrpcPlatformSnapshotServiceTest.java b/grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/admin/GrpcPlatformSnapshotServiceTest.java similarity index 98% rename from grpc/grpc-admin/src/test/java/dev/caskeleton/grpc/admin/GrpcPlatformSnapshotServiceTest.java rename to grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/admin/GrpcPlatformSnapshotServiceTest.java index c512d49..cdc95fc 100644 --- a/grpc/grpc-admin/src/test/java/dev/caskeleton/grpc/admin/GrpcPlatformSnapshotServiceTest.java +++ b/grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/admin/GrpcPlatformSnapshotServiceTest.java @@ -15,7 +15,7 @@ import org.junit.jupiter.api.Test; class GrpcPlatformSnapshotServiceTest { private static final Instant NOW = Instant.parse("2026-08-30T10:00:00Z"); - private static final String DOCUMENTS = "hyeonworks.document.v1.DocumentService"; + private static final String DOCUMENTS = "caskeleton.document.v1.DocumentService"; private final GrpcServiceHealthRegistry health = new GrpcServiceHealthRegistry(GrpcHealthPolicy.standalone()); diff --git a/grpc/grpc-admin/src/test/java/dev/caskeleton/grpc/admin/GrpcReflectionPolicyTest.java b/grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/admin/GrpcReflectionPolicyTest.java similarity index 100% rename from grpc/grpc-admin/src/test/java/dev/caskeleton/grpc/admin/GrpcReflectionPolicyTest.java rename to grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/admin/GrpcReflectionPolicyTest.java diff --git a/grpc/grpc-admin/src/test/java/dev/caskeleton/grpc/admin/GrpcServiceHealthRegistryTest.java b/grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/admin/GrpcServiceHealthRegistryTest.java similarity index 97% rename from grpc/grpc-admin/src/test/java/dev/caskeleton/grpc/admin/GrpcServiceHealthRegistryTest.java rename to grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/admin/GrpcServiceHealthRegistryTest.java index 7454b5a..c3da8c3 100644 --- a/grpc/grpc-admin/src/test/java/dev/caskeleton/grpc/admin/GrpcServiceHealthRegistryTest.java +++ b/grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/admin/GrpcServiceHealthRegistryTest.java @@ -14,7 +14,7 @@ import org.junit.jupiter.api.Test; class GrpcServiceHealthRegistryTest { - private static final String DOCUMENTS = "hyeonworks.document.v1.DocumentService"; + private static final String DOCUMENTS = "caskeleton.document.v1.DocumentService"; @Test @DisplayName("an instance is not ready before its first check completes") @@ -42,7 +42,7 @@ class GrpcServiceHealthRegistryTest { GrpcServiceHealthRegistry registry = new GrpcServiceHealthRegistry(GrpcHealthPolicy.standalone()); - assertThat(registry.stateOf("hyeonworks.other.v1.OtherService")) + assertThat(registry.stateOf("caskeleton.other.v1.OtherService")) .isEqualTo(GrpcHealthState.SERVICE_UNKNOWN); } diff --git a/grpc/grpc-client/src/test/java/dev/caskeleton/grpc/client/GrpcChannelRuntimeRegistryTest.java b/grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/client/GrpcChannelRuntimeRegistryTest.java similarity index 100% rename from grpc/grpc-client/src/test/java/dev/caskeleton/grpc/client/GrpcChannelRuntimeRegistryTest.java rename to grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/client/GrpcChannelRuntimeRegistryTest.java diff --git a/grpc/grpc-client/src/test/java/dev/caskeleton/grpc/client/GrpcClientMetadataPolicyTest.java b/grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/client/GrpcClientMetadataPolicyTest.java similarity index 99% rename from grpc/grpc-client/src/test/java/dev/caskeleton/grpc/client/GrpcClientMetadataPolicyTest.java rename to grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/client/GrpcClientMetadataPolicyTest.java index 1d663b9..04e973d 100644 --- a/grpc/grpc-client/src/test/java/dev/caskeleton/grpc/client/GrpcClientMetadataPolicyTest.java +++ b/grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/client/GrpcClientMetadataPolicyTest.java @@ -23,7 +23,7 @@ class GrpcClientMetadataPolicyTest { private static final GrpcMetadataKey CORRELATION = GrpcMetadataKey.ascii("x-correlation-id"); private static final GrpcMetadataKey TENANT = GrpcMetadataKey.ascii("x-tenant-context"); private static final GrpcMethodName GET = - GrpcMethodName.parse("hyeonworks.document.v1.DocumentService/GetDocument"); + GrpcMethodName.parse("caskeleton.document.v1.DocumentService/GetDocument"); private static final Instant NOW = Instant.parse("2026-08-30T10:00:00Z"); private static GrpcClientMetadataPolicy policy(boolean crossesBoundary) { diff --git a/grpc/grpc-client/src/test/java/dev/caskeleton/grpc/client/GrpcNamedChannelProfileTest.java b/grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/client/GrpcNamedChannelProfileTest.java similarity index 100% rename from grpc/grpc-client/src/test/java/dev/caskeleton/grpc/client/GrpcNamedChannelProfileTest.java rename to grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/client/GrpcNamedChannelProfileTest.java diff --git a/grpc/grpc-client/src/test/java/dev/caskeleton/grpc/client/GrpcTypedStubFactoryTest.java b/grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/client/GrpcTypedStubFactoryTest.java similarity index 98% rename from grpc/grpc-client/src/test/java/dev/caskeleton/grpc/client/GrpcTypedStubFactoryTest.java rename to grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/client/GrpcTypedStubFactoryTest.java index 15cdf29..021d4e8 100644 --- a/grpc/grpc-client/src/test/java/dev/caskeleton/grpc/client/GrpcTypedStubFactoryTest.java +++ b/grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/client/GrpcTypedStubFactoryTest.java @@ -19,7 +19,7 @@ class GrpcTypedStubFactoryTest { private static final GrpcChannelProfileName PROFILE = new GrpcChannelProfileName("documents-read"); private static final GrpcMethodName GET = - GrpcMethodName.parse("hyeonworks.document.v1.DocumentService/GetDocument"); + GrpcMethodName.parse("caskeleton.document.v1.DocumentService/GetDocument"); private static final Instant NOW = Instant.parse("2026-08-30T10:00:00Z"); /** Stands in for a generated blocking stub. */ diff --git a/grpc/grpc-policy/src/test/java/dev/caskeleton/grpc/context/GrpcContextBinderTest.java b/grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/context/GrpcContextBinderTest.java similarity index 99% rename from grpc/grpc-policy/src/test/java/dev/caskeleton/grpc/context/GrpcContextBinderTest.java rename to grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/context/GrpcContextBinderTest.java index f45ecf2..1e1d115 100644 --- a/grpc/grpc-policy/src/test/java/dev/caskeleton/grpc/context/GrpcContextBinderTest.java +++ b/grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/context/GrpcContextBinderTest.java @@ -28,7 +28,7 @@ import org.junit.jupiter.api.Test; class GrpcContextBinderTest { private static final GrpcMethodName GET = - GrpcMethodName.parse("hyeonworks.document.v1.DocumentService/GetDocument"); + GrpcMethodName.parse("caskeleton.document.v1.DocumentService/GetDocument"); private static GrpcContextSnapshot snapshot(Instant credentialExpiry) { GrpcRequestContext request = diff --git a/grpc/grpc-policy/src/test/java/dev/caskeleton/grpc/deadline/GrpcCancellationCoordinatorTest.java b/grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/deadline/GrpcCancellationCoordinatorTest.java similarity index 100% rename from grpc/grpc-policy/src/test/java/dev/caskeleton/grpc/deadline/GrpcCancellationCoordinatorTest.java rename to grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/deadline/GrpcCancellationCoordinatorTest.java diff --git a/grpc/grpc-policy/src/test/java/dev/caskeleton/grpc/deadline/GrpcDeadlineCalculatorTest.java b/grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/deadline/GrpcDeadlineCalculatorTest.java similarity index 97% rename from grpc/grpc-policy/src/test/java/dev/caskeleton/grpc/deadline/GrpcDeadlineCalculatorTest.java rename to grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/deadline/GrpcDeadlineCalculatorTest.java index b158c98..71826cc 100644 --- a/grpc/grpc-policy/src/test/java/dev/caskeleton/grpc/deadline/GrpcDeadlineCalculatorTest.java +++ b/grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/deadline/GrpcDeadlineCalculatorTest.java @@ -17,7 +17,7 @@ import org.junit.jupiter.api.Test; class GrpcDeadlineCalculatorTest { private static final GrpcMethodName GET = - GrpcMethodName.parse("hyeonworks.document.v1.DocumentService/GetDocument"); + GrpcMethodName.parse("caskeleton.document.v1.DocumentService/GetDocument"); private static final GrpcDeadlineProfile TWO_SECONDS = GrpcDeadlineProfile.of(Duration.ofSeconds(2)); private static final GrpcMethodPolicy READ = GrpcMethodPolicy.readOnlyUnary(GET, TWO_SECONDS); @@ -86,7 +86,7 @@ class GrpcDeadlineCalculatorTest { GrpcMethodPolicyCatalog.builder() .register( GrpcMethodPolicy.readOnlyUnary( - GrpcMethodName.parse("hyeonworks.document.v1.DocumentService/ListDocuments"), + GrpcMethodName.parse("caskeleton.document.v1.DocumentService/ListDocuments"), TWO_SECONDS)) .build(); Map> dependencies = diff --git a/grpc/grpc-discovery/src/test/java/dev/caskeleton/grpc/discovery/GrpcDiscoveryPolicyValidatorTest.java b/grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/discovery/GrpcDiscoveryPolicyValidatorTest.java similarity index 100% rename from grpc/grpc-discovery/src/test/java/dev/caskeleton/grpc/discovery/GrpcDiscoveryPolicyValidatorTest.java rename to grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/discovery/GrpcDiscoveryPolicyValidatorTest.java diff --git a/grpc/grpc-discovery/src/test/java/dev/caskeleton/grpc/discovery/GrpcKubernetesProfileTest.java b/grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/discovery/GrpcKubernetesProfileTest.java similarity index 100% rename from grpc/grpc-discovery/src/test/java/dev/caskeleton/grpc/discovery/GrpcKubernetesProfileTest.java rename to grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/discovery/GrpcKubernetesProfileTest.java diff --git a/grpc/grpc-policy/src/test/java/dev/caskeleton/grpc/error/GrpcErrorMapperTest.java b/grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/error/GrpcErrorMapperTest.java similarity index 99% rename from grpc/grpc-policy/src/test/java/dev/caskeleton/grpc/error/GrpcErrorMapperTest.java rename to grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/error/GrpcErrorMapperTest.java index 9fc3603..86e01af 100644 --- a/grpc/grpc-policy/src/test/java/dev/caskeleton/grpc/error/GrpcErrorMapperTest.java +++ b/grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/error/GrpcErrorMapperTest.java @@ -24,7 +24,7 @@ import org.junit.jupiter.api.Test; class GrpcErrorMapperTest { private static final GrpcMethodName CREATE = - GrpcMethodName.parse("hyeonworks.document.v1.DocumentService/CreateDocument"); + GrpcMethodName.parse("caskeleton.document.v1.DocumentService/CreateDocument"); private final GrpcErrorMapper mapper = new GrpcErrorMapper("document.v1", () -> "exec-0001"); diff --git a/grpc/grpc-policy/src/test/java/dev/caskeleton/grpc/idempotency/GrpcCompletionReconcilerTest.java b/grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/idempotency/GrpcCompletionReconcilerTest.java similarity index 98% rename from grpc/grpc-policy/src/test/java/dev/caskeleton/grpc/idempotency/GrpcCompletionReconcilerTest.java rename to grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/idempotency/GrpcCompletionReconcilerTest.java index 7bffcbc..972630e 100644 --- a/grpc/grpc-policy/src/test/java/dev/caskeleton/grpc/idempotency/GrpcCompletionReconcilerTest.java +++ b/grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/idempotency/GrpcCompletionReconcilerTest.java @@ -12,7 +12,7 @@ import org.junit.jupiter.api.Test; class GrpcCompletionReconcilerTest { private static final GrpcMethodName CREATE = - GrpcMethodName.parse("hyeonworks.document.v1.DocumentService/CreateDocument"); + GrpcMethodName.parse("caskeleton.document.v1.DocumentService/CreateDocument"); private static final Instant NOW = Instant.parse("2026-08-30T10:00:00Z"); private static final String CALLER = "tenant-1|actor-1"; private static final String KEY = "order-2026-0001"; diff --git a/grpc/grpc-policy/src/test/java/dev/caskeleton/grpc/idempotency/GrpcIdempotencyInterceptorTest.java b/grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/idempotency/GrpcIdempotencyInterceptorTest.java similarity index 98% rename from grpc/grpc-policy/src/test/java/dev/caskeleton/grpc/idempotency/GrpcIdempotencyInterceptorTest.java rename to grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/idempotency/GrpcIdempotencyInterceptorTest.java index 7a09d60..6ed3d16 100644 --- a/grpc/grpc-policy/src/test/java/dev/caskeleton/grpc/idempotency/GrpcIdempotencyInterceptorTest.java +++ b/grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/idempotency/GrpcIdempotencyInterceptorTest.java @@ -28,9 +28,9 @@ import org.junit.jupiter.api.Test; class GrpcIdempotencyInterceptorTest { private static final GrpcMethodName CREATE = - GrpcMethodName.parse("hyeonworks.document.v1.DocumentService/CreateDocument"); + GrpcMethodName.parse("caskeleton.document.v1.DocumentService/CreateDocument"); private static final GrpcMethodName GET = - GrpcMethodName.parse("hyeonworks.document.v1.DocumentService/GetDocument"); + GrpcMethodName.parse("caskeleton.document.v1.DocumentService/GetDocument"); private static final GrpcDeadlineProfile TEN_SECONDS = GrpcDeadlineProfile.of(Duration.ofSeconds(10)); private static final Instant NOW = Instant.parse("2026-08-30T10:00:00Z"); diff --git a/grpc/grpc-policy/src/test/java/dev/caskeleton/grpc/idempotency/GrpcOutcomeReplayBoundTest.java b/grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/idempotency/GrpcOutcomeReplayBoundTest.java similarity index 100% rename from grpc/grpc-policy/src/test/java/dev/caskeleton/grpc/idempotency/GrpcOutcomeReplayBoundTest.java rename to grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/idempotency/GrpcOutcomeReplayBoundTest.java diff --git a/grpc/grpc-policy/src/test/java/dev/caskeleton/grpc/policy/GrpcPayloadBoundaryPolicyTest.java b/grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/policy/GrpcPayloadBoundaryPolicyTest.java similarity index 100% rename from grpc/grpc-policy/src/test/java/dev/caskeleton/grpc/policy/GrpcPayloadBoundaryPolicyTest.java rename to grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/policy/GrpcPayloadBoundaryPolicyTest.java diff --git a/grpc/grpc-policy/src/test/java/dev/caskeleton/grpc/resilience/GrpcRetryEligibilityTest.java b/grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/resilience/GrpcRetryEligibilityTest.java similarity index 98% rename from grpc/grpc-policy/src/test/java/dev/caskeleton/grpc/resilience/GrpcRetryEligibilityTest.java rename to grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/resilience/GrpcRetryEligibilityTest.java index b3c1b95..16c2078 100644 --- a/grpc/grpc-policy/src/test/java/dev/caskeleton/grpc/resilience/GrpcRetryEligibilityTest.java +++ b/grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/resilience/GrpcRetryEligibilityTest.java @@ -22,11 +22,11 @@ import org.junit.jupiter.api.Test; class GrpcRetryEligibilityTest { private static final GrpcMethodName GET = - GrpcMethodName.parse("hyeonworks.document.v1.DocumentService/GetDocument"); + GrpcMethodName.parse("caskeleton.document.v1.DocumentService/GetDocument"); private static final GrpcMethodName CREATE = - GrpcMethodName.parse("hyeonworks.document.v1.DocumentService/CreateDocument"); + GrpcMethodName.parse("caskeleton.document.v1.DocumentService/CreateDocument"); private static final GrpcMethodName WATCH = - GrpcMethodName.parse("hyeonworks.document.v1.DocumentService/WatchDocuments"); + GrpcMethodName.parse("caskeleton.document.v1.DocumentService/WatchDocuments"); private static final GrpcDeadlineProfile TEN_SECONDS = GrpcDeadlineProfile.of(Duration.ofSeconds(10)); private static final GrpcMethodPolicy READ = GrpcMethodPolicy.readOnlyUnary(GET, TEN_SECONDS); diff --git a/grpc/grpc-policy/src/test/java/dev/caskeleton/grpc/resilience/GrpcRetryOwnershipValidatorTest.java b/grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/resilience/GrpcRetryOwnershipValidatorTest.java similarity index 96% rename from grpc/grpc-policy/src/test/java/dev/caskeleton/grpc/resilience/GrpcRetryOwnershipValidatorTest.java rename to grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/resilience/GrpcRetryOwnershipValidatorTest.java index 4eb597d..b6905bd 100644 --- a/grpc/grpc-policy/src/test/java/dev/caskeleton/grpc/resilience/GrpcRetryOwnershipValidatorTest.java +++ b/grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/resilience/GrpcRetryOwnershipValidatorTest.java @@ -20,11 +20,11 @@ import org.junit.jupiter.api.Test; class GrpcRetryOwnershipValidatorTest { private static final GrpcMethodName GET = - GrpcMethodName.parse("hyeonworks.document.v1.DocumentService/GetDocument"); + GrpcMethodName.parse("caskeleton.document.v1.DocumentService/GetDocument"); private static final GrpcMethodName CREATE = - GrpcMethodName.parse("hyeonworks.document.v1.DocumentService/CreateDocument"); + GrpcMethodName.parse("caskeleton.document.v1.DocumentService/CreateDocument"); private static final GrpcMethodName WATCH = - GrpcMethodName.parse("hyeonworks.document.v1.DocumentService/WatchDocuments"); + GrpcMethodName.parse("caskeleton.document.v1.DocumentService/WatchDocuments"); private static final GrpcDeadlineProfile TWO_SECONDS = GrpcDeadlineProfile.of(Duration.ofSeconds(2)); @@ -83,7 +83,7 @@ class GrpcRetryOwnershipValidatorTest { @DisplayName("a service config entry naming a method the catalog does not declare is reported") void aRenamedMethodLeavesItsEntryMatchingNothing() { GrpcMethodName renamed = - GrpcMethodName.parse("hyeonworks.document.v1.DocumentService/CreateDocumentV2"); + GrpcMethodName.parse("caskeleton.document.v1.DocumentService/CreateDocumentV2"); GrpcServiceConfigPolicy config = new GrpcServiceConfigPolicy( GrpcRetryOwner.GRPC_PLATFORM, diff --git a/grpc/grpc-policy/src/test/java/dev/caskeleton/grpc/resilience/GrpcWaitForReadyValidatorTest.java b/grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/resilience/GrpcWaitForReadyValidatorTest.java similarity index 98% rename from grpc/grpc-policy/src/test/java/dev/caskeleton/grpc/resilience/GrpcWaitForReadyValidatorTest.java rename to grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/resilience/GrpcWaitForReadyValidatorTest.java index 5bac289..5608c70 100644 --- a/grpc/grpc-policy/src/test/java/dev/caskeleton/grpc/resilience/GrpcWaitForReadyValidatorTest.java +++ b/grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/resilience/GrpcWaitForReadyValidatorTest.java @@ -17,7 +17,7 @@ import org.junit.jupiter.api.Test; class GrpcWaitForReadyValidatorTest { private static final GrpcMethodName GET = - GrpcMethodName.parse("hyeonworks.document.v1.DocumentService/GetDocument"); + GrpcMethodName.parse("caskeleton.document.v1.DocumentService/GetDocument"); private static final GrpcDeadlineProfile TEN_SECONDS = GrpcDeadlineProfile.of(Duration.ofSeconds(10)); diff --git a/grpc/grpc-policy/src/test/java/dev/caskeleton/grpc/security/GrpcCredentialRotationManagerTest.java b/grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/security/GrpcCredentialRotationManagerTest.java similarity index 81% rename from grpc/grpc-policy/src/test/java/dev/caskeleton/grpc/security/GrpcCredentialRotationManagerTest.java rename to grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/security/GrpcCredentialRotationManagerTest.java index 85c8cd0..9da1db1 100644 --- a/grpc/grpc-policy/src/test/java/dev/caskeleton/grpc/security/GrpcCredentialRotationManagerTest.java +++ b/grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/security/GrpcCredentialRotationManagerTest.java @@ -9,6 +9,7 @@ import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.Future; import java.util.function.Consumer; +import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; class GrpcCredentialRotationManagerTest { @@ -32,12 +33,28 @@ class GrpcCredentialRotationManagerTest { // when long lowest = lowestCurrentAfterRacing( - manager -> manager.rotate(gen(3L), NOW), GrpcCredentialRotationManager::completeDrain); + manager -> manager.rotate(gen(3L), NOW), manager -> manager.completeDrain(gen(1L))); // then assertThat(lowest).isEqualTo(3L); } + @Test + @DisplayName("이전 세대의 drain 완료 보고는 그 사이 새 rotation이 시작한 drain을 끝내지 않는다") + void completingAnOlderDrainLeavesTheNewerDrainInPlace() { + // given + GrpcCredentialRotationManager manager = + new GrpcCredentialRotationManager(gen(1L), Duration.ofSeconds(30)); + manager.rotate(gen(2L), NOW); + manager.rotate(gen(3L), NOW); + + // when + manager.completeDrain(gen(1L)); + + // then + assertThat(manager.draining()).contains(gen(2L)); + } + /** * Starts each round at generation 2 (draining 1), runs {@code first} and {@code second} at the * same moment, and returns the lowest generation left current over all rounds. diff --git a/grpc/grpc-policy/src/test/java/dev/caskeleton/grpc/security/GrpcTlsProfileTest.java b/grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/security/GrpcTlsProfileTest.java similarity index 99% rename from grpc/grpc-policy/src/test/java/dev/caskeleton/grpc/security/GrpcTlsProfileTest.java rename to grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/security/GrpcTlsProfileTest.java index dba6213..4804462 100644 --- a/grpc/grpc-policy/src/test/java/dev/caskeleton/grpc/security/GrpcTlsProfileTest.java +++ b/grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/security/GrpcTlsProfileTest.java @@ -140,7 +140,7 @@ class GrpcTlsProfileTest { assertThat(manager.drainExpired(now.plusSeconds(29))).isFalse(); assertThat(manager.drainExpired(now.plusSeconds(30))).isTrue(); - manager.completeDrain(); + manager.completeDrain(first); assertThat(manager.draining()).isEmpty(); } diff --git a/grpc/grpc-server/src/test/java/dev/caskeleton/grpc/server/GrpcAdmissionControllerTest.java b/grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/server/GrpcAdmissionControllerTest.java similarity index 100% rename from grpc/grpc-server/src/test/java/dev/caskeleton/grpc/server/GrpcAdmissionControllerTest.java rename to grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/server/GrpcAdmissionControllerTest.java diff --git a/grpc/grpc-server/src/test/java/dev/caskeleton/grpc/server/GrpcNettyVariantSelectorTest.java b/grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/server/GrpcNettyVariantSelectorTest.java similarity index 100% rename from grpc/grpc-server/src/test/java/dev/caskeleton/grpc/server/GrpcNettyVariantSelectorTest.java rename to grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/server/GrpcNettyVariantSelectorTest.java diff --git a/grpc/grpc-server/src/test/java/dev/caskeleton/grpc/server/GrpcServerInterceptorOrderTest.java b/grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/server/GrpcServerInterceptorOrderTest.java similarity index 100% rename from grpc/grpc-server/src/test/java/dev/caskeleton/grpc/server/GrpcServerInterceptorOrderTest.java rename to grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/server/GrpcServerInterceptorOrderTest.java diff --git a/grpc/grpc-server/src/test/java/dev/caskeleton/grpc/server/GrpcServerProfileTest.java b/grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/server/GrpcServerProfileTest.java similarity index 100% rename from grpc/grpc-server/src/test/java/dev/caskeleton/grpc/server/GrpcServerProfileTest.java rename to grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/server/GrpcServerProfileTest.java diff --git a/grpc/grpc-server/src/test/java/dev/caskeleton/grpc/server/GrpcServiceAdapterTest.java b/grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/server/GrpcServiceAdapterTest.java similarity index 99% rename from grpc/grpc-server/src/test/java/dev/caskeleton/grpc/server/GrpcServiceAdapterTest.java rename to grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/server/GrpcServiceAdapterTest.java index 997b4a2..b202250 100644 --- a/grpc/grpc-server/src/test/java/dev/caskeleton/grpc/server/GrpcServiceAdapterTest.java +++ b/grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/server/GrpcServiceAdapterTest.java @@ -32,7 +32,7 @@ import org.junit.jupiter.api.Test; class GrpcServiceAdapterTest { private static final GrpcMethodName CREATE = - GrpcMethodName.parse("hyeonworks.document.v1.DocumentService/CreateDocument"); + GrpcMethodName.parse("caskeleton.document.v1.DocumentService/CreateDocument"); private record CreateRequest(String title) {} diff --git a/grpc/grpc-policy/src/test/java/dev/caskeleton/grpc/streaming/GrpcFlowControlPolicyTest.java b/grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/streaming/GrpcFlowControlPolicyTest.java similarity index 100% rename from grpc/grpc-policy/src/test/java/dev/caskeleton/grpc/streaming/GrpcFlowControlPolicyTest.java rename to grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/streaming/GrpcFlowControlPolicyTest.java diff --git a/grpc/grpc-policy/src/test/java/dev/caskeleton/grpc/streaming/GrpcResumeTokenCodecTest.java b/grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/streaming/GrpcResumeTokenCodecTest.java similarity index 100% rename from grpc/grpc-policy/src/test/java/dev/caskeleton/grpc/streaming/GrpcResumeTokenCodecTest.java rename to grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/streaming/GrpcResumeTokenCodecTest.java diff --git a/grpc/grpc-policy/src/test/java/dev/caskeleton/grpc/streaming/GrpcSerializedStreamWriterTest.java b/grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/streaming/GrpcSerializedStreamWriterTest.java similarity index 100% rename from grpc/grpc-policy/src/test/java/dev/caskeleton/grpc/streaming/GrpcSerializedStreamWriterTest.java rename to grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/streaming/GrpcSerializedStreamWriterTest.java diff --git a/grpc/grpc-policy/src/test/java/dev/caskeleton/grpc/streaming/GrpcStreamAdmissionConcurrencyTest.java b/grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/streaming/GrpcStreamAdmissionConcurrencyTest.java similarity index 100% rename from grpc/grpc-policy/src/test/java/dev/caskeleton/grpc/streaming/GrpcStreamAdmissionConcurrencyTest.java rename to grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/streaming/GrpcStreamAdmissionConcurrencyTest.java diff --git a/grpc/grpc-policy/src/test/java/dev/caskeleton/grpc/streaming/GrpcStreamEnvelopeTest.java b/grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/streaming/GrpcStreamEnvelopeTest.java similarity index 88% rename from grpc/grpc-policy/src/test/java/dev/caskeleton/grpc/streaming/GrpcStreamEnvelopeTest.java rename to grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/streaming/GrpcStreamEnvelopeTest.java index 9788b7f..ccbaa45 100644 --- a/grpc/grpc-policy/src/test/java/dev/caskeleton/grpc/streaming/GrpcStreamEnvelopeTest.java +++ b/grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/streaming/GrpcStreamEnvelopeTest.java @@ -104,18 +104,6 @@ class GrpcStreamEnvelopeTest { .isInstanceOf(IllegalArgumentException.class); } - @Test - @DisplayName("a profile that buffers live events until the snapshot completes is the default") - void theDefaultProfileBuffersLiveEventsUntilTheSnapshotCompletes() { - GrpcStreamProfile profile = GrpcStreamProfile.snapshotThenLive(); - - assertThat(profile.snapshotFirst()).isTrue(); - assertThat(profile.liveEventsBeforeSnapshotComplete()).isFalse(); - assertThat(profile.resumable()).isTrue(); - assertThatThrownBy(() -> new GrpcStreamProfile(false, true, true, 10, 1024L)) - .isInstanceOf(IllegalArgumentException.class); - } - @Test @DisplayName("a termination reason says whether to reconnect and whether the position survives") void terminationReasonsSayWhatToDoNext() { diff --git a/grpc/grpc-policy/src/test/java/dev/caskeleton/grpc/streaming/GrpcStreamLifetimePolicyTest.java b/grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/streaming/GrpcStreamLifetimePolicyTest.java similarity index 100% rename from grpc/grpc-policy/src/test/java/dev/caskeleton/grpc/streaming/GrpcStreamLifetimePolicyTest.java rename to grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/streaming/GrpcStreamLifetimePolicyTest.java diff --git a/grpc/grpc-policy/src/test/java/dev/caskeleton/grpc/validation/GrpcValidationInterceptorTest.java b/grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/validation/GrpcValidationInterceptorTest.java similarity index 99% rename from grpc/grpc-policy/src/test/java/dev/caskeleton/grpc/validation/GrpcValidationInterceptorTest.java rename to grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/validation/GrpcValidationInterceptorTest.java index 73468e8..b7d328d 100644 --- a/grpc/grpc-policy/src/test/java/dev/caskeleton/grpc/validation/GrpcValidationInterceptorTest.java +++ b/grpc/grpc-runtime/src/test/java/dev/caskeleton/grpc/validation/GrpcValidationInterceptorTest.java @@ -22,7 +22,7 @@ import org.junit.jupiter.api.Test; class GrpcValidationInterceptorTest { - private static final String FULL_METHOD = "hyeonworks.document.v1.DocumentService/CreateDocument"; + private static final String FULL_METHOD = "caskeleton.document.v1.DocumentService/CreateDocument"; /** A UTF-8 marshaller, so the descriptor needs no generated message type. */ private static final MethodDescriptor.Marshaller UTF8 = diff --git a/grpc/grpc-server/build.gradle b/grpc/grpc-server/build.gradle deleted file mode 100644 index 26c8142..0000000 --- a/grpc/grpc-server/build.gradle +++ /dev/null @@ -1,17 +0,0 @@ -plugins { - id 'ca.grpc-platform-module' -} - -// Server boundary: the ArchUnit-shaped application boundary rules, the typed service adapter SPI, -// the interceptor order contract, and the Netty server/executor/admission profiles. -// -// The Netty profiles are configuration models, not Netty wiring — no netty dependency here. Real -// Netty lives in `grpc-testkit`'s certification lane, which is where transport evidence is produced. - -dependencies { - api project(':grpc:grpc-core-api') - api project(':grpc:grpc-policy') - - api "io.grpc:grpc-api" - api "io.grpc:grpc-stub" -} diff --git a/grpc/grpc-server/gradle.lockfile b/grpc/grpc-server/gradle.lockfile deleted file mode 100644 index 9369e83..0000000 --- a/grpc/grpc-server/gradle.lockfile +++ /dev/null @@ -1,91 +0,0 @@ -# This is a Gradle generated file for dependency locking. -# Manual edits can break the build and are not advised. -# This file is expected to be part of source control. -com.github.ben-manes.caffeine:caffeine:3.2.4=annotationProcessor,testAnnotationProcessor -com.github.kevinstern:software-and-algorithms:1.0=annotationProcessor,testAnnotationProcessor -com.github.spotbugs:spotbugs-annotations:4.10.2=spotbugs -com.github.spotbugs:spotbugs:4.10.2=spotbugs -com.github.stephenc.jcip:jcip-annotations:1.0-1=spotbugs -com.google.auto.service:auto-service-annotations:1.0.1=annotationProcessor,testAnnotationProcessor -com.google.auto.value:auto-value-annotations:1.9=annotationProcessor,testAnnotationProcessor -com.google.auto:auto-common:1.2.2=annotationProcessor,testAnnotationProcessor -com.google.code.findbugs:jsr305:3.0.2=checkstyle,compileClasspath,runtimeClasspath,spotbugs,testCompileClasspath,testRuntimeClasspath -com.google.code.gson:gson:2.13.2=spotbugs -com.google.errorprone:error_prone_annotation:2.49.0=annotationProcessor,testAnnotationProcessor -com.google.errorprone:error_prone_annotations:2.28.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -com.google.errorprone:error_prone_annotations:2.41.0=spotbugs -com.google.errorprone:error_prone_annotations:2.47.0=checkstyle -com.google.errorprone:error_prone_annotations:2.49.0=annotationProcessor,testAnnotationProcessor -com.google.errorprone:error_prone_check_api:2.49.0=annotationProcessor,testAnnotationProcessor -com.google.errorprone:error_prone_core:2.49.0=annotationProcessor,testAnnotationProcessor -com.google.googlejavaformat:google-java-format:1.35.0=annotationProcessor,testAnnotationProcessor -com.google.guava:failureaccess:1.0.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -com.google.guava:failureaccess:1.0.3=annotationProcessor,checkstyle,testAnnotationProcessor -com.google.guava:guava:33.2.1-android=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -com.google.guava:guava:33.5.0-jre=annotationProcessor,testAnnotationProcessor -com.google.guava:guava:33.6.0-jre=checkstyle -com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava=annotationProcessor,checkstyle,compileClasspath,runtimeClasspath,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath -com.google.j2objc:j2objc-annotations:3.0.0=compileClasspath,testCompileClasspath -com.google.j2objc:j2objc-annotations:3.1=annotationProcessor,checkstyle,testAnnotationProcessor -com.google.protobuf:protobuf-java:4.33.2=annotationProcessor,testAnnotationProcessor -com.h3xstream.findsecbugs:findsecbugs-plugin:1.14.0=spotbugsPlugins -com.puppycrawl.tools:checkstyle:13.5.0=checkstyle -commons-beanutils:commons-beanutils:1.11.0=checkstyle -commons-collections:commons-collections:3.2.2=checkstyle -commons-io:commons-io:2.21.0=spotbugs -info.picocli:picocli:4.7.7=checkstyle -io.github.eisop:dataflow-errorprone:3.41.0-eisop1=annotationProcessor,testAnnotationProcessor -io.github.java-diff-utils:java-diff-utils:4.12=annotationProcessor,testAnnotationProcessor -io.grpc:grpc-api:1.68.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -io.grpc:grpc-stub:1.68.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -javax.inject:javax.inject:1=annotationProcessor,testAnnotationProcessor -jaxen:jaxen:2.0.6=spotbugs -net.bytebuddy:byte-buddy:1.17.8=testCompileClasspath,testRuntimeClasspath -net.sf.saxon:Saxon-HE:12.9=checkstyle,spotbugs -org.antlr:antlr4-runtime:4.13.2=checkstyle -org.apache.bcel:bcel:6.12.0=spotbugs -org.apache.commons:commons-lang3:3.20.0=checkstyle,spotbugs -org.apache.commons:commons-text:1.15.0=spotbugs -org.apache.commons:commons-text:1.3=checkstyle -org.apache.httpcomponents:httpclient:4.5.13=checkstyle -org.apache.httpcomponents:httpcore:4.4.16=checkstyle -org.apache.logging.log4j:log4j-api:2.25.5=spotbugs -org.apache.logging.log4j:log4j-core:2.25.5=spotbugs -org.apache.maven.doxia:doxia-core:1.12.0=checkstyle -org.apache.maven.doxia:doxia-logging-api:1.12.0=checkstyle -org.apache.maven.doxia:doxia-module-xdoc:1.12.0=checkstyle -org.apache.maven.doxia:doxia-sink-api:1.12.0=checkstyle -org.apache.xbean:xbean-reflect:3.7=checkstyle -org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath -org.assertj:assertj-core:3.27.7=testCompileClasspath,testRuntimeClasspath -org.checkerframework:checker-qual:3.42.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -org.codehaus.plexus:plexus-classworlds:2.6.0=checkstyle -org.codehaus.plexus:plexus-component-annotations:2.1.0=checkstyle -org.codehaus.plexus:plexus-container-default:2.1.0=checkstyle -org.codehaus.plexus:plexus-utils:3.3.0=checkstyle -org.dom4j:dom4j:2.2.0=spotbugs -org.javassist:javassist:3.28.0-GA=checkstyle -org.jspecify:jspecify:1.0.1=annotationProcessor,checkstyle,testAnnotationProcessor,testCompileClasspath -org.junit.jupiter:junit-jupiter-api:6.0.3=testCompileClasspath,testRuntimeClasspath -org.junit.jupiter:junit-jupiter-engine:6.0.3=testRuntimeClasspath -org.junit.jupiter:junit-jupiter-params:6.0.3=testCompileClasspath,testRuntimeClasspath -org.junit.jupiter:junit-jupiter:6.0.3=testCompileClasspath,testRuntimeClasspath -org.junit.platform:junit-platform-commons:6.0.3=testCompileClasspath,testRuntimeClasspath -org.junit.platform:junit-platform-engine:6.0.3=testRuntimeClasspath -org.junit.platform:junit-platform-launcher:6.0.3=testRuntimeClasspath -org.junit:junit-bom:6.0.3=testCompileClasspath,testRuntimeClasspath -org.junit:junit-bom:6.1.0=spotbugs -org.mockito:mockito-core:5.20.0=mockitoAgent -org.opentest4j:opentest4j:1.3.0=testCompileClasspath,testRuntimeClasspath -org.ow2.asm:asm-analysis:9.10.1=spotbugs -org.ow2.asm:asm-commons:9.10.1=spotbugs -org.ow2.asm:asm-tree:9.10.1=spotbugs -org.ow2.asm:asm-util:9.10.1=spotbugs -org.ow2.asm:asm:9.10.1=spotbugs -org.pcollections:pcollections:4.0.1=annotationProcessor,testAnnotationProcessor -org.reflections:reflections:0.10.2=checkstyle -org.slf4j:slf4j-api:2.0.18=spotbugs,spotbugsSlf4j -org.slf4j:slf4j-simple:2.0.17=spotbugsSlf4j -org.slf4j:slf4j-simple:2.0.18=checkstyle -org.xmlresolver:xmlresolver:5.3.3=checkstyle,spotbugs -empty= diff --git a/grpc/grpc-spring-boot-starter/build.gradle b/grpc/grpc-spring-boot-starter/build.gradle index b85f08b..ad114e6 100644 --- a/grpc/grpc-spring-boot-starter/build.gradle +++ b/grpc/grpc-spring-boot-starter/build.gradle @@ -1,5 +1,7 @@ plugins { - id 'ca.platform-module' + // grpc-platform, not platform: grpc-runtime's io.grpc api dependencies are versionless and + // need the gRPC BOM on every classpath they reach. + id 'ca.grpc-platform-module' id 'ca.spring-config' } @@ -11,16 +13,9 @@ plugins { // enforces it, and GrpcPlatformStartupValidatorTest asserts the same rule from the Java side. dependencies { api project(':grpc:grpc-core-api') - api project(':grpc:grpc-policy') - api project(':grpc:grpc-server') - api project(':grpc:grpc-client') - api project(':grpc:grpc-discovery') - api project(':grpc:grpc-admin') + api project(':grpc:grpc-runtime') api project(':grpc:grpc-observability') - implementation project(':grpc:grpc-proto-contract') - implementation project(':grpc:grpc-codegen') - implementation 'org.springframework.boot:spring-boot-autoconfigure' } diff --git a/grpc/grpc-spring-boot-starter/src/main/java/dev/caskeleton/grpc/boot/GrpcPlatformAutoConfiguration.java b/grpc/grpc-spring-boot-starter/src/main/java/dev/caskeleton/grpc/boot/GrpcPlatformAutoConfiguration.java index 6e57e6b..5e17459 100644 --- a/grpc/grpc-spring-boot-starter/src/main/java/dev/caskeleton/grpc/boot/GrpcPlatformAutoConfiguration.java +++ b/grpc/grpc-spring-boot-starter/src/main/java/dev/caskeleton/grpc/boot/GrpcPlatformAutoConfiguration.java @@ -14,7 +14,6 @@ import dev.caskeleton.grpc.security.GrpcTlsProfile; import dev.caskeleton.grpc.server.GrpcAdmissionController; import dev.caskeleton.grpc.server.GrpcExecutorProfile; import dev.caskeleton.grpc.server.GrpcServerProfile; -import java.time.Duration; import java.util.UUID; import org.springframework.beans.factory.ObjectProvider; import org.springframework.beans.factory.SmartInitializingSingleton; @@ -54,16 +53,7 @@ public class GrpcPlatformAutoConfiguration { @ConditionalOnMissingBean public GrpcServerProfile grpcServerProfile( GrpcPlatformProperties properties, GrpcExecutorProfile executorProfile) { - return new GrpcServerProfile( - properties.getTransport(), - 1024L * 1024L, - 8192, - Duration.ofSeconds(30), - Duration.ofSeconds(10), - Duration.ofSeconds(30), - Duration.ofMinutes(30), - Duration.ofSeconds(30), - executorProfile); + return GrpcServerProfile.stable(properties.getTransport(), executorProfile); } /** Admission control, sized from the executor. */ @@ -124,19 +114,21 @@ public class GrpcPlatformAutoConfiguration { * Runs the Stable startup validator against the bean graph after singleton assembly. * *

The Gradle architecture gate owns dependency-graph isolation. Runtime validation checks only - * inputs a running process can actually observe: typed properties, the method-policy catalog and - * named client channels. + * inputs a running process can actually observe: typed properties, the method-policy catalog, + * named client channels and the server transport profile. */ @Bean public SmartInitializingSingleton grpcPlatformStartupCheck( GrpcPlatformProperties properties, ObjectProvider catalogs, - ObjectProvider channelProfiles) { + ObjectProvider channelProfiles, + GrpcServerProfile serverProfile) { return () -> GrpcPlatformStartupValidator.requireValid( properties, catalogs.getIfAvailable(() -> GrpcMethodPolicyCatalog.builder().build()), - channelProfiles.orderedStream().toList()); + channelProfiles.orderedStream().toList(), + serverProfile); } /** The shared error mapper. Its execution ids are random and carry no derived content. */ diff --git a/grpc/grpc-spring-boot-starter/src/main/java/dev/caskeleton/grpc/boot/GrpcPlatformStartupValidator.java b/grpc/grpc-spring-boot-starter/src/main/java/dev/caskeleton/grpc/boot/GrpcPlatformStartupValidator.java index 24cf787..f4024f9 100644 --- a/grpc/grpc-spring-boot-starter/src/main/java/dev/caskeleton/grpc/boot/GrpcPlatformStartupValidator.java +++ b/grpc/grpc-spring-boot-starter/src/main/java/dev/caskeleton/grpc/boot/GrpcPlatformStartupValidator.java @@ -9,6 +9,7 @@ import dev.caskeleton.grpc.core.GrpcMethodName; import dev.caskeleton.grpc.core.RpcType; import dev.caskeleton.grpc.discovery.GrpcDiscoveryPolicyValidator; import dev.caskeleton.grpc.resilience.GrpcRetryOwner; +import dev.caskeleton.grpc.server.GrpcServerProfile; import java.util.ArrayList; import java.util.LinkedHashSet; import java.util.List; @@ -41,15 +42,16 @@ public final class GrpcPlatformStartupValidator { public static List violations( GrpcPlatformProperties properties, GrpcMethodPolicyCatalog catalog, - List channelProfiles) { - if (properties == null || catalog == null || channelProfiles == null) { + List channelProfiles, + GrpcServerProfile serverProfile) { + if (properties == null || catalog == null || channelProfiles == null || serverProfile == null) { throw new IllegalArgumentException("startup validation needs every input"); } List violations = new ArrayList<>(); validateTransportAndSecurity(properties, violations); validateExecutor(properties, violations); - validateMethods(properties, catalog, violations); + validateMethods(properties, catalog, serverProfile, violations); validateChannels(channelProfiles, violations); return List.copyOf(violations); } @@ -62,8 +64,9 @@ public final class GrpcPlatformStartupValidator { public static void requireValid( GrpcPlatformProperties properties, GrpcMethodPolicyCatalog catalog, - List channelProfiles) { - List violations = violations(properties, catalog, channelProfiles); + List channelProfiles, + GrpcServerProfile serverProfile) { + List violations = violations(properties, catalog, channelProfiles, serverProfile); if (!violations.isEmpty()) { throw new GrpcPlatformConfigurationException(violations); } @@ -113,9 +116,22 @@ public final class GrpcPlatformStartupValidator { } private static void validateMethods( - GrpcPlatformProperties properties, GrpcMethodPolicyCatalog catalog, List violations) { + GrpcPlatformProperties properties, + GrpcMethodPolicyCatalog catalog, + GrpcServerProfile serverProfile, + List violations) { for (GrpcMethodName method : sorted(catalog.methods())) { GrpcMethodPolicy policy = catalog.require(method); + if (policy.maxInboundMessageBytes() > serverProfile.maxInboundMessageBytes()) { + violations.add( + "method '" + + method.canonical() + + "' accepts " + + policy.maxInboundMessageBytes() + + "-byte messages but the server rejects anything over " + + serverProfile.maxInboundMessageBytes() + + "; the method's bound is a promise the transport breaks"); + } if (policy.rpcType() == RpcType.UNARY && policy.deadline().usable().isZero()) { violations.add( "Stable unary method '" diff --git a/grpc/grpc-spring-boot-starter/src/test/java/dev/caskeleton/grpc/boot/GrpcPlatformStartupValidatorTest.java b/grpc/grpc-spring-boot-starter/src/test/java/dev/caskeleton/grpc/boot/GrpcPlatformStartupValidatorTest.java index aaa4c26..dcffee9 100644 --- a/grpc/grpc-spring-boot-starter/src/test/java/dev/caskeleton/grpc/boot/GrpcPlatformStartupValidatorTest.java +++ b/grpc/grpc-spring-boot-starter/src/test/java/dev/caskeleton/grpc/boot/GrpcPlatformStartupValidatorTest.java @@ -7,6 +7,7 @@ import dev.caskeleton.grpc.admin.GrpcReflectionMode; import dev.caskeleton.grpc.api.deadline.GrpcDeadlineProfile; import dev.caskeleton.grpc.api.policy.GrpcMethodPolicy; import dev.caskeleton.grpc.api.policy.GrpcMethodPolicyCatalog; +import dev.caskeleton.grpc.api.policy.GrpcTransportLimits; import dev.caskeleton.grpc.api.policy.RpcIdempotencyProfile; import dev.caskeleton.grpc.api.policy.WaitForReadyPolicy; import dev.caskeleton.grpc.client.GrpcNamedChannelProfile; @@ -14,6 +15,8 @@ import dev.caskeleton.grpc.core.GrpcMethodName; import dev.caskeleton.grpc.core.RpcType; import dev.caskeleton.grpc.resilience.GrpcRetryOwner; import dev.caskeleton.grpc.security.GrpcTlsProfile; +import dev.caskeleton.grpc.server.GrpcExecutorProfile; +import dev.caskeleton.grpc.server.GrpcServerProfile; import dev.caskeleton.grpc.server.GrpcServerTransport; import java.io.IOException; import java.io.UncheckedIOException; @@ -29,9 +32,9 @@ import org.junit.jupiter.api.Test; class GrpcPlatformStartupValidatorTest { private static final GrpcMethodName GET = - GrpcMethodName.parse("hyeonworks.document.v1.DocumentService/GetDocument"); + GrpcMethodName.parse("caskeleton.document.v1.DocumentService/GetDocument"); private static final GrpcMethodName CREATE = - GrpcMethodName.parse("hyeonworks.document.v1.DocumentService/CreateDocument"); + GrpcMethodName.parse("caskeleton.document.v1.DocumentService/CreateDocument"); private static final GrpcTlsProfile PROD_TLS = GrpcTlsProfile.serverAuthenticated(GrpcTlsProfile.Environment.PROD, "trust-bundle"); @@ -64,15 +67,50 @@ class GrpcPlatformStartupValidatorTest { GrpcRetryOwner.GRPC_PLATFORM)); } + private static GrpcServerProfile stableServer() { + return GrpcServerProfile.stableNetty(GrpcExecutorProfile.boundedPool(32, 256)); + } + + @Test + @DisplayName("method의 inbound 한도가 서버 profile의 한도보다 크면 기동을 거부한다") + void aMethodBoundAboveTheServerBoundIsRefused() { + // given + GrpcMethodPolicyCatalog catalog = + GrpcMethodPolicyCatalog.builder() + .register( + new GrpcMethodPolicy( + GET, + RpcType.UNARY, + RpcIdempotencyProfile.READ_ONLY, + GrpcDeadlineProfile.of(Duration.ofSeconds(2)), + WaitForReadyPolicy.DISABLED, + false, + 2 * GrpcTransportLimits.DEFAULT_MAX_MESSAGE_BYTES, + 1024)) + .build(); + + // when + List violations = + GrpcPlatformStartupValidator.violations( + productionProperties(), catalog, oneChannel(), stableServer()); + + // then + assertThat(violations) + .containsExactly( + "method 'caskeleton.document.v1.DocumentService/GetDocument' accepts 2097152-byte" + + " messages but the server rejects anything over 1048576; the method's bound is a" + + " promise the transport breaks"); + } + @Test @DisplayName("a coherent production configuration starts") void aCoherentConfigurationStarts() { assertThat( GrpcPlatformStartupValidator.violations( - productionProperties(), healthyCatalog(), oneChannel())) + productionProperties(), healthyCatalog(), oneChannel(), stableServer())) .isEmpty(); GrpcPlatformStartupValidator.requireValid( - productionProperties(), healthyCatalog(), oneChannel()); + productionProperties(), healthyCatalog(), oneChannel(), stableServer()); } @Test @@ -87,7 +125,9 @@ class GrpcPlatformStartupValidatorTest { GrpcPlatformProperties properties = productionProperties(); properties.setTransport(GrpcServerTransport.IN_PROCESS); - assertThat(GrpcPlatformStartupValidator.violations(properties, healthyCatalog(), oneChannel())) + assertThat( + GrpcPlatformStartupValidator.violations( + properties, healthyCatalog(), oneChannel(), stableServer())) .anySatisfy(violation -> assertThat(violation).contains("not network evidence")); } @@ -99,9 +139,13 @@ class GrpcPlatformStartupValidatorTest { GrpcPlatformProperties trustAll = productionProperties(); trustAll.setTrustAllCertificates(true); - assertThat(GrpcPlatformStartupValidator.violations(noTls, healthyCatalog(), oneChannel())) + assertThat( + GrpcPlatformStartupValidator.violations( + noTls, healthyCatalog(), oneChannel(), stableServer())) .anySatisfy(violation -> assertThat(violation).contains("TLS is required")); - assertThat(GrpcPlatformStartupValidator.violations(trustAll, healthyCatalog(), oneChannel())) + assertThat( + GrpcPlatformStartupValidator.violations( + trustAll, healthyCatalog(), oneChannel(), stableServer())) .anySatisfy(violation -> assertThat(violation).contains("providing none")); } @@ -111,7 +155,9 @@ class GrpcPlatformStartupValidatorTest { GrpcPlatformProperties properties = productionProperties(); properties.setReflectionMode(GrpcReflectionMode.ENABLED); - assertThat(GrpcPlatformStartupValidator.violations(properties, healthyCatalog(), oneChannel())) + assertThat( + GrpcPlatformStartupValidator.violations( + properties, healthyCatalog(), oneChannel(), stableServer())) .anySatisfy(violation -> assertThat(violation).contains("published to anyone")); assertThat(productionProperties().effectiveReflectionMode()) .isEqualTo(GrpcReflectionMode.DISABLED); @@ -123,7 +169,9 @@ class GrpcPlatformStartupValidatorTest { GrpcPlatformProperties properties = productionProperties(); properties.setExecutorQueueCapacity(0); - assertThat(GrpcPlatformStartupValidator.violations(properties, healthyCatalog(), oneChannel())) + assertThat( + GrpcPlatformStartupValidator.violations( + properties, healthyCatalog(), oneChannel(), stableServer())) .anySatisfy(violation -> assertThat(violation).contains("unbounded latency")); } @@ -146,7 +194,9 @@ class GrpcPlatformStartupValidatorTest { 1024)) .build(); - assertThat(GrpcPlatformStartupValidator.violations(properties, catalog, oneChannel())) + assertThat( + GrpcPlatformStartupValidator.violations( + properties, catalog, oneChannel(), stableServer())) .anySatisfy(violation -> assertThat(violation).contains("never honoured")); } @@ -168,7 +218,8 @@ class GrpcPlatformStartupValidatorTest { .build(); assertThat( - GrpcPlatformStartupValidator.violations(productionProperties(), catalog, oneChannel())) + GrpcPlatformStartupValidator.violations( + productionProperties(), catalog, oneChannel(), stableServer())) .anySatisfy(violation -> assertThat(violation).contains("Advanced capability")); } @@ -190,7 +241,7 @@ class GrpcPlatformStartupValidatorTest { assertThat( GrpcPlatformStartupValidator.violations( - productionProperties(), healthyCatalog(), twoOwners)) + productionProperties(), healthyCatalog(), twoOwners, stableServer())) .anySatisfy(violation -> assertThat(violation).contains("multiply the load")); } @@ -203,7 +254,9 @@ class GrpcPlatformStartupValidatorTest { broken.setExecutorQueueCapacity(0); assertThatThrownBy( - () -> GrpcPlatformStartupValidator.requireValid(broken, healthyCatalog(), oneChannel())) + () -> + GrpcPlatformStartupValidator.requireValid( + broken, healthyCatalog(), oneChannel(), stableServer())) .isInstanceOf(GrpcPlatformConfigurationException.class) .satisfies( failure -> diff --git a/grpc/grpc-testkit/build.gradle b/grpc/grpc-testkit/build.gradle index fd9eb56..3387707 100644 --- a/grpc/grpc-testkit/build.gradle +++ b/grpc/grpc-testkit/build.gradle @@ -43,14 +43,8 @@ tasks.named('test') { dependencies { api project(':grpc:grpc-core-api') - api project(':grpc:grpc-policy') - api project(':grpc:grpc-server') - api project(':grpc:grpc-client') - api project(':grpc:grpc-discovery') - api project(':grpc:grpc-admin') + api project(':grpc:grpc-runtime') api project(':grpc:grpc-observability') - api project(':grpc:grpc-proto-contract') - api project(':grpc:grpc-codegen') api project(':grpc:grpc-operation-ledger-jpa') api "io.grpc:grpc-api" diff --git a/grpc/grpc-testkit/src/main/java/dev/caskeleton/grpc/release/GrpcStableReleaseGate.java b/grpc/grpc-testkit/src/main/java/dev/caskeleton/grpc/release/GrpcStableReleaseGate.java index 862f8d1..14913cf 100644 --- a/grpc/grpc-testkit/src/main/java/dev/caskeleton/grpc/release/GrpcStableReleaseGate.java +++ b/grpc/grpc-testkit/src/main/java/dev/caskeleton/grpc/release/GrpcStableReleaseGate.java @@ -1,6 +1,5 @@ package dev.caskeleton.grpc.release; -import dev.caskeleton.grpc.codegen.GrpcSchemaArtifactPublisher; import dev.caskeleton.grpc.testkit.GrpcEvidenceGrade; import java.util.ArrayList; import java.util.List; @@ -30,13 +29,14 @@ public final class GrpcStableReleaseGate { /** * The release decision. * - * @param schemaDecision the schema publisher's verdict, which carries the consumer-compile result + * @param schemaBreakages what {@code buf breaking} reported against the released schema (the CI + * job {@code grpc-proto-buf}); empty when the schema is compatible */ public GrpcReleaseDecision evaluate( GrpcReleaseEvidence evidence, Map laneResults, - GrpcSchemaArtifactPublisher.PublishDecision schemaDecision) { - if (evidence == null || laneResults == null || schemaDecision == null) { + List schemaBreakages) { + if (evidence == null || laneResults == null || schemaBreakages == null) { throw new IllegalArgumentException( "a release decision needs evidence, lanes and the schema verdict"); } @@ -51,9 +51,7 @@ public final class GrpcStableReleaseGate { + " evidence was not produced; without it the release cannot claim " + grade.certifies().stream().sorted().toList())); - if (!schemaDecision.allowed()) { - schemaDecision.blockers().forEach(blocker -> blockers.add("schema: " + blocker)); - } + schemaBreakages.forEach(breakage -> blockers.add("schema: " + breakage)); if (!evidence.runbookPresent()) { blockers.add( "the operations runbook is missing; COMPLETION_UNKNOWN and FULL_RESYNC_REQUIRED are " diff --git a/grpc/grpc-testkit/src/test/java/dev/caskeleton/grpc/performance/GrpcPerformanceLaneTest.java b/grpc/grpc-testkit/src/test/java/dev/caskeleton/grpc/performance/GrpcPerformanceLaneTest.java index b1d1828..afe924b 100644 --- a/grpc/grpc-testkit/src/test/java/dev/caskeleton/grpc/performance/GrpcPerformanceLaneTest.java +++ b/grpc/grpc-testkit/src/test/java/dev/caskeleton/grpc/performance/GrpcPerformanceLaneTest.java @@ -33,7 +33,7 @@ import org.junit.jupiter.api.Test; class GrpcPerformanceLaneTest { private static final MethodDescriptor ECHO = - GrpcTextCodec.unary("hyeonworks.document.v1.DocumentService/GetDocument"); + GrpcTextCodec.unary("caskeleton.document.v1.DocumentService/GetDocument"); private static final int SAMPLE_SIZE = 200; private static ServerServiceDefinition echoService() { @@ -43,7 +43,7 @@ class GrpcPerformanceLaneTest { observer.onNext(request); observer.onCompleted(); }); - return ServerServiceDefinition.builder("hyeonworks.document.v1.DocumentService") + return ServerServiceDefinition.builder("caskeleton.document.v1.DocumentService") .addMethod(ECHO, handler) .build(); } diff --git a/grpc/grpc-testkit/src/test/java/dev/caskeleton/grpc/release/GrpcStableReleaseGateTest.java b/grpc/grpc-testkit/src/test/java/dev/caskeleton/grpc/release/GrpcStableReleaseGateTest.java index b5012b5..ad2be8d 100644 --- a/grpc/grpc-testkit/src/test/java/dev/caskeleton/grpc/release/GrpcStableReleaseGateTest.java +++ b/grpc/grpc-testkit/src/test/java/dev/caskeleton/grpc/release/GrpcStableReleaseGateTest.java @@ -3,7 +3,6 @@ package dev.caskeleton.grpc.release; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; -import dev.caskeleton.grpc.codegen.GrpcSchemaArtifactPublisher; import dev.caskeleton.grpc.testkit.GrpcEvidenceGrade; import java.util.EnumSet; import java.util.LinkedHashMap; @@ -33,8 +32,8 @@ class GrpcStableReleaseGateTest { true); } - private static GrpcSchemaArtifactPublisher.PublishDecision schemaAllowed() { - return new GrpcSchemaArtifactPublisher.PublishDecision(true, List.of()); + private static List schemaAllowed() { + return List.of(); } @Test @@ -112,9 +111,9 @@ class GrpcStableReleaseGateTest { @Test @DisplayName("a schema that breaks a consumer blocks the release") void aBrokenConsumerBlocks() { - GrpcSchemaArtifactPublisher.PublishDecision refused = - new GrpcSchemaArtifactPublisher.PublishDecision( - false, List.of("consumer 'document-client-v1' loses METHOD_PATH 'CreateDocument'")); + List refused = + List.of( + "caskeleton/grpc/common/v1/stream.proto: Field \"3\" on message \"StreamEnvelope\" deleted."); assertThat(gate.evaluate(completeEvidence(), allLanesPassing(), refused).blockers()) .anySatisfy(blocker -> assertThat(blocker).startsWith("schema:")); diff --git a/grpc/grpc-testkit/src/test/java/dev/caskeleton/grpc/testkit/GrpcInProcessContractFixtureTest.java b/grpc/grpc-testkit/src/test/java/dev/caskeleton/grpc/testkit/GrpcInProcessContractFixtureTest.java index b7aa2ec..70eceaf 100644 --- a/grpc/grpc-testkit/src/test/java/dev/caskeleton/grpc/testkit/GrpcInProcessContractFixtureTest.java +++ b/grpc/grpc-testkit/src/test/java/dev/caskeleton/grpc/testkit/GrpcInProcessContractFixtureTest.java @@ -24,10 +24,10 @@ class GrpcInProcessContractFixtureTest { private static final MethodDescriptor ECHO = GrpcInProcessContractFixture.unaryMethod( - "hyeonworks.document.v1.DocumentService/GetDocument"); + "caskeleton.document.v1.DocumentService/GetDocument"); private static final MethodDescriptor WATCH = GrpcInProcessContractFixture.streamingMethod( - "hyeonworks.document.v1.DocumentService/WatchDocuments"); + "caskeleton.document.v1.DocumentService/WatchDocuments"); /** Records the order interceptors actually ran in, which is the property under test. */ private record OrderRecordingInterceptor(String name, List log) diff --git a/grpc/grpc-testkit/src/test/java/dev/caskeleton/grpc/testkit/GrpcNettyContractProfileTest.java b/grpc/grpc-testkit/src/test/java/dev/caskeleton/grpc/testkit/GrpcNettyContractProfileTest.java index a73358a..bfccd45 100644 --- a/grpc/grpc-testkit/src/test/java/dev/caskeleton/grpc/testkit/GrpcNettyContractProfileTest.java +++ b/grpc/grpc-testkit/src/test/java/dev/caskeleton/grpc/testkit/GrpcNettyContractProfileTest.java @@ -25,7 +25,7 @@ import org.junit.jupiter.api.Test; class GrpcNettyContractProfileTest { private static final MethodDescriptor ECHO = - GrpcTextCodec.unary("hyeonworks.document.v1.DocumentService/GetDocument"); + GrpcTextCodec.unary("caskeleton.document.v1.DocumentService/GetDocument"); private static ServerServiceDefinition echoService() { ServerCallHandler handler = @@ -34,7 +34,7 @@ class GrpcNettyContractProfileTest { observer.onNext("echo:" + request); observer.onCompleted(); }); - return ServerServiceDefinition.builder("hyeonworks.document.v1.DocumentService") + return ServerServiceDefinition.builder("caskeleton.document.v1.DocumentService") .addMethod(ECHO, handler) .build(); } diff --git a/grpc/grpc-testkit/src/test/java/dev/caskeleton/grpc/testkit/GrpcPackageOwnershipTest.java b/grpc/grpc-testkit/src/test/java/dev/caskeleton/grpc/testkit/GrpcPackageOwnershipTest.java index 22a4835..a5f460c 100644 --- a/grpc/grpc-testkit/src/test/java/dev/caskeleton/grpc/testkit/GrpcPackageOwnershipTest.java +++ b/grpc/grpc-testkit/src/test/java/dev/caskeleton/grpc/testkit/GrpcPackageOwnershipTest.java @@ -17,7 +17,7 @@ class GrpcPackageOwnershipTest { @Test void corePolicyAndLedgerJpaDoNotSplitAJavaPackageAcrossLeaves() throws Exception { Path repo = repositoryRoot(); - List leaves = List.of("grpc-core-api", "grpc-policy", "grpc-operation-ledger-jpa"); + List leaves = List.of("grpc-core-api", "grpc-runtime", "grpc-operation-ledger-jpa"); Map> owners = new LinkedHashMap<>(); for (String leaf : leaves) { Path source = repo.resolve("src/grpc").resolve(leaf).resolve("src/main/java"); diff --git a/grpc/grpc-testkit/src/test/java/dev/caskeleton/grpc/testkit/GrpcTransportEvidenceClassifierTest.java b/grpc/grpc-testkit/src/test/java/dev/caskeleton/grpc/testkit/GrpcTransportEvidenceClassifierTest.java index 3b7c224..41ef53e 100644 --- a/grpc/grpc-testkit/src/test/java/dev/caskeleton/grpc/testkit/GrpcTransportEvidenceClassifierTest.java +++ b/grpc/grpc-testkit/src/test/java/dev/caskeleton/grpc/testkit/GrpcTransportEvidenceClassifierTest.java @@ -40,9 +40,9 @@ import org.junit.jupiter.api.Test; class GrpcTransportEvidenceClassifierTest { private static final GrpcMethodName CREATE = - GrpcMethodName.parse("hyeonworks.document.v1.DocumentService/CreateDocument"); + GrpcMethodName.parse("caskeleton.document.v1.DocumentService/CreateDocument"); private static final GrpcMethodName GET = - GrpcMethodName.parse("hyeonworks.document.v1.DocumentService/GetDocument"); + GrpcMethodName.parse("caskeleton.document.v1.DocumentService/GetDocument"); private static final MethodDescriptor CREATE_DESCRIPTOR = GrpcTextCodec.unary(CREATE.canonical()); private static final MethodDescriptor GET_DESCRIPTOR = @@ -349,7 +349,7 @@ class GrpcTransportEvidenceClassifierTest { return GrpcNettyTestServer.start( GrpcNettyContractProfile.plaintext(), List.of( - ServerServiceDefinition.builder("hyeonworks.document.v1.DocumentService") + ServerServiceDefinition.builder("caskeleton.document.v1.DocumentService") .addMethod(descriptor, handler) .build()), List.of(), diff --git a/grpc/grpc-testkit/src/test/java/dev/caskeleton/grpc/testkit/GrpcUnaryReliabilityContractTest.java b/grpc/grpc-testkit/src/test/java/dev/caskeleton/grpc/testkit/GrpcUnaryReliabilityContractTest.java index 164ff6f..d27214f 100644 --- a/grpc/grpc-testkit/src/test/java/dev/caskeleton/grpc/testkit/GrpcUnaryReliabilityContractTest.java +++ b/grpc/grpc-testkit/src/test/java/dev/caskeleton/grpc/testkit/GrpcUnaryReliabilityContractTest.java @@ -21,11 +21,11 @@ import org.junit.jupiter.api.Test; class GrpcUnaryReliabilityContractTest { private static final GrpcMethodName GET = - GrpcMethodName.parse("hyeonworks.document.v1.DocumentService/GetDocument"); + GrpcMethodName.parse("caskeleton.document.v1.DocumentService/GetDocument"); private static final GrpcMethodName CREATE = - GrpcMethodName.parse("hyeonworks.document.v1.DocumentService/CreateDocument"); + GrpcMethodName.parse("caskeleton.document.v1.DocumentService/CreateDocument"); private static final GrpcMethodName KEYED = - GrpcMethodName.parse("hyeonworks.document.v1.DocumentService/SubmitOrder"); + GrpcMethodName.parse("caskeleton.document.v1.DocumentService/SubmitOrder"); private final GrpcUnaryReliabilityContract contract = GrpcUnaryReliabilityContract.stable(GET, CREATE, KEYED);