Improve performance 2 - #136
Open
owjs3901 wants to merge 154 commits into
Open
Conversation
Changepacksvespera@0.2.0 → 0.3.0 - Cargo.tomlMinor
vespera@0.2.0 - crates/vespera/Cargo.tomlMaybe you forgot to write the following files to the latest version vespera_core@0.2.0 - crates/vespera_core/Cargo.tomlMaybe you forgot to write the following files to the latest version vespera_inprocess@0.2.0 - crates/vespera_inprocess/Cargo.tomlMaybe you forgot to write the following files to the latest version vespera_jni@0.2.0 - crates/vespera_jni/Cargo.tomlMaybe you forgot to write the following files to the latest version vespera_macro@0.2.0 - crates/vespera_macro/Cargo.tomlMaybe you forgot to write the following files to the latest version vespera-bridge@0.1.1 → 0.2.0 - libs/vespera-bridge/build.gradle.ktsMinor
vespera-bridge-gradle-plugin@0.1.1 → 0.2.0 - libs/vespera-bridge-gradle-plugin/build.gradle.ktsMinor
|
…_path_byte_array_call JNI helper, labeled break 'producer (3 kept)
…ralise BODY_STREAM_ERROR_MSG/BODY_SINK_STOPPED_MSG, lock V_OUT_OF_RANGE_MSG (3 kept)
…_request_err + invalid_input_array_err helpers (3 kept)
…Writer into SliceSink, saturating_add zero_read_backoff (3 kept)
…CAFFOLD/WRAPPER/ITEM_SCAFFOLD hand-counts with str::len() literals (3 kept)
…e contract fix, parse_wire_header_len try_into() cleanup (2 kept)
…query helpers, drop unused Debug derive, align consecutive_empty counter (4 kept)
Item 1: header_value_as_str in wire/header_write.rs collapses 4 repeated .to_str().unwrap_or(`) sites inside write_header_value into one #[inline] helper. Byte-identical wire output, locked by hand_serialize_matches_serde tests.
Item 2: Drop unused Debug from bench-only WireResponseHeader in wire.rs. Only Serialize is consumed; grep confirms zero {:?} / dbg! uses across wire/tests.rs and every bench site.
Item 3: compose_path_query in internal.rs collapses the identical 4-line String::with_capacity + push_str + push('?') + push_str duplicated between build_uri (production) and request_builder (bench-only A/B twin). URI-composition invariant now lives in one place.
Item 4: Align consecutive_empty counter in spawn_request_producer (streaming.rs) with sibling consecutive_empty_reads.saturating_add(1) in vespera_jni/streaming_closures.rs. Same panic-free discipline; MAX_CONSECUTIVE_EMPTY_READS = 1024 cap makes overflow unreachable in practice.
…tract wire.rs bench-only serde twins into wire/bench_serde.rs (2 kept)
…request_bytes on 413 path, single-match daemon-env cache check, peel first-iter comma in write_headers/validation_errors (5 kept)
…SKIP_DEPTH multiple-of-64, inline let threw (3 kept)
…ue_to_owned helper, take_pending_exception helper (3 kept)
Item 1 (hoist.rs): drop dead `Split::next().unwrap_or(\\\\)` fallback in `body_is_json` — replace with `split_once(';').map_or(s, |(head, _)| head)`. `Split::next()` on `&str` is infallible, so the fallback was unreachable dead code. Byte-identical media-type extraction; hoist_422 / wire_contract goldens preserved.
Item 2 (internal.rs): extract private `#[inline] fn header_value_to_owned` above `collect_header_map`; replace 3× `to_str().unwrap_or(\\\\).to_owned()` with helper calls. Locks the `empty on non-UTF-8` contract in one place — same discipline the wire-path `header_value_as_str` already uses (borrowed vs owned split is deliberate).
Item 3 (streaming_closures.rs): extract private `#[inline] fn take_pending_exception`; rewrite 3× `if env.exception_check() { env.exception_clear(); return ...; }` blocks in `make_pull_closure` / `make_push_closure` / `call_header_consumer`. Same drift-prevention discipline `clear_pending_exception` established for cold-path callers; caller-specific returns preserved.
Verification: cargo test --workspace (0 failed), cargo clippy --all-targets --all-features -- -D warnings, cargo clippy --workspace --no-default-features -- -D warnings, cargo fmt --check — all GREEN in both checkpoint groups (items 1+2, then item 3). No wire byte layout / JNI ABI / observable dispatch behaviour change.
Replaces the get()+set() shape with OnceLock::get_or_init so exactly one initializer runs even when N JVM threads race for the first call, matching the pattern used elsewhere for RUNTIME_WORKER_THREADS, MAX_REQUEST_BYTES, STREAMING_CHUNK_BYTES, and DEFAULT_ROUTER. Warm hot path is byte-identical (single atomic load then match). cargo bench -p vespera_inprocess is unreachable from this file (dep graph: vespera_jni -> vespera_inprocess, not the reverse), so the change cannot affect those benchmarks by construction.
…se 1-key header fast path (2 kept)
Item 1: streaming.rs::spawn_request_producer - replace the per-pull
`catch_unwind(AssertUnwindSafe(&mut pull))` with a SINGLE outer
`catch_unwind` around the whole producer loop. Two independent wins:
1. Cost - the per-pull catch installed a landing-pad frame on every
chunk (~4K setups per 1 GiB / 256 KiB stream) on the happy path.
Every code path already treated a caught pull-panic identically
to RequestChunk::Error, so an outer catch is observationally
equivalent for a panicking pull() AND removes the per-chunk cost.
2. Semantics - a panic ANYWHERE ELSE in the loop body (Bytes::from,
the chunk-splitter while, tx.blocking_send,
consecutive_empty.saturating_add) used to unwind past the
per-pull catch, abort the spawn_blocking task, and surface as a
JoinError that await_request_producer silently discards
(`let _ = handle.await;`) - axum then saw a CLEAN end-of-stream
instead of a StreamAbort, i.e. a TRUNCATED upload accepted as a
complete request body (silent data loss, the exact failure the
per-pull catch was written to prevent). The outer catch closes
that hole so ANY loop-body panic now surfaces as StreamAbort.
`tx.clone()` is a single Arc bump paid once per producer spawn (not
per chunk); the outer `tx` moves into the wrapped closure so the
happy path still uses exactly one sender. `consecutive_empty` and
`max_chunk` move inside the wrapped closure (they were already
loop-local). All four existing early-exit paths (sustained empty
reads, End, Error, receiver_gone) are preserved verbatim.
Bench streaming_path (5 BEFORE + 5 AFTER runs, --sample-size 10):
bidirectional/1024 median 69.950us -> 63.413us (-9.3%, improved)
bidirectional/64 median 10.339us -> 11.516us (+11.4%, within
baseline 3.2x noise band)
bidirectional_no_body_poll/* +10% BUT the /discard handler never
polls the request body, so spawn_request_producer never runs -
the shift is a system-noise artifact, not caused by this change.
response_streaming/* also shifts (response-only path, code
unchanged by item 1) - confirms system was warmer during AFTER.
Item 2: wire/header_write.rs::write_headers 1-key fast path -
flatten the nested `if let Some(name) = ... { happy } else {
debug_assert!(false, ...); sink.put(b"{}"); }` into
`let Some(name) = ... else { debug_assert!(false, ...);
sink.put(b"{}"); return; };` so the always-taken happy branch is no
longer indented under a paranoid fallback that must never fire.
Byte-identical output either way. Locked by
`hand_serialize_matches_serde_for_tiny_header_maps`,
`hand_serialize_matches_serde_serialize`, and
`tests/wire_contract.rs`.
Verification (both checkpoint groups GREEN):
cargo test --workspace PASS
cargo clippy --all-targets --all-features -- -D warnings PASS
cargo clippy --workspace --no-default-features -- -D warnings PASS
cargo fmt --check PASS
Includes jni_impl::streaming_abort_tests and the 1871 vespera_inprocess
tests, plus the wire byte-identity property tests that lock item 2.
Public API, JNI symbols, and binary wire format bytes unchanged.
…eral, mark can_call_unchecked inline, tighten path_bytes_for_owned/to_wire_bytes docs (5 kept)
…_test.rs under the 1000-line cap, Deduplicate the shared prologue/epilogue of the two fillHeaderJson overloads, Remove the duplicated … (7/8 applied) Applied (7/8): - [1] Split examples/axum-example/tests/integration_test.rs under the 1000-line cap — impact: Split the 2074-line integration test into four concern-scoped test targets, all under 1000 lines, while retaining all 82 test cases.; evidence: none; changed files are example integration-test targets, not benchmark dependencies; decision: Independent attribute census matched 82 tests before and after; axum-example and workspace tests, clippy, and formatting passed. The full benchmark loop was attempted but timed out; the test-only files are excluded from both benchmark pack… - [2] Deduplicate the shared prologue/epilogue of the two fillHeaderJson overloads — impact: Removed duplicated wire-header JSON prologue and epilogue while preserving both overloads' independent header emission and failure handling.; evidence: none; decision: Independent Java, Rust wire-contract, workspace test, clippy, and format checks passed. The existing six-case cross-overload byte-equality test passed under forced Gradle execution; review confirmed the field order and catch paths are pres… - [4] Remove the duplicated ingress-cap predicate while keeping the public signature — impact: The ingress-cap comparison now has one internal spelling, preventing the public helper and live 413 guard from drifting while preserving their behavior.; evidence: Focused bytes-path medians improved: 1 B 922.25 to 909.43 ns, 64 B 2.0661 to 2.0172 us, 1024 B 30.742 to 30.568 us.; decision: Independent diff review confirmed the immutable export list, single cap load, and 413 message. Targeted and workspace tests, both Clippy gates, and formatting passed. Focused dispatch measurements showed no regression; details are in the r… - [5] Collapse apply_stored_route's ten copy-pasted override blocks — impact: Replaced ten repeated Option override blocks with one declarative field list while preserving explicit-value-only copying. New route metadata fields are now visibly maintained in one location.; evidence: none; only private proc-macro compile-time code changed, so the configured in-process runtime benchmarks cannot reach i…; decision: Independent review confirmed all original fields are covered, None cannot clobber collector metadata, and the distinct boolean/header paths remain intact. Workspace tests, strict Clippy/fmt, and regenerated axum-example OpenAPI checks pass… - [6] Unify the three *_with_format schema helpers and fix their stale doc comment — impact: Moves the primitive-type documentation to its intended function and centralizes the identical inline-format schema construction without changing helper callers or output.; evidence: none; this private proc-macro helper is not linked into the configured runtime benchmarks; decision: Independent diff review confirmed the requested extract-only refactor. Workspace tests, macro snapshots, clippy, formatting, runtime benchmark command, and regenerated OpenAPI check all passed; details are in the review report. - [7] Fix the misplaced doc comment on WIRE_HEADER_RESERVE — impact: WIRE_HEADER_RESERVE now documents its 192-byte response-header sizing floor instead of a serializer function contract.; evidence: none; decision: Independent diff review found only six removed and five added doc lines; workspace tests, doctests, clippy, and formatting passed. Rendered private docs contain the new sizing description and omit the old function wording. See review repor… - [8] Refresh the drifted facts in AGENTS.md — impact: Corrects the shared agent guide's named-app registry, JNI helper, and requested component counts, preventing future work from relying on stale implementation facts.; evidence: none - AGENTS.md is documentation only and is not part of compiled benchmark paths.; decision: Independent source checks confirmed ArcSwap lock-free lookup and with_cached_daemon_env; stale-claim grep and fresh census passed. fmt, clippy, workspace tests, and the configured benchmark command completed successfully. See the review re… Not applied (1/8): - [3] Move canonicalKey/canonicalKeyLen4/canonicalKeyLen7 into WireHeaderReader (drop 6 duplicated static… — reverted; attempted impact: Candidate removed duplicated canonical-key helpers, but was restored because it exceeded the repository source-file size limit.; evidence: none; reason: Independent review found WireHeaderReader.java grew from 984 to 1,019 lines, violating AGENTS.md's 1,000-line cap. Tests and lint passed; backup restoration was verified exact.
…it/vespera into improve-performance-2
…nes) below the 1000-line cap, Split benches/dispatch.rs (1044 lines) below the 1000-line cap, Remove dead pub-use re-exports and their… (8/8 applied) Applied (8/8): - [1] Split tests/streaming_with_header.rs (1118 lines) below the 1000-line cap — impact: The oversized integration-test file is now a 769-line parent plus a 353-line included sidecar, satisfying the repository cap without changing test behavior.; evidence: none - only integration-test source changed, which benchmark binaries do not link; decision: Independent byte-sensitive comparisons prove the 351 moved lines and retained 766-line prefix are unchanged. All 26 target tests, workspace tests, clippy, and formatting passed; see the review report. - [2] Split benches/dispatch.rs (1044 lines) below the 1000-line cap — impact: Splits the streaming Criterion groups into an internal module, reducing dispatch.rs to 789 lines while preserving its benchmark behavior.; evidence: none; module-only benchmark refactor; decision: Independent diff review found unchanged benchmark bodies and IDs; default and bench-support harness tests, workspace tests, clippy, and formatting all pass. See review report. - [3] Remove dead pub-use re-exports and their #[allow(unused_imports)] in vespera_impl.rs — impact: Removes two dead private-module re-exports and their unused-import lint suppressions while retaining the orchestrator entry-point re-export used by the macro crate.; evidence: none; compile-time-only private re-export deletion with no runtime dispatch or wire-path effect; decision: Independent inspection confirmed the removed helpers are imported from their owning sibling modules and no crate consumer uses the removed vespera_impl paths. Workspace tests, all-feature clippy with warnings denied, fmt, macro build, and … - [4] Remove the never-read docs_url/redoc_url fields from OpenApiWriteResult and its #[allow(dead_code)] — impact: OpenApiWriteResult now retains only its consumed OpenAPI representations, eliminating two unused String clones per macro expansion and restoring dead-code linting for the type.; evidence: none; this private proc-macro-only change cannot affect runtime dispatch benchmarks; decision: Independent diff and call-path review confirmed the removed URLs were never consumed; router code still obtains them from ProcessedVesperaInput. Workspace tests, all-target clippy with warnings denied, formatting, and five benchmark passes… - [5] Prune dead and test-only re-exports in schema_macro/seaorm.rs — impact: Removed unused facade exports and lint suppressions while limiting the sole test-only facade export to test builds. The SeaORM module facade now exposes only production consumers plus its explicit test helper.; evidence: none; this is compile-time name-resolution cleanup with no runtime code generation or dispatch-path change.; decision: Independent code review confirmed the removed names are used only in sibling modules, while the cfg(test) export serves circular_relation_tests. Workspace tests, all-target clippy with warnings denied, formatting, and the non-test macro bu… - [6] Prune the dead file_path_to_module_path re-export in schema_macro/file_lookup.rs — impact: Removes one dead private re-export and two blanket unused-import suppressions, so future unused re-exports fail lint instead of being hidden.; evidence: none; this private proc-macro re-export emits no runtime code and cannot affect the benchmarked crates; decision: Independent diff review confirmed the exact requested one-file change. Workspace tests, all-feature clippy with warnings denied, formatting, macro build, and five benchmark runs completed successfully; the target has no remaining unused-im… - [7] Delete the stale duplicated doc block wrongly attached to ranges_overlap — impact: Removed stale direct-buffer and raw-pointer safety documentation from safe ranges_overlap, leaving its accurate SEC-1 aliasing rationale visible. write_response_to_out retains the real raw-pointer contract.; evidence: none; decision: Independent diff inspection found exactly 14 deleted doc-comment lines and no code-token change. Workspace tests, full and minimal clippy, formatting, doc tests, and five serial benchmark runs all completed successfully; details are in the… - [8] cfg(test)-gate the never-populated FileCache::struct_index field — impact: Production proc-macro builds no longer allocate, invalidate, or profile an always-empty struct index; test builds retain its cache and invalidation behavior.; evidence: none; compile-time-only private cache change outside runtime benchmark paths; decision: Independent diff inspection confirmed every production reference is gated and the support layer is test-only. Macro and workspace build, test, clippy, and formatting gates all passed; see the review report. Not applied (0/8):
…esponse wire-header serializer (BENCHMARK ITEM), Unify the duplicated CARGO_MANIFEST_DIR epoch-cache helper in the proc-macro file cac… (7/8 applied)
Applied (7/8):
- [1] Skip per-name HeaderMap hash lookups in the response wire-header serializer (BENCHMARK ITEM) — impact: All-single response-header maps retain borrowed values while sorting, eliminating one HeaderMap lookup per distinct name. Repeated-name maps retain the existing rendering path.; evidence: Candidate-specific A/B data is documented in the implementation report. My five-run full benchmark attempt timed out af…; decision: Independent review found no contract or correctness issue. Workspace tests, clippy with warnings denied, formatting, and diff checks pass; the added test covers the new all-single path on both output sinks.
- [3] Unify the duplicated CARGO_MANIFEST_DIR epoch-cache helper in the proc-macro file cache — impact: A single documented epoch-cache helper now serves both manifest-directory lookup paths, preventing future fixes from diverging between duplicate implementations.; evidence: none; this proc-macro-only refactor is not linked into the configured runtime benchmarks.; decision: Independent diff review confirmed unchanged cache semantics and correct child-to-parent private access. Workspace tests, strict clippy, formatting, diff checks, and the configured benchmark command passed; see the review report.
- [4] Reuse file_utils::{mtime_fingerprint, combine_fingerprint} in vespera_impl/cache.rs instead of two … — impact: Sidecar and route-file cache fingerprints now share one canonical mtime conversion and mtime/size mixer, preventing future cache-key divergence while preserving existing values and failure sentinels.; evidence: none; modified helpers execute during proc-macro expansion and are not reached by the requested runtime benchmark crates; decision: Independent diff review confirmed identical arithmetic and None/zero failure behavior. Workspace tests, clippy, fmt, diagnostics, and diff checks passed; each mixing constant appears once in vespera_macro. See the review report for benchma…
- [5] Extract the duplicated post-dispatch stream-abort tail shared by both dispatch*WithHeader JNI symbo… — impact: The shared success-side stream-abort predicate now has one private inline implementation, preventing the two JNI header-dispatch symbols from drifting apart while preserving their truncation-reporting contract.; evidence: none; the inline JNI-only helper is not exercised by the configured vespera and vespera_inprocess benchmarks.; decision: Independent diff review confirmed identical predicate, single Acquire snapshot, and buffer-release ordering at both call sites. Build, workspace tests, strict clippy, formatting, diff check, and five configured benchmark runs all completed…
- [6] Collapse the three repeated header-buffer sizing / serialize / 500-on-overflow blocks in wire.rs in… — impact: A private inline helper now owns all three header-vector sizing and serialization paths, preventing their capacity and overflow handling from drifting while preserving emitted wire bytes and allocations.; evidence: No attributable regression. Five affected benchmark samples had a 1.7455 us median and a noisy 1.6631-1.8173 us range; …; decision: Independent backup comparison confirmed unchanged capacity arithmetic, serializer arguments, body reserve, and 500 fallback. Workspace tests, Clippy with warnings denied, formatting, and diff checks passed; the affected benchmark showed no…
- [7] Lock the ingress-cap predicate config::exceeds with unit tests (currently zero coverage) — impact: Adds 10 inline rstest cases that lock the unlimited sentinel and strict ingress-cap boundary, preventing default-cap outages and exact-cap 413 regressions.; evidence: none; only cfg(test) code and a dev dependency changed, neither compiled into benchmark artifacts; decision: Independent review confirmed the requested matrix, no production API changes, and passing workspace tests, clippy, and formatting. Five benchmark runs exited successfully; host-noisy timings cannot affect this test-only change.
- [8] Give the hand-rendered dispatch() 500 envelope a serde drift tripwire — impact: The private 500 fallback JSON is now a documented constant guarded against drift from ResponseEnvelope and ResponseMetadata serde output.; evidence: none; same compile-time-expanded literal on an unreachable fallback path; decision: Independent mutation made the new test fail with the expected byte diff; restoration passed. Workspace tests, clippy, fmt, diff checks, and five benchmark invocations completed.
Not applied (1/8):
- [2] Remove the write-only FileCache::path_lookup_epoch field and the no-op ensure_path_lookup_caches_fr… — failed; attempted impact: Candidate removes private dead cache state and documents the active epoch and fingerprint revalidation mechanism.; evidence: unverified: runtime benchmark is not attributable to this compile-time macro change and the mandated five-run sample wa…; reason: Independent diff review, workspace tests, clippy, formatting, and removed-symbol search passed, but the required five benchmark samples did not complete before the review harness timeout. See the report.
… the no-op `ensure_path_lookup_caches_fresh`, Unify the duplicated per-crate macro storage in `route_impl` and `cron_impl`, Remove the… (6/7 applied) Applied (6/7): - [1] Remove the dead `path_lookup_epoch` field and the no-op `ensure_path_lookup_caches_fresh` — impact: Removes a write-only private cache field, its no-op wrapper, and two dead calls. Corrected documentation now describes the actual epoch-and-fingerprint freshness mechanism.; evidence: none; the private proc-macro code is not linked into the configured runtime benchmark binaries; decision: Independent diff and cache-flow review found no read of the removed field and confirmed lookup invalidation is still driven by last_epoch_validated and path fingerprints. Workspace tests, both clippy configurations, and formatting passed; … - [3] Unify the duplicated per-crate macro storage in `route_impl` and `cron_impl` — impact: Route and cron metadata registration now share one poison-tolerant, copy-on-write per-crate storage implementation, eliminating duplicated replacement logic while preserving all entry points and behavior.; evidence: none; runtime code unchanged. The attempted five-run benchmark exceeded the 30-minute command limit during run two, so …; decision: Independent code review found the generic implementation behavior-equivalent. `cargo test --workspace`, strict clippy, formatting, and diff checks pass. The full five-pass runtime benchmark exceeded the command time limit; the change is co… - [4] Remove the two `unwrap()` panic sites in `process_vespera_macro` — impact: Cache freshness is now represented by `Option<VesperaCache>`, so stale caches cannot reach reuse and the two non-test unwrap panic sites are removed.; evidence: No candidate-caused runtime change: this is a proc-macro control-flow refactor; the cached OpenAPI output is byte-ident…; decision: Independent workspace tests, clippy with warnings denied, and formatting passed. Two forced profiled axum-example recompilations took the cache-hit stages and preserved the OpenAPI SHA-256; five configured benchmarks completed, with unrela… - [5] Stop cloning route path/name into the error-only `claimed` map in `assemble_path_items` — impact: The duplicate-route map now borrows route paths and handler names from immutable metadata, eliminating two successful-path String allocations per discovered route.; evidence: none; this private compile-time proc-macro refactor is not linked into the configured runtime benchmark binaries; decision: Independent workspace tests, clippy, format, and the focused duplicate-route diagnostic test passed. The map borrows metadata that outlives the assembly loop, and the unchanged format string preserves the diagnostic text. See the review re… - [6] Return a borrow from `MergeSpecCache::read` instead of cloning the child spec — impact: The cache now returns its stored entry by reference, removing full serialized child-spec clones on the cache miss and on every later read. This reduces compile-time allocation and copying while preserving merge and config-hash behavior.; evidence: Compile-time: removes two full child-spec allocations and memcpys across the hash miss and later merge read per child a…; decision: Independent review found both consumers read-only and the ownership change sound. `cargo test --workspace`, clippy with warnings denied, fmt check, and an axum-example merge build passed; regenerated openapi.json was unchanged. The runtime… - [7] Delete the unfulfilled `#[allow]` on the test-only `collect_metadata` wrapper — impact: Removed a dead lint suppression from the test-only collector wrapper, restoring accurate lint coverage without changing behavior.; evidence: none; five benchmark passes completed but host contention produced unusable variance, while this cfg(test) lint attribu…; decision: Independent review confirmed the one-line requested diff, strict all-target Clippy and formatting passed, and the full workspace test suite passed. See the review report for benchmark evidence and limitations. Not applied (1/7): - [2] Drop the always-None header_bytes_owner parameter from internal::dispatch_parts — reverted; attempted impact: The candidate removed a dead private parameter, but no change is retained because its benchmark evidence did not meet the performance gate.; evidence: Criterion dispatch_path comparisons reported repeated candidate regressions, from about 2.4% to 47.6% in affected cases…; reason: Independent workspace tests and strict lint/format passed, but five baseline/candidate dispatch benchmark runs repeatedly reported regressions beyond noise. The two files were restored byte-identically from backup.
…rs 500-recovery dedup, JNI streaming-setup-failure helper, two wire-header byte-identity tests (5 kept) Recovered from an interrupted iteration-4 IMPROVE batch: the driver was killed during item 8's implementation, leaving items 1-7's reviewed work uncommitted. Only the items that passed independent review are kept here. kept - item 1 (collector.rs): extract private `build_route_path` so the ROUTE_STORAGE fast path and the syn fallback cannot drift; replaces a `clippy::option_if_let_else` suppression with `map_or_else`. - item 2 (wire.rs): `build_header_vec` returns `Result<Vec<u8>, Vec<u8>>`, collapsing the duplicated 500-recovery blocks into one path. - item 3 (jni_impl.rs): private `streaming_setup_failed_array` replaces the duplicated error arms in dispatchStreaming / dispatchFullStreaming; JNI symbol names, signatures and error bytes unchanged. - item 5 (wire/tests.rs): hand-vs-serde byte identity over the heap fallback arms (40 header names, above STACK_CAP, all-single and mixed maps). - item 6 (wire/tests.rs): metadata fixture with quote / backslash / newline, compared on both the Vec and slice writer paths. reverted by review (restored from backup, not in this commit) - item 4 (jni_impl_support.rs): sequential `global_ref_checked` changed the null-check vs promotion-failure error precedence. - item 7 (streaming_closures.rs): evaluating `method_cache(env)` before the `can_call_unchecked` receiver check initialised the process-global cache on a null receiver. rolled back (never reviewed — implementation aborted mid-flight) - item 8 (RequestShape.java): restored byte-identically from .retry-now/backups/0004/item-08-8. verification: cargo fmt --check clean; cargo clippy --all-targets --all-features -- -D warnings exit 0; cargo test --workspace 0 failed.
…ared by header_read.rs decode/validate twins (BENCHMAR…, Route max_request_bytes through the shared read_env_clamped config helper, Ex… (4/6 applied) Applied (4/6): - [2] Unify the unicode-escape surrogate grammar shared by header_read.rs decode/validate twins (BENCHMAR… — impact: One private helper now owns surrogate parsing for decoding and validation, eliminating a documented accept/reject drift hazard without changing allocations or public behavior.; evidence: Five targeted runs were host-noisy but showed no repeatable affected-path regression; unknown-parser hand/serde ratio m…; decision: The reviewed diff preserves every parser branch and decoder-only scalar conversion. Workspace tests, clippy with denied warnings, formatting, and repeated affected benchmarks passed; see the review report. - [3] Route max_request_bytes through the shared read_env_clamped config helper — impact: The request-size ingress cap now uses the shared environment parsing policy, preventing future drift from the streaming settings while preserving its unlimited default and exact valid values.; evidence: No steady-state change expected: only the once-per-process OnceLock initializer changed. Two full benchmark runs comple…; decision: Independent diff review confirmed equivalent lookup, trim, parse, fallback, and identity-clamp behavior. Workspace tests, clippy, and formatting passed; benchmark runs found no candidate-attributable regression. - [5] Extract dispatch_streaming_with_header_body so both WithHeader JNI symbols share one shell — impact: The response-only header-streaming JNI symbol now delegates to a private body function through a matching argument carrier, aligning both WithHeader entry-point shells and reducing future control-flow drift.; evidence: none; the configured benchmark packages do not link vespera_jni, so no relevant benchmark median exists; decision: Independent backup diff review found a mechanical extraction only: callback order, runtime failure handling, buffer leases, Arc clone count, catch_unwind boundary, ABI, and panic fallback remain unchanged. Workspace tests, clippy, and form… - [6] Refresh the stale AGENTS.md KEY COMPONENTS table (11 missing modules, 5 drifted line counts) — impact: AGENTS.md now provides repository-relative navigation paths, current measured counts, and full coverage of the documented JNI and bridge implementation surfaces.; evidence: none; candidate changes Markdown only; decision: Independent checks found 37 component rows with zero missing paths, 35 numeric counts matching disk, and all 20 required files above 100 lines represented. Cargo tests and lint pass; see the review report for the unavailable oxlint and non… Not applied (2/6): - [1] Dedupe the WireHeaderStringSupport canonical-key tables — reverted; attempted impact: No change retained. The candidate's extra encoded table and comparison path expanded the hot-path implementation instead of delivering the requested minimal deduplication.; evidence: Rejected: reported heap byte[] lookup regressed 28-38% (about 1.4 ns); Rust benchmark run timed out during pass 2 of 5 …; reason: Independent review found the candidate deviates from the required String[][] plus existing-regionEquals design and its documented heap lookup regression is beyond noise. Java tests, allocation test, Rust tests, and lint/format passed; the … - [4] Collapse the two-hop normalize_path_key re-export chain in vespera_macro — reverted; attempted impact: The candidate removed two forwarding imports and pointed all users at file_utils, but it was rolled back because independent benchmark verification was incomplete.; evidence: none; benchmark verification incomplete; reason: Workspace tests and clippy/fmt passed, but five configured cargo bench runs exceeded the execution limit. The four target files were restored from the item backup; see the review report.
…n no response header name repeats, Extract the dispatchDirect0 jint result encoding into two shared helpers, Extract the duplicated di… (4/8 applied) Applied (4/8): - [1] collect_header_map: single-pass fast path when no response header name repeats — impact: Avoids a HeaderName hash and HeaderMap probe per distinct response header when names are unique, while preserving the repeated-header path.; evidence: No comparable end-to-end median: the configured benchmark lacks this envelope path and timed out amid unrelated host no…; decision: Reviewed the present single-file diff. The fast-path predicate exactly identifies no repeated names, preserves the existing set-cookie path, and passed workspace tests plus strict clippy and formatting. See the review report for benchmark … - [2] Extract the dispatchDirect0 jint result encoding into two shared helpers — impact: The direct JNI ABI encoders now have one private implementation each, preventing the two call-site pairs from silently drifting while preserving their sentinel fallback behavior.; evidence: none; the configured benchmark targets cannot execute the changed vespera_jni helpers; decision: Backup comparison confirmed a pure four-site extraction plus boundary tests. Independent workspace tests, strict Clippy, and format checks passed; the configured benchmark cannot reach vespera_jni helpers and exceeded the harness limit in … - [3] Extract the duplicated dispatch*WithHeader header callback into one factory — impact: Both JNI streaming-with-header symbols now share one private callback factory, preventing their header delivery and flag bookkeeping from drifting while preserving the exactly-once header contract.; evidence: none; configured benchmarks do not compile or link vespera_jni, so they cannot measure this JNI-only refactor.; decision: Independent code review found identical JNI call, result-to-flag update, and ownership transfer semantics. Workspace tests, clippy, fmt, and 13 targeted vespera_jni tests passed; details are in the review report. - [4] Collapse the seven repeated byte_array_from_slice conversions in jni_impl.rs — impact: A private JNI helper now centralizes seven identical wire byte-array conversions, preventing drift while preserving each caller's Result propagation and the distinct outer OOM fallback.; evidence: none; the configured vespera and vespera_inprocess benchmarks do not execute vespera_jni code; decision: Independent backup diff review confirmed only the requested extraction, unchanged wire error literals, and preserved exception clearing. cargo test --workspace and the clippy/format gate passed. The configured benchmark suite does not link… Not applied (4/8): - [5] Split collect_metadata_from_files and remove its clippy::too_many_lines allow — failed; attempted impact: Driver process died before this item was independently reviewed; retry-now recover rolled it back from its backup because it never passed the review gate.; reason: Driver process died before this item was independently reviewed; retry-now recover rolled it back from its backup because it never passed the review gate. - [6] Single HttpMethod name table backing both Display and TryFrom<&str> — skipped; attempted impact: Not attempted: the driver process died during item 5 of this batch.; reason: Not attempted: the driver process died during item 5 of this batch. - [7] Generalize parse_lit_str_slot into parse_slot<T: Parse> in args.rs — skipped; attempted impact: Not attempted: the driver process died during item 5 of this batch.; reason: Not attempted: the driver process died during item 5 of this batch. - [8] Deduplicate parse_request_body's extractor arms and drop its too_many_lines allow — skipped; attempted impact: Not attempted: the driver process died during item 5 of this batch.; reason: Not attempted: the driver process died during item 5 of this batch. Recovered by retry-now recover: the driver process died mid-batch, so this commit records the items that had already passed independent review. Item 5 was rolled back from its per-item backup because it never reached a review verdict.
… collector, Single-source the multipart WrongFieldType error construction, Dedup the four JNI setup_* promote/checkout routines, Singl… (5/5 applied) Applied (5/5): - [1] Dedup the per-file take-or-clone block in the collector — impact: One private helper now enforces identical move-or-clone handling for module and file paths in both collector paths, eliminating duplicated drift-prone logic without changing output.; evidence: none; the change is compile-time proc-macro code and does not enter the timed runtime benchmark paths; decision: Independent review found the helper semantically identical to both removed branches. Workspace tests, clippy with warnings denied, format, diagnostics, example rebuild, and byte-identical OpenAPI comparison all passed; see the review repor… - [2] Single-source the multipart WrongFieldType error construction — impact: A private helper now builds all scalar WrongFieldType errors, eliminating seven duplicate literals while preserving field names, expected types, and messages.; evidence: None measurable: configured benchmarks do not execute multipart scalar parsing.; decision: Independent diff review found equivalent construction at every call site. Workspace tests, Clippy with warnings denied, formatting, and the configured benchmark command passed; no benchmark reaches this parser. - [3] Dedup the four JNI setup_* promote/checkout routines — impact: Header streaming setup now owns only its header-specific validation and global reference, while shared reference, JVM, and checkout ordering lives in the non-header helpers. This makes the lease-safety invariant authoritative per stream sh…; evidence: none; the configured vespera/vespera_inprocess benchmarks do not compile or link the edited optional vespera_jni crate.; decision: Independent review confirmed both header helpers retain the original NullPtr identity and precedence, and checkout remains last fallible. Workspace tests, both mandated clippy modes, formatting, and the release JNI demo build passed. Full … - [4] Single-source the HTTP-method table across vespera_core and vespera_macro — impact: HttpMethod::ALL and as_str now provide one compiler-enforced source for every supported method name. Core parsing, formatting, and macro validation share it while invalid macro identifiers remain allocation-free.; evidence: none; no runtime benchmark path covers the changed method parsing or macro validation code; decision: Independent workspace tests, strict clippy/format, diff validation, and axum-example regeneration passed. The complete benchmark suite could not finish within the environment timeout; its runtime paths do not exercise this compile-time par… - [5] Remove the test-only struct-candidate index subsystem from the macro file cache — impact: Removed an isolated cfg(test) struct-candidate cache and its self-referential tests, reducing macro-cache maintenance surface while retaining coverage of the live file-list cache path.; evidence: none; decision: Independent diff review found only the two authorized files and no remaining removed-symbol references. Workspace tests, clippy, fmt, and the byte-identical axum-example OpenAPI build passed. Four benchmark runs completed; host variance wa… Not applied (0/5):
…pps/front, apps/admin do not exist) and two dead WHERE…, Correct crates/vespera_macro/AGENTS.md: drop the false anyhow convention, fix… (3/8 applied) Applied (3/8): - [1] Correct root AGENTS.md: frontend workspace (apps/front, apps/admin do not exist) and two dead WHERE… — impact: Repository guidance now points to real schema directories and the sole frontend workspace, so contributors use valid paths and commands.; evidence: none; decision: Independent path, package script, and stale-reference checks passed. The only candidate diff is AGENTS.md; workspace tests, Clippy with warnings denied, and formatting all passed. - [2] Correct crates/vespera_macro/AGENTS.md: drop the false anyhow convention, fix KEY FUNCTIONS locatio… — impact: Macro contributor guidance now names the actual syn::Error flow, production route scanner, current macro entry points, and complete module layout.; evidence: none - documentation-only change; no compiled or benchmarked artifact changes; decision: Independent inspection confirmed every requested location and all 20 module declarations. fmt, Clippy with warnings denied, and the workspace test suite passed. - [3] Correct crates/vespera_macro/src/parser/AGENTS.md for the schema/ and parameters/ module splits — impact: Parser documentation now reflects the split schema/ and parameters/ modules, eliminating dead paths, stale line counts, and obsolete entry-point names.; evidence: none; Markdown-only change with no compiled runtime impact; decision: Independent diff and path audit passed: all 42 documented paths exist, no line-count pattern remains, documented parser entry points resolve, and all configured tests, lint, format, and five benchmark runs exited successfully. See the revi… Not applied (5/8): - [4] Remove the dead err_spanned / IntoSynError doc references from crates/vespera_macro/src/error.rs — failed; attempted impact: Driver process died before this item was independently reviewed; retry-now recover rolled it back from its backup because it never passed the review gate.; reason: Driver process died before this item was independently reviewed; retry-now recover rolled it back from its backup because it never passed the review gate. - [5] method.rs tests: replace contains() token probes with an exact assertion and drive the exhaustive c… — skipped; attempted impact: Not attempted: the driver process died during item 4 of this batch.; reason: Not attempted: the driver process died during item 4 of this batch. - [6] Add try_set_operation return-value coverage in vespera_core (the predicate duplicate-route detectio… — skipped; attempted impact: Not attempted: the driver process died during item 4 of this batch.; reason: Not attempted: the driver process died during item 4 of this batch. - [7] Deduplicate the SCHEMA_STORAGE lock/entry/Arc::make_mut preamble shared by register_schema and inse… — skipped; attempted impact: Not attempted: the driver process died during item 4 of this batch.; reason: Not attempted: the driver process died during item 4 of this batch. - [8] BENCHMARK-AFFECTING (only one in this batch): short-circuit the default-app fast path in resolve_ap… — skipped; attempted impact: Not attempted: the driver process died during item 4 of this batch.; reason: Not attempted: the driver process died during item 4 of this batch. Recovered by retry-now recover: the driver process died mid-batch, so this commit records the items that had already passed independent review. Item 4 was rolled back from its per-item backup because it never reached a review verdict.
…relude into cap_and_split, route/utils.rs: collapse four duplicated literal-value blocks into a lit_value helper, wire/hoist.rs: extra… (8/8 applied) Applied (8/8): - [1] Extract the shared ingress-cap + wire-split prelude into cap_and_split — impact: One inline private helper now keeps the shared 413-before-400 prelude consistent across all owned-wire entry points while preserving each caller's error-delivery contract.; evidence: No credible regression. Five-run affected-path medians varied with host noise; immediate post-backup candidate confirma…; decision: Independent scope review confirmed the requested three call sites, preserved bidirectional exemption, and no API or wire changes. Workspace tests, all-feature clippy, no-default-feature clippy, and formatting passed; affected benchmarks sh… - [2] route/utils.rs: collapse four duplicated literal-value blocks into a lit_value helper — impact: Replaces four duplicate literal conversions with one private helper and confines the two necessary clippy suppressions to its five-line implementation.; evidence: none; decision: Independent diff review verified identical call inputs and outputs. Workspace tests, strict clippy, formatting, snapshot checks, and five runtime benchmark runs completed successfully; the runtime benchmark does not exercise this private p… - [3] wire/hoist.rs: extract the shared serde_json Value walk into hoist_from_value — impact: One private fallback helper now serves production and the benchmark-only DOM arm, removing duplicated extraction logic while preserving 422 selection and ordering semantics.; evidence: Five targeted samples were noisy, but all runs retained the expected typed-versus-DOM arm separation. No candidate-spec…; decision: Independent diff review confirmed the typed production fast path and full-DOM value_old arm remain separate. Workspace tests, clippy, fmt, and five targeted A/B benchmark runs passed; details are in the review report. - [4] file_cache.rs: stop holding the FILE_CACHE borrow across syn::parse_str — impact: parse_struct_cached releases its FILE_CACHE RefCell borrow before syn::parse_str, removing a latent re-entrant BorrowMutError panic risk in the proc macro while preserving behavior.; evidence: none; this proc-macro-only compile-time refactor is outside the runtime benchmark call graph; decision: Independent code review confirmed one unconditional counter increment before parsing, the unchanged signature and Result, and no live RefCell borrow across parse. Macro tests, workspace tests, strict clippy/fmt, and five configured benchma… - [5] internal.rs: convert two clippy too_many_arguments allow attributes to expect — impact: The two targeted suppressions now fail lint when they become stale, preserving their hot-path justification without changing runtime behavior.; evidence: none; lint attributes emit no runtime code; decision: Independent backup/diff review confirmed only the two requested attributes changed. Workspace tests, all-features lint, no-default-features lint, and formatting passed. The configured five-run benchmark exceeded the command limit without f… - [6] wire/tests.rs: add mixed object/array deep-nesting coverage for the ContainerStack overflow tier — impact: Adds parser-parity coverage for alternating object and array containers beyond the 128-level inline stack, including mismatched closer rejection in the heap overflow tier.; evidence: none; the only candidate change is inside #[cfg(test)] and cannot affect release benchmark artifacts.; decision: Independent diff review confirmed depth 200 crosses the overflow boundary and covers both container kinds. The targeted test, full workspace tests, clippy, and formatting all passed; details and the benchmark timeout limitation are in the … - [7] streaming_closures.rs: unify call_consumer_accept and call_future_complete — impact: One shared callback body prevents fast-path and exception-contract drift while preserving each wrapper's JNI method selection, return type, and fallback signature.; evidence: none; configured benchmarks do not compile or exercise the private vespera_jni helpers; decision: Independent code review verified all required behavior. Workspace tests, JNI all-feature build, clippy with warnings denied, and format check passed; five configured benchmark passes do not exercise vespera_jni. - [8] collector.rs: split the per-file body into fast/slow-path helpers and drop the too_many_lines allow — impact: Route discovery now isolates its stored-route and parsed-route paths in private helpers, leaving the outer collector focused on per-file setup. The blanket too_many_lines suppression is removed while preserving route metadata construction …; evidence: none; the change is confined to proc-macro compile-time code and does not affect runtime benchmark paths; decision: Independent diff review confirmed both extracted loops preserve field order, route order, description resolution, and take_or_clone semantics. Workspace tests and doctests, warnings-denied clippy, formatting, regenerated OpenAPI comparison… Not applied (0/8):
…nding-exception check-and-clear, vespera_macro: extract VesperaCache::is_fresh to dedup the cache-freshness predicate, vespera_macro: … (7/8 applied) Applied (7/8): - [2] vespera_jni: unify the three copies of the pending-exception check-and-clear — impact: One JNI-symbol-layer implementation now owns pending-exception checking and clearing, preventing future policy drift while retaining existing call-site behavior.; evidence: none; the configured vespera and vespera_inprocess benchmarks do not link the JNI-only changed crate.; decision: Independent diff review found the requested shared helper and wrapper. Exactly one check/clear pair remains in the three target files; fmt, both clippy configurations, the full workspace tests, and five configured benchmark invocations pas… - [3] vespera_macro: extract VesperaCache::is_fresh to dedup the cache-freshness predicate — impact: A single borrowed CacheKey and is_fresh predicate now govern both macro cache paths, preventing one path from silently omitting a future invalidation input while preserving export_app sidecar validation.; evidence: none; only compile-time proc-macro cache code changed, outside the benchmarked runtime dispatch paths; decision: Independent review confirmed the identical six comparisons and export-only sidecar check. Workspace tests, strict Clippy, formatting, cache hit/miss behavior, and the configured benchmark command completed; full evidence is in the review r… - [4] vespera_macro: extract finalize_metadata to dedup 4 copies of extend/merge/check — impact: One private helper now keeps metadata finalization identical across both vespera! and export_app! cache paths, removing a four-way drift hazard while retaining exact duplicate-schema diagnostics.; evidence: none (compile-time proc-macro refactor; runtime paths are unchanged); decision: Independent backup diff review found only the intended refactor and focused tests. Workspace tests, clippy, formatting, and axum-example build passed; generated OpenAPI and Insta snapshots were unchanged. - [5] vespera_macro: unify file-fingerprint computation on mtime+len — impact: Uses one mtime-plus-size fingerprint implementation for route files, sidecars, and macro sources. Timestamp-preserved source edits that change size now invalidate stale macro caches without extra metadata syscalls.; evidence: none; metadata syscall count is unchanged and no runtime dispatch path changed; decision: Independent review found the assigned diff correct. The size-only regression test, full workspace tests, clippy, formatting, and two axum-example builds passed. Five configured benchmark runs completed; their noisy runtime variance is unre… - [6] vespera_macro: extract with_current_crate_bucket in schema_impl.rs — impact: Centralizes poison-tolerant, per-crate copy-on-write schema-bucket mutation so the two mutating paths cannot drift while preserving their behavior.; evidence: none; this private proc-macro helper is outside the configured runtime benchmark binaries and retains the prior operati…; decision: Independent diff review confirmed unchanged duplicate and overwrite semantics; workspace tests, clippy, fmt, and five benchmark invocations completed successfully. See review report for evidence. - [7] vespera_macro: drop the normalize_path_key pass-through re-export chain — impact: Removes two misleading crate-internal re-export hops so every consumer imports normalize_path_key from its defining module.; evidence: none; compile-time import-only refactor with no runtime code or generated-token changes; decision: Independent diff review confirmed equivalent symbol resolution. Workspace tests, clippy -D warnings, fmt, and five benchmark runs all passed; full evidence is in the review report. - [8] vespera_jni: extract finish_header_dispatch to dedup the two dispatch*WithHeader tails — impact: Centralizes the identical post-dispatch JNI header tail and its load-bearing panic-path lease-discard invariant, reducing drift risk without changing behavior or public interfaces.; evidence: none; only private vespera_jni code changed, which is outside the configured vespera and vespera_inprocess benchmark bi…; decision: Independent review confirmed the Ok path releases the same leases in the same order and the Err path never invokes the release closure. cargo test, clippy -D warnings, fmt --check, and five configured benchmark runs passed. Not applied (1/8): - [1] wire header_write: single-distinct-name fast path in write_headers (BENCHMARK-AFFECTING) — reverted; attempted impact: No measurable target-path improvement was demonstrated; restoring the prior path avoids an extra branch on multi-header responses.; evidence: metadata_static_fast: 23.978 ns to 24.084 ns (+0.4%), within the reported 3-5% noise band.; reason: Workspace tests, clippy, formatting, and wire-contract goldens passed. The implementer’s interleaved target benchmark was +0.4%, within noise, and its analysis indicates LLVM already removes the work the fast path intended to avoid. See th…
…_include))] module attributes in vespera_jni, Delete the isHopByHopRequestHeader delegating wrapper and inline its three call sites, C… (6/6 applied) Applied (6/6): - [1] Remove the five redundant #[cfg(not(tarpaulin_include))] module attributes in vespera_jni — impact: Removes five redundant module cfg attributes already subsumed by the crate-level coverage gate, reducing maintenance noise without changing compiled behavior.; evidence: none; decision: Independent diff review found exactly five intended deletions. Workspace tests, all-feature clippy, fmt, tarpaulin-cfg check, and five benchmark invocations completed successfully; the change cannot affect normal-build codegen. - [2] Delete the isHopByHopRequestHeader delegating wrapper and inline its three call sites — impact: Removes a misleading private no-op wrapper while preserving request header filtering and documenting why the shared hop-by-hop predicate is correct.; evidence: none; the changed Java code is outside the configured Rust benchmark harness; decision: Independent diff review confirmed a pure static-delegate inline at all three required call sites. Java tests, Rust workspace tests, clippy, formatting, and Rust benchmark invocations passed; see the review report. - [3] Collapse HeaderPolicy's two duplicated ASCII-lowercase routines into one range-based fold — impact: One range-based ASCII fold now serves Connection-token parsing and header-name fallback, removing duplicate private logic while retaining the existing allocation profile and fast path.; evidence: none; Java-only refactor with unchanged one char[] plus one String allocation per folded value; decision: Backup comparison confirmed only the requested helper merge; Gradle tests, workspace tests, Clippy, formatting, and five benchmark runs completed successfully. See the review report for details. - [4] Replace the collector's double HashMap lookup with the entry API — impact: The collector slow path now hashes and probes each parsed file path once when storing and borrowing its AST, rather than repeating the lookup. It also eliminates the collector's Index panic site.; evidence: One fewer file-path hash and HashMap probe per collector slow-path file; runtime benchmark suite has no path through th…; decision: Independent diff review confirmed the owned key clone and AST borrow preserve the push_parsed_routes lifetime and behavior. cargo test --workspace, strict clippy/fmt, and five benchmark invocations passed; runtime benchmark noise is unrela… - [5] [BENCHMARK] Drop the redundant post-comma skip_ws() in the hand-rolled wire-header parser — impact: Removed two redundant whitespace scans after commas; read_string() performs the required skip at the next loop iteration.; evidence: Five-run median deltas: parse +0.45%; headers/1 -0.89%, /8 -2.24%, /16 -1.84%. No relevant regression exceeded +2%.; decision: Independent code review proved equivalence; workspace tests, clippy, fmt, and the five-run A/B benchmark passed. Details are in the review report. - [6] Table-drive WireHeaderStringSupport.canonicalKey, deleting six copy-pasted methods — impact: One length-indexed table replaces six duplicated canonical-key methods, so adding a supported header is a single table edit while preserving shared literal instances and concrete hot-path comparisons.; evidence: Java p3_apply allocation is 576 bytes/op. Rust Criterion benches are structurally unrelated because no Rust code change…; decision: Independent diff review confirmed the table exactly matches every prior length and literal. Forced Gradle tests, the Java allocation benchmark, cargo test, cargo fmt, and cargo clippy all passed; full evidence is in the review report. Not applied (0/6):
…erMap into a LazyLock static (PERF item), parse_request_body: collapse the four copy-pasted extractor arms, remove the unwrap() panic … (6/8 applied) Applied (6/8): - [1] error_wire: hoist the fixed content-type HeaderMap into a LazyLock static (PERF item) — impact: Error wire construction reuses an immutable one-entry content-type HeaderMap, eliminating a per-response allocation and header-name hash without changing the emitted bytes.; evidence: No directly exercised Criterion group covers error_wire. Five full benchmark runs passed; successful-path variation is …; decision: Independent source review confirmed the prescribed scoped change and unchanged write path. Focused and workspace tests, clippy, and formatting passed; wire_contract locks error_wire bytes exactly. Five benchmark runs completed, with unrela… - [2] parse_request_body: collapse the four copy-pasted extractor arms, remove the unwrap() panic site, d… — impact: Consolidates duplicated request-body construction, removes the macro-path panic site, and eliminates an unnecessary clippy suppression while preserving deterministic OpenAPI output.; evidence: none; this proc-macro-only refactor is outside the runtime dispatch benchmark's execution path. The attempted five-pass…; decision: Independent diff review found behaviorally equivalent private helpers. Targeted 19-test parser suite, full workspace tests, strict clippy, and fmt check pass; no pending Insta snapshots or diff whitespace errors. - [3] rename_field: extract one helper per rename_all strategy and drop the too_many_lines allow — impact: The long rename_field implementation is now a concise strategy dispatch over six private helpers, and the clippy suppression is removed without merging intentionally different case algorithms.; evidence: No candidate runtime path: this private proc-macro refactor does not reach vespera or vespera_inprocess benchmarks.; decision: Independent backup diff review found only a behavior-preserving extraction. Scoped and workspace tests, strict clippy/format checks, and the configured benchmark command all completed successfully; detailed evidence is in the review report. - [4] impl Serialize for Schema: split the 170-line field emitter into ordered group helpers and drop the… — impact: Schema serialization is split into six private ordered field-group helpers, removing the too_many_lines suppression while preserving the OpenAPI field sequence.; evidence: none; configured benchmarks do not construct or serialize Schema; decision: Independent review confirmed the exact helper grouping and order. Workspace tests, Insta snapshots, clippy, formatting, example OpenAPI regeneration, and the configured benchmark completed successfully; see the review report. - [5] Remove the path.segments.last().unwrap() panic sites in vespera_macro parser modules — impact: All six empty-path parser cases now return their existing neutral fallback, and the two String type defaults no longer parse with unwrap. This prevents opaque proc-macro panics without changing valid-input output.; evidence: none; decision: Independent diff review confirmed scope and fallback equivalence. cargo test --workspace, clippy -D warnings, and fmt --check passed; the executable non-test panic scan is clean. The repeated benchmark sweep timed out during its final repe… - [6] normalize_display_path: drop the unconditional second allocation — impact: Avoids the unconditional replacement allocation for separator-free paths while preserving normalized display output.; evidence: One allocation removed for valid UTF-8 paths without backslashes; configured runtime benches do not link this proc-macr…; decision: Independent review confirmed equivalent lossy path rendering; targeted and workspace tests, clippy, formatting, and five benchmark-suite runs passed. See the review report. Not applied (2/8): - [7] Replace the named-field ident.unwrap()/expect() panic sites with spanned diagnostics — failed; attempted impact: Machine failure: no valid signal; reason: Driver terminated item 7: no valid signal - [8] Remove the 'infallible' expect()/unwrap() sites in schema_macro/codegen.rs, schema_macro/type_utils… — skipped; attempted impact: not attempted because item 7 terminated the batch; reason: not attempted because item 7 terminated the batch
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.
No description provided.