lodgeit labs

Coal LSL levy available external contributor

Monthly Coal Mining Industry long service leave payroll levy and eligible wages for one employee and one month. Eligible wages are the greater of Formula A and Formula B under s 3B of the Coal Mining Industry (Long Service Leave) Payroll Levy Collection Act 1992; the levy is that figure at the published 2.7% rate, rounded once at the end. The caller establishes the employee's eligibility and pay facts; the calculator does not assess them. Internal arithmetic is exact; money outputs are 2 dp, eligible wages and Formula B keep quarter cents at 4 dp, and levy_before_rounding is exact at 8 dp before the single final rounding to cents.

Hosted by the contributor, not on LodgeiT infrastructure. This calculator runs on the contributor's own Cloudflare Worker. LodgeiT points at it and attests conformance only — the numbers reproduce against a published standard and an inspectable source. It is not yet practitioner-attested: no credentialed practitioner has certified that the levy logic is correct against the statute. See the provenance panel below, and the open bounty seeking that review.

Trust & provenance

Builder: Ryan Duguid — duguid.com.au (browser version at duguid.com.au/tools/coal-lsl-levy). Source: github.com/ryanduguid/ryanduguid.github.io, path service/coal-lsl-levy, pinned at revision 53ba9b8 (v0.4.0).

Attestation tier: conformance-passed. On the publishing standard's ladder (unattested → conformance-passed → practitioner-attested → jurisdiction-owned), this entry sits at the second rung. The honest reading of that label is load-bearing:

The inspectable conformance chain, so you can check it yourself rather than trust us:

  1. Pinned public source. The engine is open at revision 53ba9b8; every claim below is checkable against that tree.
  2. Public runnable suite. Clone the source and run the conformance runner against the live Worker:
    npm run conformance -- --base https://coal-lsl-levy.coal-lsl-levy-service.workers.dev
    It exercises the 23 synthetic fixtures in service/coal-lsl-levy/fixtures/cases.json (8 computed results, 5 factual refusals, 8 validation failures, 2 unsupported periods), checking every expected value, the served rate/method hashes, and the raw response bytes on repeat calls.
  3. Live manifest proves running = reviewed. Each computed response carries rate and method content hashes plus the engine's code_revision. Comparing those to the pinned source proves the running Worker is the reviewed source (a dirty build is labelled -dirty).
  4. LodgeiT independent re-pass (2026-10-11). We re-ran it ourselves: source tests 64/64, live conformance 16/16 against the Worker, npm audit --audit-level=high 0 vulnerabilities, and the six publish-standard sections (discovery, manifest/hashes, decimal strings, refusals, limits, rounding) all exercised. (The Worker unit test worker.test.mjs was not run on our host — wrangler would not install — a tooling gap, not a defect.)

The rounding choice, half_up_cent_final_step, conforms to LodgeiT's published rounding standard (HALF_UP, ties away from zero). It is the calculator's documented choice, not a statutory rule — which is exactly the kind of thing the review bounty asks a practitioner to judge.

Base URL

https://coal-lsl-levy.coal-lsl-levy-service.workers.dev

This calculator has its own base URL, separate from the shared LodgeiT gateway used by the in-house calculators — because the contributor hosts it. Put the base in configuration, not code.

Endpoint

POST /v1/calculators/urn:sbrm:calculator:coal-lsl:levy/urn:sbrm:period:coal-lsl-levy:{YYYY-MM}

URN urn:sbrm:calculator:coal-lsl:levy, module urn:sbrm:module:coal-lsl. Period-scoped by month: the period URN is urn:sbrm:period:coal-lsl-levy:{YYYY-MM}, because levy returns are monthly. Supported months are January 2024 to August 2026. Selection depends on facts, not an election. Read the input schema from /openapi.json (OpenAPI 3.1) before calling.

Discovery and liveness are standard:

GET /v1/modules
GET /v1/calculators[?module=urn:sbrm:module:coal-lsl]
GET /v1/rates/{period_uri}[/{rate_id}]
GET /openapi.json
GET /healthz
GET /livez

Inputs

FieldRequiredAllowed values
reporting_monthrequiredstring YYYY-MM; must match the period URN
branchrequiredbase_rate | annual_salary | casual
employee.eligible_employeerequiredboolean; caller establishes eligibility
pay.base_rate_of_payrequireddecimal string
pay.salary_sacrificedrequireddecimal string ("0.00" for nil)
pay.overtime_and_penalty_ratesrequireddecimal string
pay.allowancesrequireddecimal string
pay.allowances_exclude_expense_reimbursementsrequiredboolean
pay.bonusesrequiredarray (may be empty); bonuses count only where paid at least monthly

Every amount is required, including "0.00" for nil. JSON-number amounts, negative values, excess precision (more than 2 dp) and unknown fields are rejected with 422 naming the field. Facts the selected branch needs but the caller has not supplied, and pay components the branch would discard, are refused with 400 and a stable refusal_class.

What the figures are

Worked example

One eligible employee, base-rate branch, June 2026, where Formula B wins and the levy lands on a half-cent (so the final rounding bites):

curl -s -X POST \
  "https://coal-lsl-levy.coal-lsl-levy-service.workers.dev/v1/calculators/urn:sbrm:calculator:coal-lsl:levy/urn:sbrm:period:coal-lsl-levy:2026-06" \
  -H "Content-Type: application/json" \
  -d '{
    "reporting_month": "2026-06",
    "branch": "base_rate",
    "employee": { "eligible_employee": true },
    "pay": {
      "base_rate_of_pay": "6000.00",
      "salary_sacrificed": "0.00",
      "overtime_and_penalty_rates": "3000.00",
      "allowances": "500.00",
      "allowances_exclude_expense_reimbursements": true,
      "bonuses": []
    }
  }'

Derivation: Formula A = 6000.00. Formula B = 0.75 × (6000.00 + 3000.00 + 500.00) = 0.75 × 9500.00 = 7125.00. The greater is 7125.00. Levy = 7125.00 × 0.027 = 192.375, rounded half up to 192.38. From the live response:

branch.code              "s 3B(1)"
eligible_wages           "7125.0000"
workings.formula_a       "6000.00"
workings.formula_b       "7125.0000"
workings.winner          "formula_b"
rate.value_percent       "2.7000"
levy_before_rounding     "192.37500000"
levy                     "192.38"
rounding.differs         true

This is one of 8 computed fixtures; the suite also exercises 5 factual refusals (unknown eligibility, not eligible, casual loading unanswered, casual components not read, allowances without the reimbursement assertion), 8 validation failures, and 2 unsupported-period 404s.