fix: follow-ups to #152 — session learner on macOS, Sonnet 5 price, release npm check - #153
Merged
Merged
Conversation
session-learner.sh piped the transcript into `timeout 90 claude -p`. Stock macOS has no `timeout`, so the command was not found (logged only to .learn.log), the model never ran, and the opt-in learner recorded nothing on a Mac. A shared forge_timeout in _guardlib.sh runs `timeout`, else Homebrew's `gtimeout`, else a bash watchdog. The watchdog keeps stdin (`<&0`: a background job without job control otherwise reads /dev/null) and sends its own output to /dev/null so a caller's $(...) never waits on its sleep. The learner's forge_lock reclaim relies on the 90 s cap, which the watchdog keeps. learn-consolidate.sh --llm now uses the same helper instead of its local one. Tests build a PATH with no timeout/gtimeout from symlinks, which reproduces stock macOS on the Linux runners too: forge_timeout keeps stdin and the exit status and kills an overrun; the real session-learner hook calls a stub claude and appends its lesson. Checked by hand in Git Bash: the unfixed hook logs "timeout: command not found" and never calls the stub. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
… them The session learner is a bash hook and writes $HOME/.claude/skills/learned. learnedDir() used node's homedir(), which on Windows reads USERPROFILE, so a Git Bash HOME that differed from it sent learn-consolidate to another folder. learnedDir() now follows HOME when set (POSIX homedir() already did). The hermetic test required every env var src reads to be unset under test. HOME is sandboxed by test/_setup.js, not unset, so the test now accepts HOME/USERPROFILE while they point away from the real home, and still fails the moment one holds it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
model_tiers.json scheduled Sonnet 5 to rise from $2/$10 to $3/$15 on 2026-09-01. Anthropic cancelled that increase: the pricing page (checked 2026-09-22) lists $2/$10 as the standard price. Since 2026-09-01 forge priced Sonnet 5 50% high, and the cost report, which reads the flat price, always had. Sonnet 5 is now a flat $2/$10 and pricingVerified is 2026-09-22 (all four tier prices re-checked). The universal router's registry entry matches. priceOf/allPricePairs take an optional table so the date-window logic keeps a test of its own with a synthetic schedule. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
v1.0.0 and v1.1.0 both shipped (npm serves them, the GitHub Releases exist) yet their release jobs failed the post-publish check, which tried 6 times 10 s apart: - v1.0.0: publish finished 02:17:23, check gave up 02:18:27; the packument's Last-Modified was 02:20:02 (159 s after publish). - v1.1.0: publish finished 13:12:17, check gave up 13:13:23; Last-Modified 13:16:29 (252 s after publish). The registry also serves packuments with Cache-Control max-age=300, so a retry could re-read the copy cached by the idempotency check's `npm view`. The check now tries 40 times 15 s apart with --prefer-online. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-ups found while verifying #152, which was merged (at
f64c540) before these commits arrived. One commit per fix:Session learner on macOS (
b78b55e).global/guards/session-learner.shrantimeout 90 claude -p. Stock macOS has notimeout, so the opt-in learner silently never recorded a lesson on a Mac; the error only reached.learn.log.forge_timeoutin_guardlib.shrunstimeout, elsegtimeout, else a bash watchdog./dev/null, so a caller's$(…)never waits on it.learn-consolidate.sh --llm, which 1.1.0 fixed by running without a limit, now uses the same helper and keeps its 180 s cap.Windows home folder (
339a869).learnedDir()followsHOME, which is where the bash learner writes.homedir()readsUSERPROFILEon Windows, so a differing Git BashHOMEsent the consolidator to another folder.test/_setup.jspoints them at its sandbox, and still fails if either holds the real home.Sonnet 5 price (
154246e).src/model_tiers.jsonscheduled $2/$10 → $3/$15 on 2026-09-01. Anthropic cancelled that increase.pricingVerified2026-09-22 (all four tier prices re-checked). The universal router registry matches.Release post-publish check (
c5227db). v1.0.0 and v1.1.0 both shipped but their release jobs went red. The check gave npm 60 s:Last-ModifiedThe registry also sends
Cache-Control: max-age=300, so a retry could re-read the copy cached by the pre-publishnpm view. The check now tries 40 × 15 s (10 minutes) with--prefer-online.Verification
Run locally on Windows (Node 24), on this branch's tree (
d9cab12):npm testnpm run lintnpm run typecheckforge docs checkbash -npasses;npm view … --prefer-onlinereturns the published versionWhy 8 tests skip here:
timeouttests. They build a symlinked PATH, which needs elevation on Windows, and Git Bash shipstimeoutanyway.Checked by hand in Git Bash, with a PATH holding no
timeout/gtimeout:timeout: command not foundand never calls the stubclaude.forge_timeout:$(…)returns in 0 s despite a 20 s watchdog.Not in this PR
claude-opus-4-8andclaude-fable-5are valid ids but listed as legacy;claude-opus-5andclaude-fable-5-1are current, at the same prices. Moving the tier table onto them is a product decision.🤖 Generated with Claude Code