Finding #1 (ACK-NOT-VALID): Acknowledged. The reviewer explicitly notes this is a known limitation of the os.SameFile pattern and that "no action is required" — the code comment already labels it defense-in-depth. No change needed.
Finding #4 (ACK-NOT-VALID): os.Lstat is intentionally used here for consistency with checkStaleDocs, which also uses Lstat to avoid implicit symlink-follow semantics. Switching to Stat post-EvalSymlinks would be equivalent in practice but inconsistent with the rest of the file. Deliberate choice — no change needed.
Finding #2 (ACK-NOT-VALID): Acknowledged. The reviewer confirms no issue — the ModeSymlink check removal is correct (the check was genuinely unreachable after filepath.EvalSymlinks), the comment is accurate, and this is a deliberate documented choice. No action needed.
Finding #5 (ACK-NOT-VALID): User-facing error messages intentionally reference *docmapFlag (the original --docmap value) rather than the resolved path. Showing the resolved path would confuse users who specified a symlink — they would see a path they did not specify. Accepted UX tradeoff.
Finding #1 (ACK-NOT-VALID): Acknowledged. The reviewer explicitly states this is a known limitation of the os.SameFile pattern and that "no action is required" — the code comment already labels it defense-in-depth. No code change needed.
Finding #1 (ACK-NOT-VALID): Acknowledged. The reviewer explicitly notes this is a known limitation of os.SameFile and that "no action is required" — the code comment already labels it defense-in-depth. No change needed.
Finding #5 (ACK-NOT-VALID): User-facing error messages intentionally reference *docmapFlag (the original --docmap value) rather than the resolved path. Showing the resolved path in errors would confuse users who specified a symlink — they want to see the path they actually provided.
Finding #4 (ACK-NOT-VALID): os.Lstat is intentionally used here for consistency with checkStaleDocs, which also uses Lstat to avoid implicit symlink-follow semantics. Switching to Stat post-EvalSymlinks would be equivalent but would create an inconsistency within the file.
Finding #2 (ACK-NOT-VALID): Acknowledged. The reviewer confirms no issue — the ModeSymlink removal is correct (the check was genuinely unreachable after EvalSymlinks), the comment is accurate, and the removal is a deliberate documented choice.
Finding #1 (ACK-NOT-VALID): Acknowledged. The reviewer explicitly notes this is a known limitation of the os.SameFile pattern and that "no action is required" — the code comment already labels it defense-in-depth. No code change needed.
Finding #5 (ACK-NOT-VALID): User-facing error messages intentionally reference *docmapFlag (the original --docmap value) for user clarity — showing a resolved path the user never specified would be surprising. The reviewer notes this is acceptable. No change needed.
Finding #4 (ACK-NOT-VALID): os.Lstat is intentionally used here for consistency with checkStaleDocs, which also uses Lstat to avoid implicit symlink follow. Mixing Stat/Lstat in the same file would be more confusing than the minor clarity benefit. The reviewer notes this is fine and the PR is approved.
Finding #2 (ACK-NOT-VALID): Acknowledged. The ModeSymlink guard was genuinely unreachable after EvalSymlinks and its removal is correct. The comment accurately documents why. The reviewer confirms this is a deliberate, documented choice — no issue.
Finding #1 (ACK-NOT-VALID): Acknowledged. This is a known OS-level limitation of the os.SameFile pattern documented in the code comment as defense-in-depth. The reviewer explicitly states "no action required." The code is correct as-is.
Test review with inline comment
TEST: ACK-NOT-VALID — test reply to thread 27980
All findings from the current HEAD round (sonnet/4814, security/4816, gpt/4817 against eb0ff3aa) have been addressed:
Thread 27980 (sonnet NIT — os.SameFile TOCTOU limitation): ACK-NOT-VALI…