Skip to content

Productionize adaptive context packing policy#205

Merged
ictechgy merged 1 commit into
mainfrom
g004-adaptive-context-packing-productionization
Jun 15, 2026
Merged

Productionize adaptive context packing policy#205
ictechgy merged 1 commit into
mainfrom
g004-adaptive-context-packing-productionization

Conversation

@ictechgy

Copy link
Copy Markdown
Owner

Summary

  • add selectable local adaptive-k policies (balanced, recall, precision) plus metadata-only recall/precision proxy gates
  • add capped selected/omitted evidence and structured source-verification hints to adaptive-k JSON without emitting raw commands or changing manifest/pack output
  • update docs, plugin copy, release smoke, and context-pack regression coverage

Safety / claim boundary

  • --adaptive-k remains opt-in and advisory; no manifest/pack/receipt changes are applied automatically
  • no model/network/embedding/provider-cost calls
  • proxy gates are local metadata only and do not support hosted token/cost savings claims

Validation

  • python3 scripts/sync_plugin_copies.py --check
  • python3 -m py_compile context-guard-kit/context_pack.py plugins/context-guard/bin/context-guard-pack tests/test_context_guard_kit.py scripts/release_smoke.py
  • targeted adaptive/docs tests OK
  • PYTHONDONTWRITEBYTECODE=1 python3 -m unittest -k context_pack tests.test_context_guard_kit.ClaudeTokenKitTests (51 tests OK)
  • python3 scripts/release_smoke.py --timeout 20
  • PYTHONDONTWRITEBYTECODE=1 python3 scripts/prepublish_check.py (696 tests OK)
  • git diff --check

Ralplan

  • Architect R5: APPROVE, blockers none
  • Critic R4: APPROVE, blockers none

@ictechgy

Copy link
Copy Markdown
Owner Author

G004 final evidence before merge:

Validation:

  • python3 scripts/sync_plugin_copies.py --check
  • python3 -m py_compile context-guard-kit/context_pack.py plugins/context-guard/bin/context-guard-pack tests/test_context_guard_kit.py scripts/release_smoke.py
  • Targeted adaptive/docs tests ✅
    • test_context_pack_suggest_adaptive_k_is_opt_in_and_claim_safe
    • test_context_pack_auto_adaptive_k_does_not_change_manifest_or_build
    • test_context_pack_adaptive_k_policy_gate_and_verification_edges
    • test_context_pack_auto_explain_docs_help_and_smoke_surface_are_listed
  • PYTHONDONTWRITEBYTECODE=1 python3 -m unittest -k context_pack tests.test_context_guard_kit.ClaudeTokenKitTests (51 tests) ✅
  • python3 scripts/release_smoke.py --timeout 20
  • PYTHONDONTWRITEBYTECODE=1 python3 scripts/prepublish_check.py (696 tests + prepublish) ✅
  • git diff --check
  • Local inertness recheck: --adaptive-k-policy without --adaptive-k does not emit adaptive_k; with --adaptive-k emits selected policy/gates ✅

PR CI:

  • test-and-prepublish (3.11)
  • test-and-prepublish (3.12)
  • test-and-prepublish (macos-latest, 3.12)

Quad review loop:

  • Codex: APPROVE, blockers none — .omx/artifacts/quad-review-pr205-codex-20260615T041200Z.md
  • Claude: APPROVE, blockers none — .omx/artifacts/quad-review-pr205-claude-20260615T041350Z.md
  • Forge: APPROVE, blockers none — .omx/artifacts/quad-review-pr205-forge-20260615T041500Z.md
  • Agy: APPROVE, blockers none — .omx/artifacts/quad-review-pr205-agy-20260615T040750Z.md

@ictechgy ictechgy merged commit 1e4ac8e into main Jun 15, 2026
3 checks passed
@ictechgy ictechgy deleted the g004-adaptive-context-packing-productionization branch June 15, 2026 04:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant