Skip to content
This repository was archived by the owner on Feb 12, 2026. It is now read-only.

Conversation

@wlawt
Copy link

@wlawt wlawt commented Feb 9, 2026

Move refcell/roxy to base/infra/roxy

Follow up cleanup PRs:

  • Move crates/roxy/bin/ to bin/
  • Move crates/roxy/cli/ to bin/roxy/

Open questions:

  • Don't make each folder in crates/roxy/ its own package?

refcell and others added 30 commits January 6, 2026 13:44
- Add #[macro_use] extern crate tracing across workspace for cleaner macro usage
- Extract monolithic lib.rs (585 lines) into 8 focused modules
- Introduce factory types (BackendFactory, GroupFactory, RouterFactory, etc.)
- Add AppBuilder with fluent API following ServerBuilder pattern
- Preserve all existing public APIs as convenience wrappers
Apply rustfmt formatting and fix lychee docs glob pattern to properly
match markdown files in the docs directory.
The --no-fail-if-empty flag doesn't exist in lychee v0.21.0. Use the
lychee-action's failIfEmpty parameter instead.
Resolve clippy warnings for production readiness:

- Replace default() with unit struct construction for unit structs (clippy::default_constructed_unit_structs)
- Use if let instead of match for single-pattern destructuring (clippy::single_match)

Verified: clippy clean, all tests pass.
* feat(cli): add SIGTERM handling for graceful container shutdown

Container orchestrators like Kubernetes and Docker send SIGTERM for
graceful termination. This change adds SIGTERM handling alongside
the existing SIGINT (Ctrl+C) handling to ensure proper production
shutdown behavior.

On Unix systems, both signals are now handled via tokio::select!.
On non-Unix systems (Windows), the existing Ctrl+C behavior is preserved.

* style: apply nightly rustfmt formatting

* fix: implement proper SIGTERM handling for container graceful shutdown

Add platform-specific shutdown signal handling:
- Unix: handles both SIGINT (Ctrl+C) and SIGTERM (container termination)
- Non-Unix: preserves existing Ctrl+C behavior

This enables proper graceful shutdown when running in container orchestrators
like Kubernetes and Docker which send SIGTERM for termination.
* fix(server): use HeaderValue::from_static for static header values

Replace .parse().unwrap() with safer alternatives:
- Use HeaderValue::from_static for constant 'application/json' (infallible)
- Use HeaderValue::from_str with if-let for dynamic Retry-After values

This improves code safety by avoiding panics on header parsing.

* chore: add #[must_use] annotations to public functions

Add #[must_use] attribute to public functions that return values
where ignoring the result would likely be a bug:
- codec.rs: ParsedRequest, ParsedRequestPacket, ParsedResponse,
  JsonRpcError, RpcCodec constructors and query methods
- connection.rs: ConnectionState, ConnectionStateMachine state
  query methods
- safe_tip.rs: SafeTip constructor and tip query methods

This helps catch potential bugs at compile time when callers
accidentally ignore important return values.

* style: fix nightly rustfmt formatting
* fix: replace panicking patterns with proper error handling

- HttpBackend::new now returns Result instead of panicking on client build failure
- Replace header .parse().unwrap() with HeaderValue::from_static for constants
- Use HeaderValue::from_str with proper error handling for dynamic headers
- Propagate HTTP client errors through the Result chain

* fix: collapse nested if statements per clippy lint
Replace bare .unwrap() with .expect("1000 is non-zero") to explicitly
document why this call cannot fail at runtime.
Handle<T> struct already has #[must_use] attribute, making the
attribute on the constructor redundant. This fixes clippy's
double_must_use warning.
The with_label method returns a new labeled spawner without mutating
the original. Callers who discard the return value likely have a bug,
as the original spawner remains unlabeled.
The with_label trait method had two #[must_use] attributes, causing
a compiler warning. Kept the more descriptive message version.
refcell and others added 6 commits February 1, 2026 18:35
- Add BACKEND_TIMEOUT error code constant (-32011) to error_codes module
- Add explicit BackendTimeout match arm in to_error_payload()
- Use inline format args for consistency
- Add test coverage for BackendTimeout error code and payload message
- Add backticks to ErrorPayload in error.rs doc (clippy doc_markdown)
- Inline format args in to_error_payload() (clippy uninlined_format_args)
- Add # Errors documentation to Decode and Encode trait methods (clippy missing_errors_doc)
- Add # Errors documentation to Handle::join() (clippy missing_errors_doc)
* style: use inline format args for improved readability

Replace format!("{}", var) with format!("{var}") across cache, backend,
server, and cli crates. This follows the Rust 2021 edition style and
improves code readability.

* docs: add # Errors sections and fix doc_markdown warnings

- Add backticks to ErrorPayload in error.rs doc (clippy doc_markdown)
- Inline format args in to_error_payload() (clippy uninlined_format_args)
- Add # Errors documentation to Decode and Encode trait methods (clippy missing_errors_doc)
- Add # Errors documentation to Handle::join() (clippy missing_errors_doc)

* test(runtime): add comprehensive tests for TokioContext

Add 16 tests covering the TokioContext implementation:
- Constructor tests (new, default)
- Spawner trait (spawn, with_label, stop, stopped)
- Clock trait (now, sleep)
- Clone/state sharing behavior
- Debug implementation

* style: use inline format args for improved readability

Replace format!("{}", var) with format!("{var}") in cache, backend,
server, and cli crates. This follows the Rust 2021 edition style.

* fix: format memory.rs after inline format args change
Add #[must_use] attribute to CodecError::new() and ValidationError::new()
to ensure callers use the returned error value, consistent with other
constructor methods in the codebase.
…033c'

git-subtree-dir: _roxy_import
git-subtree-mainline: dae5882
git-subtree-split: c87514b
@cb-heimdall
Copy link
Collaborator

cb-heimdall commented Feb 9, 2026

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants