Repository navigation
perf(analysis-view): reuse validated immutable captures - #5349
Conversation
Reuse complete capture validation at the format owner for exact authenticated immutable results. Keep per-parent subject and resource admission checks, mutable-input validation, source Evidence and existing CLI/MCP contracts. Record 12 real public-qlog import/query/export comparisons, first-view and small-input costs, CPU/family-memory observations, and executed source, compiled and real CLI/MCP verification. Refs #3133. Co-authored-by: Kaoru0822 <208281322+kaoru0822-kitauji@users.noreply.github.com>
|
@greptileai review |
[Medium impact] The PR appears safe to merge; the follow-up fixes the missing-record check without changing production behavior. SummaryReuses successful capture validation for the exact owned immutable object. Mutable and externally frozen inputs still use ordinary validation.
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Capture input] --> B{Exact object already validated?}
B -->|Yes| C[Reuse immutable capture]
B -->|No| D[Run complete schema validation]
D --> E{Valid and owned immutable proof matches?}
E -->|Yes| F[Remember exact object in WeakSet]
F --> C
E -->|No| G[Return ordinary parse result]
C --> H[Check each request's subject and limits]
Reviews (2) · Last reviewed commit: "test(perf): require every selected captu..." · Reviewed by Greptile |
Co-authored-by: Kaoru0822 <208281322+kaoru0822-kitauji@users.noreply.github.com>
|
The human owner explicitly confirmed readiness and authorized recording the Author readiness declarations and marking this PR ready in the current working session. The declaration is recorded at their direction; CI and automated review remain separate verification. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
…t-state-serve morluto#5319 is on main as one squashed commit with the same content as the branch this work was stacked on, so the branch's side of each overlapping hunk is kept; morluto#5349's analysis-view changes merge as they are. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t-state-coverage morluto#5319 is on main as one squashed commit with the same content as the branch this work was stacked on, so the branch's side of each overlapping hunk is kept; morluto#5349's analysis-view changes merge as they are. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Problem and change
Retained HAR/SAZ/qlog pages revalidate and copy the entire capture for each selected query. Reuse successful validation at the capture format owner for the exact immutable object, using the existing sealing and normalization proof. Mutable/external-freeze inputs still validate normally; subject, coverage and budget checks remain per request. CLI/MCP share the projection. One-shot producer/environment-file admission keeps ordinary schema validation.
Refs #3133; its broader model-workflow research remains open.
Evidence and validation
Final adjacent main/candidate tasks on the same public 30,753-event qlog preserve all selected Evidence and original-record round trips:
First view is slower: 2.797 → 4.041 s. This is one final pair, not a distribution. Earlier three-run cohorts, small-input limits and a slower unpaired replay remain in the report. No model-token saving is claimed.
Full
npm run check, 252 source assertions in two invocations, 63 compiled CLI/MCP/decoder assertions (one inapplicable guard-unavailable case skipped), 10 receipt regressions and test discovery pass. Both public recordings have exact real CLI/MCP Evidence agreement.A combined source run exposed an existing cancellation-spy loading-order failure, reproduced on unchanged main with environmentReplay loaded first. The service file passes 48 assertions alone and the other files pass 204. No unrelated repair is included.
Pinned audit, driver, every run and limits. Query experiments are serial, one CPU, 4 GiB hard/3 GiB early memory, no swap; static checks use a separate 8 GiB cap. Guard stops and unavailable final counters remain explicit. Other capture formats/platforms and post-GC retained heap are not performance-qualified.
Review correction: require both selected records per page. The revised oracle rechecked 22 archived completed transcripts (198 pages/396 records); empty/short response controls fail. Both real MCP tasks passed again with identical Evidence and verified cleanup.
Author readiness
Human owner: @gensokyo-dev