Skip to content

fix(trogon-std): rename trogonstd to trogon-std#5

Merged
yordis merged 1 commit into
mainfrom
fix-pk-name
Feb 18, 2026
Merged

fix(trogon-std): rename trogonstd to trogon-std#5
yordis merged 1 commit into
mainfrom
fix-pk-name

Conversation

@yordis

@yordis yordis commented Feb 18, 2026

Copy link
Copy Markdown
Member

Summary

  • Rename trogonstd crate to trogon-std for consistent naming with trogon-nats
  • Update all import paths and dependency references

Test plan

  • cargo test --workspace passes (75 tests + doctests)

@cursor

cursor Bot commented Feb 18, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Primarily a crate rename and import/dependency path updates; low behavioral risk but may break builds if any external consumers still reference trogonstd.

Overview
Renames the internal crate trogonstd to trogon-std and updates the workspace lockfile and downstream references to match.

trogon-nats now depends on trogon-std (including dev-deps) and switches Rust imports in code and doctests from trogonstd::… to trogon_std::…; trogon-std’s package name and README header are updated accordingly.

Env var check: This PR continues to reference NATS_URL, NATS_CREDS, NATS_NKEY, NATS_USER, NATS_PASSWORD, and NATS_TOKEN; please confirm these are defined in every environment (dev/staging/prod/CI) where trogon-nats runs.

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>
@yordis yordis merged commit 049b087 into main Feb 18, 2026
1 check passed
@yordis yordis deleted the fix-pk-name branch February 18, 2026 17:57
@coderabbitai

coderabbitai Bot commented Feb 18, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@yordis has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 18 minutes and 2 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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.

Walkthrough

This PR systematically renames the package from trogonstd to trogon-std across the codebase. Changes include updating the Cargo manifest package name, all module path references (converting hyphens to underscores per Rust conventions), and documentation examples. No logic, control flow, or public API changes are introduced.

Changes

Cohort / File(s) Summary
Cargo Manifests
rsworkspace/crates/trogon-nats/Cargo.toml, rsworkspace/crates/trogon-std/Cargo.toml
Package name and local dependency path renamed from trogonstd to trogon-std. Feature specifications remain unchanged.
Module Path Imports (trogon-nats)
rsworkspace/crates/trogon-nats/src/auth.rs, rsworkspace/crates/trogon-nats/src/lib.rs
Import statements corrected from trogonstd to trogon_std in regular and test imports.
Documentation Examples (trogon-std)
rsworkspace/crates/trogon-std/src/env/mod.rs, rsworkspace/crates/trogon-std/src/fs/mod.rs, rsworkspace/crates/trogon-std/src/time/mod.rs, rsworkspace/crates/trogon-std/src/time/mock.rs
Documentation code examples updated to reference correct module path trogon_std instead of trogonstd.
Documentation Header
rsworkspace/crates/trogon-std/README.md
Title updated from trogonstd to trogon-std.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A hop, a skip, a dash became an underscore,
The names align from shore to shore,
Old trogonstd now claims its hyphened crown,
As trogon-std travels through the codebase town! ✨

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-pk-name

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.

❤️ Share

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

jramirezhdez02 added a commit that referenced this pull request Feb 27, 2026
- 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.
jramirezhdez02 added a commit that referenced this pull request Apr 7, 2026
- 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.
mariorha pushed a commit that referenced this pull request Apr 7, 2026
- 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.
jramirezhdez02 added a commit that referenced this pull request Apr 9, 2026
- 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.
mariorha pushed a commit that referenced this pull request Apr 9, 2026
- 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.
mariorha pushed a commit that referenced this pull request Apr 10, 2026
- 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.
jramirezhdez02 added a commit that referenced this pull request Apr 13, 2026
- 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.
mariorha pushed a commit that referenced this pull request Apr 13, 2026
- 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.
mariorha added a commit that referenced this pull request Apr 14, 2026
…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.
mariorha added a commit that referenced this pull request Apr 14, 2026
…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.
mariorha pushed a commit that referenced this pull request Apr 15, 2026
#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).
mariorha pushed a commit that referenced this pull request Apr 20, 2026
- 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.
mariorha pushed a commit that referenced this pull request Apr 20, 2026
- 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.
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