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 "제거된 코드" 표에 복구 커밋(208077fd)과 함께 기록.

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 208077fddf
commit 6d27356e2b
2822 changed files with 27992 additions and 166879 deletions
@@ -1,39 +0,0 @@
package dev.caskeleton.application.storage.migration;
import dev.caskeleton.application.objectstorage.identity.ObjectDestinationId;
import dev.caskeleton.application.objectstorage.identity.ObjectOperationKey;
import java.time.Instant;
/** Verified, expiry-bounded two-approver authorization for one exact adoption manifest. */
@Deprecated
public record LegacyObjectAdoptionApproval(
ObjectOperationKey operationKey,
String manifestSha256,
String legacyNamespaceDigest,
ObjectDestinationId targetDestination,
String targetNamespaceDigest,
Instant notBefore,
Instant expiresAt,
String nonce,
String approvalDigest) {
public LegacyObjectAdoptionApproval {
if (operationKey == null
|| !hex64(manifestSha256)
|| !hex64(legacyNamespaceDigest)
|| targetDestination == null
|| !hex64(targetNamespaceDigest)
|| notBefore == null
|| expiresAt == null
|| !expiresAt.isAfter(notBefore)
|| nonce == null
|| !nonce.matches("[A-Za-z0-9_-]{16,128}")
|| !hex64(approvalDigest)) {
throw new IllegalArgumentException("legacy adoption approval is invalid");
}
}
private static boolean hex64(String value) {
return value != null && value.matches("[0-9a-f]{64}");
}
}
@@ -1,9 +0,0 @@
package dev.caskeleton.application.storage.migration;
/** Verifies a detached canonical approval before any adoption mutation. */
@Deprecated
public interface LegacyObjectAdoptionApprovalVerifierPort {
LegacyObjectAdoptionApproval verify(
byte[] canonicalApprovalDocument, LegacyObjectAdoptionRequest expectedRequest);
}
@@ -1,8 +0,0 @@
package dev.caskeleton.application.storage.migration;
/** Deprecated administrative migration seam; unavailable to normal business composition. */
@Deprecated
public interface LegacyObjectAdoptionPort {
LegacyObjectAdoptionReceipt adopt(LegacyObjectAdoptionRequest request);
}
@@ -1,34 +0,0 @@
package dev.caskeleton.application.storage.migration;
import dev.caskeleton.application.objectstorage.identity.ObjectOperationKey;
import dev.caskeleton.application.objectstorage.identity.ObjectReference;
import dev.caskeleton.application.objectstorage.identity.ObjectVersionToken;
import dev.caskeleton.application.objectstorage.model.ObjectContentIdentity;
import dev.caskeleton.application.objectstorage.model.ObjectMediaType;
import dev.caskeleton.application.objectstorage.model.ObjectMutationOutcome;
import java.time.Instant;
/** Locator-free evidence from a report-only inspection or reviewed adoption apply. */
@Deprecated
public record LegacyObjectAdoptionReceipt(
ObjectOperationKey operationKey,
ObjectContentIdentity contentIdentity,
ObjectMediaType mediaType,
ObjectVersionToken inspectedLegacyVersion,
ObjectReference adoptedReference,
ObjectVersionToken adoptedVersion,
ObjectMutationOutcome outcome,
Instant recordedAt) {
public LegacyObjectAdoptionReceipt {
if (operationKey == null
|| contentIdentity == null
|| mediaType == null
|| inspectedLegacyVersion == null
|| outcome == null
|| recordedAt == null
|| (adoptedReference == null) != (adoptedVersion == null)) {
throw new IllegalArgumentException("legacy adoption receipt is invalid");
}
}
}
@@ -1,36 +0,0 @@
package dev.caskeleton.application.storage.migration;
import dev.caskeleton.application.objectstorage.request.ObjectPublishRequest;
/** Exact report/apply request for one reviewed legacy locator. */
@Deprecated
public record LegacyObjectAdoptionRequest(
LegacyObjectLocator locator,
ObjectPublishRequest publicationRequest,
String manifestSha256,
String legacyNamespaceDigest,
String targetNamespaceDigest,
Mode mode,
LegacyObjectAdoptionApproval approval) {
public LegacyObjectAdoptionRequest {
if (locator == null
|| publicationRequest == null
|| !hex64(manifestSha256)
|| !hex64(legacyNamespaceDigest)
|| !hex64(targetNamespaceDigest)
|| mode == null
|| (mode == Mode.REPORT_ONLY && approval != null)) {
throw new IllegalArgumentException("legacy object adoption request is invalid");
}
}
public enum Mode {
REPORT_ONLY,
APPLY
}
private static boolean hex64(String value) {
return value != null && value.matches("[0-9a-f]{64}");
}
}
@@ -1,54 +0,0 @@
package dev.caskeleton.application.storage.migration;
import java.nio.charset.StandardCharsets;
import java.util.Objects;
/**
* Deprecated administrative raw-locator exception used only by the isolated adoption workflow.
*
* <p>The value is deliberately redacted from {@link #toString()} and exception messages.
*/
@Deprecated
public final class LegacyObjectLocator {
private static final int MAXIMUM_UTF8_BYTES = 1024;
private final String value;
private LegacyObjectLocator(String value) {
this.value = value;
}
public static LegacyObjectLocator of(String value) {
if (value == null
|| value.isBlank()
|| value.getBytes(StandardCharsets.UTF_8).length > MAXIMUM_UTF8_BYTES
|| value.codePoints().anyMatch(LegacyObjectLocator::isControl)) {
throw new IllegalArgumentException("legacy object locator is invalid");
}
return new LegacyObjectLocator(value);
}
/** Available only to the named migration adapter/use case; never log or persist this value. */
public String migrationValue() {
return value;
}
@Override
public String toString() {
return "LegacyObjectLocator[redacted]";
}
@Override
public boolean equals(Object other) {
return other instanceof LegacyObjectLocator locator && value.equals(locator.value);
}
@Override
public int hashCode() {
return Objects.hash(value);
}
private static boolean isControl(int codePoint) {
return Character.isISOControl(codePoint);
}
}
@@ -40,14 +40,6 @@ class ObjectStorageArchitectureContractTest {
"dev.caskeleton.bootstrap.",
"java.nio.file.Path",
"java.io.File");
private static final List<String> ACTIVE_MIGRATION_TYPE_NAMES =
List.of(
"dev.caskeleton.application.storage.migration.LegacyObjectAdoptionApproval",
"dev.caskeleton.application.storage.migration.LegacyObjectAdoptionApprovalVerifierPort",
"dev.caskeleton.application.storage.migration.LegacyObjectAdoptionPort",
"dev.caskeleton.application.storage.migration.LegacyObjectAdoptionReceipt",
"dev.caskeleton.application.storage.migration.LegacyObjectAdoptionRequest",
"dev.caskeleton.application.storage.migration.LegacyObjectLocator");
@Test
void semanticContractIsFrameworkProviderTransportAndPersistentLocatorFree() throws Exception {
@@ -106,16 +98,6 @@ class ObjectStorageArchitectureContractTest {
assertThat(receipt.forRemoval()).isTrue();
}
@Test
void activeLegacyAdoptionMechanismIsDeprecatedWithoutRemovalIntent() throws Exception {
for (String typeName : ACTIVE_MIGRATION_TYPE_NAMES) {
Deprecated lifecycle = Class.forName(typeName).getAnnotation(Deprecated.class);
assertThat(lifecycle).as(typeName).isNotNull();
assertThat(lifecycle.forRemoval()).as(typeName).isFalse();
}
}
private static void assertElementTypesArePure(Class<?> owner, AnnotatedElement element) {
for (Annotation annotation : element.getAnnotations()) {
assertTypeNameIsPure(owner, annotation.annotationType().getName());