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
51 lines
3.4 KiB
Markdown
51 lines
3.4 KiB
Markdown
# Recurrence Storage Matrix
|
|
|
|
This matrix defines the authoritative storage model for recurring authoring defaults during the service-period-first rollout.
|
|
|
|
## Canonical Storage
|
|
|
|
| Field | Live contract lines | Template-authored defaults | Preset-authored defaults | Compatibility notes |
|
|
| --- | --- | --- | --- | --- |
|
|
| `billing_frequency` | `contract_lines.billing_frequency` | `contract_template_lines.billing_frequency` | `contract_line_presets.billing_frequency` | Shared interfaces project the same field directly. |
|
|
| `billing_timing` | `contract_lines.billing_timing` | `contract_template_lines.billing_timing` | `contract_line_presets.billing_timing` | `contract_template_line_terms.billing_timing` is legacy read compatibility only and must not outrank `contract_template_lines.billing_timing`. |
|
|
| `cadence_owner` | `contract_lines.cadence_owner` | `contract_template_lines.cadence_owner` | `contract_line_presets.cadence_owner` | Existing rows backfill to `client` during staged rollout. |
|
|
| `enable_proration` | `contract_lines.enable_proration` | `contract_template_line_fixed_config.enable_proration` | `contract_line_preset_fixed_config.enable_proration` | Fixed-only partial-period compatibility setting. |
|
|
| `billing_cycle_alignment` | `contract_lines.billing_cycle_alignment` | `contract_template_line_fixed_config.billing_cycle_alignment` | `contract_line_preset_fixed_config.billing_cycle_alignment` | Legacy compatibility field; no longer part of live recurring execution. |
|
|
|
|
## Shared Interface Contract
|
|
|
|
- Authoritative write-shape interfaces:
|
|
- `IContractLine`
|
|
- `IContractTemplateLine`
|
|
- `IContractLinePreset`
|
|
- Compatibility projection interfaces:
|
|
- `IClientContractLine`
|
|
- `IContractLineMapping`
|
|
- `IContractLineFixedConfig`
|
|
- `IContractLinePresetFixedConfig`
|
|
|
|
## Repository And Action Seams
|
|
|
|
- Live line reads and writes normalize recurring cadence fields through:
|
|
- `shared/billingClients/recurringAuthoringPolicy.ts`
|
|
- `shared/billingClients/recurrenceStorageModel.ts`
|
|
- `packages/billing/src/repositories/contractLineRepository.ts`
|
|
- `server/src/lib/repositories/contractLineRepository.ts`
|
|
- `packages/billing/src/models/contractLine.ts`
|
|
- Template-line reads and template-to-contract cloning normalize recurring cadence fields through:
|
|
- `packages/billing/src/models/contractTemplate.ts`
|
|
- `packages/billing/src/repositories/contractLineRepository.ts`
|
|
- `server/src/lib/repositories/contractLineRepository.ts`
|
|
- `packages/billing/src/actions/contractWizardActions.ts`
|
|
- Preset reads, writes, and preset-to-contract propagation normalize recurring cadence fields through:
|
|
- `packages/billing/src/models/contractLinePreset.ts`
|
|
- `packages/billing/src/actions/contractLinePresetActions.ts`
|
|
|
|
## Authoritative Rules
|
|
|
|
- `contract_lines` is the authoritative live recurring storage surface for v1 runtime execution.
|
|
- `contract_template_lines` is the authoritative template recurrence storage surface for cadence owner and billing timing when template authoring supports canonical recurrence semantics.
|
|
- `contract_line_presets` is the authoritative preset recurrence storage surface for cadence owner and billing timing when presets are reused into live lines.
|
|
- Fixed-only partial-period compatibility settings remain split from cadence/timing on template and preset surfaces until those legacy fixed-config tables are retired.
|
|
- Readers may fall back for staged compatibility, but writes must target the authoritative storage surface for the field they own.
|