quad/.claude/archive
qwreey a4b517aee2
design: native* 물리 조작 계층 확정 + C-7("부기가 물리보다 먼저") 역전
주입 op 셋(mountInst/unmountInst/disposeInst)으로는 Move/Swap을 아예 표현할
수 없다는 지적에서 시작해 물리 조작 계층 전체를 재설계했다.

층위 정의(사용자): raw*는 그 Slot 스코프 안의 연산(평탄화 전, _elements
인덱스), native*는 확정된 offset/length로 표현되는 물리 트리 연산(평탄화 후,
절대 좌표).

표면 여섯:
  nativeInsert (target, offset, elements)
  nativeExtract(target, offset, elements, newElements?)   -- 빼되 살림
  nativeRemove (target, offset, elements, newElements?)   -- 빼면서 파괴
  nativeMove   (target, fromOffset, elements, toOffset)
  nativeSwap   (target, offsetA, elementsA, offsetB, elementsB)
  nativeDispose(element)                                   -- 트리 밖 값 파괴

- Replace는 별도 op이 아니라 newElements가 있는 Remove/Extract(Splice도 동일)
  — 제거+삽입을 한 호출로 합쳐 리플로우 2회와 그 사이 인덱스가 어긋난 창을
  없앤다
- 파괴/비파괴를 불리언이 아니라 이름으로 가름 — 공개 CRUD의 Remove/Extract
  어휘를 물려받고, Roblox의 "Parent=nil 없이 그 자리에서 Destroy" 융합을 연다
- 빠지는 요소는 반드시 배열로 넘김 — (target, offset, count)로 대상을 찾을 수
  있는 건 DOM뿐이고 Roblox는 자식이 순서 없는 집합이라 offset 역조회가 안 됨
- nativeSwap은 별도 — Move는 사이를 전부 밀지만 Swap은 가운데 고정
- 미주입이면 에러가 아니라 조합 폴백(addTag 계열과 갈리는 지점)
- 전제: 한 Slot의 물리 자식은 부모 안에서 연속 구간을 차지한다

그 여파로 4라운드 C-7 일반 계약이 역전됨 — "Length를 먼저 올려 밀어내고 그
공간에 넣는다"는 그림은 base에 물리적으로 자리를 비워둘 수단이 없어 성립하지
않는다. 규칙이 "빼기는 물리 먼저/넣기는 부기 먼저" 두 얼굴에서
"자기 자리를 정하는 것(setOffsetSource) 먼저 / 뒤를 미는 것(setLength→
recompute) 나중" 하나로 줄었다. 배치 경로(materializeSlotTree→mountSlotTree)의
부기-전량-먼저는 C6가 요구하는 별개 사안이라 그대로.
원문은 archive/bookkeeping-before-physical-reversed.md.

같이: getOffsetAt을 사용자 의사코드대로 단일 함수 + invalidAfter로 정정
(무효화는 min(invalidAfter, i) 하나, recompute도 그 캐시 위에 얹혀 O(N)).

doc-check.py ERROR 0. 상세는
qa-request/pre-implementation-qa-round5-followup.md의 L절.

