Repository navigation
Conversation
- Decode native JSON and paginated failures without requiring success data or page fields. - Preserve native error codes, full diagnostics and Retry-After through fallback and forbidden response paths. - Add seven offline regressions covering MCP guidance, unchanged success shapes and no extra retries.
- Replace map/unwrap_or_default chains with equivalent lazy map_or_else defaults and borrowed-string map_or values. - Preserve existing behavior and older API compatibility without suppressing warnings or pinning CI to an older compiler. - Verify formatting, Clippy, 585 tests and rustdoc with CI-matching Rust 1.100.0.
Collaborator
Author
|
Fixed CI in 155939b. Rust 1.100.0 Clippy rejected 17 map/unwrap_or_default chains under -D warnings. Replaced them with equivalent map_or/map_or_else expressions; no lint suppression or toolchain downgrade. Verification: all six GitHub checks passed (Ubuntu, macOS, Windows; push and pull_request workflows). Local Rust 1.100.0 formatting, Clippy, rustdoc, and tests passed: 585 passed, 2 skipped. CI: https://github.com/napbat/semctl/actions/runs/43752578692 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Preserve native HTTP failures when the response does not have an endpoint's success shape. This fixes three client-side losses:
Retry-After.Both decoders now use the existing structured-body failure path when their success envelope cannot deserialize. Status, native code/body and retry delay remain available to MCP error guidance. Successful standard/legacy pages are unchanged; no request retry policy changes.
Evidence and scope
A session-history audit found
GraphLoadingHTTP409 failures followed by the single retry instructed by the tool; some retries timed out. Those historical outputs do not establish the original raw wire-envelope shape or prove an agent retry loop. Source inspection exposed the decoding defects above; deterministic loopback regressions cover them. This PR does not fix or claim to explain the server's graph-loading availability.Seven new regressions cover bare loading errors through actual MCP error rendering, paginated errors without success fields, errors with incompatible success-data types, non-loading conflicts, plain-text gateways, successful standard/legacy pages, and forbidden responses with exactly one request.
Verification
Windows x64, Rust1.98.1, nextest0.9.152; eight build/test workers, isolated target directory:
cargo fmt --check— passed.cargo nextest run --workspace --locked --test-threads 8 --no-fail-fast— 585 passed, 2 skipped by the existing suite.cargo clippy --workspace --all-targets --locked -- -D warnings— passed.RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps --document-private-items --locked— passed.Local environment corrections: moved only this task's generated target off a full drive; placed the installed Rust toolchain ahead of an unconfigured mise
rustfmtshim for subprocess tests. No tests were weakened or production formatter behavior changed. Linux/macOS execution remains to CI.Built on an isolated branch from
origin/main(14c584e) to preserve unrelated existing checkout edits. OMP local settings and private Discord/history evidence are not included in this PR.