설계: 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>
50 lines
2.8 KiB
Markdown
50 lines
2.8 KiB
Markdown
# Command policy
|
||
|
||
`src/adapter/outbound/redis-sdk/src/main/resources/redis-sdk/redis-command-policy.yml` is the
|
||
single source of truth for what this SDK is willing to do with each Redis command. Official server
|
||
metadata decides what a command *is*; this file decides what we allow.
|
||
|
||
A command that is not classified there is refused. Adding a command therefore means editing that
|
||
file, not writing code — and the edit is where the risk decision is made and reviewed.
|
||
|
||
## Fields
|
||
|
||
| Field | Default | Meaning |
|
||
| --- | --- | --- |
|
||
| `risk` | required | `R1` routine, `R2` needs an explicit permit, `R3` administrative, `R4` never allowed |
|
||
| `support` | required | `TYPED`, `ADVANCED_TYPED`, `RAW_ONLY`, `ADMIN_ONLY`, `VERSION_GATED`, `BLOCKED` |
|
||
| `minimum-version` | `7.2` | lowest server version that carries the command |
|
||
| `access` | derived from `support` | which ACL account may issue it |
|
||
| `blocking` | `false` | occupies its connection until the server replies |
|
||
| `optional-block` | `false` | the command also has a non-blocking form; only `XREAD` and `XREADGROUP` carry it |
|
||
| `read-only` | `false` | never mutates the dataset |
|
||
| `retry-safe` | `read-only` | may be retried after a failure that could have reached the server |
|
||
| `may-be-ambiguous` | `!read-only` | a failure may leave the outcome unknown |
|
||
| `timeout-profile` | derived | `FAST`, `COLLECTION`, `ADMIN`, `BLOCKING` |
|
||
| `key-spec` | `1 1 1` | where the keys are, or `none`, or `movable` |
|
||
| `required-policy` | – | the permit policy an R2 command demands |
|
||
|
||
## Rules the catalog enforces
|
||
|
||
- An R2 `ADVANCED_TYPED` command must name the permit policy it requires. There is no R2 command
|
||
that anyone may issue without an issued permit.
|
||
- An R4 command must be `BLOCKED`, and an R3 command must be `ADMIN_ONLY`. The type system refuses
|
||
the other combinations at load time.
|
||
- A `BLOCKED` command carries no ACL account, so no path in the SDK can reach it.
|
||
- A blocking command must use the `BLOCKING` timeout profile, and its request must declare a bounded
|
||
server block — unless it also declares `optional-block`, which only the two stream reads do.
|
||
- Deprecated command names stay `BLOCKED` even when the SDK offers their behaviour. The typed
|
||
sorted-set ranges issue `ZRANGE ... BYSCORE|BYLEX|REV`, not `ZRANGEBYSCORE`, so what the guard was
|
||
told and what reaches the wire are the same command.
|
||
|
||
## Where each support level is reachable from
|
||
|
||
| Support | Reachable from |
|
||
| --- | --- |
|
||
| `TYPED` | the typed operations, no permit |
|
||
| `ADVANCED_TYPED` | the typed operations, with the named permit |
|
||
| `VERSION_GATED` | a capability bean that exists only when the probe found the feature |
|
||
| `RAW_ONLY` | `sdk.raw`, and only with a deployment-registered approval |
|
||
| `ADMIN_ONLY` | `sdk.admin`, read-only diagnostics only |
|
||
| `BLOCKED` | nowhere |
|