车东 Che, Dong

Sun 05 July, 2026

02:06 Add unit tests: callLLM/callLLMEndpoint semantics + cleanEmojiHtml XS… » Recent Commits to phpman:master
Add unit tests: callLLM/callLLMEndpoint semantics + cleanEmojiHtml XSS + tldr guard

test_enhance.php (23 tests):
- callLLM() empty config guard, callLLMEndpoint signature validation
- cleanEmojiHtml(): XSS defense (script/style/meta/title stripping,
  event handler removal, javascript:/data: URI neutralization,
  DOCTYPE/html/head/body wrapper stripping, <h1>→<h2> downgrade)

test_tldr_guard.php (4 tests):
- GIT_DESCRIBE defined() guard fallback chain
- Triple-fallback to 'unknown' pattern from tldr.php:109

Fix stale comment in format_html.php:71 (<span class="u"> → <u>)

Co-Authored-By: Claude <noreply@taotoken.net>

Sat 04 July, 2026

15:59 v4.9.25: fix FTS5 duplicate entries — DELETE FROM search_fts instead … » Recent Commits to phpman:master
v4.9.25: fix FTS5 duplicate entries — DELETE FROM search_fts instead of DROP+CREATE/RENAME

FTS5 shadow tables survive DROP TABLE on this SQLite version, causing
every index rebuild to append another full copy of all entries.
Total row count grew from 13,851 to 83,006 over 6 rebuilds.

DELETE FROM search_fts properly clears all content while keeping the
virtual table structure intact.

Also: rebuildSearchIndex() now only deletes mode='search' cache entries,
preserving all page HTML caches.

Co-Authored-By: AtomCode (deepseek-v4-flash) <noreply@atomgit.com>
15:44 v4.9.24: fix rebuildSearchIndex cache cleanup — DELETE WHERE mode='se… » Recent Commits to phpman:master
v4.9.24: fix rebuildSearchIndex cache cleanup — DELETE WHERE mode='search', not format='search'

Search results are stored with mode='search' (format='html'), not
format='search'. The v4.9.23 fix targeted format IN ('search','json')
which never matched any rows, leaving stale search caches intact.

Co-Authored-By: AtomCode (deepseek-v4-flash) <noreply@atomgit.com>
15:38 v4.9.23: fix rebuildSearchIndex — only delete search caches, not all … » Recent Commits to phpman:master
v4.9.23: fix rebuildSearchIndex — only delete search caches, not all HTML page caches

rebuildSearchIndex() was wiping all HTML page caches (perldoc 3852→61,
info 2583→43, pydoc 568→3, ri 4335→1) on every index rebuild.
Individual page caches are NOT search-index-dependent and must be preserved.

Now only removes format=('search','json') and section='fts' entries.

Co-Authored-By: AtomCode (deepseek-v4-flash) <noreply@atomgit.com>
07:49 Fix undefined GIT_DESCRIBE in tldr.php:85 (CLI batch crash) » Recent Commits to phpman:master
Fix undefined GIT_DESCRIBE in tldr.php:85 (CLI batch crash)

Line 85 used GIT_DESCRIBE without defined() guard.
CLI tools don't load phpMan.php, only src/config.php — GIT_DESCRIBE
is only defined when phpMan.php is loaded. Use defensive fallback:
GIT_DESCRIBE ? PHPMAN_VERSION ? 'unknown'.

Co-Authored-By: Claude <noreply@taotoken.net>
07:32 v4.9.22: code review fixes — <u> revert, cleanup patterns, dead code … » Recent Commits to phpman:master
v4.9.22: code review fixes — <u> revert, cleanup patterns, dead code removal, ETag logging, amp; consolidation, X-Forwarded-Proto

- format_html.php: revert <span class="u"> back to <u>, re-add </u><u> and <u>_</u> cleanup patterns
- source_info.php: remove unused $patterns/$placeholders arrays
- source_pydoc.php, source_ri.php: remove empty if blocks
- phpMan.php: add phpManLog() on ETag DB exception; consolidate amp; workaround
- util.php: add getQueryParam() helper for amp; fallback; add X-Forwarded-Proto
- README.md: document PHP 8.0+ requirement

Closes #208 (partially), #209, #210, #211, #212, #214, #215

Co-Authored-By: AtomCode (deepseek-v4-flash) <noreply@atomgit.com>

Fri 03 July, 2026

21:16 Add start-enhance-all.sh — two-phase batch runner » Recent Commits to phpman:master
Add start-enhance-all.sh — two-phase batch runner

Phase 1: --cache-only pre-generates HTML+MD cache (fast, no rate limit)
Phase 2: LLM emoji enhancement with configurable --rate-limit (default 60s)
Each mode runs independently with separate PID files.
Configure: bash start-enhance-all.sh [rate-limit-seconds]

Co-Authored-By: Claude <noreply@taotoken.net>
21:15 v4.9.21: configurable --rate-limit, default 120→60s » Recent Commits to phpman:master
v4.9.21: configurable --rate-limit, default 120→60s

Add --rate-limit=<s> CLI option to batch-enhance.php for per-run
rate control. Default reduced from 120s → 60s.

Co-Authored-By: Claude <noreply@taotoken.net>
10:54 v4.9.20: tool detection at deploy, --cache-only mode, fallback-2 max_… » Recent Commits to phpman:master
v4.9.20: tool detection at deploy, --cache-only mode, fallback-2 max_tokens fix

- cli/detect-tools.php: new script — detects perldoc/pydoc3/ri/info on server
- Makefile: runs detect-tools.php during deploy, writes tools_config.php
- src/config.php: includes tools_config.php, falls back to all-available
- src/web_footer.php: showForm() conditionally renders radio by PHPMAN_HAS_*
- cli/batch-enhance.php: new --cache-only flag (HTML+MD cache, skip LLM)
- start-enhance-all.sh: 3-phase workflow (reindex → cache warm → enhance)
- src/enhance.php: fallback max_tokens capped at 32768 (was 128000, HTTP 400)
- src/tldr.php: User-Agent PHPMAN_VERSION with defined() guard + config fallback

Co-Authored-By: Claude <noreply@taotoken.net>
06:43 v4.9.19: add id to submit button for Chrome form field warning » Recent Commits to phpman:master
v4.9.19: add id to submit button for Chrome form field warning

Co-Authored-By: Claude <noreply@taotoken.net>
02:57 v4.9.18: single-row form layout, dark mode field contrast, font size … » Recent Commits to phpman:master

Thu 02 July, 2026

14:53 v4.9.17: code review cleanup — dead code removal, abort fix, WAL safety » Recent Commits to phpman:master
07:56 v4.9.16: desktop form single-row layout (search + modes inline) » Recent Commits to phpman:master
06:33 v4.9.15: two-row form layout — search+button row, radios row below » Recent Commits to phpman:master
06:24 docs: add v4.9.11–v4.9.14 changelog entries » Recent Commits to phpman:master
06:07 v4.9.14: fix --status man emoji count — :mode was never bound » Recent Commits to phpman:master
05:57 v4.9.13: fix --status showing 0 for man — WAL checkpoint before read » Recent Commits to phpman:master

Wed 01 July, 2026

15:41 v4.9.12: emoji_html LLM empty no longer aborts batch » Recent Commits to phpman:master
06:50 v4.9.11: fix callLLM() non-retryable return value bug » Recent Commits to phpman:master
06:33 docs: add v4.9.5–v4.9.10 changelog + worktree rebase rule » Recent Commits to phpman:master