Skip to content

feat: harden LLM calls and fix test failures#38

Merged
WellDunDun merged 7 commits intodevfrom
custom/prefix/router-1773327317629
Mar 12, 2026
Merged

feat: harden LLM calls and fix test failures#38
WellDunDun merged 7 commits intodevfrom
custom/prefix/router-1773327317629

Conversation

@WellDunDun
Copy link
Collaborator

Summary

Merge audit improvements: exponential backoff retry for transient LLM subprocess failures, JSONL validation cap to prevent timeouts on large logs, and dashboard constant refactor for source-truth alignment.

Changes

  • Add RetryOptions interface to callViaAgent with exponential backoff (2s → 4s → 8s). Retries only on transient subprocess failures, not user errors.
  • Cap JSONL health-check validation at 500 lines to prevent timeouts on large log files (65K+ lines). Full line count still reported.
  • Export DEFAULT_WINDOW_SESSIONS constant from status.ts and use it in dashboard.ts and dashboard-server.ts instead of telemetry.length.
  • Fix test fixture source field in bundle.test.ts from "hook" to "claude_code_replay" to match high-confidence record filter.

Test plan

  • All 1183 fast tests pass (3.27s)
  • Dashboard server tests pass (22/22 in 3.45s)
  • Lint clean (biome + architecture)
  • No regressions in observability, grading, or test harness

🤖 Generated with Claude Code

WellDunDun and others added 7 commits March 10, 2026 22:02
Replace relative path imports of telemetry-contract with the published
@selftune/telemetry-contract workspace package. Adds workspace config to
package.json and expands tsconfig includes to cover packages/*.

Closes SEL-10

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add version 1.0.0 and package metadata (description, author, license,
repository) to the telemetry-contract package. Create golden fixture file
with one valid example per record kind and a test suite that validates
all fixtures against the contract validator.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add make test-fast / test-slow targets (5s vs 80s, 16x faster dev loop)
- Add bun run test:fast / test:slow scripts in package.json
- Reposition README as "Claude Code first", update competitive comparison
- Bump PRD.md version to 0.2.1
- Add CHANGELOG unreleased section (source-truth, telemetry-contract, test split)
- Fix pre-existing lint: types.ts formatting, golden.test.ts import order

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Document all selftune sync flags (--since, --dry-run, --force, etc.)
- Add selftune hook dispatch command with all 6 hook names
- Verified init, activation rules, and source-truth sections already current

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add exponential backoff retry to callViaAgent for transient subprocess
failures. Cap JSONL health-check validation at 500 lines to prevent
timeouts on large log files. Use exported DEFAULT_WINDOW_SESSIONS
constant in dashboard data collection instead of telemetry.length.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@WellDunDun WellDunDun merged commit 9ea8a5c into dev Mar 12, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant