TLDR

Snapshot — run metadata

Branch: {{branchId}}

Run date:

Checksum: {{sha256}}

Export filename: payroll-run-{{runId}}.csv

Platform-Exit Playbook: Stepwise Fixes for Shift Overlaps, Missing Premiums & Unapplied Rate Matrices Across Branches | A visual showing a simple, clear flowchart: export CSV, checksum verification, snapshot and rollback steps; labels: branch, run-date, checksum, export.  Shot by RDNE Stock project
Platform-Exit Playbook: Stepwise Fixes for Shift Overlaps, Missing Premiums & Unapplied Rate Matrices Across Branches | A visual showing a simple, clear flowchart: export CSV, checksum verification, snapshot and rollback steps; labels: branch, run-date, checksum, export. Shot by RDNE Stock project

Shift overlaps — algorithmic dedupe and audit

Treat branches like neighborhood crews (downtown vs northside).

Shifts use an inclusive start and an exclusive end. Small grace windows are allowed. Breaks are defined as unpaid when policy says so. Use a single, deterministic rule to pick which shift survives an overlap. Example rules: earliest hire date wins, or the higher-pay line stays. Keep the rule codified and simple.

Sample delta-overlap query (conceptual)
SELECT s.* FROM shifts s JOIN shifts t ON s.emp_id = t.emp_id AND s.id <> t.id WHERE s.start < t.end AND s.end > t.start AND s.branch = '{{branch}}';

Action mapping:

  • Action: ReconcileOverlaps
  • Inputs: shifts, hireDate, payRate
  • Outputs: resolvedShifts, overlapReport
  • Required data: masterEmployeeId, branchId, shiftBounds
Audit sampling & quick checks

Sample audit: pick N random shifts per branch per week. Validate start/end alignment and required breaks. Flag any overlap where the resolved choice changes pay materially.

Sample metric: percent unresolved overlaps per run. If > 2% escalate to rollback plan.

Missing premiums — ruleset table and retro-apply pattern

Premiums come from policy, contract, or law. Map each premium to a single ruleset and a retro-apply window. Keep a versioned manifest for any retro work.

Premium rules, trigger, and retro-apply guidance
Premium Rule Retro-apply
Overtime 29 CFR 778; > 40 hours/week Auto-calc back-pay if within statute; create ticket if manual
Holiday pay Branch CBA or local policy Compute back-pay and flag payroll adjustment
Shift differential Contract clause mapped to branch overrides Retro-apply for affected runs; attach versioned manifest
Training premium Local policy: paid training rates for scheduled sessions Back-pay for runs within defined retro window; create remediation ticket
Notes: confirm statute-of-limit windows before auto retro. Keywords: retro-apply, back-pay, CBA, premium ruleset, versioned manifest. Use automated tickets for manual review items.

Action mapping:

  • Action: AlignPremiums
  • Inputs: shifts, premiums, CBAs
  • Outputs: premiumAssignments, remediationTickets
  • Required data: premiumRuleset, branchPolicy
Retro-apply pattern

Steps: detect missing premium → compute amount → attach to remediation ticket or auto-post if within window → record manifest entry with checksum and version.

Rate matrices — branch rollups and fallback matrix

Keep a single source of truth for matrices. Resolve a payroll line with: branch override → regional fallback → global default. Always record which matrix version applied to each pay line.

Matrix fields and validation
matrixId
Unique matrix identifier. Use stable IDs for rollbacks.
branchId
Branch the matrix targets. Null means global.
role
Job or role mapping key.
rate
Numeric pay rate or multiplier.
effectiveFrom
Start timestamp, inclusive.
effectiveTo
End timestamp, exclusive.

Action mapping:

  • Action: ApplyRateMatrix
  • Inputs: timesheets, matrixRepo
  • Outputs: payLines, mismatchReport
  • Required data: matrixVersion, branchMapping
Pre-payout checks

Verify for each payroll line that the applied matrix version exists, that effectiveFrom <= shift start < effectiveTo, and that no higher-priority override was missed. If mismatch > threshold, block payout for that branch until review.

Integrity — immutable logs and diffable CSVs

Keep exports immutable. Each run has a manifest entry: startInclusive, endExclusive, sourceId, version, checksum. Keep CSVs that are diffable to show exact changes between runs.

29 CFR Part 516, 29 CFR 785, 29 CFR 778 are common references for recordkeeping, compensable time, and overtime. Use them as audit anchors for pay decisions.

Action mapping:

  • Action: SnapshotAndRollback
  • Inputs: exportCSV, manifest
  • Outputs: snapshotId, rollbackPlan
  • Required data: checksum, versionedArtifact

Run health meter (example):

62%

62% of runs had full immutable manifests and checklist completed in the sample window. Aim for 100% before final payout roll-off.

Snapshot and rollback checklist
  1. Lock source system reads.
  2. Generate export CSV and compute checksum.
  3. Store manifest with version and snapshotId.
  4. Run diff against prior export and record line-level changes.
  5. If threshold breaches, use rollbackPlan tied to snapshotId.

Page SEO — runbook JSON‑LD and timestamped snippets

Provide a compact runbook that machines can parse. Keep steps simple and timestamped. Keep one canonical boundary: start inclusive, end exclusive.

Copy-ready JSON-LD runbook (HowTo)
{ "@context":"https://schema.org", "@type":"HowTo", "name":"Platform-Exit Runbook", "step":[ {"@type":"HowToDirection","name":"LockTimeBoundary","action":"validate","input":["startInclusive","endExclusive"],"output":["canonicalShift"]}, {"@type":"HowToDirection","name":"DeltaOverlapCheck","action":"detect","input":["shifts","branchId"],"output":["overlapReport"]}, {"@type":"HowToDirection","name":"MatrixApplicationCheck","action":"validate","input":["timesheet","matrixVersion"],"output":["mismatchReport"]} ], "notes":"Guardrails: immutable audit entries; rollback trigger: threshold mismatches or unresolved overlaps." }

Keep microcases per run. Example snippet:

— runId {{runId}} — applied matrix {{matrixVersion}}.

Branch microcase concept

Store a small JSON per branch per run: branchId, runId, checksum, key findings (overlaps, missing premiums, matrix mismatches). This enables quick per-branch audits and targeted rollbacks.

Definitions, tags and categories

Matrix
A table mapping roles to pay rates and effective windows.
Premium
Extra pay rule such as overtime, holiday pay, or shift differential.
Manifest
A versioned descriptor for an export: ranges, source, version, checksum.
Shift bounds
Start and end timestamps used as canonical boundaries for a shift.
tags
  • timesheet disorder: shift overlap errors
  • export fallout: imported wrong time range
  • compliance crunch: shift premium missing
  • logic debugging: complex rate matrix not applied
  • audit and repair: corrected tax withholding group
  • payroll exceptions: payout for unused vacation
  • ops misfire moments: technician switched branch undocumented
  • state regulations: florida
categories
union agreements

Use the manifest and JSON-LD for automation. Keep all run artifacts diffable and timestamped. When in doubt, prefer simple, deterministic rules and record the choice.

payroll runbook, run metadata, immutable logs, diffable CSVs, export integrity, checksum verification, versioned manifest, snapshot and rollback, auditability, deterministic rules, overlap detection, shift overlaps, dedupe algorithm, retro-apply, back-pay, premium ruleset, rate matrices, matrix versioning, branch overrides, governance, compliance, 29 CFR references, timekeeping compliance, tickets and remediation, automation, data lineage, single source of truth, branch-level reporting, run health metrics, data validation, roll-off, branch mapping, input validation, outputs and reports, policy and CBAs, manifest artifacts, diff against prior run, audit trail, export reconciliation, post-payout checks