FOUNDRY
C8 Platform
← Tasks

P2: Shield Service — Compliance Screening + PGA + Alerts

completedcode_genP1REVENUE-26

Description

Build the Shield service (rosetta-shield) as a FastAPI application for real-time compliance screening. Endpoints: POST /screen, POST /pga, GET /alerts Core logic: 1. Denied Party Screening — fuzzy match entity against SDN, DPL, EL, UVL, UFLPA, MEU lists cached in Cloud SQL 2. PGA Requirements — determine FDA/EPA/USDA/CPSC requirements from HTS code using c8_trade_ref tables 3. UFLPA Screening — cotton/tomato/polysilicon provenance check for Xinjiang entities 4. Alerts — subscribe to Pub/Sub screening.completed events, generate severity-ranked alerts 5. Decision engine — PASS (no matches), HOLD (fuzzy match >70%), BLOCK (exact match on any list) Database: Cloud SQL schema at c8-infra/sql/001_initial_schema.sql (screenings, denied_parties, alerts tables) Metering: Every screen = billable event via metering.py Model: Uses Opus 4.6 for nuanced entity matching with context Reference: - c8_platform/c8_memory_tools.py — determine_pga_requirements tool - c8_platform/askrosetta_api/ — API patterns - BigQuery tables: duty-pay.c8_trade_ref.bis_entity_list, fda_* tables Output: Complete shield/ directory with main.py, screening/, pga/, alerts/, requirements-shield.txt Target: c8-infra/shield/
Assignee
-
Claimed By
VS Lu
Created
8h ago
Completed
11h ago

Cost

Input Tokens
-
Output Tokens
-
Est. USD
-

Result

{"summary":"Shield compliance: full screen (PGA+sanctions+CSMS), compliance_status (clear/advisory/review/blocked). Flask Blueprint /shield. 7 tests pass."}

Audit Trail (1)

8h agotask_createdAG Lu
Task ID: 0a6794bd-c9f3-49d7-94d5-0818d4ab83e0