> response =
handler.handleUnknown(
new RuntimeException("boom"),
@@ -341,7 +341,7 @@ class GlobalExceptionHandlerTest {
assertThat(response.getStatusCode()).isEqualTo(HttpStatus.INTERNAL_SERVER_ERROR);
assertThat(response.getBody()).isNotNull();
- assertThat(response.getBody().error().retryable()).isTrue();
+ assertThat(response.getBody().error().retryable()).isFalse();
assertThat(response.getBody().error().message()).isEqualTo(ClientErrorMessages.OPAQUE);
}
diff --git a/src/adapter/inbound/web/src/test/java/dev/caskeleton/adapter/inbound/web/observability/RetryAfterAdvisorTest.java b/src/adapter/inbound/web/src/test/java/dev/caskeleton/adapter/inbound/web/observability/RetryAfterAdvisorTest.java
index 9d8bfb0c..2d6ce109 100644
--- a/src/adapter/inbound/web/src/test/java/dev/caskeleton/adapter/inbound/web/observability/RetryAfterAdvisorTest.java
+++ b/src/adapter/inbound/web/src/test/java/dev/caskeleton/adapter/inbound/web/observability/RetryAfterAdvisorTest.java
@@ -14,9 +14,15 @@ class RetryAfterAdvisorTest {
@Test
void retryableCodeAdvisesRetryAfter() {
- // INTERNAL_ERROR is retryable per-code; the seam keys off retryable(), the
+ // DB_UNAVAILABLE is retryable per-code; the seam keys off retryable(), the
// owner branch decides the concrete seconds + 429/503 specifics.
- assertThat(RetryAfterAdvisor.shouldAdvise(OperationalError.INTERNAL_ERROR)).isTrue();
+ assertThat(RetryAfterAdvisor.shouldAdvise(OperationalError.DB_UNAVAILABLE)).isTrue();
+ }
+
+ @Test
+ void internalErrorAdvisesNoRetryAfter() {
+ // decision 28: an unclassified failure is not retryable; transient ones have their own codes.
+ assertThat(RetryAfterAdvisor.shouldAdvise(OperationalError.INTERNAL_ERROR)).isFalse();
}
@Test
diff --git a/src/adapter/outbound/messaging/CLAUDE.md b/src/adapter/outbound/messaging/CLAUDE.md
index f7f0bba6..5bd7540d 100644
--- a/src/adapter/outbound/messaging/CLAUDE.md
+++ b/src/adapter/outbound/messaging/CLAUDE.md
@@ -37,8 +37,9 @@ Package root: `dev.caskeleton.adapter.outbound.messaging`.
`adapter:outbound:support`, not here: a use case encodes before it appends, in compositions that
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) here. The evidence manifest schema check moved to build-tools
- (`VerifyMessagingEvidenceTask`).
+- 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
+ test-only (owner decision 29).
- Do not hide use-case sequencing or business routing policy in broker adapters.
- `OutboxMessagePublishAdapter` is delegate-only and emits no dependency log. The confirmed
FAILED/DEAD transition owns the one canonical ERROR.
diff --git a/src/adapter/outbound/messaging/build.gradle b/src/adapter/outbound/messaging/build.gradle
index a1fa876e..c5cc2ed0 100644
--- a/src/adapter/outbound/messaging/build.gradle
+++ b/src/adapter/outbound/messaging/build.gradle
@@ -16,28 +16,47 @@ 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
+ // configuration; only the `test*` ones may resolve it.
+ testImplementation 'org.yaml:snakeyaml'
}
-configurations.configureEach {
+// A `test*` configuration may carry snakeyaml; nothing else may. The exclude goes on resolvable and
+// consumable configurations only, never on the `implementation`/`runtimeOnly` buckets: the test
+// classpaths extend those, and an exclude there would reach them too.
+boolean yamlAllowedIn(Configuration configuration) {
+ configuration.name.startsWith('test')
+}
+
+configurations.configureEach { configuration ->
exclude group: 'tools.jackson.dataformat', module: 'jackson-dataformat-yaml'
- exclude group: 'org.yaml', module: 'snakeyaml'
exclude group: 'org.snakeyaml', module: 'snakeyaml-engine'
+ if (!yamlAllowedIn(configuration) && (configuration.canBeResolved || configuration.canBeConsumed)) {
+ exclude group: 'org.yaml', module: 'snakeyaml'
+ }
}
// The messaging runtime is Jackson 3 only and YAML-free. The excludes above remove the YAML parsers
// the graph carries today (Spring Boot's snakeyaml included); this rule fails resolution if anything
-// brings Jackson 2 or any YAML module back. A `rejectAll()` constraint would not: Spring's dependency
-// management overrides the version it rejects.
-configurations.configureEach {
+// brings Jackson 2 or any YAML module back — in a test configuration, any YAML module other than
+// snakeyaml itself. A `rejectAll()` constraint would not: Spring's dependency management overrides
+// the version it rejects.
+configurations.configureEach { configuration ->
+ boolean snakeyamlAllowed = yamlAllowedIn(configuration)
resolutionStrategy.componentSelection.all { selection ->
String id = selection.candidate.group + ':' + selection.candidate.module
+ if (snakeyamlAllowed && id == 'org.yaml:snakeyaml') {
+ return
+ }
if (id ==~ /(?i).*yaml.*/ || id ==~ /com\.fasterxml\.jackson\.core:jackson-(core|databind)/) {
selection.reject('the messaging runtime is Jackson 3 only and YAML-free')
}
}
}
+// The card check reads the whole config/messaging tree (cards, profiles, the evidence schema).
tasks.named('test') {
- inputs.file(rootProject.file('config/messaging/evidence/build-evidence-manifest-v1.schema.json'))
+ inputs.dir(rootProject.file('config/messaging'))
.withPathSensitivity(PathSensitivity.RELATIVE)
}
diff --git a/src/adapter/outbound/messaging/gradle.lockfile b/src/adapter/outbound/messaging/gradle.lockfile
index de2704ed..d5e49531 100644
--- a/src/adapter/outbound/messaging/gradle.lockfile
+++ b/src/adapter/outbound/messaging/gradle.lockfile
@@ -146,6 +146,7 @@ org.springframework:spring-web:7.0.9=testCompileClasspath,testRuntimeClasspath
org.springframework:spring-webmvc:7.0.9=testCompileClasspath,testRuntimeClasspath
org.xmlresolver:xmlresolver:5.3.3=checkstyle,spotbugs
org.xmlunit:xmlunit-core:2.10.4=testCompileClasspath,testRuntimeClasspath
+org.yaml:snakeyaml:2.5=testCompileClasspath,testRuntimeClasspath
tools.jackson.core:jackson-core:3.1.5=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
tools.jackson.core:jackson-databind:3.1.5=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
tools.jackson:jackson-bom:3.1.5=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
diff --git a/src/app-bootstrap/src/test/java/dev/caskeleton/bootstrap/contract/messaging/MessagingCapabilityRegistryContractTest.java b/src/adapter/outbound/messaging/src/test/java/dev/caskeleton/adapter/outbound/messaging/evidence/MessagingCapabilityRegistryContractTest.java
similarity index 96%
rename from src/app-bootstrap/src/test/java/dev/caskeleton/bootstrap/contract/messaging/MessagingCapabilityRegistryContractTest.java
rename to src/adapter/outbound/messaging/src/test/java/dev/caskeleton/adapter/outbound/messaging/evidence/MessagingCapabilityRegistryContractTest.java
index d36b4035..97b5c182 100644
--- a/src/app-bootstrap/src/test/java/dev/caskeleton/bootstrap/contract/messaging/MessagingCapabilityRegistryContractTest.java
+++ b/src/adapter/outbound/messaging/src/test/java/dev/caskeleton/adapter/outbound/messaging/evidence/MessagingCapabilityRegistryContractTest.java
@@ -1,10 +1,8 @@
-package dev.caskeleton.bootstrap.contract.messaging;
+package dev.caskeleton.adapter.outbound.messaging.evidence;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
-import com.fasterxml.jackson.core.type.TypeReference;
-import com.fasterxml.jackson.databind.ObjectMapper;
import java.io.InputStream;
import java.nio.file.Files;
import java.nio.file.Path;
@@ -21,7 +19,17 @@ import org.yaml.snakeyaml.LoaderOptions;
import org.yaml.snakeyaml.Yaml;
import org.yaml.snakeyaml.constructor.SafeConstructor;
import org.yaml.snakeyaml.error.YAMLException;
+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.
+ *
+ * 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
+ * {@code test} inputs so a card edit re-runs it.
+ */
class MessagingCapabilityRegistryContractTest {
private static final Set FIRST_TUPLE_CARD_IDS =
@@ -254,7 +262,7 @@ class MessagingCapabilityRegistryContractTest {
void commonEvidenceSchemaIsPayloadFreeAndKeepsAllFailClosedFields() throws Exception {
Path schema = requiredConfig("evidence/build-evidence-manifest-v1.schema.json");
Map root =
- new ObjectMapper().readValue(schema.toFile(), new TypeReference