Skip to content

feat(cm): the CASE_MANAGER seats a new participant with Add(CaseParticipant, target=case) - #6802

Merged
sei-ahouseholder merged 12 commits into
mainfrom
task/6295-participant-seating-add
Nov 30, 2026
Merged

sei-ahouseholder merged 12 commits into
mainfrom
task/6295-participant-seating-add

Conversation

@sei-ahouseholder

@sei-ahouseholder sei-ahouseholder commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The CASE_MANAGER now seats a new participant with Add(CaseParticipant, target=<case>), context the case, carrying the record in full, under the semantic type ADD_CASE_PARTICIPANT_TO_CASE (VAM-06-004, CLP-07-021). Create(CaseParticipant) is gone: no factory builds it, no pattern matches it, and an inbox refuses a received one as unrecognized (VAM-01-017). A replica seats the record in the case the entry's target names, and fails an entry whose target names no case or another case (CM-11-025, CM-23-044).

Issues: closed 1, opened 0
Questions: asked 1, filed 0

Changes

  • vultron/core/models/events/base.py: CREATE_CASE_PARTICIPANT is replaced by ADD_CASE_PARTICIPANT_TO_CASE. The Case Owner removes or reinstates an actor with its own act naming the actor, which the CASE_MANAGER admits and announces #6465 freed that name.
  • vultron/wire/as2/vocab/activities/case_participant.py: _AddParticipantToCaseActivity(as_Add) requires target and context (the case) and the record inline. Its generated name is now "… Add as_CaseParticipant … to ".
  • vultron/wire/as2/factories/case_participant.py: add_participant_to_case_activity(participant, target, *, at, ...) is the one factory. It defaults context to the case and refuses a context that names another case. create_participant_activity is deleted.
  • vultron/wire/as2/extractor/_instances.py, vultron/semantic_registry/case_participant.py, vultron/core/models/events/case_participant.py: AddCaseParticipantToCasePattern is ADD + CaseParticipant + target_=VulnerabilityCase. The object type keeps it apart from the Owner's Add(<Actor>) reinstatement. The entry is recognized and unhandled. The event's case_id reads target.
  • vultron/core/behaviors/sync/nodes/participant_record_effect.py: ApplyAddCaseParticipantToCaseFromLedgerNode resolves the case from the snapshot's target, not from the entry's context. An entry whose target is missing, or names a case other than the entry's own (CM-11-025, CLP-07-007), fails with a reason and seats nothing.
  • vultron/adapters/driven/trigger_activity_adapter/cases.py: the generic add-object trigger refuses a CaseParticipant. Add(CaseParticipant, target=<case>) is now the CASE_MANAGER's own seating entry, and a participant record comes into existence only as the CASE_MANAGER's consequence of an act it records (VAM-01-020). The existing case-participant refusal tests pin this.
  • vultron/core/behaviors/sync/nodes/canonical_entry.py: drops the ("Create", "CaseParticipant") signature.
  • Renames (no change in behavior): record_case_participant_added (port and adapter, derived-id prefix case-participant-added), commit_case_participant_added, IsAddCaseParticipantToCaseEventNode, the AddCaseParticipantToCase effect slot, ADD_CASE_PARTICIPANT_TO_CASE_SEMANTIC_TYPE, the add_participant_to_case vocabulary example, the VINCE translation's seat act (Add), and docstrings across core and demo.
  • Generated: docs/reference/examples/add_participant_to_case.json (renamed), the msm-occasions output (occasions.yaml, lookup tables, the add-case-participant-to-case section and embed), ui/src/data/semantic_registry.json, and the demo ledger recordings under ui/src/recordings/, re-recorded with export-demo-recordings (run through run-heavy.py), and the UI replay goldens are regenerated to match.
  • ui/src/utils/: the mapper keeps create_case_participant log-only, so older uploaded logs still replay. The test fixture's participant entry is an Add with a target.
  • Docs and notes: docs/reference/messages/case_management.md, ledger_replication.md, case_initialization.md, rv-demo-protocol.md, and the rv/rcv/rcv-reject/rvv/_engagement_status_entry scenario pages now name the Add form and add_case_participant_to_case. In notes/as2-vocabulary-alignment.md the section's Today line now records what was built.
  • docs/adr/0124-case-is-a-projection-of-its-ledger.md: revision 3, edited in place with the maintainer's approval (ADR-0124 is accepted-provisional, epoch 2 of ADR-0120; Epic Each message is the act of the actor that decides it, and an act the CASE_MANAGER makes for another names the request it carries out #6509 run, 2026-11-30). The Decision bullet that gave Create(CaseParticipant) as its example now says that a record joining one of the case's lists is an Add of the record with the case as its target (CLP-07-021, the participant-record decision on CASE_MANAGER ledger entries record a new consent row as Create, not Add(row, target=participant) #6330), and that any other new record is Create(Object). status_override, updated, revision, More Information and the ADR index record the change. The chosen option is unchanged.
  • Specs: removes the VAM-06-004 phantom_symbol_ref suppression. The verification: text of CLP-07-021, CM-11-025, VAM-01-017, VAM-01-018, VAM-01-020 and VAM-06-004 now names the real tests instead of "(The CASE_MANAGER seats a new participant with an Add of the record to the case #6295)". No statement or priority changes.
  • Tests:
    • test/architecture/test_participant_seating_add_planned.py is deleted.
    • test_the_stub_invite_adds_the_participant_record_to_the_case loses its strict xfail and is rewritten for the The Case Owner invites an actor with its own Invite, and the CASE_MANAGER makes the stub Invite from it #6697 flow. It asserts the entry's type/target/context, replays it to a bystander replica, and finds the record seated.
    • New in test_add_log_entry_tree.py: one test that the record is seated in the case target names, and one that an entry with no target, or another case's, seats nothing and keeps the entry out of the ledger (SYNC-12-004).
    • test_inbox_outcome_chain.py adds Create(CaseParticipant) (with target) to the refused-as-unrecognized cases.
    • New factory tests cover type/target/context, the mismatched context and the missing case. The wire-class tests pass target/context, so each refusal is about object alone, and they also refuse an explicit None case. A new event-alias row pins that case_id reads target.

Specs

Spec manifest
Loaded (floor): CLP-07-021 CLP-07-007 CM-23-044 CM-11-023 CM-11-024 CM-11-025 CM-31-012 VAM-01-017 VAM-01-018 VAM-01-019 VAM-01-020 VAM-06-004 AF-01-001 AF-01-003 AF-04-001 SE-01-001 SE-08-001 MS-18-001
Loaded (cross-cutting): ARCH CS
Loaded (selected): VAM-06 — participant management wire forms; CM-11 — stub Invite seating entries; SYNC-02 — the ledger Add's own target/context rules, checked as not covering the carried payload; CM-24 — delegated authorship/inReplyTo scope check; SE-05 — recognized-but-unhandled entry; SE-08 — target_ discriminator, required target (SE-08-002); SYNC-12 — failed effect keeps the entry out (SYNC-12-004); VAM-01 — Create refusal; CLP-07 — commit-caused entry forms; CM-31 — no Add at Accept (CM-31-012); AF-01 AF-02 AF-04 — factory rules
Considered, skipped: RF-08 — inReplyTo on commit-caused acts is #6726's sweep; CM-21 — ownership transfer belongs to #6466; AKM-02 AKM-03 AKM-05 ARCH-02 ARCH-10 ARCH-15 ARCH-22 ARCH-25 ASK-07 BT-14 BT-17 BTND-03 BTND-05 CBT-01 CEH-04 CLP-02 CLP-10 CLP-14 CLP-15 CM-02 CM-10 CM-12 CM-14 CM-17 CM-18 CM-22 CM-23 CM-29 CP-01 CP-02 CP-05 CP-09 CS-03 CS-13 CS-14 CS-19 CSB-15 DEMOCI-01 DL-02 DR-02 EMB-16 EMB-18 EP-09 ID-04 IO-02 MSM-01 MSM-02 MSM-03 MSM-04 MSM-07 MV-01 MV-09 MV-10 OID-01 OX-06 OX-14 PCR-02 PCR-04 PCR-06 PCR-07 PCR-08 RF-02 RF-03 RF-04 RSH-08 RSH-09 SBT-04 SE-02 SE-03 SE-07 SIG-01 SIG-05 SYNC-03 SYNC-04 SYNC-09 SYNC-10 SYNC-14 SYNC-15 SYNC-16 SYNC-18 SYNC-20 SYNC-21 UCORG-02 VAM-03 VAM-04 VAM-05 VAM-08 VAM-09 VM-08 VM-10 — reached only through a renamed hub symbol (MessageSemantics, the factories package, examples, mirror tests); the rename changes none of their behavior

Docs

Docs: updated docs/reference/messages/case_management.md, docs/reference/messages/ledger_replication.md, docs/topics/case_lifecycle/case_initialization.md, docs/reference/rv-demo-protocol.md, docs/howto/activitypub/activities/initialize_participant.md, docs/topics/scenarios/rv.md, docs/topics/scenarios/rcv.md, docs/topics/scenarios/rcv-reject.md, docs/topics/scenarios/rvv.md, docs/topics/scenarios/_engagement_status_entry.md, docs/adr/0124-case-is-a-projection-of-its-ledger.md (revision 3, edited in place), and the generated occasion fragments, examples and known-gaps page

Verification

  • Demo verdict: every scenario's ledger differs from the merge base only by the intended Create → Add(CaseParticipant) seating entry, so the PR carries demo-verdict-change (DEMOCI-11-063).
  • Targeted gate: 20089 passed, 1 failed, exit: 1. The one failure was an xdist worker crash under host load (An in-process rv demo test still crashes its xdist worker in a large loaded run, with #6190's fix in place #6727), in test/core/use_cases/triggers/test_actor_triggers.py::TestCaseManagerJudgesTheOwnersInvite::test_an_invite_from_a_participant_that_is_not_the_owner_is_refused. That file, run alone (-n 0, through run-heavy.py), passes. An earlier gate run had two load failures, a fresh-import timeout and a worker crash in test/demo/test_pcr_late_joiner.py. Both files pass when run alone.
  • The UI replay goldens (ui/src/utils/replay-golden/*.txt) are regenerated with vitest -u. The re-recorded ledgers also reflect The Case Owner invites an actor with its own Invite, and the CASE_MANAGER makes the stub Invite from it #6697's Owner-sent Invite: main's recordings still showed Offer(Actor) for that step. vitest run gives 462 passed.
  • ruff and mypy clean (the type-check second pass is CI's, PAD-18-027)
  • Self-check:
    • Affected text: searched CREATE_CASE_PARTICIPANT, create_case_participant, CreateCaseParticipant, create_participant, _CreateParticipantActivity, record_case_participant_created, create-case-participant, Create(CaseParticipant) and "Create case participant" across vultron/, test/, docs/ (not docs/adr/, which is history, ADR-0127), notes/, specs/, ui/src/ and AGENTS.md files. Every live hit is updated. The remaining Create(CaseParticipant) mentions say that it is refused (VAM-01-017).
    • Failure paths: the seating commit is unchanged apart from its verb (commit_emitted_activity in the same transaction as before). The replica apply has a new failure: an entry whose target is missing or names another case fails before any write, so nothing is created or seated. Tested in test_add_entry_naming_no_case_or_another_case_seats_nothing. A replay of a seated record stays an idempotent no-op (existing test).
    • Branch coverage: every new branch has a test (factory context mismatch, missing case, both wire-class requirements, both replica refusals).
    • Reuse: reuses with_case_context, case_target_ref, case_uri_of and _extract_id_from_field. The wire class follows the _ReinstateParticipantActivity frame. No duplication found.
  • AC-1: add_participant_to_case_activity builds Add(CaseParticipant, target=<case>), context the case. No factory builds Create(CaseParticipant). test_the_seating_entry_is_an_add_to_the_case covers it.
  • AC-2: the replica reads target. test_add_entry_seats_the_record_in_the_case_its_target_names covers the apply node, and test_the_stub_invite_adds_the_participant_record_to_the_case replays the entry through the announce tree.
  • AC-3: ADD_CASE_PARTICIPANT_TO_CASE replaces CREATE_CASE_PARTICIPANT, with an Add pattern and canonical signature. A received Create(CaseParticipant) resolves to UNKNOWN and is refused. A received Add(CaseParticipant)[target=case] is recognized and unhandled.
  • AC-4: the docs pages and fragments are updated, and the demo recordings are re-recorded.
  • AC-5: the probe file is deleted, the stub-Invite test is no longer xfail, and the CM-11-023/CM-11-025/VAM-06-004 tests assert the Add form.

Note: inReplyTo on this commit-caused Add is left to #6726. That Task names Add(CaseParticipant) among the emits it sweeps, alongside the genesis content Adds, which carry none today either.

🤖 Generated with Claude Code

ahouseholder and others added 6 commits November 20, 2026 19:49
…cipant, target=case)

The CASE_MANAGER's new-participant ledger entry is now
Add(CaseParticipant, target=<case>) with context the case, carrying the
record in full, under ADD_CASE_PARTICIPANT_TO_CASE (VAM-06-004,
CLP-07-021). CREATE_CASE_PARTICIPANT, its Create pattern, wire class and
factory are gone, so a received Create(CaseParticipant) is refused as
unrecognized (VAM-01-017). A replica seats the record in the case the
entry's target names and fails an entry naming no case or another one
(CM-11-025, CM-23-044, SYNC-02-008).

Removes the #6613 strict-xfail probes, re-records the demo ledger
recordings, regenerates the occasion fragments, examples, known-gaps page
and UI registry, and updates the docs, notes and spec verification text.

Closes #6295

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…er (SYNC-12-004)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tests

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t (VAM-01-020)

Add(CaseParticipant, target=case) is now the CASE_MANAGER's own seating
entry, so a participant's add-object trigger must not send it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the size:L 1001-2500 diff lines or 4-8 ACs label Nov 20, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sei-ahouseholder

Copy link
Copy Markdown
Contributor Author

Pre-push review (fresh agent, before first push)

6 findings: 0 FAIL, 6 IMPROVE, all fix-now. Every one is fixed on this branch.

  • phase5-sync-02-008-miscited-0 (IMPROVE):
    • Resolution: fixed: participant_record_effect.py docstring and refusal message now cite CM-11-025, CLP-07-007; the test marker drops SYNC-02-008 for CLP-07-007
  • phase6-adr-0124-create-participant-example-0 (IMPROVE):
  • phase10-wire-context-none-branch-untested-0 (IMPROVE):
    • Resolution: fixed: test_object_types.py TestAddParticipantToCaseActivity.test_refuses_an_explicit_none_case covers target=None and context=None reaching _names_its_case
  • phase10-event-case-id-reads-target-untested-0 (IMPROVE):
    • Resolution: fixed: test_event_property_aliases.py adds an AddCaseParticipantToCaseReceivedEvent row with context differing from target, pinning case_id == target_id
  • phase10-refusal-test-asserts-no-cause-0 (IMPROVE):
    • Resolution: fixed: test_add_entry_naming_no_case_or_another_case_seats_nothing asserts the node logs its reason for each case via caplog
  • phase5-vam-06-004-marker-missing-0 (IMPROVE):
    • Resolution: fixed: test_received_create_of_a_case_record_is_refused_case_unchanged now carries VAM-06-004

@sei-ahouseholder sei-ahouseholder left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR triage — #6802 (delta mode; build context reused)

Head: d7357a5c7. Carry-forward: all six pre-push findings are fixed on the head.

ID Severity Outcome Finding
phase6-adr-0124-edit-in-place-0 FAIL fix-now ADR-0124 is accepted-provisional (epoch 2). The maintainer chose to edit in place, so the dated Amendment goes. Rewrite the bullet at line 79 in place, bump revision to 3 and updated, and record the approval in status_override (ADR-0120, as ADR-0199 does).
phase8-cases-comment-unparseable-0 IMPROVE fix-now cases.py:80 — the comment on the CaseParticipant refusal does not parse; name the CASE_MANAGER.
phase11-demo-verdict-changed-0 FAIL fix-now "Demo verdict unchanged" (and so the CI gate) is red. Every ledger differs only by the intended Create → Add(CaseParticipant) change, so the PR needs demo-verdict-change (DEMOCI-11-063).
phase12-merge-conflict-0 FAIL fix-now Conflicts with main in the 12 ui/src/recordings/*/case-actor.jsonl files and the generated add_participant_to_case.json. Take main's and regenerate on the merged tree.

Out of scope:

  • The reported recordings check gap is not a gap. The daily demo-recordings workflow caught it and filed #6755, which closed on 2026-11-21. No issue filed.
  • inReplyTo is left to #6726.

- adr-check — ADR-0124 revision 3 edited in place with the maintainer's
  approval (epoch 2, ADR-0120): the dated Amendment is removed, the Decision
  bullet now names Add(CaseParticipant, target=<case>) for a record that
  joins a case list and Create otherwise; status_override, updated, revision
  and the ADR index record it
- code-review — reword the CaseParticipant refusal comment in the generic
  add-object trigger

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sei-ahouseholder sei-ahouseholder added the demo-verdict-change Deliberate demo verdict change: admits a demo-verdict base-vs-head difference label Nov 30, 2026
ahouseholder and others added 4 commits November 30, 2026 19:30
…-seating-add

# Conflicts:
#	docs/reference/examples/add_participant_to_case.json
#	ui/src/recordings/rccv-extension/case-actor.jsonl
#	ui/src/recordings/rccv-handoff/case-actor.jsonl
#	ui/src/recordings/rcv-embargo/case-actor.jsonl
#	ui/src/recordings/rcv-reject/case-actor.jsonl
#	ui/src/recordings/rcv/case-actor.jsonl
#	ui/src/recordings/rcvcv/case-actor.jsonl
#	ui/src/recordings/rcvv-embargo/case-actor.jsonl
#	ui/src/recordings/rv-csaf/case-actor.jsonl
#	ui/src/recordings/rv/case-actor.jsonl
#	ui/src/recordings/rvcv-extension/case-actor.jsonl
#	ui/src/recordings/rvcv-handoff/case-actor.jsonl
#	ui/src/recordings/rvv/case-actor.jsonl
Takes main's recordings in the merge and regenerates them with
export-demo-recordings (through run-heavy.py), so the participant seating
entries are Add(CaseParticipant, target=case) on top of main's changes. The
scenario tree and the UI replay goldens are unchanged (vitest: 462 passed).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-seating-add

# Conflicts:
#	ui/src/recordings/rccv-handoff/case-actor.jsonl
#	ui/src/recordings/rvcv-handoff/case-actor.jsonl
Takes main's handoff recordings in the merge and regenerates every
scenario with export-demo-recordings (through run-heavy.py) on the merged
tree. Only the two handoff ledgers change; the scenario tree, the UI replay
goldens (vitest -u: 462 passed) and the other generated files are in sync.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sei-ahouseholder
sei-ahouseholder marked this pull request as ready for review November 30, 2026 20:55

@sei-ahouseholder sei-ahouseholder left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Execute: #6802 — feat(cm): the CASE_MANAGER seats a new participant with Add(CaseParticipant, target=case)

Fixes applied: 3 commits (plus 2 base merges)
Excursions filed and fixed: 0
Deferred (you approved): 0
Halted (inversion, awaiting you): 0
Tests run: targeted set, twice (once per merged tree)
CI status: ✅ passing on 44bb74f0e
Base sync: ✅ merged main @ 59b9182d0, then @ f419eb7a9 after #6803 (conflicting) — 13 + 2 conflicts resolved
Docs line: Docs: updated …, docs/adr/0124-case-is-a-projection-of-its-ledger.md (revision 3, edited in place), … — 1 page updated by execute (plus the generated ADR index)

Suite runs: 0 full, 2 targeted


Conflicts Resolved

Path Resolution
ui/src/recordings/*/case-actor.jsonl (12) Took main's and re-recorded every scenario on the merged tree with export-demo-recordings through run-heavy.py (ab208642c)
ui/src/recordings/{rccv,rvcv}-handoff/case-actor.jsonl (after #6803) Took main's and re-recorded every scenario again (44bb74f0e). Only the two handoff ledgers changed. The scenario tree, the replay goldens (vitest -u, 462 passed) and the other generated files are in sync
docs/reference/examples/add_participant_to_case.json Regenerated with the vocab example generator; the regenerated file drops caseEngagement, which #6766 removed

Fixed

Finding Commit Closes
phase6-adr-0124-edit-in-place-0: ADR-0124 revision 3, edited in place with the maintainer's approval. The dated Amendment is removed, the Decision bullet is rewritten, and status_override, updated, revision, More Information and the ADR index are updated 71cb5f1fb —
phase8-cases-comment-unparseable-0: reworded the CaseParticipant refusal comment 71cb5f1fb —
phase11-demo-verdict-changed-0: added the demo-verdict-change label. The only difference is the intended Create → Add(CaseParticipant) seating entry (DEMOCI-11-063) label —
phase12-merge-conflict-0: merged main twice; recordings taken from main and re-recorded f419eb7a9 —

Local gate notes: the first gate had 3 load failures. Two were xdist worker crashes (#6727) and one was a fresh-import timeout while both heavy-check slots were busy. The second gate had one worker crash (#6727) in test/demo/test_report.py. Each of those files passes when run alone (-n 0, through run-heavy.py). The CI mirror passed.


Execute artifact: .claude/pr-6802-execute.json

@sei-ahouseholder sei-ahouseholder left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Verify: #6802 — READY-TO-MERGE

Merge state: MERGEABLE (CLEAN), base main; CI gate SUCCESS, no conflict markers
CI: green on 44bb74f0e (46 checks, integration checks pass)
Docs line: current. The fix commits 71cb5f1fb, ab208642c and 44bb74f0e were checked, and every page the line lists as updated changes in the diff
Spec amended: no statement or priority changes

Finding Severity Verdict Evidence at HEAD
phase6-adr-0124-edit-in-place-0 FAIL CONFIRMED ADR-0124 line 83 is rewritten in place. revision: 3, updated: 2026-11-30, status_override records the approval, there is no dated Amendment, and the index shows revision 3 (71cb5f1fb)
phase8-cases-comment-unparseable-0 IMPROVE CONFIRMED cases.py:80-82 reworded (71cb5f1fb)
phase11-demo-verdict-changed-0 FAIL CONFIRMED demo-verdict-change label is set. "Demo verdict unchanged" and the CI gate pass
phase12-merge-conflict-0 FAIL CONFIRMED Merged main twice (59b9182d0, f419eb7a9) and re-recorded on the merged tree (ab208642c, 44bb74f0e). Mergeable and clean

No deferrals, halts or skips. No issues filed: the reported recordings check gap is covered by the daily demo-recordings workflow (#6755).

@sei-ahouseholder
sei-ahouseholder merged commit 3fe0ae7 into main Nov 30, 2026
48 checks passed
@sei-ahouseholder
sei-ahouseholder deleted the task/6295-participant-seating-add branch November 30, 2026 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

demo-verdict-change Deliberate demo verdict change: admits a demo-verdict base-vs-head difference size:L 1001-2500 diff lines or 4-8 ACs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The CASE_MANAGER seats a new participant with an Add of the record to the case

2 participants