From a176b8fac748b2ed770e118cfb9c55df6e00be8d Mon Sep 17 00:00:00 2001 From: Davood Tofighi Date: Mon, 14 Sep 2026 16:35:52 -0600 Subject: [PATCH 1/3] docs: park issue #487 (AI rewrite trigger) in .STATUS Worth-it review found real value but user chose to park rather than start now. Backlog is fully clear: 0 open issues, 0 open PRs, 2 parked (#487, #517). Co-Authored-By: Claude Sonnet 5 --- .STATUS | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.STATUS b/.STATUS index 5523c1f98..aa3657f06 100644 --- a/.STATUS +++ b/.STATUS @@ -959,25 +959,24 @@ the 2026-09-12 session block above. **Issue #275 shipped and closed (2026-09-13)** — `teach dashboard`, PR #522 merged to `dev`. See the 2026-09-13 session block above. -1. **Issue #487** — AI rewrite trigger (`:rw`/`:rwq`): unbuilt, spec lost, four decisions - preserved in the issue body. Needs a re-written spec before any implementation. -2. **Markdown-lint backlog** (advisory, non-blocking by design) — 394 errors, 138 of them MD040 +1. **Markdown-lint backlog** (advisory, non-blocking by design) — 394 errors, 138 of them MD040 (fenced blocks needing a language tag). `test.yml` documents why it stays advisory; clearing it is the precondition for making that gate blocking. -3. **Decide the fate of `feature/email-dispatcher-restructure`** — either merge its ORCHESTRATE +2. **Decide the fate of `feature/email-dispatcher-restructure`** — either merge its ORCHESTRATE plan's substance somewhere durable, or retire the branch deliberately. Left standing 2026-09-05 because it is the only copy. + because it is the only copy. ## Parked - API documentation push (50% → 80% coverage of 348 functions) — parked 2026-07-02, no active driver -- ~~Code workspace manager (`code ws` dispatcher)~~ — retired 2026-07-02, spec moved to `docs/specs/_archive/SPEC-code-workspace-2026-02-13.md` (never implemented, no demand signal in 4.5mo) - **Issue #517** — historical `DC_API_KEY` exposure — parked 2026-09-13, nothing actionable left (provider unidentified, no consumer, no live credential to rotate; history-scrub deferred) +- **Issue #487** — AI rewrite trigger (`:rw`/`:rwq`) — parked 2026-09-14 by user decision (worth-it review done: real recurring friction, moderate effort, low risk, but not prioritized now). Spec lost, four architecture/backend decisions preserved in the issue body; needs a fresh spec, not a resume, whenever picked back up. --- -**Last Updated:** 2026-09-13 -**Status:** v7.17.3 released and tagged (2026-09-09/10) | `dev` ahead of `main` by `teach check` (#359, PR #519) + `teach week` fix (#521) + `teach dashboard` (#275, PR #522, squash-merged `43493df`) | 0 open PRs | 1 open issue (#487) + 1 parked (#517) | full suite (ZDOTDIR-isolated) — 86 passed / 2 failed (test-atlas-contract, e2e-em-dispatcher — pre-existing external-tool drift, reproduced on `dev` baseline, unrelated to this diff) / 0 timeout across 86 registered suites | man-page guard passing | markdown lint ADVISORY and failing by design (394 errors) | 14 dispatchers + `at` bridge (`teach dashboard` is a new subcommand, not a new dispatcher) | 179 `test-*.zsh` suite files +**Last Updated:** 2026-09-14 +**Status:** v7.17.3 released and tagged (2026-09-09/10) | `dev` ahead of `main` by `teach check` (#359, PR #519) + `teach week` fix (#521) + `teach dashboard` (#275, PR #522, squash-merged `43493df`) | 0 open PRs | 0 open issues | 2 parked (#487, #517) | full suite (ZDOTDIR-isolated) — 86 passed / 2 failed (test-atlas-contract, e2e-em-dispatcher — pre-existing external-tool drift, reproduced on `dev` baseline, unrelated to this diff) / 0 timeout across 86 registered suites | man-page guard passing | markdown lint ADVISORY and failing by design (394 errors) | 14 dispatchers + `at` bridge (`teach dashboard` is a new subcommand, not a new dispatcher) | 179 `test-*.zsh` suite files ## wins: Fixed the regression bug (2026-07-06), --category fix squashed the bug (2026-07-06), fixed the bug (2026-07-06), Fixed the regression bug (2026-07-06), --category fix squashed the bug (2026-07-06) ## streak: 1 ## last_active: 2026-07-06 12:53 From b3599b0df3f5dca9c9e67ef71845bf69e26c5697 Mon Sep 17 00:00:00 2001 From: Davood Tofighi Date: Mon, 14 Sep 2026 16:45:40 -0600 Subject: [PATCH 2/3] fix(zsh): harden _radian_version_check against a contaminated version cache The R-vs-radian version-drift check compared the cached value to the current R version with no validation of either side. If the cache ever held radian's own version string (format "0.6.16" -- indistinguishable from a real X.Y.Z version by a plain semver regex) instead of R's, the next login produced a nonsensical warning like "R changed: 0.6.16 -> 4.6.1" even though nothing was actually wrong. R has not shipped a major version below 2 in decades; radian has never left major version 0. Require major >= 2 on both the freshly-read R version and the cached value before comparing -- a malformed or contaminated value is now silently ignored (and self-heals on write) instead of producing a false warning. E2E: extracted the live function, stubbed R, and ran it against an isolated HOME/cache in 3 scenarios -- contaminated cache (no warning, cache self-heals), genuine version change (warns correctly), and no change (silent). All three passed against the actual shipped code. Co-Authored-By: Claude Sonnet 5 --- zsh/.zshrc | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/zsh/.zshrc b/zsh/.zshrc index 5cb0cc6c5..536f46e7f 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -1116,14 +1116,24 @@ fi # If R was upgraded since last shell start, warn user to rebuild radian _radian_version_check() { command -v R >/dev/null 2>&1 || return 0 - local r_ver cached cache_dir + local r_ver cached cache_dir old r_ver=$(R --version 2>/dev/null | head -1 | awk '{print $3}') + # Guard against a malformed R --version parse, AND against radian's own + # "0.6.x"-style version string ending up here by mistake (both are valid + # X.Y.Z shapes, so a plain semver regex can't tell them apart -- R has not + # shipped a major version 0 or 1 release in decades, radian has never left + # major version 0, so major >= 2 is the actual discriminator). + [[ "$r_ver" =~ ^[2-9][0-9]*\.[0-9]+\.[0-9]+$ ]] || return 0 cache_dir="${HOME}/.cache" cached="${cache_dir}/radian_r_version" mkdir -p "$cache_dir" if [[ -f "$cached" ]]; then - local old=$(cat "$cached") - if [[ "$old" != "$r_ver" ]]; then + old=$(cat "$cached") + # Only warn if the cached value is itself a plausible R version -- a + # stale/contaminated cache entry must not be compared against the real + # R version, or the warning is nonsense (this is exactly how a past + # version of this check produced "R changed: 0.6.16 -> 4.6.1"). + if [[ "$old" =~ ^[2-9][0-9]*\.[0-9]+\.[0-9]+$ && "$old" != "$r_ver" ]]; then print -P "%F{yellow}⚠️ R changed: ${old} → ${r_ver}. If radian breaks, run: pipx reinstall radian%f" fi fi From 4e4c1cdb2776b1b034c0cf6018e0b72b6dfd37e2 Mon Sep 17 00:00:00 2001 From: Davood Tofighi Date: Mon, 14 Sep 2026 16:49:08 -0600 Subject: [PATCH 3/3] fix(zsh): correct major-version regex to handle double-digit majors The previous commit's ^[2-9][0-9]*\. regex only matched when the LEADING digit was 2-9, so a future double-digit major like R 10.x (leading digit 1) would be wrongly rejected as "not a real version" despite 10 >= 2. Caught in review before merge, not by a user report. Corrected to ^([1-9][0-9]+|[2-9])\. -- true major >= 2, single or multi-digit. Re-ran the full E2E suite plus 2 new double-digit-major cases (10.0.0 vs 9.9.9 must warn, 10.0.0 vs 10.0.0 must not) against the actual shipped function; all 5 scenarios pass. Co-Authored-By: Claude Sonnet 5 --- zsh/.zshrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zsh/.zshrc b/zsh/.zshrc index 536f46e7f..f5acff627 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -1123,7 +1123,7 @@ _radian_version_check() { # X.Y.Z shapes, so a plain semver regex can't tell them apart -- R has not # shipped a major version 0 or 1 release in decades, radian has never left # major version 0, so major >= 2 is the actual discriminator). - [[ "$r_ver" =~ ^[2-9][0-9]*\.[0-9]+\.[0-9]+$ ]] || return 0 + [[ "$r_ver" =~ ^([1-9][0-9]+|[2-9])\.[0-9]+\.[0-9]+$ ]] || return 0 cache_dir="${HOME}/.cache" cached="${cache_dir}/radian_r_version" mkdir -p "$cache_dir" @@ -1133,7 +1133,7 @@ _radian_version_check() { # stale/contaminated cache entry must not be compared against the real # R version, or the warning is nonsense (this is exactly how a past # version of this check produced "R changed: 0.6.16 -> 4.6.1"). - if [[ "$old" =~ ^[2-9][0-9]*\.[0-9]+\.[0-9]+$ && "$old" != "$r_ver" ]]; then + if [[ "$old" =~ ^([1-9][0-9]+|[2-9])\.[0-9]+\.[0-9]+$ && "$old" != "$r_ver" ]]; then print -P "%F{yellow}⚠️ R changed: ${old} → ${r_ver}. If radian breaks, run: pipx reinstall radian%f" fi fi