docs(memory): add BDR-009 + LRN-008 (dtach menu -> ~/.bashrc, VS Code non-login)

- BDR-009: reverses BDR-007; menu moved to ~/.bashrc because VS Code
  Remote-SSH terminals are non-login; per-tab firing accepted over a
  once-per-connection sentinel.
- LRN-008: VS Code Remote-SSH (Linux) terminals are non-login -> skip
  ~/.profile; hook ~/.bashrc for "run once at session start"; diagnose via
  VSCODE_IPC_HOOK_CLI + no login-bash ancestry + shopt -q login_shell.
- journal: 2026-06-25 session entry.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CN1KSmsuLG6TxSeN5m8xvM
This commit is contained in:
Bastien Chanot
2026-06-26 00:09:16 +02:00
co-authored by Claude Opus 4.8
parent e37eb77ed5
commit ea33e231ef
3 changed files with 33 additions and 0 deletions
+11
View File
@@ -56,3 +56,14 @@ returned EMPTY while code-server + RDP stayed undocumented. A partial doc commit
hides earlier feature drift. Fix: drift-detect against FEATURE commits (scan `git log` for feat/* touching
source since the doc's last SUBSTANTIVE edit, OR cross-ref each entry-point / install-step in code vs doc
text) — never trust doc timestamp alone. Surfaced by /doc clean this session.
## LRN-008 — VS Code Remote-SSH terminals are non-login → skip ~/.profile
2026-06-25. VS Code Remote-SSH (Linux) integrated terminals = NON-login interactive bash → source `~/.bashrc`,
NEVER `~/.profile`. Any login-scoped startup wiring (`~/.profile`, `~/.bash_profile`) silently never runs there.
Diagnose via process tree: `VSCODE_IPC_HOOK_CLI` env + `.vscode-server/.../remote-cli` in PATH, no `sshd` /
no `bash -l` ancestry (the launching shell reparents to systemd); confirm with `shopt -q login_shell`. For
"run once at session start" that must work under VS Code, hook `~/.bashrc` (universal: sourced by login shells
via `~/.profile` AND directly by non-login interactive shells), NOT `~/.profile`. Extends/corrects LRN-006
(its `~/.profile` fix is valid only for real login shells, not IDE remotes). Deductive tell that pinned it:
wiring proven correct + target resource (session) proven present, yet menu never fires at startup → the startup
file is not being sourced → non-login shell. See BDR-009.