Skip to content

MOD-170 — Regulatory Submissions Portal

Purpose

Cross-return-type landing portal — deadline calendar + per-return drill-down + Finance officer approval workflow. Reads REGULATORY.SUBMISSION_CALENDAR (MOD-036) for due-date proximity, links to REGULATORY.STREAMLIT_RETURN_BUILDER (MOD-036) for the cell-level lineage view of prudential returns, and writes approval rows to REGULATORY.RETURN_APPROVALS — the REP-005 GATE table MOD-036's submission orchestrator checks before any regulator POST.

MOD-170 is the human-facing edge of the SD06 regulatory return pipeline. The four-check gate in MOD-036's orchestrator (src/orchestrator/gate.ts::evaluateGate) is dead-air until MOD-170 provides the second gate (the approval row).

Architecture

Streamlit-in-Snowflake only — no DCM project, no dbt models, no Lambdas. The Streamlit object lives in MOD-036's REGULATORY schema (per DCM v2 single-project ownership: MOD-036 declares the schema, MOD-170's Streamlit + stage co-exist as non-DCM objects). Same pattern MOD-033's stage uses inside MOD-032's RISK_CAPITAL.

Snowflake objects owned by MOD-170

Object Type Schema Notes
MOD_170_STREAMLIT_STAGE STAGE REGULATORY Source stage for streamlit_app.py. Created by legacy infra/snowflake/ path per ADR-054 §"DCM v2 limitations — no Streamlit".
SUBMISSIONS_PORTAL STREAMLIT REGULATORY Cross-return-type landing portal. Reads MOD-036's published surface; writes only to RETURN_APPROVALS.

SSM outputs

Path Value Consumer
/bank/{env}/risk-platform/regulatory-submissions-portal/streamlit-url REGULATORY.SUBMISSIONS_PORTAL MOD-171 / MOD-172 hub dashboards link out to this Streamlit.
/bank/{env}/risk-platform/regulatory-submissions-portal/required-role REGULATORY_SUBMISSIONS_PORTAL_ROLE Documentation surface — the role MOD-102 must provision (outbound issue #37) before the approval form is usable.

Dependencies

Module Surface Why hard?
MOD-036 REGULATORY schema + RETURN_APPROVALS + SUBMISSION_CALENDAR + V_RETURN_PREVIEW + V_RETURN_VALIDATION + RETURN_RUNS + RETURN_SUBMISSIONS Hard — without MOD-036 the schema doesn't exist and there's nothing to read.
MOD-102 REGULATORY_SUBMISSIONS_PORTAL_ROLE Hard for the approval form path; soft for read-only render. Outbound handoff issue #37 tracks provisioning.
MOD-104 (none direct — just CI infra) n/a

Optional consumer modules (their drill-downs light up when those modules ship): MOD-037 (AML), MOD-057 (statistical), MOD-060 (FATCA/CRS).

Policies satisfied

Policy Mode How
REP-005 (cooperating module) WRITE MOD-170 is the human half of REP-005's "validation + approval" two-gate check. MOD-036 owns the GATE logic; MOD-170 owns the write surface. tests/policy/streamlit-writes-only-approvals.test.ts asserts the Streamlit's only write path is INSERT INTO REGULATORY.RETURN_APPROVALS (no writes to RETURN_RUNS / RETURN_SUBMISSIONS — SoD vs the orchestrator).
NFR-024 (cooperating module) LOG The portal performs no UPDATE / DELETE / TRUNCATE on any REGULATORY object — the only mutation is the append-only INSERT into RETURN_APPROVALS. Verified by tests/policy/streamlit-writes-only-approvals.test.ts.

Build sequence references

  • bank-wiki #35 Action D handoff: docs/handoffs/SD06-streamlit-dashboard-layer.handoff.md lines 168-189.
  • MOD-036 design doc: docs/design/MOD-036.md (the surface MOD-170 consumes).
  • MOD-102 role-provisioning outbound: ../bank-platform/docs/handoffs/MOD-102-sd06-streamlit-roles.handoff.md (bank-wiki issue #37).