Some checks are pending
Bidi Control Character Guard / bidi-control-guard (push) Waiting to run
Circular Dependency Check / Check for new circular dependencies (push) Waiting to run
Citus Migration Smoke / Combined migrations on single-node Citus (push) Waiting to run
E2E Fresh Install Tests / fresh-install-e2e (push) Waiting to run
ext-v2 guardrails / Run ext-v2 guard and ESLint (push) Waiting to run
Integration Tests / Check for relevant changes (push) Waiting to run
Integration Tests / ${{ (github.event_name == 'schedule' || github.event.inputs.suite == 'full') && 'Full integration suite' || 'Tier-1 integration subset' }} (push) Blocked by required conditions
Mobile checks / Mobile lint + typecheck (push) Waiting to run
Mobile checks / Mobile unit tests (push) Waiting to run
Mobile checks / Mobile dependency audit (report) (push) Waiting to run
Mobile checks / Mobile reproducibility checks (push) Waiting to run
Secrets guard (env backups) / Ensure no tracked env backup files (push) Waiting to run
Temporal Readiness / fast-readiness (push) Waiting to run
Temporal Readiness / docker-parity (push) Waiting to run
TypeScript Type Check / Nx affected typecheck (push) Waiting to run
Unit Tests / Skipped-test budget (push) Waiting to run
Unit Tests / Nx affected unit tests (push) Waiting to run
Unit Tests / Server unit coverage (informational) (push) Waiting to run
Validate Tenant Management Schema / Check for relevant changes (push) Waiting to run
Validate Tenant Management Schema / Validate Tenant Management Schema (push) Blocked by required conditions
EE Workflows Build Guard / ee-workflows-build-guard (push) Waiting to run
Excluded: .git, node_modules, secrets/, compose.env, assemblyscript tgz Source: /opt/alga-psa on psa.joliet.tech
3.1 KiB
3.1 KiB
Recurring Service-Period Troubleshooting Runbook
Purpose
This runbook covers the staged-rollout period where future recurring work is materialized in recurring_service_periods, but not every downstream workflow has been fully rewritten around that ledger yet.
Use it to diagnose:
- missing future materialized rows
- preserved user edits that now conflict with regenerated candidates
- unexpected gaps or overlaps after regeneration
- billed rows whose invoice linkage looks wrong
Generation Failure Triage
- Query
recurring_service_periodsbytenant,obligation_id,obligation_type, andschedule_key. - Confirm whether future active rows exist at all.
- Compare
source_rule_versionandsource_run_keyacross the active future set. - Distinguish ordinary missing future rows from continuity problems that need repair.
Suggested query:
select
record_id,
lifecycle_state,
service_period_start,
service_period_end,
invoice_window_start,
invoice_window_end,
provenance_kind,
reason_code,
source_rule_version,
source_run_key,
supersedes_record_id
from recurring_service_periods
where tenant = :tenant
and obligation_id = :obligation_id
order by service_period_start, revision;
Override Conflict Investigation
When regeneration preserved an edited row, inspect the conflict kind before attempting repair.
The v1 conflict kinds are:
missing_candidateservice_period_mismatchinvoice_window_mismatchactivity_window_mismatch
Treat the preserved edited row as the active future truth until a deliberate repair step supersedes it.
Regeneration Troubleshooting
When source rules changed and the future schedule looks wrong:
- Check whether the row was eligible for ordinary regeneration.
- Use
supersedes_record_idto follow revision lineage. - Separate continuity repair from ordinary regeneration.
Ordinary regeneration may replace generated future rows, but it must not silently repair continuity drift or overwrite preserved edits.
Invoice Linkage Repair Triage
If billed history looks inconsistent:
- Load the billed row from
recurring_service_periods. - Confirm
invoice_id,invoice_charge_id, andinvoice_charge_detail_idare either all present or all null. - Join the row to
invoice_charge_details. - If the linkage is wrong, use
invoice_linkage_repair; do not mutate the billed row through ordinary edit or regeneration flows.
Suggested query:
select
rsp.record_id,
rsp.lifecycle_state,
rsp.invoice_id,
rsp.invoice_charge_id,
rsp.invoice_charge_detail_id,
icd.item_detail_id,
icd.service_period_start,
icd.service_period_end
from recurring_service_periods rsp
left join invoice_charge_details icd
on icd.tenant = rsp.tenant
and icd.item_detail_id = rsp.invoice_charge_detail_id
where rsp.tenant = :tenant
and rsp.record_id = :record_id;
Guardrails
- Do not delete canonical
invoice_charge_detailsrows to make persisted linkage look cleaner. - Do not rewrite billed historical coverage through ordinary regeneration.
- Do not treat edited future rows as disposable staging data.