"""Pure constants for close signals — no app imports, so the seed migration can import the default task→signal bindings safely. See :mod:`app.domains.finance.close_signals` for the evaluators. """ from __future__ import annotations SIG_DATA_COMPLETE = "data_complete" SIG_GL_SYNCED = "gl_synced" SIG_NS_PERIOD_CLOSED = "ns_period_closed" SIG_RECON_CLEAN = "recon_clean" SIG_NO_OPEN_RESTATEMENTS = "no_open_restatements" SIG_FX_FROZEN = "fx_frozen" SIG_CLOUD_COST = "cloud_cost_materialized" SIG_HUILIANYI = "huilianyi_synced" ALL_SIGNAL_KEYS = ( SIG_DATA_COMPLETE, SIG_GL_SYNCED, SIG_NS_PERIOD_CLOSED, SIG_RECON_CLEAN, SIG_NO_OPEN_RESTATEMENTS, SIG_FX_FROZEN, SIG_CLOUD_COST, SIG_HUILIANYI, ) # Default task → signal bindings, keyed by template ``source_key``. Curated # from the checklist: tasks whose completion is gated by a Helix data check. # Seeded by migration 357 + ensure_seeded; admin-editable afterwards. DEFAULT_SIGNAL_BINDINGS: dict[str, str] = { "ap-16": SIG_RECON_CLEAN, # Reconciliation of AP / expense / accrual "ap-03": SIG_HUILIANYI, # Navan & offline employee reimbursement entry "cogs-03": SIG_GL_SYNCED, # Post journal entries in Netsuite + reconcile "cogs-08": SIG_CLOUD_COST, # Monthly cloud bill accrual + allocation "cogs-09": SIG_CLOUD_COST, # Prepare/post cloud cost journal entries "cogs-10": SIG_RECON_CLEAN, # Netsuite reconciliation: cloud cost ties out "rr-10": SIG_GL_SYNCED, # Sync Middle Platform Rev Rec to Netsuite "rr-11": SIG_RECON_CLEAN, # Revenue Reconciliation "pay-13": SIG_RECON_CLEAN, # Payroll account reconciliations "ic-05": SIG_RECON_CLEAN, # Intercompany reconciliations "tr-06": SIG_RECON_CLEAN, # Review all bank reconciliations "rep-02": SIG_DATA_COMPLETE, # add new accounts in Netsuite "rep-03": SIG_FX_FROZEN, # Foreign currency revaluation "rep-04": SIG_NO_OPEN_RESTATEMENTS, # Announce soft close "rep-08": SIG_DATA_COMPLETE, # Check key FS report items }