• config-audit/v5.0.0 6cfca82885

    Ghost released this 2026-05-01 07:45:56 +00:00 | 400 commits to main since this release

    The v5.0.0-rc.1 N5 implementation looked up hotspot.path in
    calibrateAgainstApi() but token-hotspots.mjs only emitted hotspot.source —
    calibration silently produced 0 actual_tokens because every iteration hit
    the if (!hotspot?.path) continue guard.

    Fix: file-backed hotspots now expose path: h.absPath in the JSON output.
    MCP-server hotspots intentionally leave path unset — their tokens are
    runtime tool-schema (formula-based: 500 + toolCount × 200), not file
    content readable by count_tokens.

    SC-6b release-gate verified against tests/fixtures/marketplace-large:

    • Actual (count_tokens, claude-opus-4-7): 589 tokens for CLAUDE.md
    • Estimated (4-bytes/token byte heuristic): 594 tokens
    • Delta: -5 tokens / -0.85% — well within ±5% gate. PASS.

    CHANGELOG: documented the fix + SC-6b result inline under [5.0.0].

    All 635 tests still green. No estimateTokens tuning required for v5.0.0.

    Co-Authored-By: Claude Opus 4.7 noreply@anthropic.com

    Downloads