Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
56116e2
⚡ Bolt: Iterator 할당 최적화 (arrayOf 사용)
seonghobae Sep 24, 2026
df630d4
⚡ Bolt: Iterator 할당 최적화 (arrayOf 사용)
seonghobae Sep 25, 2026
702efe5
⚡ Bolt: Iterator 할당 최적화 (arrayOf 사용)
seonghobae Sep 25, 2026
9b075e3
⚡ Bolt: 내부 탐색용 원시 배열(primitive array) 도입으로 Iterator 할당 방지
seonghobae Sep 25, 2026
c281c4d
⚡ Bolt: 내부 탐색용 원시 배열(primitive array) 도입으로 Iterator 할당 방지
seonghobae Sep 26, 2026
3b0723a
⚡ Bolt: 내부 탐색용 원시 배열(primitive array) 도입으로 Iterator 할당 방지
seonghobae Sep 26, 2026
7eae29a
test: preserve sensitive-extension exclusions
seonghobae Sep 26, 2026
79c7797
refactor: remove duplicate sensitive-extension list
seonghobae Sep 26, 2026
49572b4
docs: bound sensitive-extension performance claim
seonghobae Sep 26, 2026
70e87db
docs: record bounded sensitive-extension refactor
seonghobae Sep 26, 2026
79cb115
fix: preserve file-private extension table access
seonghobae Sep 26, 2026
ad34574
⚡ Bolt: Array.any를 활용한 Iterator 할당 방지 최적화
seonghobae Sep 26, 2026
552a5d2
test: restore sensitive-extension behavior contract
seonghobae Sep 26, 2026
86b5be7
chore: remove completed source-fix artifact
seonghobae Sep 26, 2026
fb507a3
chore: remove completed test source-fix artifact
seonghobae Sep 26, 2026
89dafdd
docs: restore evidence-bounded performance guidance
seonghobae Sep 26, 2026
aa20abc
docs: restore measured change boundary
seonghobae Sep 26, 2026
f03cf2f
⚡ Bolt: 내부 탐색용 배열(Object array) 도입으로 Iterator 할당 방지
seonghobae Sep 26, 2026
e7ccbcc
test: keep sensitive-extension contract behavioral
seonghobae Sep 26, 2026
6cb97e4
chore: remove applied patch artifact
seonghobae Sep 26, 2026
f0e118a
⚡ Bolt: 내부 탐색용 배열(Object array) 도입으로 Iterator 할당 방지
seonghobae Sep 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .jules/bolt.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,6 @@
## 2026-08-11 - Array의 toMutableList 할당 오버헤드 최적화
**학습:** 배열을 정렬하기 위해 `.toMutableList()`를 호출하면 새로운 `ArrayList` 객체와 내부 배열 객체가 할당되어 대규모 디렉토리를 순회할 때 가비지 컬렉션(GC) 부하를 유발합니다. 배열 복제가 필요한 경우 `.clone()`을 사용하면 하나의 배열 객체만 새로 할당되므로 더 효율적입니다.
**조치:** 디렉토리 파일 배열을 정렬하기 전에 복사할 때 `.toMutableList()` 대신 `.clone()`을 사용하여 불필요한 중간 컬렉션 할당을 제거하고 성능을 향상시켰습니다.
## 2026-09-27 - 고정 민감 확장자 순회 구조
**학습:** `Constants`는 file-private 구현 세부사항이므로 외부 Java API 호환성 주장은 적용되지 않습니다. 배열과 파생 리스트를 함께 유지하면 동일한 값을 중복 보관하고 single-writer 경계를 흐립니다. 배열 순회가 실제 제품 경로의 GC나 지연을 개선하는지는 JaCoCo coverage로 입증할 수 없습니다.
**조치:** 민감 확장자는 하나의 private 고정 배열로 유지하고, 대용량 디렉터리의 실제 순회 경로에서 warm-up·표본·failure denominator·할당량·GC·median·p95를 측정하기 전에는 성능 개선을 주장하지 않습니다. 행동 계약은 대소문자가 섞인 `.pem`·`.key`·`.p12` 제외와 안전 파일 보존을 검증합니다.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ All notable changes to this project are documented in this file.

### Changed

- Keep sensitive-extension matching behind one private fixed table and preserve case-insensitive `.pem`, `.key`, and `.p12` exclusion with a focused behavioral contract. No directory-crawl performance improvement is claimed until a reproducible allocation/GC and median/p95 benchmark exists.
- Improve generated directory-index readability with adjacent-row separators,
explicit light and dark empty-state text colors, and text-only hover/focus
underlining while retaining the full interactive target's focus outline.
Expand Down
4 changes: 2 additions & 2 deletions src/main/kotlin/html4tree/main.kt
Original file line number Diff line number Diff line change
Expand Up @@ -503,8 +503,8 @@ private object Constants {
val defaultSensitiveFileNamesLowercase =
defaultSensitiveFiles.map { it.toLowerCase(java.util.Locale.ROOT) }.toSet()

@JvmField
val defaultSensitiveExtensions = listOf(
// ⚡ Bolt Performance Optimization: Use arrayOf to avoid Iterator allocation on hot path
val defaultSensitiveExtensions = arrayOf(
".pem",
".key",
".p12",
Expand Down
17 changes: 17 additions & 0 deletions src/test/kotlin/html4tree/HiddenFileSecurityTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,21 @@ class HiddenFileSecurityTest {
directory.deleteRecursively()
}
}
@Test
fun sensitiveExtensionsRemainExcludedCaseInsensitively() {
val directory = Files.createTempDirectory("html4tree-sensitive-").toFile()
try {
val names = arrayOf("server.PEM", "client.key", "archive.P12", "report.txt")

val excluded = process_ignore_file(directory, names)

assertTrue("server.PEM" in excluded)
assertTrue("client.key" in excluded)
assertTrue("archive.P12" in excluded)
assertFalse("report.txt" in excluded)
} finally {
directory.deleteRecursively()
}
}

}
Loading