TLDR
Snapshot — run metadata
Branch: {{branchId}}
Run date:
Checksum: {{sha256}}
Export filename: payroll-run-{{runId}}.csv

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.
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% 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
- Lock source system reads.
- Generate export CSV and compute checksum.
- Store manifest with version and snapshotId.
- Run diff against prior export and record line-level changes.
- 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