refactor: 부가 기능을 capability 모듈로 포장하고 기본 조립을 web-only로 전환

설계: docs/superpowers/specs/2026-09-25-capability-module-packaging-design.md
계획/진행 기록: docs/superpowers/plans/2026-09-25-capability-module-packaging.md

- Wave 0: 규칙 고정(AGENTS.md capability 완료 기준·테스트 규칙) + 차단 결함 7건
  (compose overlay 검사, redis-sdk CI job, 적용된 V9/V13 원복 + V16, @EnableScheduling,
  messaging bridge 순서, prod 에러 상세 validator, sample loggers read-only)
- Wave 1: 데이터·보안 Critical 10건 (durable operation 25P02, operation 유스케이스 이동,
  outbox 재인코딩, Kafka TLS/SASL, 알림 트랜잭션, SNS 서명, tus checksum, GraphQL fragment,
  Redis lane, gRPC FAILED_TERMINAL)
- Wave 2: 리팩터링 잔재·실험용 자리 삭제, outbox v1 fencing(V17), 멱등성 V2 정본화
- Wave 3: 라이브러리형 코드 정리(동작하지 않는 설정·인터페이스·gate 제거, web-advanced 분리)
- Wave 4: capability 11개를 "있으면 켜짐" 모듈로 포장, 끄는 장치 제거, 기본 조립 web-only,
  qualificationBootJar 분리
- Wave 5: 빌드 로직 축소(17.2k -> 10.8k줄), sample 테스트 컨벤션 적용

삭제한 코드는 docs/capability-status.md "제거된 코드" 표에 복구 커밋(b5114b9b)과 함께 기록.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
DongHyeonka
2026-09-25 12:49:07 +09:00
co-authored by Claude Opus 5.5
parent b5114b9bb4
commit 5e44be9ab4
122 changed files with 725 additions and 9914 deletions
@@ -51,9 +51,9 @@ public final class CompatibilityMatrix {
* Reports whether a lane has run this adapter against a real broker.
*
* <p>Read from the evidence rather than declared. As a field it was a boolean an author set
* next to the tier, and RabbitMQ carried {@code true} while no fault scenario had ever been
* executed against it — the same shape as the coverage matrix that used to assert its own
* constants.
* next to the tier, and an Experimental adapter carried {@code true} while no fault scenario
* had ever been executed against it — the same shape as the coverage matrix that used to assert
* its own constants.
*
* @return true when {@link CertifiedEvidence} has live-broker evidence for this adapter
*/
@@ -78,36 +78,11 @@ public final class CompatibilityMatrix {
private static final Map<String, Entry> ENTRIES =
Map.of(
"messaging-kafka",
// 4.1 only. The declared 4.2/4.3 were never run: the fixtures pin apache/kafka:4.1.0
// and
// the locked client is 4.1.1, so the matrix and the support document agreed with each
// other and with nothing that had executed. A version returns here when a lane runs
// against its image.
new Entry("messaging-kafka", List.of("4.1"), Tier.STABLE, true, true),
"messaging-rabbit",
// Experimental until a lane runs a fault scenario against a RabbitMQ container. The
// adapter passes the shared contract and its broker IT exercises the routable and
// unroutable happy paths, but Stable in this repository means fault evidence, and
// there is none: connection-refused, cut-after-write, confirm-timeout,
// settlement-lost and high-latency have never been executed here.
new Entry("messaging-rabbit", List.of("4.3"), Tier.EXPERIMENTAL, true, false),
"messaging-kafka-share-experimental",
new Entry(
"messaging-kafka-share-experimental",
List.of("4.2", "4.3"),
Tier.EXPERIMENTAL,
false,
false),
"messaging-pulsar-experimental",
new Entry(
"messaging-pulsar-experimental",
List.of("4.0", "4.2"),
Tier.EXPERIMENTAL,
false,
false),
"messaging-nats-experimental",
new Entry(
"messaging-nats-experimental", List.of("2.14"), Tier.EXPERIMENTAL, false, false));
// 4.1 only. The declared 4.2/4.3 were never run: the fixtures pin apache/kafka:4.1.0 and
// the locked client is 4.1.1, so the matrix and the support document agreed with each
// other and with nothing that had executed. A version returns here when a lane runs
// against its image.
new Entry("messaging-kafka", List.of("4.1"), Tier.STABLE, true, true));
/**
* Returns every certified adapter.
@@ -9,8 +9,8 @@ import java.util.concurrent.CompletionStage;
* The seam each broker adapter implements to run the common contract.
*
* <p>The harness exposes outcomes, not internals: what the platform decided, what reached the dead
* letter destination, and what is still unsettled. Kafka and RabbitMQ answer those three questions
* with completely different machinery, and the contract only passes if the answers match.
* letter destination, and what is still unsettled. Each broker answers those three questions with
* its own machinery, and the contract only passes if the answers match.
*/
public interface MessagingAdapterHarness extends AutoCloseable {
@@ -53,8 +53,8 @@ class CertifiedEvidenceTest {
assertThat(CertifiedEvidence.knownGaps("messaging-kafka"))
.as("a Kafka producer buffers before it learns a connection exists, so this stays unproven")
.contains(NetworkFaultScenario.CONNECTION_REFUSED);
assertThat(CertifiedEvidence.knownGaps("messaging-rabbit"))
.as("no lane runs a fault scenario against RabbitMQ, so every scenario is a gap")
assertThat(CertifiedEvidence.knownGaps("messaging-artemis"))
.as("an adapter no lane has run has every scenario as a gap")
.containsExactlyElementsOf(NetworkFaultScenario.all());
}
@@ -32,7 +32,6 @@ class CompatibilityMatrixTest {
void noExperimentalAdapterIsEnabledByDefault() {
assertThat(CompatibilityMatrix.entries().values())
.filteredOn(entry -> entry.tier() == CompatibilityMatrix.Tier.EXPERIMENTAL)
.isNotEmpty()
.allSatisfy(entry -> assertThat(entry.enabledByDefault()).isFalse());
}
@@ -41,7 +40,6 @@ class CompatibilityMatrixTest {
assertThat(CompatibilityMatrix.entries().values())
.filteredOn(entry -> entry.tier() == CompatibilityMatrix.Tier.STABLE)
.extracting(CompatibilityMatrix.Entry::adapter)
.as("RabbitMQ passes the shared contract, but no fault scenario has been run against it")
.containsExactly("messaging-kafka");
}
@@ -48,19 +48,16 @@ class CrossBrokerContractSuite {
assertThat(matrix.gapsFor("messaging-kafka"))
.as("what the Kafka lanes have not exercised against a live broker")
.isEqualTo(CertifiedEvidence.knownGaps("messaging-kafka"));
assertThat(matrix.gapsFor("messaging-rabbit"))
.as("what the Rabbit lanes have not exercised against a live broker")
.isEqualTo(CertifiedEvidence.knownGaps("messaging-rabbit"));
}
@Test
void evidenceThatDisagreesWithItsScenarioIsNotCoverage() {
BrokerCertificationEvidence contradicting =
new BrokerCertificationEvidence(
"messaging-rabbit",
"rabbitmq:4.3-management",
"messaging-kafka",
"apache/kafka:4.1.0",
NetworkFaultScenario.CONNECTION_CUT_AFTER_WRITE,
"RabbitBrokerIT#anUnroutablePublishIsRejectedEvenThoughTheExchangeConfirmedIt",
"SomeIT#someScenario",
"REJECTED",
"repository-local",
java.time.Instant.parse("2026-08-15T00:00:00Z"));
@@ -105,14 +102,6 @@ class CrossBrokerContractSuite {
.isNotEqualTo(Coverage.LIVE_BROKER)));
}
@Test
void anExperimentalAdapterIsAllowedGapsButTheyAreRecorded() {
assertThat(matrix.isComplete("messaging-pulsar-experimental"))
.as("the Experimental tier is a statement of fact, not a disclaimer")
.isFalse();
assertThat(matrix.gapsFor("messaging-pulsar-experimental")).isNotEmpty();
}
@Test
void aFaultThatWasNeverRecordedReadsAsUncoveredRatherThanPassing() {
assertThat(matrix.coverageOf("messaging-artemis", NetworkFaultScenario.CONFIRM_TIMEOUT))
@@ -135,10 +135,6 @@ class MessagingDocumentationContractTest {
private static String brokerLabel(String adapter) {
return switch (adapter) {
case "messaging-kafka" -> "Kafka";
case "messaging-rabbit" -> "RabbitMQ";
case "messaging-pulsar-experimental" -> "Pulsar";
case "messaging-nats-experimental" -> "NATS";
case "messaging-kafka-share-experimental" -> "Kafka Share";
default -> adapter;
};
}