feat(intrastate): automate state PUC/PSC authority filing (email + invoice + auto-bill)

Intrastate operating authority is state-specific + application-based like IRP, so
it reuses the same email/POA + invoice-reconciliation flow:
  - intrastate_filing.send_intrastate_submission: emails the state PSC/PUC the
    authority application with the signed POA attached (subject tag [PW-ISA CO-..]),
    reusing irp_filing's MinIO download + census enrich helpers.
  - The shared poller (irp_invoice_poller) now matches BOTH [PW-IRP] and [PW-ISA]
    tags, parses the fee, Telegram-alerts, and bills the customer the exact amount
    with the correct service slug.
  - state_trucking gov-fee gate routes intrastate-authority to the PSC/PUC email
    path; if no submission email is configured for the base state it falls back
    to a manual todo (safe default — no emailing guessed agency addresses).

Per-state ISA_<ST>_EMAIL env (blank until the exact agency address is verified).
SC/GA/TX scaffolded. Customer still only sees an exact-fee payment link; you only
approve the final filing.
This commit is contained in:
justin 2026-06-16 07:57:57 -05:00
parent 42b433db5a
commit b125d46663
4 changed files with 226 additions and 18 deletions

View file

@ -118,6 +118,12 @@ IRP_FILINGS_IMAP_PASS={{ vault_irp_filings_imap_pass | default('') }}
IRP_FILINGS_IMAP_FOLDER={{ vault_irp_filings_imap_folder | default('INBOX') }}
IRP_FILINGS_FROM={{ vault_irp_filings_from | default('filings@performancewest.net') }}
IRP_SC_EMAIL={{ vault_irp_sc_email | default('MCS@scdmv.net') }}
# Intrastate operating-authority (PSC/PUC) submission emails per base state.
# Leave blank until the exact agency submission address is confirmed — the
# worker then creates a manual todo instead of emailing a guessed address.
ISA_SC_EMAIL={{ vault_isa_sc_email | default('') }}
ISA_GA_EMAIL={{ vault_isa_ga_email | default('') }}
ISA_TX_EMAIL={{ vault_isa_tx_email | default('') }}
# ── Porkbun (.ca domain registration) ────────────────────────────────────────
PORKBUN_API_KEY={{ vault_porkbun_api_key | default('') }}