fix(trogon-std): rename trogonstd to trogon-std#5
Conversation
PR SummaryLow Risk Overview
Env var check: This PR continues to reference Written by Cursor Bugbot for commit 4d3a665. This will update automatically on new commits. Configure here. |
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. WalkthroughThis PR systematically renames the package from Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
- backoff_shift_saturates_at_31_for_high_attempt_counts: verifies the
formula (attempts-1).min(31) saturates the shift count at 31 for all
attempt values >= 32, preventing u32 overflow in Duration arithmetic
- e2e_empty_query_string_appended_as_bare_question_mark: documents that
a URI with trailing '?' (empty query) causes uri.query() = Some(""),
which the proxy formats as "?" and appends to the upstream URL
Gaps #1 (double publish failure) and #8 (consumer stream error) are not
testable without introducing a trait abstraction over async_nats::Client.
- backoff_shift_saturates_at_31_for_high_attempt_counts: verifies the
formula (attempts-1).min(31) saturates the shift count at 31 for all
attempt values >= 32, preventing u32 overflow in Duration arithmetic
- e2e_empty_query_string_appended_as_bare_question_mark: documents that
a URI with trailing '?' (empty query) causes uri.query() = Some(""),
which the proxy formats as "?" and appends to the upstream URL
Gaps #1 (double publish failure) and #8 (consumer stream error) are not
testable without introducing a trait abstraction over async_nats::Client.
- backoff_shift_saturates_at_31_for_high_attempt_counts: verifies the
formula (attempts-1).min(31) saturates the shift count at 31 for all
attempt values >= 32, preventing u32 overflow in Duration arithmetic
- e2e_empty_query_string_appended_as_bare_question_mark: documents that
a URI with trailing '?' (empty query) causes uri.query() = Some(""),
which the proxy formats as "?" and appends to the upstream URL
Gaps #1 (double publish failure) and #8 (consumer stream error) are not
testable without introducing a trait abstraction over async_nats::Client.
- backoff_shift_saturates_at_31_for_high_attempt_counts: verifies the
formula (attempts-1).min(31) saturates the shift count at 31 for all
attempt values >= 32, preventing u32 overflow in Duration arithmetic
- e2e_empty_query_string_appended_as_bare_question_mark: documents that
a URI with trailing '?' (empty query) causes uri.query() = Some(""),
which the proxy formats as "?" and appends to the upstream URL
Gaps #1 (double publish failure) and #8 (consumer stream error) are not
testable without introducing a trait abstraction over async_nats::Client.
- backoff_shift_saturates_at_31_for_high_attempt_counts: verifies the
formula (attempts-1).min(31) saturates the shift count at 31 for all
attempt values >= 32, preventing u32 overflow in Duration arithmetic
- e2e_empty_query_string_appended_as_bare_question_mark: documents that
a URI with trailing '?' (empty query) causes uri.query() = Some(""),
which the proxy formats as "?" and appends to the upstream URL
Gaps #1 (double publish failure) and #8 (consumer stream error) are not
testable without introducing a trait abstraction over async_nats::Client.
- backoff_shift_saturates_at_31_for_high_attempt_counts: verifies the
formula (attempts-1).min(31) saturates the shift count at 31 for all
attempt values >= 32, preventing u32 overflow in Duration arithmetic
- e2e_empty_query_string_appended_as_bare_question_mark: documents that
a URI with trailing '?' (empty query) causes uri.query() = Some(""),
which the proxy formats as "?" and appends to the upstream URL
Gaps #1 (double publish failure) and #8 (consumer stream error) are not
testable without introducing a trait abstraction over async_nats::Client.
- backoff_shift_saturates_at_31_for_high_attempt_counts: verifies the
formula (attempts-1).min(31) saturates the shift count at 31 for all
attempt values >= 32, preventing u32 overflow in Duration arithmetic
- e2e_empty_query_string_appended_as_bare_question_mark: documents that
a URI with trailing '?' (empty query) causes uri.query() = Some(""),
which the proxy formats as "?" and appends to the upstream URL
Gaps #1 (double publish failure) and #8 (consumer stream error) are not
testable without introducing a trait abstraction over async_nats::Client.
- backoff_shift_saturates_at_31_for_high_attempt_counts: verifies the
formula (attempts-1).min(31) saturates the shift count at 31 for all
attempt values >= 32, preventing u32 overflow in Duration arithmetic
- e2e_empty_query_string_appended_as_bare_question_mark: documents that
a URI with trailing '?' (empty query) causes uri.query() = Some(""),
which the proxy formats as "?" and appends to the upstream URL
Gaps #1 (double publish failure) and #8 (consumer stream error) are not
testable without introducing a trait abstraction over async_nats::Client.
…l-results TTL #3 — Pre-LLM heartbeat now reloads the KV revision and retries the claimed_at write on CAS conflict instead of just warning. Repeated conflicts no longer leave claimed_at stale, preventing startup recovery on another process from false-positively stealing an active run. If the reload reveals the promise reached a terminal state, the run stops cleanly to avoid duplicate side effects. #5 — System prompt pre-pin now reloads the revision and retries on CAS conflict instead of immediately reverting system_prompt to None. Reduces the window where a crash before the first checkpoint causes recovery to resume with a different system prompt. #7 — AGENT_TOOL_RESULTS bucket TTL raised to 2 × PROMISE_TTL (48 h). Tool results are written once and never updated, so their TTL counts from creation time. A run lasting up to 24 h could exhaust a 24 h TTL for tool results written early in the run; doubling the TTL ensures any result written at any point during a max-length run is still available at the very end.
…ar dedup check Three durability fixes: #1 — Re-enable checkpointing each turn `checkpointing_disabled` was sticky: once set true it never cleared, so a run that hit the size limit on turn N skipped all subsequent checkpoints even if later turns produced smaller payloads. Moved the declaration inside the `tool_use` match arm so it resets to `false` on every iteration. The size-guard re-disables it for the current turn only if trimming still fails. #5 — Reload + retry on Resolved write failure The `end_turn` Resolved write previously just logged a warning on CAS conflict or timeout, leaving the promise `Running`. Added a reload-and-retry path: on any write failure, `get_promise` is called to fetch the current revision; if the promise is still not Resolved, a second `update_promise` is attempted with the fresh revision. Mirrors the existing retry pattern in the checkpoint write path. #9 — Retry Linear `get_comments` pre-check once before graceful degradation A single transient network error in the idempotency pre-check was enough to bypass duplicate detection and post a duplicate comment. Now retries `get_comments` once; only proceeds without the check if both attempts fail.
#5 — heartbeat KV timeout now reloads revision and retries the write, matching the CAS-conflict arm. Under sustained NATS degradation the old code left claimed_at frozen; the reload+retry keeps it fresh and avoids false-positive stale detection by startup recovery. #2 — recovering resets to false when checkpointing is permanently disabled (payload exceeds all trim levels). Previously recovering stayed true forever, causing same-input tool calls in genuinely-new turns to return stale cached results (polling anti-pattern). New test recovering_resets_when_checkpointing_permanently_disabled covers the case. #7 — summarize_dropped_messages is now wrapped in a 30 s timeout. The call inherits a 5-minute LLM timeout which blocks the checkpoint write and leaves claimed_at stale for that window. 30 s is generous for a short summary; on timeout the empty Vec triggers the plain-trim fallback that was already there. #6 — list_running timeout raised from NATS_KV_TIMEOUT (10 s) to a dedicated LIST_RUNNING_TIMEOUT (2 min). The operation does N+1 KV reads; at 50+ stale promises under mild load the 10 s ceiling fires and silently skips recovery. 2 min covers hundreds of promises without blocking the consumer loop (recovery runs in a background task).
- backoff_shift_saturates_at_31_for_high_attempt_counts: verifies the
formula (attempts-1).min(31) saturates the shift count at 31 for all
attempt values >= 32, preventing u32 overflow in Duration arithmetic
- e2e_empty_query_string_appended_as_bare_question_mark: documents that
a URI with trailing '?' (empty query) causes uri.query() = Some(""),
which the proxy formats as "?" and appends to the upstream URL
Gaps #1 (double publish failure) and #8 (consumer stream error) are not
testable without introducing a trait abstraction over async_nats::Client.
- backoff_shift_saturates_at_31_for_high_attempt_counts: verifies the
formula (attempts-1).min(31) saturates the shift count at 31 for all
attempt values >= 32, preventing u32 overflow in Duration arithmetic
- e2e_empty_query_string_appended_as_bare_question_mark: documents that
a URI with trailing '?' (empty query) causes uri.query() = Some(""),
which the proxy formats as "?" and appends to the upstream URL
Gaps #1 (double publish failure) and #8 (consumer stream error) are not
testable without introducing a trait abstraction over async_nats::Client.
Summary
trogonstdcrate totrogon-stdfor consistent naming withtrogon-natsTest plan
cargo test --workspacepasses (75 tests + doctests)