Skip to content

Order symbols before slicing, and say when the list was cut - #82

Merged
Seungpyo1007 merged 1 commit into
developfrom
fix/symbol-order-before-slice
Aug 11, 2026
Merged

Order symbols before slicing, and say when the list was cut#82
Seungpyo1007 merged 1 commit into
developfrom
fix/symbol-order-before-slice

Conversation

@Seungpyo1007

Copy link
Copy Markdown
Member

Two more in the family from #80 and #81.

The exact match could be sliced away

flattenNavTree ranks exact matches first, but only within one file. The merged list across files was ordered by nothing but test-vs-non-test before being cut at the limit, so a file scanned early producing many partial matches could push the exact definition past the cut.

find_references then answered "정의를 못 찾았습니다" for a symbol that exists — the worst possible answer, since it reads as "this doesn't exist" rather than "I stopped looking".

Ordering now runs across the whole merged list before slicing: exact name, then prefix, then the rest, with test files behind within each band. Extracted as orderSymbols with 7 tests; the first one is this defect — searching foo where fooBarBaz and fooBarQux come from earlier files and the real foo from a later one.

The slice was silent

find_symbol printed a truncated list with no indication it was truncated, so the list reads as complete. It now says when it was cut.

1115 unit tests passing (7 new). Real-app symbol probe still 5/5. npm run typecheck and npm run build clean.

flattenNavTree 의 정렬은 한 파일 안에서만 돈다. 파일 가로질러 모은 다음
상한에서 자르는데, 앞쪽 파일이 부분 일치를 잔뜩 내면 정확히 그 이름인 정의가
잘려나간다. 그러면 find_references 가 "정의를 못 찾았습니다" 라고 답한다.
있는데도.

자르기 전에 전체를 다시 세운다. orderSymbols 로 빼서 테스트.

find_symbol 이 잘랐다는 말도 안 하고 있었다. 목록이 전부인 줄 알기 딱 좋다.
@Seungpyo1007 Seungpyo1007 added this to the v0.3 (2026-09-30) milestone Aug 11, 2026
@Seungpyo1007 Seungpyo1007 added the bug Something isn't working label Aug 11, 2026
@Seungpyo1007 Seungpyo1007 self-assigned this Aug 11, 2026
@Seungpyo1007
Seungpyo1007 merged commit 3f30957 into develop Aug 11, 2026
1 check passed
@Seungpyo1007
Seungpyo1007 deleted the fix/symbol-order-before-slice branch August 11, 2026 00:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant