Repository navigation
Conversation
R41-J2-MED1: the DIRECT overflow stash evicted live, unredeemed responses when the count (1024) or byte (256 MiB) budget was exceeded. The handler had already run for them, so the later fetch0 / stream0 failed with a 500 for a correct response. The stash now sweeps only TTL-expired entries; a fresh overflow is refused with a retryable 503 only past the hard ceilings (4096 entries, 1 GiB held), and a re-put over a live token is never refused. The DirectStash and StashedOverflowException javadoc document the retention and the fetch0 Integer.MIN_VALUE contract. R41-IP1-L1: try_on_shared_runtime refuses a hook once the shared runtime build has failed, so cron takes its error path instead of reporting the job accepted. Child-process test added. R41-CJ1-L1: OpenApi::merge ignores an empty webhooks map from the other side (as merge_component_map does). Test added. R41-CJ2-L1, R41-IP0-L1, R41-I4-01: doc and comment corrections only (unescape_schema_name lossy UTF-8, RequestEnvelope::headers single value, tracing test comment). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Round 41 runtime findings (one MEDIUM, five LOW). All seven were verified against the code before fixing; none was refuted.
R41-J2-MED1 (MEDIUM): DIRECT overflow stash evicted live responses
Stash::evictdropped the least recently stashed entries whenever the count (1024) or byte (256 MiB) budget was exceeded. An entry is stashed only after its handler ran, so an evicted, still-unredeemed response turned a correct response into a failedfetch0/stream0(a 500 on the Java side).Change:
MAX_STASHED= 4096 entries andMAX_STASHED_BYTES= 1 GiB held (one response larger than the byte ceiling is kept alone when the stash is empty). A refused overflow answers a retryable503wire. A re-put over a live token is never refused.DirectStash.javaandStashedOverflowException.javajavadoc document the retention and thefetch0Integer.MIN_VALUEcontract (unknown, expired, discarded or already redeemed while the runtime is live).Residual, by design: at the hard ceiling a new overflow still gets a
503instead of its response. Delivering it would need a Java-side change or a re-run of the handler, so I did not add one.R41-IP1-L1 (LOW): try_on_shared_runtime accepted hooks after a failed build
try_on_shared_runtimenow returnsfalsewhenRUNTIMEis settled as a failed build, so cron takes its "not scheduled" error path.start_runtime_for_hooksalready returnedfalsein that state (runtime()isNone); its doc now says so. Test: child-processhooks_are_refused_after_a_failed_build.Not covered: a hook queued while the build was still running, before it failed, is accepted and never flushed. Closing the queue on failure needs a branch no test can reach (the build does not fail in tests), which would break the 100% line gate, so I left it.
R41-CJ1-L1 (LOW): OpenApi::merge adopted an empty webhooks map
mergenow usesnon_empty_component_map(other.webhooks), asmerge_component_mapdoes. Test:merge_ignores_an_empty_webhooks_map_from_other.R41-CJ2-L1, R41-IP0-L1, R41-I4-01 (LOW): doc and comment only
unescape_schema_namedoc: invalid UTF-8 decodes to U+FFFD (lossy), not "kept as written".RequestEnvelope::headersdoc: a single value per name, last one wins (serde keeps the last entry); the type is not changed (semver).tracing_instrumentation.rscomment: only the spanappfield withholds the raw client value; the WARN detail names it.Verification
cargo test -p vespera_core: 332 passed.cargo test -p vespera_inprocess --features runtime(lib and all integration tests), plus--features runtime,tracing --test tracing_instrumentation: all pass.cargo test -p vespera_jni --lib: 58 passed.stashfilter run three times: 10 passed each time.cargo clippy --all-targets --all-features -- -D warningson vespera_core, vespera_inprocess and vespera_jni: clean.cargo fmt --allapplied.stash_handle_protocol_and_evictionnow fills to the hard ceiling and checks that no live entry is evicted; the old eviction code fails that check..changepacks/changepack_log_runtime_round41.json: all seven packages at Patch, ASCII note.🤖 Generated with Claude Code