You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A cache publish on a store whose logs/ dir cannot be created bakes in 120/50 as though config had said so #358
Both are set by scripts/log.sh:382-410. But log.shreturns at line 61 — return 1 2>/dev/null || true — on a store whose logs/ directory cannot be created. That is before line 366 and far before 382, so neither variable is ever set.
Two publish sites source it with stderr suppressed and no guard:
scripts/user-prompt-hook.sh:86-87
scripts/post-tool-hook.sh:212-217 (slow path)
scripts/session-start-hook.sh:80-89 is the one site that does guard it (command -v _remember_date -> exit 127), and that guard was written for exactly this failure mode.
Why the validation cannot catch it
On a read-only or permission-denied store the cache records 120/50 as though config had said so. _remember_env_cache_load's new validation (scripts/lib-env-cache.sh:136-137) accepts them — they are digits, which is the one property that cannot distinguish a default from a configured value here. scripts/post-tool-hook.sh:510 and :542 then read them as authoritative for the life of the cache, which is invalidated only by a config mtime change. So a user with cooldowns.save_seconds set to something else gets the default silently, until they touch their config.
REMEMBER_TZ travels the same route and predates this delta, but an empty TZ is honestly empty. 120 is a claim.
What settles it
chmod 000 the store's logs/ dir, fire user-prompt-hook.sh, and read the published cache file against a config.json setting cooldowns.save_seconds to something other than 120.
Shape of a fix
The command -v _remember_date guard session-start already carries, before the publish call at both sites.
Activity
release 0.21.0 — a store that could not get out of its own way
release 0.22.0 — guards that were written next door
fix: never let an unwritable logs/ dir masquerade as configured values (