Add terminate-only STIR/SHAKEN option across RMD pipeline

STIRShakenStep intake:
- New "Terminate only" option for carriers that only receive pre-signed
  calls and don't originate
- Contextual hints for each option explaining requirements
- Show/hide vendor and upstream fields based on selection

RMD letter generator:
- New terminate_only section explaining verification-only posture,
  citing 47 CFR § 64.6301 (signing obligation on originating provider)
- Added to needs_exhibit_a list

RMD Exhibit A generator:
- New terminate_only STIR/SHAKEN paragraph with SBC verification language
- Fixed scope paragraph: wholesale/facilities carriers no longer get
  "small provider without Class 4 switch" boilerplate
- Fixed OCN paragraph: wholesale carriers get neutral wording instead
  of "no OCN required for small retail provider"

RMD filing handler:
- Maps stir_shaken_status to rmd_option for Exhibit A generation
- Passes entity metadata (ocn, wholesale, gateway, contact) to generator
- Maps terminate_only → partial_implementation for FCC RMD form radio

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
justin 2026-04-29 10:59:28 -05:00
parent 050b19a43a
commit fbf3b8a1ea
4 changed files with 123 additions and 17 deletions

View file

@ -299,6 +299,7 @@ class RMDFilingHandler(BaseServiceHandler):
stir_status = entity.get("stir_shaken_status", "complete_implementation")
if stir_status in (
"partial_implementation",
"terminate_only",
"robocall_mitigation_only",
"exempt_small_carrier",
):
@ -317,12 +318,30 @@ class RMDFilingHandler(BaseServiceHandler):
work_dir,
f"robocall_mitigation_program_{order_number}_{date_str}.docx",
)
# Map stir_shaken_status to Exhibit A rmd_option
_STATUS_TO_OPTION = {
"complete_implementation": "option1",
"partial_implementation": "option2",
"terminate_only": "terminate_only",
"robocall_mitigation_only": "option3",
"exempt_small_carrier": "option3",
}
exhibit = generate_exhibit_a(
entity_name=entity.get("legal_name", ""),
frn=entity.get("frn", ""),
ocn=entity.get("ocn", ""),
carrier_role=role,
carrier_metadata=entity.get("carrier_metadata", {}),
upstream_provider_name=entity.get("upstream_provider_name", ""),
is_wholesale=entity.get("is_wholesale", False),
is_gateway=entity.get("is_gateway_provider", False),
foreign_traffic=entity.get("is_international_only", False),
rmd_option=_STATUS_TO_OPTION.get(stir_status, "option2"),
contact_name=entity.get("contact_name", ""),
contact_title=entity.get("contact_title", ""),
contact_email=entity.get("contact_email", ""),
contact_phone=entity.get("contact_phone", ""),
address=entity.get("address", ""),
llm_generate=self._call_llm,
output_path=exhibit_docx,
)
@ -422,8 +441,11 @@ class RMDFilingHandler(BaseServiceHandler):
)
# STIR/SHAKEN implementation status — value must match the
# RMD form radio options.
# RMD form radio options. terminate_only maps to
# partial_implementation on the FCC form (verification-only).
stir_status = entity.get("stir_shaken_status", "complete_implementation")
if stir_status == "terminate_only":
stir_status = "partial_implementation"
await page.click(f'input[name="stir_shaken_status"][value="{stir_status}"]')
await human_delay()