Skip to content

fix(agent): downgrade per-attempt run mirror retry logs to warn - #3722

Merged
kojiwakayama merged 2 commits into
mainfrom
fix/sentry-veryfront-agent-3
Aug 14, 2026
Merged

fix(agent): downgrade per-attempt run mirror retry logs to warn#3722
kojiwakayama merged 2 commits into
mainfrom
fix/sentry-veryfront-agent-3

Conversation

@kojiwakayama

Copy link
Copy Markdown
Contributor

Fixes VERYFRONT-AGENT-3 (495 events — every one a retry attempt, not a distinct failure).

Root cause

recordHostedChunkMirrorRetryScheduled logged every flush retry at error level; node-sentry converts every error-level framework log into a Sentry capture, and retry backoff caps at 5s — so one degraded window of the run-event append endpoint emitted a Sentry error every ~5s per active run. The condition is self-healing (failed batches re-queue and flush on recovery); terminal stop/disable paths report separately.

Fix

Per-attempt retry logs are now warn-level, escalating to error only when consecutiveFailures reaches HOSTED_CHUNK_MIRROR_RETRY_ERROR_THRESHOLD = 5. Terminal stop/disable paths untouched (still error).

Testing (red-green TDD)

New run-chunk-mirror.test.ts drives the seam below and above the threshold asserting the instrumentation level for each — fails on pre-fix src where every attempt logs error (adversarial revert-check), passes at HEAD.

Reviewer notes (from adversarial verification)

  • After the threshold, every subsequent attempt logs error again (Sentry groups them; escalation is the intent) — a log-once-per-streak scheme would cap volume further if desired.

Every retry_scheduled flush outcome of the hosted run chunk mirror logged
at error level, and node-sentry converts error-level framework logs into
Sentry captures. With retry backoff capped at a few seconds, one degraded
window of the run-event append endpoint emitted a Sentry error every ~5s
per active run. The condition is self-healing, so log each retry attempt
at warn and escalate to error only once consecutiveFailures reaches 5.
Terminal stop/disable paths keep their existing error-level reporting.

Fixes VERYFRONT-AGENT-3
@coderabbitai

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@kojiwakayama, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 51 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 9c94decd-dc8e-44c9-97ea-e5361fd8d8c3

📥 Commits

Reviewing files that changed from the base of the PR and between 4eece1f and b3472e1.

📒 Files selected for processing (4)
  • docs/api-reference/veryfront/agent.md
  • src/agent/conversation/run-chunk-mirror.test.ts
  • src/agent/conversation/run-chunk-mirror.ts
  • src/security/repository-hardening.test.ts

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

📦 Client bundle boundary

Entrypoint Modules Source size Server leaks
src/index.client.ts 454 3062 KiB ⚠️ 39 known

A server module in a client graph aborts hydration in the browser. New leaks fail CI; known leaks are tracked in scripts/lint/client-bundle-baseline.json to burn down.

The retry-log change moved the generated API reference line number and added a test file that reshuffled coverage shard 2. That exposed repository-hardening tests that read repository files through process cwd while sibling parallel tests can temporarily chdir. Anchor those reads to the test module URL and refresh the pinned API reference line.

Constraint: CI runs docs generation on Deno 2.7.7/Linux; local newer Deno reported broad line-number drift.\nRejected: Regenerate all API docs locally | produced toolchain-only churn unrelated to the PR.\nConfidence: high\nScope-risk: narrow\nTested: deno test --preload=src/testing/preload.ts --no-check --parallel --allow-all --unstable-worker-options --unstable-net src/security/repository-hardening.test.ts src/testing/cwd.test.ts\nTested: deno test --preload=src/testing/preload.ts --no-check --allow-all --unstable-worker-options --unstable-net src/agent/conversation/run-chunk-mirror.test.ts\nTested: deno task lint:cwd-relative-test-reads\nTested: deno fmt --check src/security/repository-hardening.test.ts src/agent/conversation/run-chunk-mirror.ts src/agent/conversation/run-chunk-mirror.test.ts docs/api-reference/veryfront/agent.md\nTested: docker run --rm -u "501:20" -e DENO_DIR=/tmp/deno-cache -v "/private/tmp/veryfront-open-pr-review.CGPobM/pr-3722":/work -w /work denoland/deno:2.7.7 deno task docs:api-reference:check\nTested: deno task coverage:ci:shard -- --shard=2/8 --coverage-dir=/tmp/pr3722-coverage-shard-2.k9XkY0\nTested: deno check src/security/repository-hardening.test.ts src/agent/conversation/run-chunk-mirror.ts\nTested: git diff --check\nNot-tested: Full CI locally.
@kojiwakayama
kojiwakayama marked this pull request as ready for review August 14, 2026 18:39
@kojiwakayama
kojiwakayama added this pull request to the merge queue Aug 14, 2026
Merged via the queue into main with commit a8a22da Aug 14, 2026
34 checks passed
@kojiwakayama
kojiwakayama deleted the fix/sentry-veryfront-agent-3 branch August 14, 2026 20:14
@kojiwakayama kojiwakayama mentioned this pull request Aug 14, 2026
5 tasks
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