refactor(repo)!: 들여온 플랫폼을 src/platforms 아래로 묶는다

문제: src/ 최상위에 계층 폴더와 들여온 제품 폴더(messaging, grpc,
grpc-advanced)와 optional 빌드 폴더(optional-platforms)가 같은 높이로
놓여, 무엇이 이 애플리케이션의 계층인지 폴더만으로 안 보인다.
src/config/에는 빌드 전체 설정과 기능 하나가 주인인 데이터(jpa,
messaging, mongodb)가 섞여 있다.

고른 방법(소유자 결정 2026-11-07, 설계 가-1):
- git mv로 src/platforms/{messaging,grpc,grpc-advanced,optional-build}.
  registry source_path 28행만 바꾸고 Gradle 경로(:messaging:*, :grpc:*)는
  그대로다. optional 빌드의 이름(optional-platforms)도 그대로다.
- optional 빌드가 한 단계 깊어져, build-logic이 "optional 빌드의 부모 =
  주 빌드"로 가정한 네 곳(registry settings, ArchitecturePlugin, 테스트
  이미지 catalog, checkstyle·spotbugs 설정)을 MainBuild(위로 올라가며
  registry·설정 파일을 찾음)로 바꾼다.
- settings.gradle·build.gradle의 상대 경로, workflow의 -p 값과 경로,
  buf 작업 폴더를 고친다. buf breaking은 이동 전 baseline에서도 옛
  경로로 비교해 이동 PR에서 건너뛰지 않는다.
- config/jpa, config/messaging, config/mongodb의 데이터를 주인 leaf의
  release/로 옮기고 읽는 빌드 줄·테스트·스크립트·문서를 고친다.
- 루트 CLAUDE.md 5절에 최상위 폴더 지도를 한 줄로 적는다.
버린 대안: Gradle 루트를 저장소 루트로(가-3, CI 재편 때 다시 봄),
application-* 묶기(가-2, 파생 서비스 충돌이 큼).

위험·한계: Gradle 문서의 "이름 = 위치" 권고와 한 단계 어긋난다
(:messaging:x가 platforms/messaging/x). 옮긴 폴더를 고쳐 쓰던 파생
서비스는 이름 바뀜 충돌이 날 수 있다(B-52). docs/capability-status.md
「제거된 코드」 표와 docs/work/evidence.md의 옛 경로는 이력이라 두었다.

검증(desktop, 트리 2b3354a4, ~/t1-layout-logs/):
- ./gradlew :ci :verifyDependencyLocks --warning-mode=fail --continue
  첫 실행 rc=1: MessagingAuthorityContractTest가 src/messaging을 찾아 실패
  → 경로를 고침. 두 번째 rc=1: messaging-policy
  MessagingAdmissionControllerTest.aWaitingCallerIsAdmittedOnceAPermitIsReturned
  (2초 대기 경쟁, 부하 7.3에서 한 번 실패, 코드 변경 없는 leaf) → --rerun
  3회 모두 통과. 세 번째 rc=0
- -p platforms/optional-build ci rc=0, 두 빌드의 verifyStrictLaneStages
  --dry-run rc=0, -p build-logic check rc=0
- :app-bootstrap:documentContractTest
  :adapter:outbound:persistence-mongo:mongoDocumentContractTest rc=0
- ./gradlew projects(주 빌드)와 optional 빌드 projects의 프로젝트 목록이
  이동 전 트리와 같다(Gradle 경로 불변)
- check-work-docs.py, 상대 링크 검사 rc=0

Refs: design-docs repo-structure/README.md 3.1, repo-structure/01-backend-layout.md 6.1
BREAKING CHANGE: src/messaging·src/grpc·src/grpc-advanced·src/optional-platforms가 src/platforms/ 아래로, src/config/{jpa,messaging,mongodb}가 주인 leaf의 release/로 옮겨졌다. optional 빌드는 -p platforms/optional-build로 부른다. docs/upgrade/2026-11-maturity-review.md B-52.
This commit is contained in:
DongHyeonka
2026-11-07 13:04:54 +09:00
parent 50cd7154d0
commit 8d69e599a3
850 changed files with 271 additions and 180 deletions
@@ -7,7 +7,7 @@
`messaging:messaging-spring-boot-starter-kafka` (the vendored platform and its Kafka transport) and
ships the module defaults in `config/module-defaults/messaging.yml`.
- Boundaries: add no code here. A publish rule belongs to the bridge (`adapter:outbound:messaging`),
a Kafka rule to the vendored product (`src/messaging/CLAUDE.md`); a class here would be a third
a Kafka rule to the vendored product (`src/platforms/messaging/CLAUDE.md`); a class here would be a third
place. Allowed edges come only from the registry entry.
- Tests: activation tests (`./gradlew :adapter:outbound:messaging-kafka:test`) and the real-Kafka
lane `messagingKafkaRelayIntegrationTest` (relay → bridge → broker record bytes; `:integrationCheck`).
+1 -1
View File
@@ -38,7 +38,7 @@ Package root: `dev.caskeleton.adapter.outbound.messaging`.
may not carry this module. The R1 contract/binding compilers and JSON Schema envelope encoder were
removed on 2026-09-25 (see `docs/capability-status.md`).
- No JSON Schema engine (NetworkNT) on the main classpath. The evidence manifest schema check and the
capability card check (`config/messaging`) are this leaf's tests (`evidence/`); snakeyaml is
capability card check (`release/`) are this leaf's tests (`evidence/`); snakeyaml is
test-only (owner decision 2026-09-25).
- Do not hide use-case sequencing or business routing policy in broker adapters.
- `OutboxMessagePublishAdapter` is delegate-only and emits no dependency log. The confirmed
+3 -3
View File
@@ -19,7 +19,7 @@ dependencies {
// Test-only: MessagingEvidenceSchemaValidatorTest holds the common evidence schema to Draft 2020-12.
testImplementation libs.json.schema.validator
// Test-only (owner decision 29): MessagingCapabilityRegistryContractTest reads the capability
// cards in config/messaging/*.yaml. The rules below keep snakeyaml out of every main
// cards in release/*.yaml. The rules below keep snakeyaml out of every main
// configuration; only the `test*` ones may resolve it.
testImplementation 'org.yaml:snakeyaml'
}
@@ -57,8 +57,8 @@ configurations.configureEach { configuration ->
}
}
// The card check reads the whole config/messaging tree (cards, profiles, the evidence schema).
// The card check reads the whole release tree (cards, profiles, the evidence schema).
tasks.named('test') {
inputs.dir(rootProject.file('config/messaging'))
inputs.dir(file('release'))
.withPathSensitivity(PathSensitivity.RELATIVE)
}
@@ -0,0 +1,169 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "urn:dev.caskeleton:messaging:build-evidence-manifest:v1",
"title": "Messaging build evidence manifest v1",
"type": "object",
"additionalProperties": false,
"required": [
"schemaVersion",
"sourceDigest",
"artifactDigest",
"producerTask",
"scenarioIds",
"counts",
"command",
"generatedAt",
"hashes",
"failures",
"skips",
"unsupportedClaims"
],
"properties": {
"schemaVersion": {
"type": "integer",
"const": 1
},
"sourceDigest": {
"$ref": "#/$defs/sha256"
},
"artifactDigest": {
"$ref": "#/$defs/sha256"
},
"producerTask": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^verifyMessaging[A-Za-z0-9]+$",
"enum": [
"verifyMessagingContracts",
"verifyMessagingPollingOutboxR2",
"verifyMessagingKafkaProducerR2",
"verifyMessagingSecurityR2",
"verifyMessagingReleaseProfile",
"verifyMessagingTargetBindingPreflight",
"verifyMessagingTargetBinding",
"verifyMessagingDeploymentCutover",
"verifyMessagingCleanupTargetBinding",
"verifyMessagingFinalR2Profile"
]
},
"scenarioIds": {
"type": "array",
"minItems": 1,
"uniqueItems": true,
"items": {
"$ref": "#/$defs/identifier"
}
},
"counts": {
"type": "object",
"additionalProperties": false,
"required": [
"executed",
"passed",
"failed",
"skipped"
],
"properties": {
"executed": {
"type": "integer",
"minimum": 1
},
"passed": {
"type": "integer",
"minimum": 0
},
"failed": {
"type": "integer",
"minimum": 0
},
"skipped": {
"type": "integer",
"minimum": 0
}
}
},
"command": {
"type": "string",
"minLength": 1,
"maxLength": 2048
},
"generatedAt": {
"type": "string",
"format": "date-time"
},
"hashes": {
"type": "object",
"additionalProperties": false,
"required": [
"profile",
"catalog",
"schema",
"settings"
],
"properties": {
"profile": {
"$ref": "#/$defs/sha256"
},
"catalog": {
"$ref": "#/$defs/sha256"
},
"schema": {
"$ref": "#/$defs/sha256"
},
"settings": {
"$ref": "#/$defs/sha256"
}
}
},
"failures": {
"type": "array",
"items": {
"$ref": "#/$defs/result"
}
},
"skips": {
"type": "array",
"items": {
"$ref": "#/$defs/result"
}
},
"unsupportedClaims": {
"type": "array",
"uniqueItems": true,
"items": {
"$ref": "#/$defs/identifier"
}
}
},
"$defs": {
"sha256": {
"type": "string",
"pattern": "^sha256:[a-f0-9]{64}$"
},
"identifier": {
"type": "string",
"minLength": 1,
"maxLength": 160,
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$"
},
"result": {
"type": "object",
"additionalProperties": false,
"required": [
"scenarioId",
"reason"
],
"properties": {
"scenarioId": {
"$ref": "#/$defs/identifier"
},
"reason": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
}
}
}
}
@@ -0,0 +1,30 @@
schemaVersion: 1
profiles:
- profileId: messaging-first-r2-polling-producer.v1
semanticContractId: messaging-outbox-publish.v1
selectedCardIds:
- messaging-outbox-publish.v1
- kafka-spring-acknowledged-idempotent.v1
- postgresql-polling-outbox.v2
- postgresql-per-record-jit-claim.v1
- json-schema-envelope.v1
- external-topic-validated.v1
- kafka-sasl-ssl-scram-sha-512.v1
- kafka-compression-none.v1
- per-key-normal-path-sequence-detectable.v1
- same-postgresql-transaction-resource.v1
- authenticated-internal-web-disposition.v1
dispatchProfile: postgresql-polling-outbox.v2
claimProfile: postgresql-per-record-jit-claim.v1
serializationProfile: json-schema-envelope.v1
producerProfile: kafka-spring-acknowledged-idempotent.v1
securityProfile: kafka-sasl-ssl-scram-sha-512.v1
topicProfile: external-topic-validated.v1
compressionProfile: kafka-compression-none.v1
orderingProfile: per-key-normal-path-sequence-detectable.v1
transactionProfile: same-postgresql-transaction-resource.v1
operatorControlProfile: authenticated-internal-web-disposition.v1
requiredScenarios:
- messaging.interaction.append-encode-claim-ack.v1
- messaging.interaction.indeterminate-hold-disposition.v1
- messaging.interaction.shutdown-drain.v1
@@ -0,0 +1,380 @@
schemaVersion: 1
cards:
- cardId: messaging-outbox-publish.v1
cardVersion: 1
phase: P1
semanticContractIds:
- messaging-outbox-publish.v1
providerId: provider-neutral
providerVersion: 1
maturity: not-implemented
guarantees:
- transactional-append-before-publication
- explicit-terminal-or-operator-disposition
explicitNonGuarantees:
- consumer-deduplication
- global-ordering
outcomeTaxonomyVersion: outbox-publication-outcome.v1
orderingProfile: per-key-normal-path-sequence-detectable.v1
resourceBounds: bounded-first-r2.v1
automaticPublicationAge: finite-required
sameEventRequeueHorizon: finite-required
securityProfile: kafka-sasl-ssl-scram-sha-512.v1
topologyProfile: external-topic-validated.v1
lifecycleProfile: bounded-startup-shutdown.v1
operatorControlProfile: authenticated-internal-web-disposition.v1
schemaSetHash: ""
settingsDigest: ""
evidenceFingerprint: ""
evidenceTasks:
- verifyMessagingContracts
requiredScenarios:
- messaging.contract.transactional-append.v1
- messaging.contract.explicit-disposition.v1
runbookIds:
- runbook.messaging-terminal-delivery-disposition.v1
owner: application-core
- cardId: kafka-spring-acknowledged-idempotent.v1
cardVersion: 1
phase: P3
semanticContractIds:
- messaging-outbox-publish.v1
providerId: spring-kafka
providerVersion: 4
maturity: not-implemented
guarantees:
- broker-acknowledgement-observed
- finite-producer-settings
explicitNonGuarantees:
- duplicate-free-delivery
- global-ordering
outcomeTaxonomyVersion: outbox-publication-outcome.v1
orderingProfile: per-key-normal-path-sequence-detectable.v1
resourceBounds: per-record-jit-bounded.v1
automaticPublicationAge: finite-required
sameEventRequeueHorizon: finite-required
securityProfile: kafka-sasl-ssl-scram-sha-512.v1
topologyProfile: external-topic-validated.v1
lifecycleProfile: bounded-startup-shutdown.v1
operatorControlProfile: authenticated-internal-web-disposition.v1
schemaSetHash: ""
settingsDigest: ""
evidenceFingerprint: ""
evidenceTasks:
- verifyMessagingKafkaProducerR2
requiredScenarios:
- messaging.kafka.ack-metadata.v1
- messaging.kafka.indeterminate-outcome.v1
runbookIds:
- runbook.messaging-producer-unavailable-or-unauthorized.v1
owner: adapter-outbound-messaging
- cardId: postgresql-polling-outbox.v2
cardVersion: 2
phase: P2
semanticContractIds:
- messaging-outbox-publish.v1
providerId: postgresql-polling
providerVersion: 2
maturity: not-implemented
guarantees:
- immutable-event-mutable-delivery-split
- fenced-publication-authority
explicitNonGuarantees:
- zero-duplicate-delivery
- global-ordering
outcomeTaxonomyVersion: outbox-publication-outcome.v1
orderingProfile: per-key-normal-path-sequence-detectable.v1
resourceBounds: per-record-jit-bounded.v1
automaticPublicationAge: finite-required
sameEventRequeueHorizon: finite-required
securityProfile: kafka-sasl-ssl-scram-sha-512.v1
topologyProfile: external-topic-validated.v1
lifecycleProfile: bounded-startup-shutdown.v1
operatorControlProfile: authenticated-internal-web-disposition.v1
schemaSetHash: ""
settingsDigest: ""
evidenceFingerprint: ""
evidenceTasks:
- verifyMessagingPollingOutboxR2
requiredScenarios:
- messaging.polling.delivery-lifecycle.v2
- messaging.polling.authority-fence.v1
runbookIds:
- runbook.messaging-outbox-backlog-and-stale-lease.v1
owner: adapter-outbound-persistence-jpa
- cardId: postgresql-per-record-jit-claim.v1
cardVersion: 1
phase: P2
semanticContractIds:
- messaging-outbox-publish.v1
providerId: postgresql-jit-claim
providerVersion: 1
maturity: not-implemented
guarantees:
- one-record-claim-after-local-admission
- token-and-unexpired-lease-cas
explicitNonGuarantees:
- distributed-strict-fifo
- duplicate-free-delivery
outcomeTaxonomyVersion: outbox-publication-outcome.v1
orderingProfile: per-key-normal-path-sequence-detectable.v1
resourceBounds: admitted-record-upper-bound-one.v1
automaticPublicationAge: finite-required
sameEventRequeueHorizon: finite-required
securityProfile: kafka-sasl-ssl-scram-sha-512.v1
topologyProfile: external-topic-validated.v1
lifecycleProfile: bounded-startup-shutdown.v1
operatorControlProfile: authenticated-internal-web-disposition.v1
schemaSetHash: ""
settingsDigest: ""
evidenceFingerprint: ""
evidenceTasks:
- verifyMessagingPollingOutboxR2
requiredScenarios:
- messaging.polling.jit-claim.v1
- messaging.polling.stale-token-rejected.v1
runbookIds:
- runbook.messaging-outbox-backlog-and-stale-lease.v1
owner: adapter-outbound-persistence-jpa
- cardId: json-schema-envelope.v1
cardVersion: 1
phase: P1
semanticContractIds:
- messaging-outbox-publish.v1
providerId: json-schema-envelope
providerVersion: 1
maturity: not-implemented
guarantees:
- deterministic-utf8-envelope
- closed-offline-schema-catalog
explicitNonGuarantees:
- alternate-wire-format
- dynamic-contract-discovery
outcomeTaxonomyVersion: outbox-publication-outcome.v1
orderingProfile: per-key-normal-path-sequence-detectable.v1
resourceBounds: bounded-envelope-and-payload.v1
automaticPublicationAge: finite-required
sameEventRequeueHorizon: finite-required
securityProfile: kafka-sasl-ssl-scram-sha-512.v1
topologyProfile: external-topic-validated.v1
lifecycleProfile: bounded-startup-shutdown.v1
operatorControlProfile: authenticated-internal-web-disposition.v1
schemaSetHash: ""
settingsDigest: ""
evidenceFingerprint: ""
evidenceTasks:
- verifyMessagingContracts
requiredScenarios:
- messaging.schema.envelope-valid.v1
- messaging.schema.adversarial-bounds.v1
runbookIds:
- runbook.messaging-schema-poison-or-record-too-large.v1
owner: adapter-outbound-messaging
- cardId: external-topic-validated.v1
cardVersion: 1
phase: P4
semanticContractIds:
- messaging-outbox-publish.v1
providerId: external-kafka-topic
providerVersion: 1
maturity: not-implemented
guarantees:
- external-topic-policy-attested
- exact-destination-binding
explicitNonGuarantees:
- automatic-topic-creation
- multi-cluster-failover
outcomeTaxonomyVersion: outbox-publication-outcome.v1
orderingProfile: per-key-normal-path-sequence-detectable.v1
resourceBounds: finite-topic-catalog.v1
automaticPublicationAge: finite-required
sameEventRequeueHorizon: finite-required
securityProfile: kafka-sasl-ssl-scram-sha-512.v1
topologyProfile: external-topic-validated.v1
lifecycleProfile: bounded-startup-shutdown.v1
operatorControlProfile: authenticated-internal-web-disposition.v1
schemaSetHash: ""
settingsDigest: ""
evidenceFingerprint: ""
evidenceTasks:
- verifyMessagingSecurityR2
requiredScenarios:
- messaging.topic.policy-attestation.v1
- messaging.topic.below-min-isr-rejection.v1
runbookIds:
- runbook.messaging-topic-policy-or-partition-change.v1
owner: adapter-outbound-messaging
- cardId: kafka-sasl-ssl-scram-sha-512.v1
cardVersion: 1
phase: P4
semanticContractIds:
- messaging-outbox-publish.v1
providerId: kafka-sasl-ssl-scram-sha-512
providerVersion: 1
maturity: not-implemented
guarantees:
- authenticated-encrypted-broker-transport
- least-privilege-producer-principal
explicitNonGuarantees:
- encryption-at-rest
- credential-zero-downtime-without-drill
outcomeTaxonomyVersion: outbox-publication-outcome.v1
orderingProfile: per-key-normal-path-sequence-detectable.v1
resourceBounds: bounded-secret-refresh.v1
automaticPublicationAge: finite-required
sameEventRequeueHorizon: finite-required
securityProfile: kafka-sasl-ssl-scram-sha-512.v1
topologyProfile: external-topic-validated.v1
lifecycleProfile: bounded-startup-shutdown.v1
operatorControlProfile: authenticated-internal-web-disposition.v1
schemaSetHash: ""
settingsDigest: ""
evidenceFingerprint: ""
evidenceTasks:
- verifyMessagingSecurityR2
requiredScenarios:
- messaging.security.sasl-ssl-scram.v1
- messaging.security.least-privilege-negative-probe.v1
runbookIds:
- runbook.messaging-shutdown-deploy-and-secret-rotation.v1
owner: adapter-outbound-messaging
- cardId: kafka-compression-none.v1
cardVersion: 1
phase: P3
semanticContractIds:
- messaging-outbox-publish.v1
providerId: kafka-compression-none
providerVersion: 1
maturity: not-implemented
guarantees:
- exact-uncompressed-producer-profile
explicitNonGuarantees:
- compression-ratio
- compression-throughput
outcomeTaxonomyVersion: outbox-publication-outcome.v1
orderingProfile: per-key-normal-path-sequence-detectable.v1
resourceBounds: bounded-record-size.v1
automaticPublicationAge: finite-required
sameEventRequeueHorizon: finite-required
securityProfile: kafka-sasl-ssl-scram-sha-512.v1
topologyProfile: external-topic-validated.v1
lifecycleProfile: bounded-startup-shutdown.v1
operatorControlProfile: authenticated-internal-web-disposition.v1
schemaSetHash: ""
settingsDigest: ""
evidenceFingerprint: ""
evidenceTasks:
- verifyMessagingKafkaProducerR2
requiredScenarios:
- messaging.kafka.compression-none-effective.v1
runbookIds:
- runbook.messaging-producer-unavailable-or-unauthorized.v1
owner: adapter-outbound-messaging
- cardId: per-key-normal-path-sequence-detectable.v1
cardVersion: 1
phase: P2
semanticContractIds:
- messaging-outbox-publish.v1
providerId: aggregate-sequence-header
providerVersion: 1
maturity: not-implemented
guarantees:
- per-key-sequence-gap-detectable
explicitNonGuarantees:
- strict-fifo-through-failure
- cross-key-ordering
outcomeTaxonomyVersion: outbox-publication-outcome.v1
orderingProfile: per-key-normal-path-sequence-detectable.v1
resourceBounds: bounded-sequence-metadata.v1
automaticPublicationAge: finite-required
sameEventRequeueHorizon: finite-required
securityProfile: kafka-sasl-ssl-scram-sha-512.v1
topologyProfile: external-topic-validated.v1
lifecycleProfile: bounded-startup-shutdown.v1
operatorControlProfile: authenticated-internal-web-disposition.v1
schemaSetHash: ""
settingsDigest: ""
evidenceFingerprint: ""
evidenceTasks:
- verifyMessagingPollingOutboxR2
requiredScenarios:
- messaging.ordering.per-key-sequence.v1
runbookIds:
- runbook.messaging-delivery-indeterminate-and-duplicate-burst.v1
owner: application-core
- cardId: same-postgresql-transaction-resource.v1
cardVersion: 1
phase: P2
semanticContractIds:
- messaging-outbox-publish.v1
providerId: same-postgresql-transaction-resource
providerVersion: 1
maturity: not-implemented
guarantees:
- business-write-and-outbox-append-atomic
explicitNonGuarantees:
- cross-database-atomicity
- broker-transaction-atomicity
outcomeTaxonomyVersion: outbox-publication-outcome.v1
orderingProfile: per-key-normal-path-sequence-detectable.v1
resourceBounds: one-transaction-resource.v1
automaticPublicationAge: finite-required
sameEventRequeueHorizon: finite-required
securityProfile: kafka-sasl-ssl-scram-sha-512.v1
topologyProfile: external-topic-validated.v1
lifecycleProfile: bounded-startup-shutdown.v1
operatorControlProfile: authenticated-internal-web-disposition.v1
schemaSetHash: ""
settingsDigest: ""
evidenceFingerprint: ""
evidenceTasks:
- verifyMessagingPollingOutboxR2
requiredScenarios:
- messaging.persistence.same-resource-rollback.v1
runbookIds:
- runbook.messaging-outbox-backlog-and-stale-lease.v1
owner: app-bootstrap
- cardId: authenticated-internal-web-disposition.v1
cardVersion: 1
phase: P3
semanticContractIds:
- messaging-outbox-publish.v1
providerId: authenticated-internal-web-disposition
providerVersion: 1
maturity: not-implemented
guarantees:
- authenticated-operator-disposition
- audited-generation-cas
explicitNonGuarantees:
- raw-status-update
- unauthenticated-operator-access
outcomeTaxonomyVersion: outbox-publication-outcome.v1
orderingProfile: per-key-normal-path-sequence-detectable.v1
resourceBounds: bounded-operator-request.v1
automaticPublicationAge: finite-required
sameEventRequeueHorizon: finite-required
securityProfile: kafka-sasl-ssl-scram-sha-512.v1
topologyProfile: external-topic-validated.v1
lifecycleProfile: bounded-startup-shutdown.v1
operatorControlProfile: authenticated-internal-web-disposition.v1
schemaSetHash: ""
settingsDigest: ""
evidenceFingerprint: ""
evidenceTasks:
- verifyMessagingKafkaProducerR2
requiredScenarios:
- messaging.operator.authenticated-disposition.v1
- messaging.operator.stale-generation-rejected.v1
runbookIds:
- runbook.messaging-terminal-delivery-disposition.v1
owner: adapter-inbound-web
@@ -0,0 +1,59 @@
# PLANNED R2 CONTRACT ONLY. No current Gradle task reads this file as release evidence.
# `MessagingQualificationPluginTest` requires verifyMessagingReleaseProfile and the remaining R2
# producers to stay unregistered until they are implemented. Empty expected hashes are therefore
# placeholders, not accepted baselines; promoting this profile requires registering a fail-closed
# verifier and replacing every empty hash with certified evidence.
schemaVersion: 1
releaseProfiles:
- releaseProfileId: messaging-first-r2-polling-producer-release.v1
compatibilityProfileId: messaging-first-r2-polling-producer.v1
selectedCardIds:
- messaging-outbox-publish.v1
- kafka-spring-acknowledged-idempotent.v1
- postgresql-polling-outbox.v2
- postgresql-per-record-jit-claim.v1
- json-schema-envelope.v1
- external-topic-validated.v1
- kafka-sasl-ssl-scram-sha-512.v1
- kafka-compression-none.v1
- per-key-normal-path-sequence-detectable.v1
- same-postgresql-transaction-resource.v1
- authenticated-internal-web-disposition.v1
requiredCardMaturity: release-eligible
expectedProfileHash: ""
expectedCatalogHash: ""
expectedSchemaHash: ""
expectedSettingsHash: ""
requiredEvidenceTasks:
- verifyMessagingContracts
- verifyMessagingPollingOutboxR2
- verifyMessagingKafkaProducerR2
- verifyMessagingSecurityR2
- verifyMessagingReleaseProfile
- verifyMessagingTargetBindingPreflight
- verifyMessagingTargetBinding
- verifyMessagingDeploymentCutover
- verifyMessagingCleanupTargetBinding
- verifyMessagingFinalR2Profile
requiredScenarios:
- messaging.release.contracts-schema.v1
- messaging.release.polling-outbox.v2
- messaging.release.kafka-producer.v1
- messaging.release.security-topology.v1
- messaging.release.shutdown-rotation.v1
runbookIds:
- runbook.messaging-producer-unavailable-or-unauthorized.v1
- runbook.messaging-outbox-backlog-and-stale-lease.v1
- runbook.messaging-delivery-indeterminate-and-duplicate-burst.v1
- runbook.messaging-schema-poison-or-record-too-large.v1
- runbook.messaging-terminal-delivery-disposition.v1
- runbook.messaging-topic-policy-or-partition-change.v1
- runbook.messaging-shutdown-deploy-and-secret-rotation.v1
- runbook.messaging-legacy-to-v2-relay-authority-cutover.v1
evidencePolicy:
rejectMissing: true
rejectSkipped: true
rejectStale: true
rejectWrongSource: true
rejectMismatchedProfile: true
maximumAgeSeconds: 86400
@@ -23,8 +23,9 @@ import tools.jackson.core.type.TypeReference;
import tools.jackson.databind.json.JsonMapper;
/**
* The messaging capability cards under {@code config/messaging} (readiness cards, compatibility and
* release profiles, the common evidence manifest schema) stay closed and fail-safe.
* The messaging capability cards under {@code adapter/outbound/messaging/release} (readiness cards,
* compatibility and release profiles, the common evidence manifest schema) stay closed and
* fail-safe.
*
* <p>Owner decision 29: the card check lives in this leaf's tests, and snakeyaml is on this leaf's
* test classpath only — main stays YAML-free (build.gradle). The files it reads are declared as
@@ -350,7 +351,8 @@ class MessagingCapabilityRegistryContractTest {
}
private static Path requiredConfig(String relativePath) {
Path path = repositorySrcRoot().resolve("config/messaging").resolve(relativePath);
Path path =
repositorySrcRoot().resolve("adapter/outbound/messaging/release").resolve(relativePath);
assertThat(path).as("required Messaging configuration %s", path).isRegularFile();
return path;
}
@@ -11,13 +11,13 @@ import java.util.List;
import org.junit.jupiter.api.Test;
/**
* The common build-evidence manifest schema (config/messaging/evidence) is valid Draft 2020-12 and
* accepts the manifest shape the R2 evidence producers are specified to write.
* The common build-evidence manifest schema (release/evidence) is valid Draft 2020-12 and accepts
* the manifest shape the R2 evidence producers are specified to write.
*/
class MessagingEvidenceSchemaValidatorTest {
private static final Path COMMON_SCHEMA =
Path.of("../../../config/messaging/evidence/build-evidence-manifest-v1.schema.json");
Path.of("release/evidence/build-evidence-manifest-v1.schema.json");
private static final String SHA256 = "sha256:" + "0".repeat(64);
private static final String VALID_MANIFEST =
"""
@@ -60,7 +60,7 @@ in `platform`), so the two capability leaves read the same way.
`jpaPlatformContractTest` lane on `FileserverPostgreSqlStack`, whose clock a case moves.
- The real-PostgreSQL tests are still in `persistence-jpa`'s `postgresqlIntegrationTest` source
set, which owns the container and Flyway wiring, and the JPA readiness card
(`config/jpa/readiness-cards.yaml`, checked by `JpaReadinessRegistryTest`) names them as that
(`persistence-jpa/release/readiness-cards.yaml`, checked by `JpaReadinessRegistryTest`) names them as that
leaf's tasks — moving them means moving the card's tasks and selectors with them:
`postgresqlFileserverMigrationIntegrationTest`, `postgresqlFileserverMetadataIntegrationTest`,
`postgresqlFileserverReclamationIntegrationTest`
@@ -46,6 +46,6 @@ apiSurface {
adopterBaseline = rootProject.file('../docs/architecture/persistence-fileserver-adopter-api-surface.txt')
adopterSources = fileTree(rootProject.projectDir) {
include '*/**/src/main/java/**/*.java'
exclude '**/build/**', 'adapter/outbound/persistence-fileserver/**', 'build-logic/**', 'optional-platforms/**'
exclude '**/build/**', 'adapter/outbound/persistence-fileserver/**', 'build-logic/**', 'platforms/optional-build/**'
}
}
@@ -389,7 +389,7 @@ cadence 측정 필요). retention 한 값은 reaper-local 이라 `@Value` 로
## JPA production capability candidate
`src/config/jpa/readiness-cards.yaml`이 capability와 독립 schema stream의
`src/adapter/outbound/persistence-jpa/release/readiness-cards.yaml`이 capability와 독립 schema stream의
machine-readable SSOT다(개수는 registry가 소유한다). `selected` base card와 `implemented-candidate` reliability card를
구분하며, 실제 PostgreSQL 테스트 통과만으로 immutable 운영 evidence가 필요한 R2를 주장하지
않는다.
@@ -117,7 +117,7 @@ dependencies {
postgresqlIntegrationTestImplementation testFixtures(project(':application-fileserver'))
// The notification capability's persistence moved out the same way, and its real-PostgreSQL
// qualifications stay here for the same reason: this lane owns the container, the Flyway wiring
// and the readiness cards that name those tests (config/jpa/readiness-cards.yaml). Test scope
// and the readiness cards that name those tests (release/readiness-cards.yaml). Test scope
// only.
postgresqlIntegrationTestImplementation project(':adapter:outbound:persistence-notification')
postgresqlIntegrationTestImplementation project(':application-notification')
@@ -171,7 +171,7 @@ dependencies {
// Real-PostgreSQL lanes. A readiness lane runs one named class (the security lane also names the
// runtime-role namespace-denial method), a platform lane selects a tag, and the pool lane has a
// source set of its own. release.yml (jpa-release-gate) and config/jpa/*.{json,yaml} name these tasks.
// source set of its own. release.yml (jpa-release-gate) and release/*.{json,yaml} name these tasks.
def jpaEvidenceImage = providers.gradleProperty('jpaPostgreSqlEvidenceImage').orElse(testContainerImages['postgres-16']).get()
def jpaMatrixVersions = providers.gradleProperty('jpa.matrix.versions').orElse('16').get()
def readinessLanes = [
@@ -205,12 +205,12 @@ def platformLanes = [
jpaPlatformQueryPlanTest: ['jpa-queryplan', 'Asserts query plan structure and planner estimate error (design §33).'],
jpaPlatformSecurityTest : ['jpa-security', 'Verifies runtime role privileges and search_path safety (design §36).'],
]
// Every scenario a readiness card cites (config/jpa/readiness-cards.yaml `evidence.scenarios`) is a
// Every scenario a readiness card cites (release/readiness-cards.yaml `evidence.scenarios`) is a
// required test of the lane that runs its class, and a readiness lane rejects skips. That is what the
// deleted JPA evidence manifest used to establish from JUnit XML after the fact; JpaReadinessRegistryTest
// checks the cards themselves.
def readinessScenarios = new groovy.json.JsonSlurper()
.parse(rootProject.file('config/jpa/readiness-cards.yaml'))
.parse(file('release/readiness-cards.yaml'))
.cards.values()
.findAll { it.state != 'not-implemented' }
.collectMany { card -> (card.evidence?.scenarios ?: []).collect { it.selector } }
@@ -287,7 +287,7 @@ tasks.named('postgresqlSecurityBaselineIntegrationTest') {
dependsOn ':adapter:inbound:web:jpaPersistenceRedactionContractTest'
}
// Which JPA lanes block a release is declared by config/jpa/release-registry.json (jpaReleaseQualification below).
// Which JPA lanes block a release is declared by release/release-registry.json (jpaReleaseQualification below).
// This leaf declares the lanes and how each runs; it does not own release orchestration.
// The unit lane reads three files that are not Java sources: the release registry and its two
@@ -298,9 +298,9 @@ tasks.named('postgresqlSecurityBaselineIntegrationTest') {
// up-to-date after a registry demotion or a workflow edit — so the drift checks that exist to catch
// exactly those edits never run on them.
tasks.named('test') {
inputs.file(rootProject.file('config/jpa/release-registry.json'))
inputs.file(file('release/release-registry.json'))
// JpaReadinessRegistryTest: the readiness cards, the lanes they name and the scenarios they cite.
inputs.file(rootProject.file('config/jpa/readiness-cards.yaml'))
inputs.file(file('release/readiness-cards.yaml'))
inputs.dir(file('src/postgresqlIntegrationTest/java')).withPropertyName('readinessScenarioSources')
inputs.file(new File(rootProject.projectDir.parentFile, 'docs/jpa/support-matrix.md'))
inputs.file(new File(rootProject.projectDir.parentFile, 'docs/jpa/repository-adaptation.md'))
@@ -316,7 +316,7 @@ tasks.named('test') {
inputs.dir(file('../persistence-fileserver/src/main/resources/db/migration'))
.withPropertyName('fileserverMigrations')
// ...and the messaging platform's tree, whose inbox range the consume side applies here.
inputs.dir(file('../../../messaging/messaging-reliability-jdbc-postgresql/src/main/resources/db/migration'))
inputs.dir(file('../../../platforms/messaging/messaging-reliability-jdbc-postgresql/src/main/resources/db/migration'))
.withPropertyName('messagingMigrations')
}
@@ -351,20 +351,20 @@ apiSurface {
include '*/**/src/main/java/**/*.java'
exclude '**/build/**', 'adapter/outbound/persistence-jpa/**', 'adapter/outbound/persistence-fileserver/**',
'adapter/outbound/persistence-notification/**',
'build-logic/**', 'optional-platforms/**'
'build-logic/**', 'platforms/optional-build/**'
}
}
// The release registry (config/jpa/release-registry.json) names the blocking release gates; this
// The release registry (release/release-registry.json) names the blocking release gates; this
// aggregate runs exactly those. It replaced the build-tools `ca.jpa-qualification` plugin (review
// 2026-09-24 BUILD-O3-2): a gate that names a task that does not exist fails when the task graph is
// built, which is the whole of what `verifyJpaReleaseGateTasks` used to check.
tasks.register('jpaReleaseQualification') {
group = 'verification'
description = 'Runs exactly the blocking JPA release gates declared by config/jpa/release-registry.json.'
description = 'Runs exactly the blocking JPA release gates declared by release/release-registry.json.'
dependsOn(new groovy.json.JsonSlurper()
.parse(rootProject.file('config/jpa/release-registry.json'))
.parse(file('release/release-registry.json'))
.gates.findAll { it.blocking }.collect { it.task })
}
@@ -0,0 +1,490 @@
{
"schema-version": 1,
"legacy-adoption": {
"state": "transition-only",
"location": "db/migration/postgresql",
"history-table": "flyway_schema_history",
"immutable-applied-versions": [1, 3, 4, 5],
"allowed-origin": "LEGACY_ADOPTED"
},
"cards": {
"jpa-observability-lifecycle": {
"state": "selected",
"schema-stream": "none",
"prerequisites": [],
"readiness-task": ":adapter:outbound:persistence-jpa:postgresqlLifecycleIntegrationTest",
"required-evidence": ["real-postgresql", "lifecycle", "observability", "no-skip"],
"evidence": {
"scenarios": [
{
"selector": "dev.caskeleton.adapter.outbound.persistence.readiness.PostgreSqlLifecycleIntegrationTest#startsPostgreSql16WithUtcAndProvidesAValidConnection",
"covers": ["real-postgresql", "lifecycle"]
},
{
"selector": "dev.caskeleton.adapter.outbound.persistence.readiness.PostgreSqlLifecycleIntegrationTest#poolCapacityExhaustionAndShutdownAreBoundedAndObservable",
"covers": ["observability"]
}
],
"task-claims": []
}
},
"jpa-security-baseline": {
"state": "selected",
"schema-stream": "none",
"prerequisites": ["jpa-observability-lifecycle"],
"readiness-task": ":adapter:outbound:persistence-jpa:postgresqlSecurityBaselineIntegrationTest",
"support-tasks": [
":adapter:inbound:web:jpaPersistenceRedactionContractTest"
],
"required-evidence": [
"real-postgresql",
"tls",
"roles",
"namespace",
"redaction",
"no-skip"
],
"evidence": {
"scenarios": [
{
"selector": "dev.caskeleton.adapter.outbound.persistence.readiness.PostgreSqlSecurityBaselineIntegrationTest#runtimeRoleCannotCreateInApplicationSchemaOrTempAndUsesTrustedSearchPath",
"covers": ["real-postgresql", "roles", "namespace"]
},
{
"selector": "dev.caskeleton.adapter.outbound.persistence.readiness.PostgreSqlSecurityBaselineIntegrationTest#verifyFullAcceptsTrustedHostAndRejectsHostnameMismatchAndUntrustedCertificate",
"covers": ["tls"]
},
{
"selector": "dev.caskeleton.adapter.outbound.persistence.readiness.PostgreSqlSecurityBaselineIntegrationTest#verifyFullRejectsAnExpiredServerCertificate",
"covers": ["tls"]
}
],
"task-claims": [
{
"task": ":adapter:inbound:web:jpaPersistenceRedactionContractTest",
"covers": ["redaction"]
}
]
}
},
"jpa-flyway-migration": {
"state": "selected",
"schema-stream": "owned",
"prerequisites": ["jpa-observability-lifecycle", "jpa-security-baseline"],
"readiness-task": ":adapter:outbound:persistence-jpa:postgresqlMigrationIntegrationTest",
"required-evidence": [
"real-postgresql",
"migration",
"rolling-compatibility",
"no-skip"
],
"evidence": {
"scenarios": [
{
"selector": "dev.caskeleton.adapter.outbound.persistence.readiness.PostgreSqlMigrationIntegrationTest#adoptsImmutableLegacyHistoryThenRunsTheIndependentCoreStream",
"covers": [
"real-postgresql",
"migration",
"migration-lifecycle:legacy-adoption"
]
},
{
"selector": "dev.caskeleton.adapter.outbound.persistence.readiness.PostgreSqlMigrationIntegrationTest#freshCoreStreamInitializesWithoutLegacyHistory",
"covers": ["migration-lifecycle:fresh"]
},
{
"selector": "dev.caskeleton.adapter.outbound.persistence.readiness.PostgreSqlMigrationIntegrationTest#interruptedTransactionalMigrationRollsBackThenForwardRecovers",
"covers": ["migration-lifecycle:interrupted-recovery"]
},
{
"selector": "dev.caskeleton.adapter.outbound.persistence.readiness.PostgreSqlMigrationIntegrationTest#additiveRollingWindowSupportsOldAndNewArtifactsWithFiniteLockTimeout",
"covers": ["rolling-compatibility"]
}
],
"task-claims": []
},
"migration": {
"location": "db/migration/jpa/core",
"history-table": "flyway_jpa_core_history",
"required-core-epoch": 0,
"feature-revision": 1,
"lifecycle-evidence": ["fresh", "legacy-adoption", "interrupted-recovery"]
}
},
"jpa-transaction-runtime": {
"state": "selected",
"schema-stream": "none",
"prerequisites": ["jpa-observability-lifecycle", "jpa-security-baseline"],
"readiness-task": ":adapter:outbound:persistence-jpa:postgresqlTransactionIntegrationTest",
"required-evidence": ["real-postgresql", "concurrency", "fault", "no-skip"],
"evidence": {
"scenarios": [
{
"selector": "dev.caskeleton.adapter.outbound.persistence.readiness.PostgreSqlTransactionIntegrationTest#inWriteActionFailureRollsBackTheWrite",
"covers": ["fault"]
},
{
"selector": "dev.caskeleton.adapter.outbound.persistence.readiness.PostgreSqlTransactionIntegrationTest#inNewCommitsIndependentlyOfTheCallersRollback",
"covers": ["real-postgresql"]
},
{
"selector": "dev.caskeleton.adapter.outbound.persistence.readiness.PostgreSqlTransactionIntegrationTest#deterministicDeadlockProducesExactlyOneTypedDeadlockFailure",
"covers": ["concurrency", "fault"]
},
{
"selector": "dev.caskeleton.adapter.outbound.persistence.readiness.PostgreSqlTransactionIntegrationTest#connectionLossDuringCommitSurfacesAsCompletionUnknownAndIsNeverRetried",
"covers": ["fault"]
}
],
"task-claims": []
}
},
"jpa-aggregate-store": {
"state": "selected",
"schema-stream": "contributes-to-core",
"prerequisites": ["jpa-transaction-runtime", "jpa-flyway-migration"],
"readiness-task": ":adapter:outbound:persistence-jpa:postgresqlAggregateIntegrationTest",
"required-evidence": [
"real-postgresql",
"mapping",
"optimistic-conflict",
"no-skip"
],
"evidence": {
"scenarios": [
{
"selector": "dev.caskeleton.adapter.outbound.persistence.readiness.PostgreSqlAggregateIntegrationTest#roundTripsUuidAndInstantAndDetectsExpectedVersionConflict",
"covers": ["real-postgresql", "mapping", "optimistic-conflict"]
}
],
"task-claims": []
}
},
"jpa-query-model": {
"state": "selected",
"schema-stream": "contributes-to-core",
"prerequisites": ["jpa-transaction-runtime", "jpa-flyway-migration"],
"readiness-task": ":adapter:outbound:persistence-jpa:postgresqlQueryIntegrationTest",
"required-evidence": [
"real-postgresql",
"query-contract",
"query-plan",
"no-skip"
],
"evidence": {
"scenarios": [
{
"selector": "dev.caskeleton.adapter.outbound.persistence.readiness.PostgreSqlQueryIntegrationTest#boundedKeysetQueryUsesTheRepresentativeIndex",
"covers": ["real-postgresql", "query-contract", "query-plan"]
}
],
"task-claims": []
}
},
"jpa-primary-foundation": {
"state": "selected",
"schema-stream": "none",
"prerequisites": [
"jpa-observability-lifecycle",
"jpa-security-baseline",
"jpa-flyway-migration",
"jpa-transaction-runtime",
"jpa-aggregate-store",
"jpa-query-model"
],
"readiness-task": ":adapter:outbound:persistence-jpa:integrationTestLaneCheck",
"support-tasks": [
":adapter:outbound:persistence-jpa:test",
":app-bootstrap:test",
":verifyCleanArchitectureDependencies",
":app-bootstrap:verifyEnvKeys",
":verifyPublicPathSnapshot"
],
"required-evidence": [
"architecture",
"configuration",
"base-card-lanes",
"no-skip"
],
"evidence": {
"scenarios": [],
"task-claims": [
{
"task": ":adapter:outbound:persistence-jpa:integrationTestLaneCheck",
"covers": ["base-card-lanes"]
},
{
"task": ":verifyCleanArchitectureDependencies",
"covers": ["architecture"]
},
{
"task": ":app-bootstrap:verifyEnvKeys",
"covers": ["configuration"]
}
]
}
},
"jpa-idempotency-owner-safe-v2": {
"state": "implemented-candidate",
"schema-stream": "owned",
"prerequisites": [
"jpa-transaction-runtime",
"jpa-flyway-migration",
"jpa-observability-lifecycle"
],
"readiness-task": ":adapter:outbound:persistence-jpa:postgresqlIdempotencyIntegrationTest",
"required-evidence": [
"real-postgresql",
"concurrency",
"fault",
"migration",
"stream-lifecycle",
"no-skip"
],
"evidence": {
"scenarios": [
{
"selector": "dev.caskeleton.adapter.outbound.persistence.readiness.PostgreSqlIdempotencyIntegrationTest#sameStoreTransactionCommitsBusinessMutationAndCompletionTogetherThenReplays",
"covers": ["real-postgresql", "fault", "migration"]
},
{
"selector": "dev.caskeleton.adapter.outbound.persistence.readiness.PostgreSqlIdempotencyIntegrationTest#expiredClaimCanBeTakenOverButTheStaleOwnerCannotStart",
"covers": ["concurrency"]
},
{
"selector": "dev.caskeleton.adapter.outbound.persistence.readiness.PostgreSqlIdempotencyIntegrationTest#expiredExecutingRecordRequiresReconciliationAndIsNeverBlindlyTakenOver",
"covers": ["fault"]
},
{
"selector": "dev.caskeleton.adapter.outbound.persistence.readiness.PostgreSqlIdempotencyIntegrationTest#competingTransactionCannotPassTheOwnerRowUntilTheFirstBusinessCommit",
"covers": ["concurrency"]
},
{
"selector": "dev.caskeleton.adapter.outbound.persistence.readiness.PostgreSqlIdempotencyIntegrationTest#optionalStreamLifecycleIsNonDestructiveAndRecoversInterruptedMigration",
"covers": [
"stream-lifecycle",
"migration-lifecycle:fresh-disabled",
"migration-lifecycle:first-enable",
"migration-lifecycle:disable",
"migration-lifecycle:re-enable",
"migration-lifecycle:interrupted-recovery"
]
}
],
"task-claims": []
},
"migration": {
"location": "db/migration/jpa/idempotency",
"history-table": "flyway_jpa_idempotency_history",
"required-core-epoch": 1,
"feature-revision": 2,
"lifecycle-evidence": [
"fresh-disabled",
"first-enable",
"disable",
"re-enable",
"interrupted-recovery"
]
}
},
"jpa-fileserver-metadata-v1": {
"state": "implemented-candidate",
"schema-stream": "owned",
"prerequisites": [
"jpa-transaction-runtime",
"jpa-flyway-migration",
"jpa-observability-lifecycle"
],
"readiness-task": ":adapter:outbound:persistence-jpa:postgresqlFileserverMetadataIntegrationTest",
"support-tasks": [
":adapter:outbound:persistence-jpa:postgresqlFileserverMigrationIntegrationTest",
":adapter:outbound:persistence-jpa:postgresqlFileserverReclamationIntegrationTest"
],
"required-evidence": [
"real-postgresql",
"optimistic-conflict",
"concurrency",
"migration",
"stream-lifecycle",
"no-skip"
],
"evidence": {
"scenarios": [
{
"selector": "dev.caskeleton.adapter.outbound.persistence.readiness.PostgreSqlFileserverMetadataStoreIntegrationTest#onlyOneReadyTransitionWinsForTheSameVersion",
"covers": ["real-postgresql", "optimistic-conflict", "concurrency", "migration"]
},
{
"selector": "dev.caskeleton.adapter.outbound.persistence.readiness.PostgreSqlFileserverMetadataStoreIntegrationTest#anIllegalTransitionNeverReachesTheDatabase",
"covers": ["optimistic-conflict"]
},
{
"selector": "dev.caskeleton.adapter.outbound.persistence.readiness.PostgreSqlFileserverMetadataStoreIntegrationTest#onlyOneWriterLeaseIsValid",
"covers": ["concurrency"]
},
{
"selector": "dev.caskeleton.adapter.outbound.persistence.readiness.PostgreSqlFileserverMetadataStoreIntegrationTest#anExpiredLeaseMayBeTakenOverAndTheStaleWriterCannotCommit",
"covers": ["concurrency"]
},
{
"selector": "dev.caskeleton.adapter.outbound.persistence.readiness.PostgreSqlFileserverMetadataStoreIntegrationTest#optionalStreamLifecycleIsNonDestructiveAndRecoversInterruptedMigration",
"covers": [
"stream-lifecycle",
"migration-lifecycle:fresh-disabled",
"migration-lifecycle:first-enable",
"migration-lifecycle:disable",
"migration-lifecycle:re-enable",
"migration-lifecycle:interrupted-recovery"
]
}
],
"task-claims": []
},
"migration": {
"location": "db/migration/jpa/fileserver",
"history-table": "flyway_jpa_fileserver_history",
"required-core-epoch": 1,
"feature-revision": 2,
"lifecycle-evidence": [
"fresh-disabled",
"first-enable",
"disable",
"re-enable",
"interrupted-recovery"
]
}
},
"jpa-notification-platform-v4": {
"state": "implemented-candidate",
"schema-stream": "owned",
"prerequisites": [
"jpa-transaction-runtime",
"jpa-flyway-migration",
"jpa-observability-lifecycle"
],
"readiness-task": ":adapter:outbound:persistence-jpa:postgresqlNotificationSchemaActivationIntegrationTest",
"support-tasks": [],
"required-evidence": [
"real-postgresql",
"migration",
"stream-lifecycle",
"no-skip"
],
"evidence": {
"scenarios": [
{
"selector": "dev.caskeleton.adapter.outbound.persistence.readiness.PostgreSqlNotificationSchemaActivationIntegrationTest#anUnappliedStreamFailsStartup",
"covers": ["real-postgresql", "migration"]
},
{
"selector": "dev.caskeleton.adapter.outbound.persistence.readiness.PostgreSqlNotificationSchemaActivationIntegrationTest#anAppliedButUnpromotedStreamStillFails",
"covers": ["real-postgresql", "migration"]
},
{
"selector": "dev.caskeleton.adapter.outbound.persistence.readiness.PostgreSqlNotificationSchemaActivationIntegrationTest#anAppliedAndPromotedStreamStarts",
"covers": ["real-postgresql", "migration"]
},
{
"selector": "dev.caskeleton.adapter.outbound.persistence.readiness.PostgreSqlNotificationSchemaActivationIntegrationTest#aMissingRegistryReadsAsNotPromoted",
"covers": ["real-postgresql", "migration"]
},
{
"selector": "dev.caskeleton.adapter.outbound.persistence.readiness.PostgreSqlNotificationSchemaActivationIntegrationTest#theStreamLifecycleIsNonDestructiveAndRecoversInterruptedMigration",
"covers": [
"stream-lifecycle",
"migration-lifecycle:fresh-disabled",
"migration-lifecycle:first-enable",
"migration-lifecycle:disable",
"migration-lifecycle:re-enable",
"migration-lifecycle:interrupted-recovery"
]
}
],
"task-claims": []
},
"migration": {
"location": "db/migration/jpa/notification-platform",
"history-table": "flyway_jpa_notification_history",
"required-core-epoch": 1,
"feature-revision": 4,
"lifecycle-evidence": [
"fresh-disabled",
"first-enable",
"disable",
"re-enable",
"interrupted-recovery"
]
}
},
"jpa-primary-replica": {
"state": "not-implemented",
"schema-stream": "none",
"prerequisites": [
"jpa-transaction-runtime",
"jpa-query-model",
"jpa-flyway-migration",
"jpa-observability-lifecycle"
],
"readiness-task": ":adapter:outbound:persistence-jpa:postgresqlReplicaIntegrationTest",
"required-evidence": ["real-postgresql", "replica", "lag", "failover", "no-skip"]
},
"jpa-tenant-discriminator-rls": {
"state": "not-implemented",
"schema-stream": "owned",
"prerequisites": ["jpa-primary-foundation"],
"readiness-task": ":adapter:outbound:persistence-jpa:postgresqlTenantRlsIntegrationTest",
"required-evidence": [
"real-postgresql",
"tenant-isolation",
"rls",
"migration",
"stream-lifecycle",
"no-skip"
],
"migration": {
"location": "db/migration/jpa/tenant",
"history-table": "flyway_jpa_tenant_history",
"required-core-epoch": 1,
"feature-revision": 1,
"lifecycle-evidence": [
"fresh-disabled",
"first-enable",
"disable",
"re-enable",
"interrupted-recovery"
]
}
},
"jpa-jdbc-efficiency-coordination": {
"state": "not-implemented",
"schema-stream": "owned",
"prerequisites": [
"jpa-transaction-runtime",
"jpa-flyway-migration",
"jpa-observability-lifecycle"
],
"readiness-task": ":adapter:outbound:persistence-jpa:postgresqlJdbcCoordinationIntegrationTest",
"required-evidence": [
"real-postgresql",
"contention",
"owner-safety",
"migration",
"stream-lifecycle",
"no-skip"
],
"migration": {
"location": "db/migration/jpa/coordination",
"history-table": "flyway_jpa_coordination_history",
"required-core-epoch": 1,
"feature-revision": 2,
"lifecycle-evidence": [
"fresh-disabled",
"first-enable",
"disable",
"re-enable",
"interrupted-recovery"
]
}
}
}
}
@@ -0,0 +1,61 @@
{
"schema-version": 1,
"_comment": [
"The typed SSOT for what this release supports and what gates it.",
"It used to be prose. JpaReleaseManifest collected every `PostgreSQL NN` the support matrix",
"mentioned and every `` `name` | gate `` it contained, with no idea which table a match came",
"from or what support level the row declared. So an Experimental PG19 landed in the same list as",
"the Stable majors, a version mentioned once in a sentence counted as supported, and demoting",
"PG17 to Experimental changed nothing as long as the string survived somewhere in the document.",
"The gate list existed twice more — a static List in JpaReleaseGate and a hard-coded matrix in",
"the workflow — with nothing tying any of them to a Gradle task that exists."
],
"databases": [
{ "major": 16, "support-level": "stable", "image": "postgres:16-alpine" },
{ "major": 17, "support-level": "stable", "image": "postgres:17-alpine" },
{ "major": 18, "support-level": "stable", "image": "postgres:18-alpine" },
{ "major": 19, "support-level": "experimental", "image": "postgres:19-alpine" }
],
"provider": {
"_comment": [
"The version the Boot BOM actually resolves, not the one the design targets. The support",
"matrix called 7.4 the Stable baseline while every gate ran on 7.1.8 — so evidence labelled",
"`hibernate-7.4-*` was produced by a provider nobody had tested the gate against."
],
"name": "hibernate-orm",
"stable-tested-baseline": "7.1.8.Final",
"compatibility-target": "7.4"
},
"gates": [
{
"name": "postgresql-contract",
"task": ":adapter:outbound:persistence-jpa:jpaPlatformContractTest",
"blocking": true
},
{
"name": "completion-unknown-no-retry",
"task": ":adapter:outbound:persistence-jpa:jpaPlatformFailureTest",
"blocking": true
},
{
"name": "osiv-disabled",
"task": ":app-bootstrap:test",
"blocking": true
},
{
"name": "flyway-validate",
"task": ":adapter:outbound:persistence-jpa:jpaPlatformMigrationTest",
"blocking": true
},
{
"name": "runtime-role-no-ddl",
"task": ":adapter:outbound:persistence-jpa:jpaPlatformSecurityTest",
"blocking": true
},
{
"name": "collection-fetch-pagination",
"task": ":adapter:outbound:persistence-jpa:jpaPlatformQueryPlanTest",
"blocking": true
}
]
}
@@ -40,7 +40,7 @@ final class MigrationTrees {
Path.of("../persistence-notification/src/main/resources/db/migration"),
Path.of("../persistence-fileserver/src/main/resources/db/migration"),
Path.of(
"../../../messaging/messaging-reliability-jdbc-postgresql/src/main/resources/db/migration"));
"../../../platforms/messaging/messaging-reliability-jdbc-postgresql/src/main/resources/db/migration"));
private MigrationTrees() {}
@@ -20,7 +20,8 @@ import tools.jackson.databind.JsonNode;
import tools.jackson.databind.json.JsonMapper;
/**
* The JPA readiness cards ({@code src/config/jpa/readiness-cards.yaml}) against the lanes and tests
* The JPA readiness cards ({@code
* src/adapter/outbound/persistence-jpa/release/readiness-cards.yaml}) against the lanes and tests
* they name.
*
* <p>This replaced the build-tools {@code ca.jpa-qualification}/{@code ca.jpa-evidence} plugins
@@ -33,8 +34,8 @@ import tools.jackson.databind.json.JsonMapper;
class JpaReadinessRegistryTest {
private static final Path SOURCE_ROOT = Path.of("../../..").toAbsolutePath().normalize();
private static final Path REGISTRY = SOURCE_ROOT.resolve("config/jpa/readiness-cards.yaml");
private static final Path LEAF = SOURCE_ROOT.resolve("adapter/outbound/persistence-jpa");
private static final Path REGISTRY = LEAF.resolve("release/readiness-cards.yaml");
private static final String LEAF_PATH = ":adapter:outbound:persistence-jpa:";
private static final Set<String> STATES =
Set.of("selected", "implemented-candidate", "not-implemented");
@@ -43,7 +43,8 @@ public record JpaReleaseManifest(
String providerBaseline) {
/** Where the registry lives, relative to the repository's {@code src} directory. */
public static final String REGISTRY_PATH = "config/jpa/release-registry.json";
public static final String REGISTRY_PATH =
"adapter/outbound/persistence-jpa/release/release-registry.json";
/**
* The registry, located by walking up from the working directory.
@@ -109,7 +109,7 @@ The architecture rule catalogue (`…mongo.architecture`) is in the **testkit**
production: it is ArchUnit input, and shipping it put rule text on every consumer's runtime
classpath. Release gating is testkit-only for the same reason and is one implementation, not two:
`…mongo.testkit.release` reads the JUnit XML a lane wrote and is what
`scripts/verify-mongodb-platform.sh` and `src/config/mongodb/release-contracts.json` drive. A second
`scripts/verify-mongodb-platform.sh` and `src/adapter/outbound/persistence-mongo/release/release-contracts.json` drive. A second
pair on the production classpath — a hand-built set of category names and a gate that checked it —
had no caller outside its own test and no source of truth behind the categories; it is gone rather
than moved.
@@ -257,7 +257,7 @@ tasks.named('check') {
strictTestLanes {
lane('mongoDocumentContractTest') {
tag = 'document-contract'
description = 'Holds the Mongo lane tags to config/mongodb/release-contracts.json.'
description = 'Holds the Mongo lane tags to release/release-contracts.json.'
rejectSkipped = true
mainStage()
}
@@ -0,0 +1,53 @@
{
"contracts": [
{
"id": "MONGO-REL-001",
"description": "Hermetic stable contract suite",
"task": "mongoStableContractTest",
"className": "dev.caskeleton.adapter.outbound.mongo.architecture.MongoModuleBoundaryTest",
"topology": "none",
"minimumExecuted": 1
},
{
"id": "MONGO-REL-002",
"description": "Advanced opt-in guard rules",
"task": "mongoStableContractTest",
"className": "dev.caskeleton.adapter.outbound.mongo.architecture.MongoAdvancedRulesTest",
"topology": "none",
"minimumExecuted": 5
},
{
"id": "MONGO-REL-003",
"description": "Transaction retry scope invariants",
"task": "mongoStableContractTest",
"className": "dev.caskeleton.adapter.outbound.mongo.transaction.retry.MongoTransactionRetryCoordinatorTest",
"topology": "none",
"minimumExecuted": 3
}
],
"experimental_contracts": [
{
"id": "MONGO-REL-010",
"description": "Sharded routing against a real sharded cluster",
"task": "mongoShardedTest",
"className": "dev.caskeleton.adapter.outbound.mongo.advanced.sharding.MongoShardedTopologyContractTest",
"topology": "sharded",
"minimumExecuted": 1,
"promotion": "experimental",
"blocking": false,
"not_promoted_reason": "The lane this names is not registered in adapter/outbound/persistence-mongo/build.gradle, and the environment it needs \u2014 a sharded cluster, an Atlas deployment, a real KMS \u2014 is not one this repository can stand up. A manifest entry pointing at an unregistered task does not fail; it is simply never run, and the release reports green for a capability nobody qualified. Demoted rather than implemented so the green means what it says."
},
{
"id": "MONGO-REL-012",
"description": "Queryable Encryption against a real KMS and key vault",
"task": "mongoKmsTest",
"className": "dev.caskeleton.adapter.outbound.mongo.advanced.encryption.MongoKmsContractTest",
"topology": "kms",
"minimumExecuted": 1,
"promotion": "experimental",
"blocking": false,
"not_promoted_reason": "The lane this names is not registered in adapter/outbound/persistence-mongo/build.gradle, and the environment it needs \u2014 a sharded cluster, an Atlas deployment, a real KMS \u2014 is not one this repository can stand up. A manifest entry pointing at an unregistered task does not fail; it is simply never run, and the release reports green for a capability nobody qualified. Demoted rather than implemented so the green means what it says."
}
],
"note": "contracts[] is the blocking set: every task named there must exist and run. experimental_contracts[] is explicitly not promoted and is never aggregated into a release manifest. Moving an entry up requires the lane, its required class, and protected-environment evidence to exist first."
}
@@ -30,8 +30,7 @@ import tools.jackson.databind.json.JsonMapper;
class MongoTestLaneContractTest {
private static final Path INTEGRATION_SOURCES = Path.of("src/mongoIntegrationTest/java");
private static final Path RELEASE_CONTRACTS =
Path.of("../../../config/mongodb/release-contracts.json");
private static final Path RELEASE_CONTRACTS = Path.of("release/release-contracts.json");
private static final Set<String> DOCKER_LANE_TAGS =
Set.of(
"mongodb-replicaset",