Co-authored-by: qwreey <me@qwreey.moe>
2026-08-21 20:07:21 +09:00
..
agent-mistake.md refactor(base): bind-system-plan.md 1단계 분할 — Ref/PreRef·이벤트·Brand를 별도 문서로 2026-08-13 18:06:24 +09:00
batch-rejected.md docs: Blocker/Effect를 base/additional-primitives.md에서 별개 파일로 재분리 2026-08-07 14:45:57 +09:00
bindlifetime-slot-owner-reversed.md qa: 구현 전 QA 5라운드 — 문항지·회신·전량 반영 + 감사 2라운드 2026-08-21 18:19:58 +09:00
bookkeeping-before-physical-reversed.md design: native* 물리 조작 계층 확정 + C-7("부기가 물리보다 먼저") 역전 2026-08-21 20:07:21 +09:00
canexecute-inst-arg-reversed.md docs: 코퍼스 전체 감사 + canBound/canExecute 재분리, Ref 0-W 해소 2026-08-14 11:03:24 +09:00
checkpoint-handler-pattern-reversed.md design(dispatch): 사각지대 손 트레이싱 라운드 + Dispatch 인덱스 기반 전면 재설계 2026-08-13 14:24:48 +09:00
context-rejected.md fix(base): 코퍼스 전체 stale 마커/모순 감사 및 무효화된 인라인 서사 archive 이전 2026-08-09 16:36:59 +09:00
debug-channel-replicatedstorage-rejected.md fix(base): 코퍼스 전체 stale 마커/모순 감사 및 무효화된 인라인 서사 archive 이전 2026-08-09 16:36:59 +09:00
dispatch-hintvalue-model-reversed.md docs(dispatch): 0-Z/0-A 확정 — Attribute 전용 키+이름 claim, 하강 diff 전면 반영 2026-08-13 23:53:15 +09:00
existing-instance-bind-rejected.md docs(base): bind/store/state 3단계 분할, UI 숏핸드 Tween 지원, existing-instance-bind 기각 2026-08-14 05:10:49 +09:00
invalidate-dedup-propagation-reversed.md docs: Debounce/Throttle 백로그 신설 + "emit은 항상 전파" base 역전 정정 2026-08-14 05:22:06 +09:00
keyed-collection-state-method-rejected.md fix(base): 코퍼스 전체 stale 마커/모순 감사 및 무효화된 인라인 서사 archive 이전 2026-08-09 16:36:59 +09:00
modifier-apply-mutable-rejected.md docs(base): 코퍼스 전체 정합성 감사 반영, 기각된 대안 archive 이관 2026-08-08 11:38:29 +09:00
observer-cleanup-contract-rejected.md fix(base): 코퍼스 전체 stale 마커/모순 감사 및 무효화된 인라인 서사 archive 이전 2026-08-09 16:36:59 +09:00
onchange-per-property-codegen-rejected.md decide(bind-system): OnChange 특수 키 신설 - GetPropertyChangedSignal 바인딩, 제네릭 없이 확정 2026-08-10 01:08:02 +09:00
preref-order-unguaranteed-withdrawn.md docs(base): PreRef/PostRef 계열 안 fire 순서 미보장안 철회 — 배열 index 순서 보장 유지 2026-08-14 05:54:05 +09:00
quad2-try-research-findings-rejected.md fix(base): 코퍼스 전체 stale 마커/모순 감사 및 무효화된 인라인 서사 archive 이전 2026-08-09 16:36:59 +09:00
question-resolved.md design: PopOnly 가칭을 Detach로 리네임 확정 + 공개 표면 위치 확정 2026-08-19 01:46:18 +09:00
ref-phase-option-reversed.md refactor(base): bind-system-plan.md 1단계 분할 — Ref/PreRef·이벤트·Brand를 별도 문서로 2026-08-13 18:06:24 +09:00
retract-always-fires-reversed.md refactor(base): bind-system-plan.md 1단계 분할 — Ref/PreRef·이벤트·Brand를 별도 문서로 2026-08-13 18:06:24 +09:00
slot-discard-no-portal-reversed.md docs(audit): 7차 감사(직접 검증) — 실측 반영 누락 3건 + Slot 언마운트 미반영 6건 정정, 역전 서사 archive 이전 2026-08-13 17:44:26 +09:00
store-source-proxy-reversed.md docs(base): bind/store/state 3단계 분할, UI 숏핸드 Tween 지원, existing-instance-bind 기각 2026-08-14 05:10:49 +09:00
tag-attribute-load-time-registration-reversed.md qa: 구현 전 QA 1라운드 결과를 base/에 전량 반영 2026-08-18 19:39:03 +09:00
tag-hash-key-model-reversed.md decide(base): Tag를 array-part 값 객체로 재설계, Dispatch 체인+retractUnder로 retract 전파 확정 2026-08-08 03:23:44 +09:00
tween-special-bind-key-reversed.md decide(tween): confirm natural-completion bookkeeping is left as-is, promote to base/ 2026-08-12 12:19:49 +09:00
ui-shorthand-roundsize-dropped.md docs: .claude/ 코퍼스 정리 — reference/ 신설, 승격/기각 분리, 역전 이력 트리밍 2026-08-07 14:39:20 +09:00