Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add plan-only semantic GC candidate reporting#228

Open
ictechgy wants to merge 6 commits into
mainfrom
agent/semantic-gc-plan-gate
Open

Add plan-only semantic GC candidate reporting#228
ictechgy wants to merge 6 commits into
mainfrom
agent/semantic-gc-plan-gate

Conversation

@ictechgy

Copy link
Copy Markdown
Owner

Ralplan summary

Add a default-off, high-risk, plan-only context-guard experiments plan semantic-gc surface. The command evaluates a bounded caller-declared graph with iterative mark-and-sweep semantics and reports non-actionable unreachable candidates only.

Acceptance boundaries

  • no deletion, omission, rewriting, replacement, emit/record/serve/apply runtime, or new binary
  • no source/artifact/config/stdin content reads, writes, subprocesses, network, model, or provider calls
  • strict JSON and graph-integrity ambiguity suppress candidate classification
  • ordinary candidate-safety failures preserve topology but block readiness
  • omitted protected-zone declaration remains null, uses conservative effective deny, and blocks readiness
  • candidates always require human review; candidate_replacement is always null
  • no hosted token/cost savings claim

Implementation

  • registered the default-off semantic-GC plan lane and exact CLI surface
  • added strict bounded JSON decoding, structural graph validation, iterative reachability, deterministic audit rows/counts/candidate ordering, ordered blockers/warnings, and invariant no-action verification scope
  • synchronized the generated plugin executable copy
  • updated the six required public documents with one canonical executable command
  • added test-first contract, graph, overflow, side-effect, non-echo, boundary, permutation, and documentation regressions

Changed files

  • context-guard-kit/experimental_registry.py
  • generated plugins/context-guard/bin/context-guard-experiments
  • tests/test_context_guard_kit.py
  • README.md, README.ko.md
  • context-guard-kit/README.md
  • plugins/context-guard/README.md, plugins/context-guard/README.ko.md
  • research/experimental-token-reduction-radar.md

Verification

  • semantic-GC tests: 19/19 passed
  • proof-carrying-context regressions: 12/12 passed
  • python3 scripts/prepublish_check.py: 787/787 passed
  • python3 scripts/release_smoke.py: OK
  • plugin sync check, py_compile, and git diff --check: passed
  • independent code-reviewer: APPROVE after all findings fixed
  • independent Ralph implementation architect: APPROVED

Risks and follow-ups

  • caller-declared reachability is not semantic relevance and never authorizes omission
  • receipt/provenance/fallback execution remains unverified by this planner
  • any future verifier, omission path, or runtime action requires a separate approved PR

ictechgy added 6 commits July 11, 2026 15:52
Introduce a default-off caller-declared mark-and-sweep planner with strict graph validation, non-actionable candidate reporting, exact fallback metadata, deterministic output, synchronized packaging, and contract-focused regression coverage.

Constraint: Keep semantic-gc plan-only with no deletion, omission, content reads, provider calls, runtime verbs, new binary, or release-surface expansion
Confidence: high
Scope-risk: experimental and default-off
Directive: Preserve graph-evaluation suppression, declared-null protected policy, and non-authorization invariants
Tested: semantic-gc 19/19; proof regression 12/12; prepublish 787/787; release smoke; sync check; py_compile; git diff --check; code-reviewer APPROVE; architect APPROVED
Not-tested: live receipt/provenance verification and actual context omission are intentionally out of scope
Round 1/5; blocker fingerprint: HIGH|maintainability|research/experimental-token-reduction-radar.md|semantic-GC inventory and closer|section appended after conclusion and omitted from inventory.

Constraint: ultra-review-loop requires one verified atomic commit per fix group
Confidence: high
Scope-risk: narrow
Directive: Keep future edits limited to the blocker fingerprint unless a later review expands scope
Tested: python3 -m unittest tests.test_context_guard_kit.ClaudeTokenKitTests.test_experimental_semantic_gc_docs_parity
Not-tested: full prepublish suite deferred until all round-one blocker groups are committed
Round 1/5; blocker fingerprint: HIGH|testability|tests/test_context_guard_kit.py|candidate safety and two-phase blocked status|safety blockers lacked explicit no-action assertions.

Constraint: ultra-review-loop requires one verified atomic commit per fix group
Confidence: high
Scope-risk: narrow
Directive: Keep future edits limited to the blocker fingerprint unless a later review expands scope
Tested: python3 -m unittest tests.test_context_guard_kit.ClaudeTokenKitTests.test_experimental_semantic_gc_candidate_safety tests.test_context_guard_kit.ClaudeTokenKitTests.test_experimental_semantic_gc_two_phase_validation
Not-tested: full prepublish suite deferred until all round-one blocker groups are committed
Round 2/5; blocker fingerprint: HIGH|correctness|context-guard-kit/experimental_registry.py|semantic-gc human-review acknowledgement candidate condition|registry wording broader than candidate-conditional enforcement.

Constraint: ultra-review-loop requires one verified atomic commit per fix group
Confidence: high
Scope-risk: narrow
Directive: Keep future edits limited to the blocker fingerprint unless a later review expands scope
Tested: python3 -m unittest tests.test_context_guard_kit.ClaudeTokenKitTests.test_experimental_semantic_gc_registry_and_surface tests.test_context_guard_kit.ClaudeTokenKitTests.test_experimental_semantic_gc_acknowledgement_invariants; python3 scripts/sync_plugin_copies.py --write
Not-tested: full prepublish suite deferred until the round-two blocker group is committed
Round 3/5; blocker fingerprint: HIGH|maintainability|README.md|semantic-GC section after License|experimental block follows license.

Constraint: ultra-review-loop requires one verified atomic commit per fix group
Confidence: high
Scope-risk: narrow
Directive: Keep future edits limited to the blocker fingerprint unless a later review expands scope
Tested: python3 -m unittest tests.test_context_guard_kit.ClaudeTokenKitTests.test_experimental_semantic_gc_docs_parity; git diff --check
Not-tested: full prepublish suite deferred until all round-three blocker groups are committed
Round 3/5; blocker fingerprint: HIGH|reliability|context-guard-kit/experimental_registry.py|blocked plan exit code contract|blocked status exits zero without an explicit machine contract.

Constraint: ultra-review-loop requires one verified atomic commit per fix group
Confidence: high
Scope-risk: narrow
Directive: Keep future edits limited to the blocker fingerprint unless a later review expands scope
Tested: python3 -m unittest tests.test_context_guard_kit.ClaudeTokenKitTests.test_experimental_semantic_gc_registry_and_surface tests.test_context_guard_kit.ClaudeTokenKitTests.test_experimental_semantic_gc_ready_for_plan_review_contract tests.test_context_guard_kit.ClaudeTokenKitTests.test_experimental_semantic_gc_acknowledgement_invariants; python3 scripts/sync_plugin_copies.py --write
Not-tested: full prepublish suite deferred until all round-three blocker groups are committed
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