Skip to content

CC-1/M0: optional recipient meta on StateNode - #1

Merged
soltrinox merged 1 commit into
mainfrom
compass/m0-cc1-recipient-meta
Sep 5, 2026
Merged

soltrinox merged 1 commit into
mainfrom
compass/m0-cc1-recipient-meta

Conversation

@soltrinox

Copy link
Copy Markdown
Owner

Summary

Implements CC-1 / M0 for comPASS Track B on engine 0.2.0.

  • Add optional recipient_id, recipient_version, route_decision_id to PersistentAgentHandle.step so they persist on StateNode.meta
  • Round-trip through StateStore save/load/lineage (already JSON-backed meta_json; documented RECIPIENT_META_KEYS)
  • Extend engine/schema/state-node.v1.json meta properties
  • Tests prove present fields survive lineage reload; absent fields keep 0.2.0 meta shape

Out of scope: CC-2..CC-10 (not included).

Acceptance criteria

  1. Unit: write a node with all three fields; reload via StateStore; assert equality
  2. Lineage: parent/child chain keeps per-turn recipient
  3. Absent fields ⇒ prior behavior (tool_status + tokenizer_id only from step)
  4. No /Users/rosario paths in engine/ source
  5. Relevant pytest: tests/test_store.py + tests/test_handle.py — 5 passed

Files changed

  • engine/src/chat_compressor/handle.py
  • engine/src/chat_compressor/store.py
  • engine/schema/state-node.v1.json
  • engine/tests/test_handle.py
  • engine/tests/test_store.py

Test plan

  • cd engine && python -m pytest tests/test_store.py tests/test_handle.py -v (5 passed)
  • rg -n '/Users/rosario' engine/ → no hits
  • Reviewers: confirm no CC-2+ leakage

Contract: comPASS docs/schema/statenode-meta.v1.md

Add optional recipient_id, recipient_version, and route_decision_id to
PersistentAgentHandle.step so they land in StateNode.meta and round-trip
through StateStore lineage reload. Absent fields keep 0.2.0 meta behavior.
Update state-node.v1 schema and add store/handle tests.
@soltrinox
soltrinox merged commit 4612efa into main Sep 5, 2026
2 of 3 checks passed
@soltrinox

Copy link
Copy Markdown
Owner Author

M1 / CC-2..CC-5 landed on this branch

Hop safety prerequisites for model switching (Track B milestone M1). Continues M0/CC-1 on compass/m0-cc1-recipient-meta.

Changes

  • CC-2: inject_history.json partitions by recipient_id (recipients map); absent id keeps session-scoped turns (0.2.0).
  • CC-3: pack_forward(..., recipient_changed=True) clears suppression like supersede.
  • CC-4: allow_skip gated on recipient continuity; first/hop turn never skips.
  • CC-5: adaptive_budget uses per-recipient lineage turn count, not session t alone.

Proof

  • pytest touched suite: store/pack/handle + tests/test_m1_hop_safety.py — all passed (logs under local test-results/m1-hop-safety/, gitignored).
  • Sanitize: rg \"/Users/rosario\" engine/ clean.
  • M1 exit: hop at turn 20 → non-skip, full budget, unsuppressed payload; no-hop tagged session matches absent-recipient token accounting.

Commits

  • 9db1564 feat(engine): CC-2..CC-5 per-recipient hop safety (M1)
  • 28244cd test(engine): polish M1 hop-safety assertions and comments

Still out of scope on this PR

CC-6..CC-10, HOOK_CONTRACT advisory (CC-9), bundle export (CC-8).

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