2025-11-27 03:18:33 +09:00
# ENV Variables Safe to Delete (Docs-Only, Already Off the Code Path)
ENV cleanup: Remove 21 doc-only variables from ENV_VARS.md
Removed 21 ENV variables that existed only in documentation with zero
code references (no getenv() calls in source):
Pool/Refill (1):
- HAKMEM_POOL_REFILL_BATCH
Intelligence Engine (3):
- HAKMEM_INT_ENGINE, HAKMEM_INT_EVENT_TS, HAKMEM_INT_SAMPLE
Frontend/FastCache (3):
- HAKMEM_TINY_FRONTEND, HAKMEM_TINY_FASTCACHE, HAKMEM_TINY_FAST
Wrapper/Safety/Debug (5):
- HAKMEM_WRAP_TINY_REFILL, HAKMEM_SAFE_FREE_STRICT, HAKMEM_TINY_GUARD
- HAKMEM_TINY_DEBUG_FAST0, HAKMEM_TINY_DEBUG_REMOTE_GUARD
Optimization/TLS/Memory (9):
- HAKMEM_TINY_QUICK, HAKMEM_USE_REGISTRY
- HAKMEM_TINY_TLS_LIST, HAKMEM_TINY_DRAIN_TO_SLL, HAKMEM_TINY_ALLOC_RING
- HAKMEM_TINY_MEM_DIET, HAKMEM_SLL_MULTIPLIER
- HAKMEM_TINY_PREFETCH, HAKMEM_TINY_SS_RESERVE
Impact:
- ENV_VARS.md: 327 lines → 285 lines (-42 lines, 12.8% reduction)
- Code impact: Zero (documentation-only cleanup)
- Variables were: planned features never implemented, replaced features,
or abandoned experiments
Documentation:
- Added SAFE_TO_DELETE_ENV_VARS.md to docs/analysis/
- Complete analysis of why each variable is obsolete
- Verification proof that variables don't exist in code
File: docs/specs/ENV_VARS.md
Status: Documentation cleanup - no code changes
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 02:52:35 +09:00
## Summary
2025-11-27 03:18:33 +09:00
- **21 ENV variables** live only in documentation; **0 getenv() hits** across `core/` , `include/` , `src/` , and `tools/` .
- These toggles were proposal placeholders; none of them ever crossed the runtime boundary.
- Status: treated as **removed from the supported surface** ; only lingering mentions remain in docs archives and can be dropped when touched.
## Docs-Only Variables (21)
- HAKMEM_ALLOC_LEARN
- HAKMEM_ALLOC_LEARN_RATE
- HAKMEM_ALLOC_LEARN_WINDOW
- HAKMEM_BUILD_3LAYER
- HAKMEM_BUILD_ROUTE
- HAKMEM_DEBUG
- HAKMEM_DEBUG_LEVEL
- HAKMEM_DEBUG_TINY
- HAKMEM_EXPERIMENTAL_ADAPTIVE_DRAIN
- HAKMEM_EXPERIMENTAL_CACHE_TUNING
- HAKMEM_FORCE_LIBC
- HAKMEM_INTEGRITY_CHECKS
- HAKMEM_LEARN_ADVANCED
- HAKMEM_LEARN_DECAY
- HAKMEM_MEM_LEARN
- HAKMEM_MEM_LEARN_THRESHOLD
- HAKMEM_MEM_LEARN_WINDOW
- HAKMEM_PROFILE_SYSCALLS
2025-12-04 16:21:54 +09:00
- HAKMEM_STATS_ENABLE (docs/archive のみ・現行コードでは未使用、備考コメントに変更済み)
- HAKMEM_STATS_INTERVAL_SEC (同上)
2025-11-27 03:18:33 +09:00
- HAKMEM_STATS_VERBOSE
## How We Verified
1) `rg 'getenv\\(\"HAKMEM_' core include src tools -n --sort path` → **0 matches** for all 21 names.
2) `comm -23 docs_env code_env` diff to isolate documentation-only names.
3) Spot-checked `docs/specs/ENV_VARS*.md` and related papers to ensure these are proposal artifacts, not active flags.
## Recommended Cleanup
- Remove these names from `docs/specs/ENV_VARS.md` , `docs/specs/ENV_VARS_COMPLETE.md` , and any status reports when you next touch them (no code changes needed).
- Keep a single sentence in change logs noting that these toggles never existed in runtime code (A/B rollback not needed).
ENV cleanup: Remove 21 doc-only variables from ENV_VARS.md
Removed 21 ENV variables that existed only in documentation with zero
code references (no getenv() calls in source):
Pool/Refill (1):
- HAKMEM_POOL_REFILL_BATCH
Intelligence Engine (3):
- HAKMEM_INT_ENGINE, HAKMEM_INT_EVENT_TS, HAKMEM_INT_SAMPLE
Frontend/FastCache (3):
- HAKMEM_TINY_FRONTEND, HAKMEM_TINY_FASTCACHE, HAKMEM_TINY_FAST
Wrapper/Safety/Debug (5):
- HAKMEM_WRAP_TINY_REFILL, HAKMEM_SAFE_FREE_STRICT, HAKMEM_TINY_GUARD
- HAKMEM_TINY_DEBUG_FAST0, HAKMEM_TINY_DEBUG_REMOTE_GUARD
Optimization/TLS/Memory (9):
- HAKMEM_TINY_QUICK, HAKMEM_USE_REGISTRY
- HAKMEM_TINY_TLS_LIST, HAKMEM_TINY_DRAIN_TO_SLL, HAKMEM_TINY_ALLOC_RING
- HAKMEM_TINY_MEM_DIET, HAKMEM_SLL_MULTIPLIER
- HAKMEM_TINY_PREFETCH, HAKMEM_TINY_SS_RESERVE
Impact:
- ENV_VARS.md: 327 lines → 285 lines (-42 lines, 12.8% reduction)
- Code impact: Zero (documentation-only cleanup)
- Variables were: planned features never implemented, replaced features,
or abandoned experiments
Documentation:
- Added SAFE_TO_DELETE_ENV_VARS.md to docs/analysis/
- Complete analysis of why each variable is obsolete
- Verification proof that variables don't exist in code
File: docs/specs/ENV_VARS.md
Status: Documentation cleanup - no code changes
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 02:52:35 +09:00
## Notes
2025-11-27 03:18:33 +09:00
- These were planning placeholders (adaptive tuning knobs, generic debug toggles, and early build-time experiments) that never materialized.
- Keeping them in docs increases cognitive load; deleting them is a zero-risk, reversible documentation-only change.