aboutsummaryrefslogtreecommitdiffstats
path: root/docs/research/050-bounded-document-prefix-find.md
diff options
context:
space:
mode:
authoreunhhu <[email protected]>2026-09-24 17:14:54 +0100
committereunhhu <[email protected]>2026-09-24 17:14:54 +0100
commitb1ce1927022d374198441afafeb27199fc8a052a (patch)
tree6021f175f4c67ed03b44240eaa2f90d846f12f6f /docs/research/050-bounded-document-prefix-find.md
parentd34f9426d5317a1948f12f229439946728bc342a (diff)
downloadpure-b1ce1927022d374198441afafeb27199fc8a052a.tar.gz
pure-b1ce1927022d374198441afafeb27199fc8a052a.zip
Establish native micro runtime checkpoint
Diffstat (limited to 'docs/research/050-bounded-document-prefix-find.md')
-rw-r--r--docs/research/050-bounded-document-prefix-find.md33
1 files changed, 33 insertions, 0 deletions
diff --git a/docs/research/050-bounded-document-prefix-find.md b/docs/research/050-bounded-document-prefix-find.md
new file mode 100644
index 0000000..a732be3
--- /dev/null
+++ b/docs/research/050-bounded-document-prefix-find.md
@@ -0,0 +1,33 @@
+# 050 — 문서 1,024개에서 추가 인덱스 없이 이름 찾기
+
+선택형 네이티브 TUI는 저장소에서 문서 이름을 읽어 정렬하고 8,192개까지만 보유한다.
+기존에는 화살표와 처음·끝 이동만 있어, 1,024개 실제 문서에서 중간 이름을 찾는 데
+목록을 길게 이동해야 했다. 목록을 연 상태에서 이름 접두어를 입력하면 정렬된 기존
+배열을 이진 탐색해 첫 일치 문서로 이동한다. Backspace는 접두어를 줄이고,
+일치하지 않는 이름에는 Enter를 눌러도 문서를 열지 않는다. 화살표를 누르면
+접두어를 지우고 기존 목록 탐색으로 돌아간다. 검색용 배열·인덱스·상주 버퍼는
+만들지 않고 기존 65 B 키 입력 공간을 재사용했다.
+
+[실제 PTY 검사](../../prototypes/connections/results/2026-09-24-prefix-find/tui.json)는
+CLI로 문서 1,024개를 만든 뒤 `doc0919`를 찾아 열고, 없는 `zz`를 열지 않으며,
+접두어를 지운 후 `doc1023`을 여는 작업을 검증한다. 저장·충돌·UTF-8·1 MiB 편집과
+터미널 복구 검사도 통과했다. [선택형 TUI 릴리스 프로필](../../prototypes/connections/results/2026-09-24-prefix-find/tui-profile.json)은
+Linux AArch64 / GCC 14에서 링크된 `text` **31,463→32,175 B(+712 B)**,
+data 1,036 B, BSS 24 B로 기존 32,768 B 상한 안에 있다. 실행 코어에는
+이 검색 코드가 없으며 직전 [코어 검사](../../prototypes/connections/results/2026-09-24-idle-work-binding/core.json)의
+6,076 B 상한도 그대로다.
+
+[CLI+TUI 묶음](../../prototypes/connections/results/2026-09-24-prefix-find/cli-tui.tar.gz)은
+31,726→**32,233 B(+507 B)**로 기존 35,840 B 상한 안에 있다. [다른 위치에서
+풀어 실행한 검사](../../prototypes/connections/results/2026-09-24-prefix-find/package-check.json)는
+고정 정의 CLI의 조건부 편집과 선택형 TUI의 실제 작업을 확인했다.
+이번 1 MiB 문서 PTY 실행의 피크 RSS는 3,200 KiB, 1,024개 목록에서는
+1,904 KiB였다. 이전 1 MiB 표본 2,832 KiB보다 높으므로 RAM이 줄었다고
+주장하지 않는다. 모두 기존 4,096 KiB 회귀 상한 안의 단일 호스트 표본이다.
+
+macOS의 엄격한 X/Open 네임스페이스는 TUI가 사용하는 `O_NOFOLLOW`를 숨길 수 있다.
+[Apple의 fcntl.h](https://github.com/apple-oss-distributions/xnu/blob/main/bsd/sys/fcntl.h)를
+근거로 해당 TUI 소스에서만 Darwin 확장을 노출하고, `check-portable`에서 TUI
+실행물까지 컴파일하도록 했다. Linux AArch64에서는 C 검사·실제 PTY가 통과했다.
+Apple Silicon SDK 컴파일·실행은 아직 확인하지 않았으며, 이름 접두어 이동은
+문서 본문 검색이 아니다.