Skip to content

sdc-sdapp-w2-provincial-coverage

W2 — Provincial Coverage (all provinces alike except Quebec)

Section titled “W2 — Provincial Coverage (all provinces alike except Quebec)”

Roadmap: apps/sd-app/ROADMAP.md → W2 · ADR: apps/sd-app/docs/adr/0002-provincial-coverage.md Parent planning thread: sdc-sdapp-full-levpro-port · Depends on: sdc-sdapp-w1-setup-taxation

packages/sd-api/profiles.py instantiates exactly two regions — ON and us-federal. A Quebec, BC, or Alberta advisor cannot use the app; there is no province selector and no per-province behaviour.

LevPro modelled this through the fed/prov deductibility flag pairs in modTypes.bas, and Quebec is the case those flags exist for — the VB6 source says so directly at modTypes.bas:325: ' Are capital gains included in taxable investment income? (Quebec: Yes; Federal: Maybe not). Quebec Deductibility Analysis.xls in the archive is the worked case.

  • Decision D2 (Talbot, 2026-08-31): all provinces treated identically except Quebec.
  • A RegionProfile per province/territory sharing ON’s unlimited-deductibility configuration; QC gets the limited-deductibility flag combination.
  • Province selector in the app (default ON). QC selection defaults language to French (FR is already 155/155 complete — routing concern, not translation work).
  • Acceptance gate: a test asserts QC’s flags differ from ON’s and fails if QC is silently treated as an unlimited-deductibility province. Without that test the one province this workstream exists for can regress unnoticed.

Shipping a per-province marginal-tax-rate table. LevPro made the user enter their own rate; publishing current rates for 13 jurisdictions means asserting tax data the repo has no authoritative source for, on numbers that drive a client-facing projection. Structural differences (deductibility) are deterministic and come from the VB6 source; numeric ones stay user-entered until Talbot sources a table and Risks signs off. See ADR-0002.

ADR-0002 reads Talbot’s “all provinces treated same except QC” as deductibility flags differ only for QC; marginal rate stays user-entered. If he meant sd-app should ship a per-province rate table, this task needs re-scoping before it ships.

  • Add per-province RegionProfiles; QC configured per ADR-0002.
  • Province selector wired through sd-api to RegionProfile selection.
  • QC-vs-ON divergence test (the regression guard above).
  • QC defaults to French.
  • Full green bar.

Shipped (monorepo 6dc9549). All 13 provinces/territories; non-QC share ON’s unlimited-deductibility flags, QC gets prov_deductibility_limited / prov_cap_gains_are_income / prov_defer_unused_deductions = true with federal flags unchanged.

Acceptance gate met — a test asserts QC’s flags differ from ON’s and fails if QC is silently treated as unlimited-deductibility. A second test asserts no rate field ever appears in the regions payload, turning ADR-0002’s hard constraint into a regression guard rather than a promise in a document.

Honest note from the run, worth keeping: the VB6 has no compiled QC constant to copy (LevPro made these Setup-dialog inputs), so the flag combination is derived from the modTypes.bas:325 comment semantics plus the archive’s Quebec Deductibility Analysis.xls, which names this exact scenario “Provincial Deductibility Limited”. Derivation, not a copied value — labelled as such.