Clarify PR-B cache and measurement telemetry#126
Merged
Conversation
Constraint: G010 PR-B scope is limited to PR #118/#122 cache and measurement interpretation follow-ups.\nRejected: Changing benchmark claim semantics beyond provider-cache caveats | Current behavior already separates paired token/cost claims and only needed clearer guardrails.\nConfidence: high\nScope-risk: moderate\nDirective: Treat provider cache fields as diagnostic telemetry; do not fold cache discounts into token-reduction claims.\nTested: python3 -m unittest discover -s tests -p 'test_context_guard_kit.py' -k cache_friendliness; python3 -m unittest discover -s tests -p 'test_context_guard_kit.py' -k transcript_audit; python3 -m unittest discover -s tests -p 'test_context_guard_kit.py' -k benchmark; python3 -m unittest discover -s tests -p 'test_context_guard_kit.py' -k benchmark_report; python3 -m unittest discover -s tests -p 'test_context_guard_kit.py' -k benchmark_runner_rejects_incompatible_existing_csv_schema; python3 -m py_compile context-guard-kit/claude_transcript_cost_audit.py plugins/context-guard/bin/context-guard-audit context-guard-kit/benchmark_runner.py plugins/context-guard/bin/context-guard-bench tests/test_context_guard_kit.py; cmp -s context-guard-kit/claude_transcript_cost_audit.py plugins/context-guard/bin/context-guard-audit; cmp -s context-guard-kit/benchmark_runner.py plugins/context-guard/bin/context-guard-bench; python3 -m json.tool docs/benchmark-report.example.json; git diff --check; python3 scripts/release_smoke.py; python3 scripts/prepublish_check.py\nNot-tested: GitHub CI before PR creation
Constraint: PR-B bumps feasibility JSON to contextguard.metric-feasibility.v1.1 while existing Mac consumer enforces exact schema compatibility.\nRejected: Accept every future v1.x schema automatically | unsupported future additive fields still need an explicit compatibility decision.\nConfidence: high\nScope-risk: narrow\nDirective: Update contextGuardSupportedFeasibilitySchemaVersions whenever the audit feasibility contract gets another compatible minor version.\nTested: swift package clean && swift test; PR-B targeted cache_friendliness/transcript_audit/benchmark unittest slices; py_compile/cmp/json/diff-check; release_smoke.py; prepublish_check.py.\nNot-tested: Live macOS app UI manual launch.
Constraint: PR-B review found status=partial could still report observed confidence for low-record cache-friendliness evidence.\nRejected: Leave as advisory-only MEDIUM | PR-B explicitly owns partial-evidence confidence framing, so fixing now reduces claim ambiguity.\nConfidence: high\nScope-risk: narrow\nDirective: Keep cache_friendliness status and confidence semantics aligned when adding new partial-evidence conditions.\nTested: unittest cache_friendliness 10 tests; unittest transcript_audit 41 tests; unittest benchmark 21 tests; swift test; py_compile/cmp/json/diff-check; release_smoke.py; prepublish_check.py 392 tests.\nNot-tested: Manual transcript review in a live Claude Code session.
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
contextguard.metric-feasibility.v1.1for additive cache-friendliness fields.build_cache_friendlinessthrough shared audit output paths to avoid redundant recomputation.Verification
python3 -m unittest discover -s tests -p 'test_context_guard_kit.py' -k cache_friendlinesspython3 -m unittest discover -s tests -p 'test_context_guard_kit.py' -k transcript_auditpython3 -m unittest discover -s tests -p 'test_context_guard_kit.py' -k benchmarkpython3 -m unittest discover -s tests -p 'test_context_guard_kit.py' -k benchmark_reportpython3 -m unittest discover -s tests -p 'test_context_guard_kit.py' -k benchmark_runner_rejects_incompatible_existing_csv_schemapython3 -m py_compile context-guard-kit/claude_transcript_cost_audit.py plugins/context-guard/bin/context-guard-audit context-guard-kit/benchmark_runner.py plugins/context-guard/bin/context-guard-bench tests/test_context_guard_kit.pycmp -s context-guard-kit/claude_transcript_cost_audit.py plugins/context-guard/bin/context-guard-auditcmp -s context-guard-kit/benchmark_runner.py plugins/context-guard/bin/context-guard-benchpython3 -m json.tool docs/benchmark-report.example.json >/dev/nullgit diff --checkpython3 scripts/release_smoke.pypython3 scripts/prepublish_check.pyNotes