quad/.claude/session
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
..
2026-08-04-01-roadmap-handoff.md chore(docs): split CLAUDE.md session log into .claude/session/, keep 2-4 line summaries 2026-08-11 14:40:43 +09:00
2026-08-06-01-quad-debug-design.md chore(docs): split CLAUDE.md session log into .claude/session/, keep 2-4 line summaries 2026-08-11 14:40:43 +09:00
2026-08-06-02-event-self-rbvm-corpus.md chore(docs): split CLAUDE.md session log into .claude/session/, keep 2-4 line summaries 2026-08-11 14:40:43 +09:00
2026-08-06-03-docsite-source-state.md chore(docs): split CLAUDE.md session log into .claude/session/, keep 2-4 line summaries 2026-08-11 14:40:43 +09:00
2026-08-06-04-pre-implementation-audit.md chore(docs): split CLAUDE.md session log into .claude/session/, keep 2-4 line summaries 2026-08-11 14:40:43 +09:00
2026-08-07-01-with-new-node.md chore(docs): split CLAUDE.md session log into .claude/session/, keep 2-4 line summaries 2026-08-11 14:40:43 +09:00
2026-08-07-02-modifier-apply.md chore(docs): split CLAUDE.md session log into .claude/session/, keep 2-4 line summaries 2026-08-11 14:40:43 +09:00
2026-08-07-03-preref.md chore(docs): split CLAUDE.md session log into .claude/session/, keep 2-4 line summaries 2026-08-11 14:40:43 +09:00
2026-08-07-04-corpus-reorg.md chore(docs): split CLAUDE.md session log into .claude/session/, keep 2-4 line summaries 2026-08-11 14:40:43 +09:00
2026-08-07-05-override-peek-isstate.md chore(docs): split CLAUDE.md session log into .claude/session/, keep 2-4 line summaries 2026-08-11 14:40:43 +09:00
2026-08-07-06-ref-preref-api.md chore(docs): split CLAUDE.md session log into .claude/session/, keep 2-4 line summaries 2026-08-11 14:40:43 +09:00
2026-08-07-07-state-apply-effect-subscribe.md chore(docs): split CLAUDE.md session log into .claude/session/, keep 2-4 line summaries 2026-08-11 14:40:43 +09:00
2026-08-07-08-none-sentinel-dispatch-brand.md chore(docs): split CLAUDE.md session log into .claude/session/, keep 2-4 line summaries 2026-08-11 14:40:43 +09:00
2026-08-07-09-corpus-audit-createdref.md chore(docs): split CLAUDE.md session log into .claude/session/, keep 2-4 line summaries 2026-08-11 14:40:43 +09:00
2026-08-07-10-none-vs-nil-order.md chore(docs): split CLAUDE.md session log into .claude/session/, keep 2-4 line summaries 2026-08-11 14:40:43 +09:00
2026-08-08-01-relate-bindlifetime.md chore(docs): split CLAUDE.md session log into .claude/session/, keep 2-4 line summaries 2026-08-11 14:40:43 +09:00
2026-08-08-02-dispatch-singleton-naming.md chore(docs): split CLAUDE.md session log into .claude/session/, keep 2-4 line summaries 2026-08-11 14:40:43 +09:00
2026-08-08-03-tag-redesign-dispatch-chain.md chore(docs): split CLAUDE.md session log into .claude/session/, keep 2-4 line summaries 2026-08-11 14:40:43 +09:00
2026-08-08-04-overridden-naming.md chore(docs): split CLAUDE.md session log into .claude/session/, keep 2-4 line summaries 2026-08-11 14:40:43 +09:00
2026-08-08-05-terminology-round.md chore(docs): split CLAUDE.md session log into .claude/session/, keep 2-4 line summaries 2026-08-11 14:40:43 +09:00
2026-08-09-01-canbound-modifier-error.md chore(docs): split CLAUDE.md session log into .claude/session/, keep 2-4 line summaries 2026-08-11 14:40:43 +09:00
2026-08-09-02-corpus-audit-archive-move.md chore(docs): split CLAUDE.md session log into .claude/session/, keep 2-4 line summaries 2026-08-11 14:40:43 +09:00
2026-08-09-03-slot-crud-list.md chore(docs): split CLAUDE.md session log into .claude/session/, keep 2-4 line summaries 2026-08-11 14:40:43 +09:00
2026-08-09-06-length-offset-unbindlifetime.md chore(docs): split CLAUDE.md session log into .claude/session/, keep 2-4 line summaries 2026-08-11 14:40:43 +09:00
2026-08-09-07-list-observer-lazy.md chore(docs): split CLAUDE.md session log into .claude/session/, keep 2-4 line summaries 2026-08-11 14:40:43 +09:00
2026-08-09-08-midreview-defects.md chore(docs): split CLAUDE.md session log into .claude/session/, keep 2-4 line summaries 2026-08-11 14:40:43 +09:00
2026-08-09-12-luau-test-spikes.md chore(docs): split CLAUDE.md session log into .claude/session/, keep 2-4 line summaries 2026-08-11 14:40:43 +09:00
2026-08-10-01-slot-add-return-index.md chore(docs): split CLAUDE.md session log into .claude/session/, keep 2-4 line summaries 2026-08-11 14:40:43 +09:00
2026-08-10-02-dynamic-children-ub.md chore(docs): split CLAUDE.md session log into .claude/session/, keep 2-4 line summaries 2026-08-11 14:40:43 +09:00
2026-08-10-03-tween-redesign.md chore(docs): split CLAUDE.md session log into .claude/session/, keep 2-4 line summaries 2026-08-11 14:40:43 +09:00
2026-08-10-04-onchange-key.md chore(docs): split CLAUDE.md session log into .claude/session/, keep 2-4 line summaries 2026-08-11 14:40:43 +09:00
2026-08-11-01-compute-trailing-args.md chore(docs): split CLAUDE.md session log into .claude/session/, keep 2-4 line summaries 2026-08-11 14:40:43 +09:00
2026-08-11-02-trailing-deps-positional.md chore(docs): split CLAUDE.md session log into .claude/session/, keep 2-4 line summaries 2026-08-11 14:40:43 +09:00
2026-08-11-03-previous-before-pack.md chore(docs): split CLAUDE.md session log into .claude/session/, keep 2-4 line summaries 2026-08-11 14:40:43 +09:00
2026-08-11-04-slot-list-layoutorder-index.md chore(docs): split CLAUDE.md session log into .claude/session/, keep 2-4 line summaries 2026-08-11 14:40:43 +09:00
2026-08-11-05-slot-doc-framing.md chore(docs): split CLAUDE.md session log into .claude/session/, keep 2-4 line summaries 2026-08-11 14:40:43 +09:00
2026-08-11-06-slot-single-nesting.md chore(docs): split CLAUDE.md session log into .claude/session/, keep 2-4 line summaries 2026-08-11 14:40:43 +09:00
2026-08-11-07-reactive-raw-elements.md chore(docs): split CLAUDE.md session log into .claude/session/, keep 2-4 line summaries 2026-08-11 14:40:43 +09:00
2026-08-11-08-claude-md-restructure.md chore(docs): split CLAUDE.md session log into .claude/session/, keep 2-4 line summaries 2026-08-11 14:40:43 +09:00
2026-08-11-09-attribute-group-primitive.md decide(attribute): group Attribute(...) primitive, AttributeKey rename, weak-cache identity 2026-08-11 18:22:54 +09:00
2026-08-12-01-tween-shape-finalized.md decide(tween): finalize option shape, override policy, relation-slot value 2026-08-12 11:02:13 +09:00
2026-08-12-02-animate-confirmed-and-or-audit.md decide(tween): finalize Animate combinator, fix and/or falsy-value bug 2026-08-12 11:14:08 +09:00
2026-08-12-03-cananimate-luau-syntax-note.md decide(tween): add Animate CanAnimate field, document Luau syntax facts 2026-08-12 11:17:49 +09:00
2026-08-12-04-compute-self-get-audit.md fix(docs): missing :Get() on :Compute callback args across base docs 2026-08-12 11:22:26 +09:00
2026-08-12-05-operator-sugar-plan.md decide(operator): add Operator sugar plan, unify combinators on :Apply 2026-08-12 11:54:09 +09:00
2026-08-12-06-tween-completed-bookkeeping-promoted.md decide(tween): confirm natural-completion bookkeeping is left as-is, promote to base/ 2026-08-12 12:19:49 +09:00
2026-08-12-07-preref-single-use-no-cancel.md decide(bind-system): PreRef is single-use, no cancel concept, reuse errors 2026-08-12 13:26:46 +09:00
2026-08-12-08-ref-retract-tagged-pattern.md decide(bind-system): Ref retract mirrors TagHandler, non-nilable T stays valid 2026-08-12 13:44:31 +09:00
2026-08-12-09-slot-retract-same-pattern.md decide(slot): store-bound Slot rebind uses Relate identity check, not retract 2026-08-12 13:49:58 +09:00
2026-08-12-10-attribute-name-ownership.md decide(attribute): per-name ownership via private rawNew keys, not a new registry 2026-08-12 15:23:24 +09:00
2026-08-12-11-retract-always-fires-correction.md decide(bind-system): retract fires on every re-dispatch, not just type changes 2026-08-12 16:13:25 +09:00
2026-08-12-12-slot-owner-relate-retractunder-args.md decide(slot): track slot->inst ownership directly instead of position diffing 2026-08-12 16:20:29 +09:00
2026-08-12-13-slot-gc-cycle-fix.md decide(slot): break the kSlotMap/slotOwner mutual strong-reference cycle 2026-08-12 16:37:40 +09:00
2026-08-12-14-luau-no-ephemeron-confirmed.md decide(relate): confirm and document that Luau has no ephemeron tables 2026-08-12 16:42:56 +09:00
2026-08-12-15-slot-in-slot-relate-scope-tag-splice-additions.md fix(slot): Splice가 vararg인 진짜 이유는 T가 opaque 제네릭이라서 2026-08-12 17:14:15 +09:00
2026-08-12-16-corpus-audit-attribute-retract-slot-owner.md fix(attribute,slot): retract 전면 재설계, 소유권 레지스트리 통합, 코퍼스 감사 2026-08-12 18:39:45 +09:00
2026-08-12-17-priority1-audit-resolved.md decide(dispatch,modifier,store): pre-implementation-audit 우선순위1 마지막 넷 해소, 누락 스파이크 보강 2026-08-12 20:24:04 +09:00
2026-08-12-18-framework-comparison-fixables-closed.md decide(state,operator,ref): use-after-destroy/동적With 의도적 비지원 확정, Operator 카탈로그 외부 리서치 반영, State 이름 최종 확정 2026-08-12 21:14:15 +09:00
2026-08-12-19-operator-sugar-external-research.md decide(state,operator,ref): use-after-destroy/동적With 의도적 비지원 확정, Operator 카탈로그 외부 리서치 반영, State 이름 최종 확정 2026-08-12 21:14:15 +09:00
2026-08-12-20-state-name-final-usedaftedestroy-scoped-out.md decide(state,operator,ref): use-after-destroy/동적With 의도적 비지원 확정, Operator 카탈로그 외부 리서치 반영, State 이름 최종 확정 2026-08-12 21:14:15 +09:00
2026-08-12-21-naming-clarity-pipe-compute-with-clone-contrast.md decide(state,operator,ref): use-after-destroy/동적With 의도적 비지원 확정, Operator 카탈로그 외부 리서치 반영, State 이름 최종 확정 2026-08-12 21:14:15 +09:00
2026-08-13-01-gcconn-audit-relate-cycle-spike-readme-sync.md audit(lifecycle): partial gcconn trick verification, close Relate cycle spike gap 2026-08-13 10:09:47 +09:00
2026-08-13-02-haskell-comparison-dispatch-reentrant-bug.md fix(dispatch): State<State<T>> 재진입 디스패치 체인 파손 버그 발견·수정, Operator Alternative 후보 신설 2026-08-13 10:49:34 +09:00
2026-08-13-03-v1-newindex-typo-scoped-out.md decide(v1-compat): objectListClass.__newIndex 오타 기능, v2 무관으로 스코프 아웃 2026-08-13 10:55:27 +09:00
2026-08-13-04-blind-spot-audit-checkpoint-handlers.md design(dispatch): 사각지대 손 트레이싱 라운드 + Dispatch 인덱스 기반 전면 재설계 2026-08-13 14:24:48 +09:00
2026-08-13-05-dispatch-index-based-redesign.md design(dispatch): 사각지대 손 트레이싱 라운드 + Dispatch 인덱스 기반 전면 재설계 2026-08-13 14:24:48 +09:00
2026-08-13-06-commit-audit-dispatch-redesign-bugs.md docs(audit): 스파이크 상태판 신설 + 코퍼스 전반 모순·stale 감사 정정 2026-08-13 16:48:32 +09:00
2026-08-13-07-corpus-audit-six-rounds.md docs(audit): 6라운드 코퍼스 감사 수렴 — 검증 라운드 마무리 + 세션 기록 2026-08-13 17:31:20 +09:00
2026-08-13-08-direct-verification-audit.md docs(session): 8차 감사 세션 기록 — 직전 6라운드 감사의 순차 직접 재검증 2026-08-13 17:56:09 +09:00
2026-08-13-09-structure-and-guardrails.md docs(session): 9차 세션 기록 — 구조 재편 3건 + 재발 방지 도구 2026-08-13 18:14:06 +09:00
2026-08-13-10-corpus-audit-parallel-agents.md docs(audit): 10차 세션 — 병렬 에이전트 코퍼스 감사, 부정확성 7건 수정 2026-08-13 18:32:53 +09:00
2026-08-13-11-corpus-audit-sequential-direct.md docs(audit): 11차 세션 — 순차 직접 감사, 부정확성 4건 수정 2026-08-13 18:52:10 +09:00
2026-08-13-12-corpus-audit-sequential-no-issues.md docs(audit): 12차 세션 — 순차 직접 감사 반복, 새 문제 없음 확인 2026-08-13 19:04:30 +09:00
2026-08-13-13-type-recursion-limit-resolved.md docs(type): 0-Y 해소 — 재귀 제네릭 반환은 Luau 상위 한계로 확정, typing-limits.md 신설 2026-08-13 22:08:51 +09:00
2026-08-13-14-attribute-getkey-dispatch-diff-reflected.md fix(docs): 리뷰 라운드 — 의사코드 결함 3건 + doc-check 사각지대 수정 2026-08-14 00:29:25 +09:00
2026-08-14-01-component-fallback-plan.md docs(research): 컴포넌트 에러 격리 유틸 Fallback 백로그 신설 2026-08-14 01:17:40 +09:00
2026-08-14-02-fallback-xpcall-spike-verified.md docs(research): Fallback의 xpcall+traceback 메커니즘 실측 확인 2026-08-14 02:54:37 +09:00
2026-08-14-03-fallback-traceback-promoted.md docs(base): Fallback/Traceback 승격 — research/에서 base/fallback-plan.md로 2026-08-14 04:32:29 +09:00
2026-08-14-04-processedpreref-postref-symmetry.md fix(lifecycle): canExecute/unbindLifetime을 value 1-인자로 정정, Subscribed 오염 제거 2026-08-14 04:03:49 +09:00
2026-08-14-05-canexecute-value-scoped.md fix(lifecycle): canExecute/unbindLifetime을 value 1-인자로 정정, Subscribed 오염 제거 2026-08-14 04:03:49 +09:00
2026-08-14-06-lifecycle-hooks-plan.md docs(session): 생명주기 훅 세션 로그 신설, CLAUDE.md 세션 번호 재조정 2026-08-14 04:08:48 +09:00
2026-08-14-07-store-source-split-shorthand-tween.md docs(base): bind/store/state 3단계 분할, UI 숏핸드 Tween 지원, existing-instance-bind 기각 2026-08-14 05:10:49 +09:00
2026-08-14-08-debounce-throttle-backlog.md docs: Debounce/Throttle 백로그 신설 + "emit은 항상 전파" base 역전 정정 2026-08-14 05:22:06 +09:00
2026-08-14-09-postref-confirmed.md docs(base): PreRef/PostRef 계열 안 fire 순서 미보장안 철회 — 배열 index 순서 보장 유지 2026-08-14 05:54:05 +09:00
2026-08-14-10-dispose-scope-resolved.md docs(base): dispose(value) 시그니처/범위 확정 — question.md 0-B 해소 2026-08-14 06:18:28 +09:00
2026-08-14-11-corpus-audit-canbound-resplit.md docs: 코퍼스 전체 감사 + canBound/canExecute 재분리, Ref 0-W 해소 2026-08-14 11:03:24 +09:00
2026-08-14-12-observer-effect-leaf-dedup.md docs(base): Observer/Effect Leaf dedup 추가 + Tag/Attribute 자기등록 모델 역전 2026-08-14 12:32:17 +09:00
2026-08-14-13-recursive-acronym-brainstorm.md docs: quad 재귀 약어 브레인스토밍 research 문서 신설 2026-08-14 13:58:01 +09:00
2026-08-14-14-corpus-audit-doc-include-backlog.md docs: 문서 stale 감소용 include 도구 백로그 신설(doc-include.py) 2026-08-14 22:56:21 +09:00
2026-08-15-01-typeof-recursive-generic-workaround.md docs: 콜백 파라미터 무주석 추론 전방위 재시도, code-review 2회전 정합성 수정 2026-08-15 19:36:44 +09:00
2026-08-15-02-try-callback-investigation-and-review-fixes.md docs: 콜백 파라미터 무주석 추론 전방위 재시도, code-review 2회전 정합성 수정 2026-08-15 19:36:44 +09:00
2026-08-16-01-subagent-audit-and-claudemd-split.md docs: CLAUDE.md 4분할(매 세션 로드 1537→354줄), 워크플로 가짜 초록불 수정 2026-08-16 01:35:02 +09:00
2026-08-16-02-audit-tooling-verification-and-first-real-run.md docs: 감사 루프 4라운드에서 중단(사용자 결정) + 다음 세션 핸드오버 정리 2026-08-16 04:05:05 +09:00
2026-08-16-03-doc-check-section-convention.md tooling: 절 인용 규약 신설 + doc-check 절 참조를 ERROR 게이트로 승격 2026-08-16 10:47:29 +09:00
2026-08-18-01-pre-implementation-qa-applied.md tooling: 감사 루프를 병렬 다패스에서 순차 1패스/턴으로 재설계 2026-08-18 19:45:36 +09:00
2026-08-19-01-new-initxxx-composition-relate-guard.md design: New()의 내부 구성 확정 — InitXxx 팩토리 체이닝 + Relate 기반 멱등 Init 가드 2026-08-19 01:16:26 +09:00
2026-08-19-02-detach-naming-and-placement.md design: PopOnly 가칭을 Detach로 리네임 확정 + 공개 표면 위치 확정 2026-08-19 01:46:18 +09:00
2026-08-19-03-debounce-throttle-final-close.md design: Debounce/Throttle 마지막 판단 대기 4개 닫고 base/로 승격 2026-08-19 02:11:11 +09:00
2026-08-19-04-pesde-migration-and-project-setup.md tooling: 에디터 Luau 솔버 설정 확정 — luau-lsp 설치해 새 솔버 필요성 실측 2026-08-19 14:37:17 +09:00
2026-08-19-04-qa-round4-questionnaire.md qa: 구현 전 QA 4라운드 문항지 — base/ 전 문서 확정 주장 전수 문항화 2026-08-20 00:33:49 +09:00
2026-08-19-05-mise-migration-and-selene-linter.md tooling: rokit → mise 전환 + selene 린터 도입 (roblox-project-example 벤치마킹) 2026-08-19 15:09:35 +09:00
2026-08-19-06-runinit-redesign-and-darklua-precision.md design: RunInit 재설계(함수를 릴레이션 키로) + darklua 경계 실측 정밀화 2026-08-19 16:17:08 +09:00
2026-08-19-07-quad-types-package-addplugin-checkversion.md design: quad-types 패키지 신설 — AddPlugin<Self,P> + CheckedQuad<T> 실측 설계 2026-08-19 17:09:16 +09:00
2026-08-19-08-type-version-check-package-extraction.md design: type-version-check 패키지 추출 — CheckedQuad<T, Pattern> 글롭/캐럿 확장 2026-08-19 17:39:57 +09:00
2026-08-19-09-handover-prep-roadmap-status-sync.md tooling: 핸드오버 준비 — session-summary.md 색인 공백 + ROADMAP/CLAUDE.md stale 정정 2026-08-19 20:47:31 +09:00
2026-08-20-01-qa-round4-response-processing.md qa: QA 4라운드 followup — 회신 처리 결과 + 재질문 정리 2026-08-20 00:57:19 +09:00
2026-08-21-01-detach-keygone-owned-and-attachslot-decomposition.md qa: 반영 후 감사 6라운드 — 실제 크래시 3건 포함 18건 수정 2026-08-21 13:20:42 +09:00
2026-08-21-02-qa-round5-and-gate-epoch-research.md design: native* 물리 조작 계층 확정 + C-7("부기가 물리보다 먼저") 역전 2026-08-21 20:07:21 +09:00