Bound low-risk performance hotspots#218
Merged
Merged
Conversation
Constraint: G004 targets benchmark resume writes, transcript prompt sampling, schema pruning, cache-score JSON linting, and context-pack receipts without new dependencies Rejected: Broad rewrites or concurrency behavior changes beyond the resume key cache | too risky for a low-risk performance story Confidence: high Scope-risk: moderate Directive: Keep future optimization passes tied to measured hot paths and preserve plugin copy sync Tested: python3 -m py_compile changed kit/plugin scripts and tests/test_context_guard_kit.py; 12 targeted unittest cases; python3 scripts/prepublish_check.py --skip-tests; python3 scripts/sync_plugin_copies.py --check; git diff --check Not-tested: Full test suite and real provider benchmark runs
Round 1 review fixes: refresh resume key caches only when the CSV stamp changes, bound canonical JSON comparison by encoded output size, and lock the oversized pack receipt omission contract with end-to-end coverage. Constraint: ultra-review-loop requires verified fixes before re-reviewing PR #218 Rejected: Restoring per-append CSV scans unconditionally | would undo the G004 resume performance objective Confidence: high Scope-risk: narrow Directive: Keep resume dedupe concurrency-safe and keep canonical JSON comparisons bounded by output bytes Tested: python3 -m py_compile changed kit/plugin scripts and tests/test_context_guard_kit.py; 15 targeted unittest cases; python3 scripts/prepublish_check.py --skip-tests; python3 scripts/sync_plugin_copies.py --check; git diff --check Not-tested: Full test suite and real concurrent benchmark processes
Round 2 review fixes: rebuild resume key caches on CSV stamp changes and let the bounded canonical encoder, not input byte size, decide whether JSON byte-stability comparison can run. Constraint: ultra-review-loop found remaining stale-cache and over-conservative canonical-skip edge cases Rejected: Input-size based canonical skip | misses whitespace-heavy JSON whose canonical output is small enough to compare safely Confidence: high Scope-risk: narrow Directive: Refresh cached CSV keys by replacement, not merge, whenever the backing file stamp changes Tested: python3 -m py_compile changed kit/plugin scripts and tests/test_context_guard_kit.py; 17 targeted unittest cases; python3 scripts/prepublish_check.py --skip-tests; python3 scripts/sync_plugin_copies.py --check; git diff --check Not-tested: Full test suite and real concurrent benchmark truncation during provider runs
Round 3 review fix: derive runnable benchmark targets through the same stamp-aware resume cache used by execution so evidence coverage and preflight cannot fail on stale CSV snapshots. Constraint: ultra-review-loop found stale runnable target selection after CSV refreshes Rejected: Keeping one-time runnable_targets from startup | diverges from execution-time resume skip semantics Confidence: high Scope-risk: narrow Directive: Use resume_runnable_targets for future resume-sensitive preflight or evidence gates Tested: python3 -m py_compile changed kit/plugin scripts and tests/test_context_guard_kit.py; 18 targeted unittest cases; python3 scripts/prepublish_check.py --skip-tests; python3 scripts/sync_plugin_copies.py --check; git diff --check Not-tested: Full test suite and live provider benchmark replay
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
Verification