Use Garry Tan's exact Claude Code setup: 23 opinionated tools that serve as CEO, Designer, Eng Manager, Release Manager, Doc Engineer, and QA
TypeScript
fix: update check ignores stale UP_TO_DATE cache after version change
Garry Tanbaf8acd55c39
diff --git a/bin/gstack-update-check b/bin/gstack-update-checkindex 79986ba1c..c9fad0c2b 100755--- a/bin/gstack-update-check+++ b/bin/gstack-update-check@@ -49,7 +49,12 @@ if [ -f "$CACHE_FILE" ]; thenCACHED="$(cat "$CACHE_FILE" 2>/dev/null || true)"case "$CACHED" inUP_TO_DATE*)- exit 0+ # Verify local version still matches cached version+ CACHED_VER="$(echo "$CACHED" | awk '{print $2}')"+ if [ "$CACHED_VER" = "$LOCAL" ]; then+ exit 0+ fi+ # Local version changed — fall through to re-check;;UPGRADE_AVAILABLE*)# Verify local version still matches cached old versiondiff --git a/browse/test/gstack-update-check.test.ts b/browse/test/gstack-update-check.test.tsindex a0fefb738..475f3e64c 100644--- a/browse/test/gstack-update-check.test.ts+++ b/browse/test/gstack-update-check.test.ts@@ -86,6 +86,19 @@ describe('gstack-update-check', () => {expect(stdout).toBe('');});+ // ─── Path D1b: Fresh UP_TO_DATE cache, but local version changed ──+ test('re-checks when UP_TO_DATE cache version does not match local', () => {+ writeFileSync(join(gstackDir, 'VERSION'), '0.4.0\n');+ // Cache says UP_TO_DATE for 0.3.3, but local is now 0.4.0+ writeFileSync(join(stateDir, 'last-update-check'), 'UP_TO_DATE 0.3.3');+ // Remote says 0.5.0 — should detect upgrade+ writeFileSync(join(gstackDir, 'REMOTE_VERSION'), '0.5.0\n');++ const { exitCode, stdout } = run();+ expect(exitCode).toBe(0);+ expect(stdout).toBe('UPGRADE_AVAILABLE 0.4.0 0.5.0');+ });+// ─── Path D2: Fresh cache, UPGRADE_AVAILABLE ────────────────test('echoes cached UPGRADE_AVAILABLE when cache is fresh', () => {writeFileSync(join(gstackDir, 'VERSION'), '0.3.3\n');