feat(compliance): wave-3 illustrative element library (A-06, A-12, E-03, F-01, F-03, F-04)#54
Open
heijiLee wants to merge 4 commits into
Open
feat(compliance): wave-3 illustrative element library (A-06, A-12, E-03, F-01, F-03, F-04)#54heijiLee wants to merge 4 commits into
heijiLee wants to merge 4 commits into
Conversation
Implement the six newly documented elements from the docs/elements walkthrough docs as an opt-in illustrative library, mirroring the wave-2 precedent (not attached to any recipe, outside default script discovery): - A-06 Affiliate: attested AffiliateBasis + dual Rule 144 look-back decay (90-day (b)(2) tail + three-calendar-month (b)(1), conservative 92d) - A-12 Red Flag Knowledge Bar: pre-trade STATELESS marking, never blocks, party-facing surface leaks nothing - E-03 Bad Actor Disqualification: offering-keyed clearance gate (V1-V4/G1-G6, L2-sealed substance never re-adjudicated) - F-01 Operator Self-Dealing: symmetric negative screen with fail-closed roster switch, primary/involuntary exceptions - F-03 Fraud Surveillance: STATEFUL post-trade SAR pipeline with no-tipping-off surface (pure check(), silent onTransfer) - F-04 Reg M Issuer Buying: restricted-period buy-side gate with issuer/participant two-branch routing and de minimis asymmetry Also: per-element unit tests (188 new; forge test --offline 770/770), tools/deploy-wave3/DeployWave3Elements.s.sol opt-in registration script (F-03 setEngine wiring; F-01 fail-closed default not auto-enabled), CLI reason-decode coverage at wave-2 parity (labels + code-name tables), FEATURES.md CMP-004 entry and PROGRESS.md session record. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
docs/elements브랜치에서 새로 문서화된 element 6개를 wave-2 전례를 따라 opt-in illustrative library로 구현합니다 (CMP-004). 이 PR은 근거 문서(docs/compliance/elements/new-format walkthrough,docs/elements브랜치 커밋 포함)와 구현을 함께 담습니다.Affiliate.solRedFlagKnowledgeBar.solcheck()항상 pass, 당사자 노출 없음BadActorDisqualification.solOperatorSelfDealing.solFraudSurveillance.solpure check(), 무이벤트onTransfer)RegMIssuerBuying.solScope
BaseElement/BaseStatefulElement+Governed(onlyOperator setter + 이벤트),ReasonCodes.encode(0, ELEMENT_ID, n), 문서 §→코드 매핑 헤더 주석, production data-source seam 문서화, fail-closed default.tools/deploy-wave3/DeployWave3Elements.s.solopt-in 스크립트로만 (F-03은setEnginewiring, D-01 HolderCount 패턴).services/clireason-decode 테이블에 wave-2와 동일한 parity(라벨 + 코드-이름 테이블, 총 23 element / 119 codes)로 추가. attest 명령/DeployStack에는 미배선 (wave-2와 동일).CMP-004entry, PROGRESS.md 세션 기록 추가. (wave-2가reason.ts에서 CMP-003으로 지칭되어 있어 이번 feature는 CMP-004로 명명)Verification
forge test --offline770/770 (pre-task 582 + 신규 188)forge fmt --check,forge build,forge lint --severity high --deny warnings src모두 통과cd services/cli && npm test통과 (reason-decode round-trip에 wave-3 포함, cast-keccak ground-truth 대조)forge script … --offline으로 컴파일 검증 (env-var 단계에서만 정지)scripts/check.sh: Foundry·RFQ SDK·CLI·demo backend·Toolkit·Operator API/dashboard 단계 통과. vendored deploy-v3 단계는 로컬 환경에 yarn이 없어 미실행 (deploy-v3 미변경, CI parity gate가 커버)Notes / Follow-ups
tools/deploy-wave2/DeployWave2Elements.s.sol의 import 경로가../src/...로 한 단계 얕아 repo root 기준 컴파일 불가 (컴파일 게이트 부재로 미검출). wave-3는 올바른../../src/...사용. wave-2 수정은 별도 follow-up.registryAvailable기본 false (fail-closed) — operator가 roster 적재 후 명시적으로 켜기 전까지 모든 거래 차단. deploy script가 자동으로 켜지 않음 (의도된 설계).