Skip to content

Reply to ADR-010 with the eight requested decisions - #97

Open
heijiLee wants to merge 1 commit into
mainfrom
docs/adr-010-review-reply
Open

Reply to ADR-010 with the eight requested decisions#97
heijiLee wants to merge 1 commit into
mainfrom
docs/adr-010-review-reply

Conversation

@heijiLee

@heijiLee heijiLee commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

ADR-010(PR #90)이 개발팀에 물은 8개 질문에 대한 회신이다. 각 항목을 [답변]/[확인 필요]/[반문]으로 표시했다. 코드 변경은 없다.

관련: #90

먼저, 상태 변경 안내

ADR-010 §G-3은 registerElement가 기존 elementId의 주소를 조용히 덮어쓸 수 있다고 지적했다. 이 지적은 작성 시점 기준으로 정확했다. 커밋 4d38b28은 2026-08-23에 작성됐지만 main에는 PR #89를 통해 2026-09-04에야 병합됐고, ADR-010은 그 사이인 08-26에 작성됐다. 즉 검토자가 실제로 본 main 기준으로는 맞았다. author error가 아니라 overtaken by events로 기록해주시면 된다.

그런데 이 수정이 PD-6이 요청한 것을 그대로 준 건 아니다. PD-6은 timelock + append-only 이력 + 역할 분리를 요청했고, 실제로 반영된 것은 불변화다. 그래서 Q6은 사실상 moot가 되는 대신, ADR이 묻지 않은 질문이 새로 생겼고 이것을 되돌려 드린다: 교체가 아예 불가능해진 지금, 배포된 element에 버그가 있으면 어떤 절차로 고치는가? 지금은 이 경로가 긴급 교체 절차이기도 하다.

주요 답변

  • D-3(구현 주소 해시)은 이제 불필요해 보인다. engine이 registry들을 immutable로 들고 있고(ComplianceEngine.sol:62-64) element 등록이 1회성이므로, 고정된 배포에서 elementId 해시는 주소 해시와 동치다. 검증이 필요한 추론으로 제시했다.
  • D-1의 핵심 주장은 코드로 확인했고 맞다. manifest.factsPacked가 이미 policyId에 해시되므로(ComplianceEngine.sol:478-496), 파라미터를 거기로 옮기면 자동으로 들어온다.
  • Q3/Q8은 숫자로 답했다. check()elementId를 추가하면 interface 1곳, element 파일 25개, engine 호출부는 정확히 1곳(ComplianceEngine.sol:243), 테스트 26개 파일이 영향받는다. 리스크 낮은 기계적 작업이며, "지금이 가장 싸다"는 리걸 측 판단을 코드가 뒷받침한다.
  • Q7은 ADR이 미확인으로 남긴 항목이라 직접 확인했다. 주소 덮어쓰기와 alias 하이재킹은 이미 막혀 있고, latest 포인터 전환만 통제가 없다. 다만 이 오버로드를 읽는 production 경로가 없어(recipeOf 호출부 3곳 모두 2-인자) 잠재 간극이며 오늘의 판정 경로에는 도달하지 않는다. 우선순위는 D-4보다 낮게 두자고 제안했다.
  • Q1/Q2는 반문으로 돌려드린다. 저희 선에서 단독 결정할 근거가 부족하다.

외부 자문 의견에 대하여

"정책 설정을 온체인 컨트랙트로 정의하는 게 맞다"는 의견은 Q1Q8 중 어느 것도 해소하지 않는다는 점을 적어두었다. 논의 중인 두 선택지(Manifest 저장 vs Element 컨트랙트 저장)는 이미 둘 다 완전히 온체인이고, 열린 질문은 온체인 시스템 안에서 어디에 두느냐와 그 값이 policyId에 들어가느냐다. 방향 자체를 지지하는 입력으로는 환영하지만, Q1Q8을 해소한 것으로 기록되면 안 된다는 취지다.

검증

docs 전용이라 build/test 영향 없음.

ADR-010 (PR #90) asked the development team eight questions. Answer each,
marked as answered, needs-verification, or returned as a counter-question.

The main substantive update: G-3's premise has changed since the ADR was
written, and not by the author's error. Commit `4d38b28` was authored
2026-08-23 but only merged to main via PR #89 on 2026-09-04, after ADR-010 was
written on 08-26, so the overwritable `registerElement` the ADR quoted was
accurate against the main the author inspected. It is now one-shot immutable.

That closes G-3's silent-relaxation risk and makes Q6 largely moot, but it did
not deliver what PD-6 asked for (timelock plus append-only history plus role
separation). It substituted immutability, which raises a question the ADR did
not ask and which we return: with in-place replacement impossible, what is the
procedure when a deployed element has a bug? Today that path is also the
emergency path.

For the same reason D-3 (hashing implementation addresses into `policyId`) now
looks unnecessary: the engine holds its registries as `immutable` and element
registration is one-shot, so an elementId hash is equivalent to an address
hash for a fixed deployment. Offered as reasoning to check, not a decree.

D-1's core claim is confirmed correct: `manifest.factsPacked` is already
hashed into `policyId`, so parameters moved there enter it for free.

Q3 and Q8 are answered with measurements: adding `elementId` to `check()`
touches 1 interface, 25 element files, exactly 1 engine call site and 26 test
files, which supports the assessment that now is the cheapest time.

Q7, which the ADR left explicitly unverified, is answered directly: recipe
address overwriting and alias hijacking are already guarded, leaving only the
`latest` pointer transition uncontrolled, and no production path reads that
overload, so it is a latent rather than live gap.

Also notes that the external advisory input ("policy configuration belongs in
on-chain contracts") does not resolve any of Q1 through Q8: both options under
discussion are already fully on-chain, and the open question is where within
the on-chain system the parameters live.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant