Skip to content

feat: the report receiver turns its CSAF report into the caseInputs of its proposal (#6723) - #6807

Merged
sei-ahouseholder merged 5 commits into
mainfrom
task/6723-csaf-case-inputs-receiver
Nov 30, 2026
Merged

sei-ahouseholder merged 5 commits into
mainfrom
task/6723-csaf-case-inputs-receiver

Conversation

@sei-ahouseholder

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

Copy link
Copy Markdown
Contributor

Summary

The report receiver now builds its CaseProposal in core and fills caseInputs from the first csaf_vulnerability_report document on the report. It can change the proposal before the adapter renders and sends it. The CASE_MANAGER builds the case from those inputs and reads no document. Its own reading of the carried Offer's document stays as the fallback for a proposal with no caseInputs.

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

Changes

  • vultron/core/services/report_case_proposal.py (new): case_proposal_from_report is the one conversion. It takes the report, the CSAF readings, the Offer id, the proposer, the CASE_MANAGER and the act's instant, and returns ConvertedCaseProposal: the core CaseProposal and the reading that filled it. used_claims gives the outcomes of the values it used. caseInputs comes from proposed_case_inputs_from_claims, with the report's own name and summary stated. The conversion reads no clock and judges no date.
  • vultron/core/services/report_case_inputs.py: adds proposed_claim_outcomes, the receiver's outcomes for the date-free half: the earliest disclosure date is APPLIED because it is carried. _undated_outcomes is shared with the CASE_MANAGER's _claim_outcomes. filling_reading moves here from the node module so the conversion can use it. The node module still imports it.
  • vultron/core/behaviors/case/nodes/proposal.py: adds two nodes. Both read report_id from the REPORT_ID act key.
    • ConvertReportToCaseProposalNode builds the proposal and puts it on /case_proposal.
    • MarkProposedClaimsNode marks the receiver's claims record with the outcomes from used_claims (CSAF-04-004), which are the conversion's account of what it used. It runs after the send, so no record is marked for a proposal that was never sent.
    • Both fail as a fault when the URL, the report or the record is missing.
    • ProposeReportCaseToActorNode no longer takes report_id. It sends whatever proposal is on /case_proposal, so a node between convert and send can change it.
  • vultron/core/behaviors/case/receive_report_case_tree.py: the proposal flow is now ensure host, convert, pending link, send, then mark. The conversion writes nothing to the store, so it runs before the pending link: a report it cannot convert leaves no link that the idempotency guard would read as a proposal already sent (CP-04-001). The factory passes request.claims_readings down.
  • vultron/core/behaviors/bridge/bt_bridge.py: the bridge now restores case_proposal, so one report's proposal never outlives its run (BT-17-020).
  • vultron/core/ports/trigger_activity/proposals.py, vultron/adapters/driven/trigger_activity_adapter/proposals.py: create_case_proposal(proposal, to=None, *, at) renders the core proposal instead of building as_CaseProposal from loose arguments. When the store holds the Offer, the adapter puts it inline on a copy (CP-01-008), so the caller's object is not changed.
  • specs/case-proposal.yaml: CP-01-026 verification now names the passing tests. specs/csaf-report-content.yaml: rewrites the CSAF-02-001 note, which said the proposer's record keeps every value display only, and updates the CSAF-02-001 and CSAF-04-004 verification texts. No statement or priority changed.
  • notes/csaf-case-inputs-on-proposal.md, notes/case-proposal.md, notes/configuration.md, notes/role-taxonomy-split.md: these now say the receiver's conversion is built, explain the convert/send split, and use the new node name.
  • docs/topics/behavior_logic/use-cases/propose-case.md, docs/reference/csaf_crosswalk/concept_mapping.md: describe the receiver's conversion and the CASE_MANAGER's fallback (AC-6). docs/reference/messages/case_proposal.md: one sentence on CP-01-026.
  • Tests:
    • test_case_from_csaf_report.py: removes the CP-01-026 strict xfail and adds tests for AC-2, AC-3 and AC-5. Tests that check the CASE_MANAGER's own record now go through _created_by_fallback, which strips caseInputs and re-signs the body.
    • New test/core/services/test_report_case_proposal.py covers the conversion. New test_convert_report_to_case_proposal.py covers the node's fault paths.
    • test_proposals.py gets render, no-mutation and addressing tests.
    • test/support/report_proposal.py runs the two nodes for the provenance and roles tests.
    • The ProposeReportCaseToActorNode::report_id ratchet entry is gone because that site no longer exists.
    • The act-key vocabulary lists /case_proposal as an intra-tree handoff, and the state-write gate pins MarkProposedClaimsNode as local bookkeeping.

Specs

Spec manifest
Loaded (floor): CP-01-007 CP-01-008 CP-01-013 CP-04 CP-09-012 CSAF-02-001 CSAF-02-003 CSAF-02-005 CSAF-03 CSAF-04-003 CSAF-04-004 CSAF-04-005 ARCH-01-001 ARCH-22-001 CP-01-026
Loaded (cross-cutting): ARCH CS EH HP SL TB
Loaded (selected): CP-01 — the caseInputs vocabulary the receiver now sends; CSAF-02 — the receiver fills inputs only from the first initial csaf_vulnerability_report document; BTND-01 — report_id is read from the REPORT_ID act key, not a constructor parameter; BTND-03 — case_proposal is named as an intra-tree handoff; BT-17 — the bridge restores case_proposal after each run; CP-06 — the pending link is still written before the send; CP-09 — the receive-report tree still stores, links, then proposes; DL-06 — the held Offer is still read as received and carried inline; AKM-03 — the report is still carried inline on the proposal
Considered, skipped: EP-04 — the passed-end embargo is #6725, not this change; AKM-02 BT-10 BT-11 BT-13 BT-14 BT-15 BT-25 BTND-05 CBT-03 CLP-05 CLP-07 CLP-09 CLP-10 CM-02 CM-05 CM-06 CM-10 CM-11 CM-12 CM-13 CM-14 CM-15 CM-16 CM-17 CM-19 CM-21 CM-23 CM-24 CM-25 CM-30 CM-31 CM-33 CP-05 CSB-15 EDF-03 EMB-18 EP-08 EP-09 ID-04 MSM-07 OID-01 OX-06 OX-08 PCR-03 PCR-08 RSH-08 SBT-01 SBT-05 SE-02 SYNC-02 VAM-01 VM-08 VP-07 — reached only through the nodes package import or a mirror test of an unchanged node; this change does not touch it

Docs

Docs: updated docs/topics/behavior_logic/use-cases/propose-case.md, docs/reference/csaf_crosswalk/concept_mapping.md, docs/reference/messages/case_proposal.md

Verification

  • Pre-push review: 5 findings (2 FAIL, 3 IMPROVE), all fixed in the third commit. Resolutions are in the artifact and will be posted on the PR.
  • pr-ship delta review: 7 findings (2 FAIL, 5 IMPROVE), fixed in 3d05a2684: the conversion now runs before the pending link, the marking node's two fault branches are tested, and the dead ConvertedCaseProposal.outcomes is gone.
  • Targeted gate, run on the freshened branch: 19302 passed, exit: 1. The 3 failures were 2 xdist worker crashes and 1 pytest-timeout trip, all in demo files (test_manage_embargo_demo.py, test_rv_demo.py, test_report_with_embargo_demo.py). Re-run alone, the three files pass, so this was memory and slot contention (Local full test runs hang forever after a pytest-xdist worker dies #4809). The first run also caught 5 architecture registry checks for the new case_proposal key and nodes, fixed in the second commit. prepush-ci-mirror exit: 0.
  • ruff and mypy clean (the type-check second pass is CI's, PAD-18-027)
  • Decision: the receiver's record marks the disclosure date APPLIED because the proposal carries it. Whether the date is taken as P, taken as the embargo end, or set aside is decided by the CASE_MANAGER at case creation (CP-01-023). The rule is documented in the CSAF-02-001 note and pinned by test_the_receiver_marks_the_date_its_proposal_carries.
  • Self-check:
    1. Affected-text sweep: I searched for display only, ProposeReportCaseToActorNode, create_case_proposal(, test_only_the_creating_side, filling_reading and #6723 across vultron/, test/, specs/, notes/, docs/ and the AGENTS.md files. I updated the CSAF-02-001 note and verification, CP-01-026 and CSAF-04-004 verification, the proposal_case_inputs.py module docstring, the port docstring, four notes and two docs pages. The ADR-0184 mention of The report receiver turns its CSAF report into the case inputs of its case proposal #6723 is a historical record, so I left it (ADR-0127). No hook or workflow trigger list changed.
    2. Failure-path pass:
      • This no-case tree runs in no act transaction, so the order of steps is the safeguard.
      • If the conversion fails, nothing is written or sent: it runs before the pending link (test_a_report_it_cannot_convert_leaves_no_pending_link).
      • If the send fails, the claims record is never marked. The pending link is left, as before this change.
      • If the marking fails after the send, the proposal is still queued and the record stays display only. The failure is logged as a fault (test_a_claims_record_not_held_is_a_fault).
      • A redelivered Offer stops at the seen-before door. CheckProposalAlreadySentForReport sends at most one proposal per report.
      • Proposal persist and seal: unchanged.
    3. Branch coverage: every new branch is tested.
      • Readings: none, another category, the filling one, and no filling reading at the mark node.
      • Conversion: a stated name, and a missing URL or report.
      • Marking: a missing report, a missing record, a record that cannot take the outcomes, and the receiver-path date with an Offer embargo and X set.
      • Adapter: the held and unheld Offer, and the to override through the sealed-body audit.
    4. Reuse check: the conversion reuses proposed_case_inputs_from_claims, filling_reading (moved, not copied) and the shared _undated_outcomes. The outbound activity is still built by create_case_proposal_activity. No duplication found.

Acceptance criteria

  • AC-1: case_proposal_from_report returns the core CaseProposal, with caseInputs from the first csaf_vulnerability_report reading. It holds the earliest disclosure date as stated and no P, and reads no clock (test_report_case_proposal.py, including no_clock).
  • AC-2: test_the_receiver_states_the_case_inputs_of_a_csaf_report, test_a_report_with_no_csaf_report_document_sends_no_case_inputs and test_a_document_of_another_category_sends_no_case_inputs.
  • AC-3: test_the_receiver_may_change_its_proposal_before_it_is_sent renames the case and drops an item between the nodes. Both changes are on the sent proposal and in the case.
  • AC-4: the receiver's record marks the used values APPLIED or OVERRIDDEN (test_the_side_that_converts_the_document_marks_what_it_used, test_the_date_free_half_marks_what_it_used). It is never sent (test_the_claims_record_is_never_sent, plus a check in the AC-5 test).
  • AC-5: test_a_csaf_report_reaches_a_separate_case_manager_as_case_inputs: a separate CASE_MANAGER takes the name, summary, items, references and embargo end from caseInputs, and holds no claims record.
  • AC-6: both docs pages are updated.

🤖 Generated with Claude Code

ahouseholder and others added 3 commits November 20, 2026 22:50
…6723)

The receiver's tree now builds the core CaseProposal through one core
conversion, case_proposal_from_report, which fills caseInputs from the first
csaf_vulnerability_report reading by proposed_case_inputs_from_claims and
reads no clock. ConvertReportToCaseProposalNode puts the proposal on the
blackboard and marks on the receiver's own claims record each value the
conversion used; ProposeReportCaseToActorNode sends it, so the receiver may
change the proposal in between. The adapter's create_case_proposal now
renders the core proposal it is given and inlines the held Offer.

CP-01-026's strict xfail passes and is removed. CSAF-02-001's note, the
verification texts, the plan note and the propose-case and CSAF concept
mapping docs describe the receiver's conversion and the CASE_MANAGER's
fallback.

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

The bridge restores case_proposal after each run, the act-key vocabulary
lists it as an intra-tree handoff, and the state-write gate pins
ConvertReportToCaseProposalNode's claims-record write as local bookkeeping.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MarkProposedClaimsNode takes the marking out of the conversion node and runs
after ProposeReportCaseToActorNode, so no record says a value was used by a
proposal that was never sent; the outcomes come from the pure used_claims.
Both receiver nodes catch their errors and fail as faults with context. The
receiver's date outcome is documented as what its proposal carried, and a
receiver-path test pins it. Adds the CP-01-026 sentence to the CaseProposal
message reference.

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
@sei-ahouseholder

Copy link
Copy Markdown
Contributor Author

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

5 findings. Each one has been resolved:

  • FAIL phase8-receiver-record-misses-override-0: proposed_claim_outcomes (vultron/core/services/report_case_inputs.py ~570-598), called from report_case_proposal.py with only the report name/summary stated, marks the earliest vulnerabilities[i].disclosure_date APPLIED even when the held Offer states a proposedEmbargo, which beats the CSAF date (CSAF-02-003) and is what the case takes; the receiver record should say OVERRIDDEN (CSAF-04-004). Same…
    • Resolution: Fixed by decision, documented and tested. The receiver judges no date (CP-01-023), and the Offer's proposedEmbargo may itself have run out by case creation, so the receiver cannot know whether the date sets P, proposes the end or is set aside. Its record states what its proposal carried. That rule is now in the proposed_claim_outcomes docstring and the CSAF-02-001 note. New receiver-path test test_the_receiver_marks_the_date_its_proposal_carries, with an Offer embargo and X set, pins it. The CASE_MANAGER fallback tests keep the time-judged OVERRIDDEN and display-only outcomes.
  • FAIL phase8-record-written-before-send-0: ConvertReportToCaseProposalNode._mark_used_claims (vultron/core/behaviors/case/nodes/proposal.py ~358-392) saves the claims-record outcomes before ProposeReportCaseToActorNode sends. The receive-report tree shows no ActTransaction around the two, so a failed send leaves a record marking values APPLIED for a proposal never sent; and a node between convert and send (the CP-01-026 edit seam the PR ex…
    • Resolution: Fixed. The marking moved into a new MarkProposedClaimsNode that runs after ProposeReportCaseToActorNode, so no record is marked for a proposal that was never sent. The outcomes come from the pure used_claims(report, readings). The edit test now checks the record after the send. The record is the conversion's account, per AC-4 (CSAF-04-004).
  • IMPROVE phase7-convert-update-shape-0: ConvertReportToCaseProposalNode.update() is ~50 lines (guideline ~20-30) and has no try/except: case_proposal_from_report (model validation), record.with_outcomes (KeyError on an unknown path) and datalayer.save can raise out of update() with no feedback_message; _mark_used_claims returns Status|None instead of raising (BT-HELPER-01: helpers raise, update() is the sole try/except). Fix: helpers ra…
    • Resolution: Fixed. The report read moved into _ReceivedReportNode._held_report and the marking into MarkProposedClaimsNode. Both update() bodies now catch VultronError, ValueError and KeyError and fail through fail_with_fault with context.
  • IMPROVE phase8-redundant-assert-0: test/core/behaviors/case/test_receive_report_case_tree.py:280 assert convert is not None is vacuous: the preceding [convert] = [...] unpacking already requires exactly one match. Remove it.
    • Resolution: Fixed. The tree-structure test now checks each leaf's type in place (test_flow_converts_sends_then_marks).
  • IMPROVE phase8-self-check-inaccurate-0: Draft body Self-check item 2 (failure-path pass) covers only the missing-record fault; it misses the record left after a failed send and the stale record after an edit, and its claim that a redelivery after a failed send is answered by the seen-before door is untested. Item 3 (every new branch tested) misses the receiver path with an Offer embargo or SSVC A/X. Update both items after fixing the tw…
    • Resolution: Fixed. The PR body's failure-path and branch-coverage items are rewritten for the send-then-mark order, the no-transaction case and the receiver-path date test. docs/reference/messages/case_proposal.md also gets the CP-01-026 sentence.

@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: #6807 — feat: the report receiver turns its CSAF report into the caseInputs of its proposal (#6723)

Linked issues: #6723
Changed files: 33 files — core/behaviors/case, core/services, adapters/driven/trigger_activity_adapter, specs, docs
CI status: ✅ passing (head f49dbba)
Merge state: 📝 DRAFT (MERGEABLE, CLEAN)
Base branch: main
Needs integration tests: yes
Context: reused build context — build context matches this branch
Mode: delta (12 delta files); all 5 pre-push findings carried forward as fixed on the head.


Findings

# Phase Severity Description Outcome
phase8-convert-after-pending-link-0 code-review ❌ FAIL Pending report-case link is written before the conversion; a failed conversion leaves a link the idempotency guard reads as "already sent", so the report is never proposed fix-now
phase10-mark-node-fault-branches-0 test-coverage ❌ FAIL MarkProposedClaimsNode report-not-held and KeyError branches untested fix-now
phase8-mark-wording-overstates-0 code-review ⚠️ IMPROVE Docstring/spec note say the record marks what the sent proposal took; it marks what the conversion used fix-now
phase8-dead-outcomes-field-0 code-review ⚠️ IMPROVE ConvertedCaseProposal.outcomes no longer read by production code fix-now
phase8-stale-test-docstring-0 code-review ⚠️ IMPROVE Stale docstring in test_convert_report_to_case_proposal.py:103 fix-now
phase3-self-check-misses-0 pr-body ⚠️ IMPROVE Self-check items 2 and 3 overclaim fix-now
phase12-draft-ci-green-0 merge-state ⚠️ IMPROVE Draft with green CI; mark ready after the fix push passes fix-now

Total: 2 FAIL · 5 IMPROVE · 0 NEW-ISSUE


Triage artifact: .claude/pr-6807-triage.json
Next step: run /pr-execute or /pr-ship to apply fixes.

- code-review — convert the report before writing the pending link, so a
  failed conversion leaves no link the idempotency guard reads as a
  proposal already sent (CP-04-001); test it
- test-coverage — test MarkProposedClaimsNode's report-not-held and
  unknown-path branches
- code-review — the claims record marks what the conversion used, not what
  the sent proposal took: reword the node docstring and CSAF-02-001 note
- code-review — drop ConvertedCaseProposal.outcomes, no longer read; tests
  use used_claims
- code-review — fix a stale test docstring

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

@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: #6807 — feat: the report receiver turns its CSAF report into the caseInputs of its proposal (#6723)

Fixes applied: 1 commits
Excursions filed and fixed: 0 (PR closes them)
Deferred (you approved): 0
Halted (inversion, awaiting you): 0
Tests run: targeted set (branch diff vs origin/main); 18935 passed, 3 xdist worker crashes in demo files with no assertion (memory contention, #4809), both files pass alone (13 passed)
CI status: ✅ passing
Base sync: ✅ deferred — overlaps main on docs/reference/csaf_crosswalk/concept_mapping.md, specs/csaf-report-content.yaml, merger updates before merge
Docs line: Docs: updated docs/topics/behavior_logic/use-cases/propose-case.md, docs/reference/csaf_crosswalk/concept_mapping.md, docs/reference/messages/case_proposal.md — 0 pages updated by execute

Suite runs: 0 full, 1 targeted


Fixed

Finding Commit Closes
phase8-convert-after-pending-link-0: conversion now runs before the pending link; new test test_a_report_it_cannot_convert_leaves_no_pending_link (fails on the old order) 3d05a2684 —
phase10-mark-node-fault-branches-0: tests for report-not-held and unknown-path at marking 3d05a2684 —
phase8-mark-wording-overstates-0: node docstring and CSAF-02-001 note say "what its conversion used" 3d05a2684 —
phase8-dead-outcomes-field-0: dropped ConvertedCaseProposal.outcomes; tests use used_claims 3d05a2684 —
phase8-stale-test-docstring-0: reworded 3d05a2684 —
phase3-self-check-misses-0: PR body Changes and Self-check updated PR body —
phase12-draft-ci-green-0: marked ready after CI passed on 3d05a2684 — —

Execute artifact: .claude/pr-6807-execute.json
Next step: run /pr-verify, or /pr-ship will continue automatically.

@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: #6807 — feat: the report receiver turns its CSAF report into the caseInputs of its proposal (#6723)

Overall verdict: ✅ READY-TO-MERGE
CI status: ✅ passing (head 3d05a2684, integration checks green, CI gate green)
Merge state: ✅ MERGEABLE (CLEAN) — base main
Base sync in execute: ✅ deferred — overlap left to the merger's update-branch (docs/reference/csaf_crosswalk/concept_mapping.md, specs/csaf-report-content.yaml)
Integrity check: ✅ all 7 findings accounted for
Docs line: ✅ current — Docs: updated docs/topics/behavior_logic/use-cases/propose-case.md, docs/reference/csaf_crosswalk/concept_mapping.md, docs/reference/messages/case_proposal.md


Finding Verdicts

Finding Severity Verdict Evidence at HEAD
phase8-convert-after-pending-link-0 FAIL CONFIRMED receive_report_case_tree.py: convert precedes WritePendingReportCaseLinkNode; test test_a_report_it_cannot_convert_leaves_no_pending_link
phase10-mark-node-fault-branches-0 FAIL CONFIRMED two new tests in test_convert_report_to_case_proposal.py
phase8-mark-wording-overstates-0 IMPROVE CONFIRMED "conversion used" in node docstring and CSAF-02-001 note
phase8-dead-outcomes-field-0 IMPROVE CONFIRMED field gone from ConvertedCaseProposal
phase8-stale-test-docstring-0 IMPROVE CONFIRMED docstring reworded
phase3-self-check-misses-0 IMPROVE CONFIRMED live PR body Self-check updated; pr-body-lint 0 findings
phase12-draft-ci-green-0 IMPROVE CONFIRMED PR is ready for review

No spec statement or priority changed (spec-amendments.sh exit 0).

@sei-ahouseholder
sei-ahouseholder merged commit 46e2556 into main Nov 30, 2026
43 checks passed
@sei-ahouseholder
sei-ahouseholder deleted the task/6723-csaf-case-inputs-receiver branch November 30, 2026 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 1001-2500 diff lines or 4-8 ACs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The report receiver turns its CSAF report into the case inputs of its case proposal

2 participants