Skip to content

Move projection logic off wire classes into adapter-side translator modules #2939

Description

@sei-ahouseholder

Summary

Move projection logic off the wire vocabulary classes into translator modules on
the adapter side. This is the change that makes ARCH-22 achievable rather than
merely redefined — wire classes end up as pure AS2 shape with no domain knowledge.

354 lines of to_core/from_core/_to_core_data are spread across 13 wire files.
After the generic-translator task most of it is already gone; this task relocates
what remains, including the three structural projections
(as_VulnerabilityCase, as_CaseStatus, as_CaseParticipant).

Acceptance Criteria

  • AC-1: No from_core() or to_core() method remains on any wire vocabulary
    class; translation lives in adapter-side translator modules (ARCH-12-005 as
    amended by ADR-0081).
  • AC-2: These 11 files no longer import vultron.core.models: case_actor,
    case_ledger_entry, case_participant, case_reference, case_status,
    embargo_event, embargo_policy, vulnerability_case,
    vulnerability_record, vulnerability_report, vultron_actor
    (all under vultron/wire/as2/vocab/objects/).
  • AC-3: vultron/wire/as2/vocab/activities/base.py, activities/actor.py,
    activities/case.py, factories/actor.py and factories/case.py are
    triaged: each either clears its import or is added to the declared exemption
    set with the requirement that mandates it.
  • AC-4: Nested-child projection still recurses correctly. as_VulnerabilityCase
    projects case_participants, case_statuses and active_embargo;
    as_CaseParticipant projects participant_statuses. Round-trip tests cover
    each nesting level.
  • AC-5: Serialized AS2 output is byte-identical to pre-change output
    (ARCH-23-003).
  • AC-6: KNOWN_VIOLATIONS shrinks by the entries cleared.
  • AC-7: Full unit suite and integration suite both pass.

Prior Art

  • vultron/adapters/driven/wire_render/as2.py — the existing adapter-side
    translation entry point; extend rather than duplicate.
  • vultron/adapters/driven/trigger_activity_adapter/_base.py:61-76 — already calls
    wire_cls.from_core(core_obj) from the adapter side; a natural consumer.

Reference

Source: #2830 (G02). ADR: docs/adr/0081-wire-core-boundary-pairing-registry.md.
Docs PR: #2931
Notes: notes/wire-core-boundary.md.
Specs: ARCH-12-005, ARCH-22-001, ARCH-23-001, ARCH-23-003.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    size:L301+ diff lines or 7+ ACs

    Type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions