Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions FEATURES.md
Original file line number Diff line number Diff line change
Expand Up @@ -639,3 +639,60 @@ passing

문서 정합화와 운영 runbook만 추가한다. contract, API 또는 production 운영 정책은
변경하지 않는다.

## CMP-004 — Wave-3 Illustrative Element Library

### Behavior

- 새로 문서화된 illustrative element 6개를 구현한다: A-06 Affiliate,
A-12 Red Flag Knowledge Bar, E-03 Bad Actor Disqualification,
F-01 Operator Self-Dealing, F-03 Fraud Surveillance,
F-04 Reg M restricted-period buying gate. 각 element는 `docs/elements`
브랜치에 추가된 new-format `docs/compliance/elements` walkthrough 문서를
근거로 구현한다.
- attestation setter는 operator-gated(`Governed`/`onlyOperator`)이며 production
data source는 각 element 헤더의 approval-gated seam으로 남는다.
- fail-closed default를 유지한다. F-01 OperatorSelfDealing은 `registryAvailable`
default가 false여서 operator가 roster를 적재하고 명시적으로 켜기 전까지 모든
거래가 fail-closed된다.
- monitoring element(A-12, F-03)는 거래를 막지 않는다. A-12는 pre-trade
STATELESS로 표시만 하고 `check()`는 항상 pass하며, F-03은 STATEFUL post-trade
로 no-tipping-off party-facing surface(operator-gated view)를 통해 감시만 한다.
- illustrative reference wiring이며 approved production policy가 아니다.
element는 `tools/deploy-wave3/DeployWave3Elements.s.sol`에서 opt-in으로만
등록하고 active recipe에 붙이지 않는다. 기본 demo 배포 범위는 변경하지 않는다.
- CLI(`services/cli`)의 reason-decode 테이블이 wave-3 6개 element를 wave-2와
동일한 수준(name label + per-element reason-code decode 테이블 + smoke-test
enumeration)으로 커버한다. wave-2와 마찬가지로 `attest` 명령
(`services/cli/src/elements.ts`의 `ELEMENT_IDS`, 원본 9개)이나 DeployStack에는
추가하지 않는다.

### Verification

- `forge test --offline`(전체 770/770, pre-task 582 + 신규 188).
- `cd services/cli && npm test`(CLI reason-decode 테이블이 이제 wave-3를 커버).
- per-element unit test: `test/unit/compliance/elements/Affiliate.t.sol`,
`test/unit/compliance/elements/RedFlagKnowledgeBar.t.sol`,
`test/unit/compliance/elements/BadActorDisqualification.t.sol`,
`test/unit/compliance/elements/OperatorSelfDealing.t.sol`,
`test/unit/compliance/elements/FraudSurveillance.t.sol`,
`test/unit/compliance/elements/RegMIssuerBuying.t.sol`.
- `forge fmt --check`.
- `forge lint --severity high --deny warnings src`.

### State

passing

### Notes

- wave-2 precedent은 `TOOLKIT-001` Notes(기본 script discovery 밖 opt-in 등록으로
기본 demo의 컴파일 그래프/배포 범위 보존)와 동일하다. wave-3 element는
DeployStack이나 active recipe에 추가하지 않는다.
- production data-source seam은 각 element 헤더에 문서화되어 있다(OFAC/ONCHAINID/
EDGAR 등은 approval-gated seam).
- F-01 OperatorSelfDealing의 `registryAvailable` fail-closed default는 deploy
script가 자동으로 켜지 않는다. operator가 roster 적재 후 명시적으로
`setRegistryAvailable(true)`를 호출해야 통과가 시작된다.
- F-03 FraudSurveillance는 STATEFUL(`BaseStatefulElement`)이므로 배포 후
`setEngine(engine)` wiring이 필요하다(wave-2 D-01 HolderCount와 동일 패턴).
28 changes: 28 additions & 0 deletions PROGRESS.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,13 @@ source of truth로 사용한다.
`snapshot`/`restore`, `quote-inspect`(서명자 복구/만료/nonce·승인, 실패 시 exit 1).
reason 디코딩·EIP-712 복구는 기존 lib 재사용. smoke(quote-inspect valid+tampered) +
full live walkthrough로 검증. `forge test --offline` 238/238 유지.
- `CMP-004 — Wave-3 Illustrative Element Library`(illustrative element 6개 +
per-element unit test + `tools/deploy-wave3` opt-in deploy script): A-06
Affiliate, A-12 Red Flag Knowledge Bar, E-03 Bad Actor Disqualification,
F-01 Operator Self-Dealing, F-03 Fraud Surveillance, F-04 Reg M
restricted-period buying gate. operator-gated setter, fail-closed default,
monitoring element(A-12/F-03) non-blocking. active recipe/DeployStack 미변경.
`forge test --offline` 770/770.

## Blocked

Expand All @@ -85,6 +92,27 @@ source of truth로 사용한다.

## Last Session Summary

- `CMP-004`에서 wave-3 illustrative element 6개(A-06 Affiliate, A-12 Red Flag
Knowledge Bar, E-03 Bad Actor Disqualification, F-01 Operator Self-Dealing,
F-03 Fraud Surveillance, F-04 Reg M restricted-period buying gate)와 per-element
unit test를 통합하고, `tools/deploy-wave3/DeployWave3Elements.s.sol` opt-in
deploy script를 추가했다. wave-2 precedent과 동일하게 기본 Foundry script
discovery 밖에서 opt-in으로 등록하며 active recipe/DeployStack에 붙이지 않는다.
F-03은 STATEFUL이라 `setEngine(engine)` wiring(D-01 HolderCount 패턴)을 하고,
F-01은 `registryAvailable` fail-closed default를 script에서 자동으로 켜지 않는다.
script는 `ELEMENT_REGISTRY`/`COMPLIANCE_ENGINE`/`DEPLOYER_PRIVATE_KEY`를 받아
등록하며 `forge script … --offline`으로 컴파일만 검증했다(env-var 단계에서만
revert). `forge fmt --check`, `forge build`,
`forge test --offline` 770/770(pre-task 582 + 신규 188),
`forge lint --severity high --deny warnings src`가 모두 통과했다.
`scripts/check.sh`는 Foundry·RFQ SDK·CLI·demo backend·Toolkit·Operator
API/dashboard 단계를 전부 통과했으나 마지막 vendored deploy-v3 단계는 이 세션
환경에 yarn이 없어 실행하지 못했다(deploy-v3는 이번 작업에서 변경 없음, CI
parity gate가 커버).
wave-2 script(`tools/deploy-wave2`)의 import 경로가 `../src/...`로 한 단계
얕아 repo root 기준 컴파일이 안 되는 잠재 버그를 발견했다(컴파일 게이트가
없어 미검출). wave-3는 올바른 `../../src/...`를 사용하며, wave-2 수정은 별도
follow-up으로 남긴다.
- `DOC-003`에서 ROADMAP의 Toolkit/API/dashboard/live E2E 완료 상태와 production
후속 범위를 정렬하고 incident-response runbook을 추가했다. 최신 main에서
`buidl-like`와 `reg-d`가 각각 7/7 scenario, Toolkit preflight/checkpoint,
Expand Down
Loading
Loading