Skip to content

Tier 17.5: F3.2 sub-tier 5 — fact_multileg_option_events (51 cols, FINAL — audit fully closed) - #23

Merged
jamezycesar-collab merged 1 commit into
mainfrom
tier17-5-f32-fact-multileg-option-events
Jun 18, 2026
Merged

Tier 17.5: F3.2 sub-tier 5 — fact_multileg_option_events (51 cols, FINAL — audit fully closed)#23
jamezycesar-collab merged 1 commit into
mainfrom
tier17-5-f32-fact-multileg-option-events

Conversation

@jamezycesar-collab

Copy link
Copy Markdown
Owner

Milestone

This PR closes the entire F3.2 audit backlog. After merge, guardrails/known_field_mapping_gaps.csv drops to 0 rows. The audit remediation arc that began with AUDIT_2026_05_04.md is complete.

Summary

Final sub-tier of WS2 F3.2 follow-on. Adds 51 spec-mapping columns to fact_multileg_option_events across all three multileg-Gold dialects (no Fabric Lakehouse variant for multileg).

Files changed

  • ddl/multileg/02_multileg_gold_delta.sql - 51 columns added
  • ddl/multileg/04_multileg_fabric_warehouse.sql - 51 columns added
  • ddl/multileg/06_multileg_gold_hive.sql - 51 columns added
  • guardrails/known_field_mapping_gaps.csv - 51 → 0 rows (header-only stub)
  • CHANGELOG.md - Tier 17.5 + full audit closure entry

51 columns added — CAT IM v4.1.0r15 §5.2

Group Count Section Examples
Order header 22 §5.2.1 underlying, order_key_date, cat_order_id, event_timestamp, manual_flag, dept_type, quantity, solicitation_flag, number_of_legs
Routing 11 §5.2.2, §5.2.3 sender_imid, destination, destination_type, routed_order_id, route_rejected_flag, originating_imid, paired_order_id
Modify/cancel/parent 8 §5.2.5.1, §5.2.6, §5.2.7 prior_order_key_date, parent_order_key_date, initiator, leaves_qty, cancel_qty, request_timestamp
Quote context 10 §5.2.8.1–§5.2.8.6 quote_key_date, quote_id, bid_price, ask_price, bid_qty, ask_qty, routed_quote_id, prior_quote_id

Mapping CSV ref polish — deferred

The earlier PDF verification flagged 22 rows in this host table with SECTION_MISMATCH or ROW_MISMATCH status. These were NOT corrected in this sub-tier — they represent valid alternative references (multi-leg usage site vs single-leg canonical definition site). Polish can be applied in an optional future tier without affecting DDL correctness or audit closure.

Coverage — AUDIT CLOSED

All 8 guardrails:                  pass (exit 0)
known_field_mapping_gaps.csv:      0 (was 51; -51) — file now header-only stub
  F3.1 phantom-table rows:         0 (cleared in Tier 13-16)
  F3.2 missing-column rows:        0 (cleared in Tier 17.1-17.5)
DDL files in parity scope:        22 (unchanged)
Tables in 2+ dialects:            42 (unchanged - same tables, new columns)
New parity violations:             0
TOTAL AUDIT BACKLOG:               0 (was 212 at start of remediation)

F3.2 burndown — COMPLETE

Sub-tier Host table Cols Allowlist Status
Tier 17.1 fact_option_executions 3 92 → 89
Tier 17.2 fact_option_allocations 3 89 → 86
Tier 17.3 fact_multileg_option_legs 5 86 → 81
Tier 17.4 fact_option_order_events 30 81 → 51
Tier 17.5 (this) fact_multileg_option_events 51 51 → 0
F3.2 total 92 92 → 0 CLOSED

Full audit arc summary

Phase                     Tiers          Cols cleared
WS2 phantom-table (F3.1)  13-16          120 across 4 facts
F3.2 missing-column       17.1-17.5       92 across 5 facts
-------------------------------------------------------
Total audit closure       Tiers 13-17.5  212 (212 -> 0)

Open followups (non-blocking)

  1. Harden validator regex (_CREATE_TABLE_RE) to not treat COMMENT as a body terminator when inside a column declaration.
  2. Decide whether to delete or stub the empty known_field_mapping_gaps.csv.
  3. Add multi-leg Fabric Lakehouse Gold variant (ddl/multileg/05_*).
  4. Apply the 22 mapping CSV section/row polish refinements.

Test plan

  • All 8 guardrails pass with 0 allowlisted rows
  • No new parity violations
  • All 51 fact_multileg_option_events mapping rows now resolve in DDL
  • PDF verification confirms every column exists in CAT IM v4.1.0r15 §5.2
  • Recurrence-safe precheck in push script

FINAL sub-tier of WS2 F3.2 follow-on. Closes the entire audit
backlog: known_field_mapping_gaps.csv drops to 0 rows.

Adds 51 spec-mapping columns to gold.fact_multileg_option_events
across all three multileg-Gold dialects (Delta, Hive, Fabric
Warehouse - multileg has no Fabric Lakehouse variant).

Column groups (CAT IM v4.1.0r15 section 5.2):
  - Order header (22 cols, sec 5.2.1): underlying, order_key_date,
    cat_order_id, event_timestamp, manual_flag, manual_order_key_date,
    manual_order_id, electronic_dup_flag, electronic_timestamp,
    dept_type, price, quantity, min_qty, order_type, trading_session,
    firm_designated_id, account_holder_type, affiliate_flag,
    representative_ind, solicitation_flag, rfq_id, number_of_legs
  - Routing (11 cols, sec 5.2.2-5.2.3): sender_imid, destination,
    destination_type, routed_order_id, session, route_rejected_flag,
    exch_origin_code, paired_order_id, receiver_imid, sender_type,
    originating_imid
  - Modify/cancel/parent linkage (8 cols, sec 5.2.5.1-5.2.7):
    prior_order_key_date, prior_order_id, parent_order_key_date,
    parent_order_id, initiator, leaves_qty, cancel_qty,
    request_timestamp
  - Quote context for RFQ/RFE (10 cols, sec 5.2.8.1-5.2.8.6):
    quote_key_date, quote_id, bid_price, ask_price, bid_qty, ask_qty,
    routed_quote_id, quote_rejected_flag, prior_quote_key_date,
    prior_quote_id

All 51 columns confirmed in CAT IM v4.1.0r15 PDF via verify_cat_im_v3.py.

22 mapping CSV refs (10 SECTION_MISMATCH + 12 ROW_MISMATCH) are
semantically valid as multi-leg usage-site references and were NOT
modified in this sub-tier. Polish can be applied in optional Tier 18.

AUDIT CLOSURE:
  known_field_mapping_gaps.csv: 51 -> 0 rows (-51)
  F3.2 remaining: 0 (was 51) - FULL CLOSURE
  F3.1 phantom-table: 0 (cleared in Tier 13-16)
  Total audit backlog: 0 (was 212 at start of remediation)

All 8 guardrails pass with 0 allowlisted rows.
@jamezycesar-collab
jamezycesar-collab merged commit 16d640e into main Jun 18, 2026
1 check passed
@jamezycesar-collab
jamezycesar-collab deleted the tier17-5-f32-fact-multileg-option-events branch June 18, 2026 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant