Skip to content

PayrollEngine v1.3.1

Latest

Choose a tag to compare

@github-actions github-actions released this 01 Dec 06:57

Payroll Engine — Release Notes

v1.3.1 - Dec 2026

Highlights

  • Lex packages — the Payroll Console packs, installs, lists and removes lex packages (.lexpkg) with the new commands LexPack, LexInstall, LexPackages and LexUninstall, and compares two package versions with LexDiff (see Payroll Console)
  • Server packages — the Payroll Console installs, lists, configures and removes server packages (.mcppkg) with the new commands McpInstall, McpServers, McpConfig and McpUninstall (see Payroll Console)
  • Extension packages — the Payroll Console installs and removes console extensions from a package (zip) with the new commands ExtensionInstall and ExtensionUninstall, without the sources of the extension (see Payroll Console)
  • Tenant isolation hardening — objects of regulations are readable only for tenants that own the regulation or consume it through a regulation share, changes only for the owner, and nested objects must belong to the regulation in the route (see Security)
  • Behavior change — forecast jobs — a forecast job reads the results of its own forecast in payrun result queries. Legal jobs are unchanged. Scripts that read results of earlier periods or runs from a forecast job can return different values than with 1.3.0 (see Backend)
  • Behavior change — Payroll Console exit codes — an unknown command or an unhandled error ends with exit code -1 instead of 0 (see Payroll Console)
  • Behavior change — Payroll Console log location — the console writes its log file to a fixed folder of the current user instead of the folder logs of the working directory (see Payroll Console)

Backend

Behavior change — forecast jobs. The rules below apply to payrun jobs with a forecast name. Payrun jobs without a forecast name (legal jobs) read results as before 1.3.0. The database schema (1.2.0) and the stored procedures are unchanged; no database update is required.

  • Forecast name — a forecast job uses its forecast name as the default of every payrun result query (wage type, collector and custom results, including the consolidated queries). A query that sets a forecast name explicitly is not changed: it matches that name as before and reads no additional jobs
  • Status Complete — with the default forecast name, a query for completed results also reads the jobs of the own forecast in status Forecast. Both reads are merged; this takes a second stored procedure call for each such query in a forecast job
  • Query without status — a query without a status reads the legal jobs in any status and the jobs of the own forecast in the status Complete or Forecast. Jobs of the forecast in other states, such as Draft or Abort, are not read. The query takes one call for the legal jobs and one for each of the two forecast states
  • Same period in legal and forecast jobs — a range query used to return the legal results only. It now returns, per wage type number or collector name and period start, the rows of the source (legal or forecast) that holds the newest result (Created, then Id). All rows of that source for the period are kept, as a source can hold several rows per period, for example from retro jobs. A wage type with a legal result of 1,000 and a result of the own forecast of 4,000 that is newer yields 4,000, not 1,000 and not their sum
  • Consolidated queries — a query without a consolidation key returns the newest result per key, as the consolidated stored procedures do
  • Order — range query results are ordered by Created, then Id
  • Tags — tag filters apply to each read before the results are merged: only results that match the tags take part in the choice of the newest source
  • Forecast names — whether forecast jobs are included compares the forecast names case-sensitively. An explicit forecast name is matched by the database according to its collation, as before
  • Completed status — a forecast job without completedJobStatus ends in status Forecast; before it stayed in Draft, so the next job of the forecast did not see it. An explicitly requested status is applied as before; a legal job without status still ends in Draft
  • Caches — the cycle and consolidated caches of a forecast job serve only queries with the parameters of the preload (forecast name and status); other queries read the database, so a cached read and a direct read return the same rows
  • Retro — GetRetroWageTypeResults in a forecast job returns retro deltas of the forecast; before it returned none. The difference chain takes the newest source per period as above
  • Repeated forecast run — a forecast run of a period sees the results of the first run of the same period and forecast. A script that reads previously paid values (for example the last wage type result of a period) counts the first run in a repeated forecast run. Check such scripts before they run in forecast jobs

Fixes

  • The regulation list returns the number of items that matches the list: the count of a paged regulation query includes the shared regulations the tenant consumes, as the list does
  • GET of a regulation case field binds the case field id of the route (.../cases/{caseId}/fields/{fieldId}); the action declared the id as caseFieldId, so the id of the route was not bound. The OpenAPI document names the path parameter fieldId (integer) and no longer lists the query parameter caseFieldId (breaking change for clients generated from the 1.3.0 document: regenerate them; a query parameter caseFieldId is ignored). The route is unchanged
  • The OpenAPI document swagger.json is regenerated from the 1.3.1 build. It now lists endpoints that already existed in 1.3.0 (admin information, bulk employee and case creation, lookup ranges, payrun job import and preview, system actions and properties) and the corrected case relation audit routes, and no longer lists the tenant route actions and the type RetroTimeType
  • Retro payrun jobs of a forecast whose name contains a single quote no longer break the job filter; the quote is escaped
  • The action parser no longer fails on an action line that produces no code

Security

Regulation objects are read and changed through the tenant routes api/tenants/{tenantId}/regulations/{regulationId}/.... 1.3.1 closes cross-tenant access on these routes:

  • A regulation is visible to a tenant if the tenant owns it, or if it is a shared regulation and the tenant has a regulation share for it (matched by the regulation name, so one share covers all versions). Regulation queries and counts return only visible regulations
  • Reading an object below a regulation route requires a visible regulation; changing an object requires a regulation of the route tenant. A regulation that is not visible answers 404. A tenant that consumes a shared regulation without a regulation share no longer reads it: check the regulation shares of consumer tenants before updating
  • An object below a regulation (case field, lookup value, report parameter, report template, report attribute, audit) must belong to its parent object in the route, up to the regulation of the route. A mismatch answers 404 for reads and changes
  • Ids in the routes are positive decimal numbers only; other notations of a number (for example hexadecimal or signed) are rejected
  • Report queries of report scripts require a visible regulation
  • Report attributes and the rebuild of script objects check the parent object
  • Tenant authorization is also applied to the report, audit and webhook message controllers

Payroll Console

Lex packages. A lex package (.lexpkg) delivers the frozen snapshots of data satellites as one file. The new commands need no backend connection; they are thin wrappers over the namespace PayrollEngine.Lex.Packaging of PayrollEngine.Lex 1.3.1.

  • LexPack — create a package from the declaration lex-package.json (/dryrun, Output:, Evidence:, /schema). The declaration schema is PayrollEngine.LexPackage.schema.json in Schemas. All findings of a rejected declaration are listed; a package file is never overwritten
  • LexInstall — install a package from a file, a file mask with one match or an https URL (/dryrun, Store:). The package is checked completely and becomes visible with one rename. An installed version with the same content whose files differ from the package (changed, missing or additional file) is replaced; the result is Repaired and names the first difference. A download sends the token of the environment variable PAYROLL_ENGINE_PACKAGE_TOKEN, if set, as bearer token to the host of the URL only; http URLs are rejected
  • LexPackages — list the installed packages and their state, /verify checks every installed file
  • LexUninstall — remove a version or all versions of a package
  • LexDiff — compare two versions of a package, given as a package identifier with two installed versions or as two package files (Satellite: limits the comparison to one satellite, Store: selects the package store). The output lists added, removed and changed satellites, entries (with the changed fields), sources and lookup index entries, sorted, with a summary. Only snapshots and lookup indexes are compared, so the evidence level of a package does not matter. Differences are no error (exit code 0); a missing or invalid version or file and an unknown satellite are exit code 6. The comparison is available to other tools as LexPackageDiff in PayrollEngine.Lex
  • Package store — Store: argument, else the environment variable PAYROLL_ENGINE_PACKAGE_STORE, else <LocalApplicationData>/PayrollEngine/packages of the user. Relative and network paths are rejected
  • Arguments — the package commands (LexPack, LexInstall, LexPackages, LexUninstall, LexDiff and the four Mcp commands) reject unknown switches, misspelled named arguments and surplus positional arguments with exit code 5, before they read or write anything
  • Exit codes — the existing codes: 3 download failed, 5 invalid arguments or store, 6 invalid package, rejected declaration, not installed or unknown satellite, -1 unexpected error
  • File type — Register-PecmdExtension.ps1 (Windows) and register-pecmd.sh (Linux, macOS) also register .lexpkg: opening a package runs LexInstall "<file>" /wait. Unregistering removes both file types. Run the script again to register .lexpkg on an existing installation

Server packages. A server package (.mcppkg) delivers a self-contained server program for one platform (win-x64, linux-x64, osx-arm64) with its context files and configuration profiles. The new commands install, list, configure and remove a package of this format; they need no backend connection and use the same package store as the lex packages (folder mcp).

  • McpInstall — install a package from a file, a file mask with one match or an https URL (/dryrun, Store:). The platform of the package must be the platform of the machine (exit code 6 otherwise); a package of another platform line than the console is installed with a warning. Files, hashes, sizes and profiles are checked completely before the package becomes visible; a profile that contains credentials is rejected. The same version with other content is rejected; the same version with damaged installed files is replaced (result Repaired). Downloads follow the rules of LexInstall
  • McpServers — list the installed packages with platform, profiles and state, /verify checks every installed file
  • McpConfig — check every file of the installed version, then write the entry for the configuration of an MCP client (Client:mcpServers or Client:vscode, PackageId:, Version:, Output: for a new file). The entry holds the absolute program path and the environment of the profile; a secret of the profile is only a placeholder, the command never writes an API key and changes no client configuration
  • McpUninstall — remove a version or all versions of a package; a version in use stays (exit code -1)
  • Package store — as for lex packages. Because a server package contains a program, a network drive (Windows) is rejected as store folder in addition to relative and network paths (exit code 5)
  • File type — the registration scripts also register .mcppkg: opening a package runs McpInstall "<file>" /wait. Registration adds no script to a package. Run the script again to register .mcppkg on an existing installation

Extension packages. An extension package is a zip file with the content of an extension folder, extension.json in its root. The new commands need no backend connection; the extension API (1.2) is unchanged.

  • ExtensionInstall — install a package from a file or a file mask with one match (/overwrite, /dryrun). The package is extracted into a staging folder and checked completely (manifest, console extension API, every file hash, undeclared files, entries outside of the folder) before the extension becomes visible. Another installed version, or changed installed files, are replaced only with /overwrite; a failed replacement restores the previous extension. The same version with the same files is reported as AlreadyInstalled. A running console keeps the version it has loaded; its next start loads the installed version
  • ExtensionUninstall — remove an extension by name
  • For both commands the console loads no extension. Within a command file the extensions are loaded, and replacing or removing a loaded extension is rejected
  • The extension loader ignores folders in extensions whose name starts with a dot (staging and backup folders of the installation)
  • Exit codes — 5 invalid arguments, 6 invalid package, another installed version without /overwrite or extension not installed, -1 extension folder in use

Lex commands.

  • LexVerifySource reads the new number formats of PayrollEngine.Lex 1.3.1 (see Lex); a partial result also lists the numbers found only next to another year

Behavior change — exit codes. An unknown command (for example a command of an extension that is not installed) and any unhandled exception end with exit code -1 (GenericError); before, the console ended with exit code 0, so a pipeline step looked successful. Scripts and pipelines that treated exit code 0 after such an error as success now see a failure. Commands that end normally keep their exit codes.

  • The error handling runs in CommandRunner; ProgramEnd runs after an error as well and waits for a key only in the wait mode the console is started with

Behavior change — log location. The log file location is now set in the code of the console. The shipped appsettings.json no longer contains the file path of the log (path) and the unused key pathWindows.

  • New default — <LocalApplicationData>/PayrollEngine/Console/logs/log-<yyyyMMdd>.log: on Windows %LOCALAPPDATA%\PayrollEngine\Console\logs, on Linux $XDG_DATA_HOME/PayrollEngine/Console/logs or ~/.local/share/PayrollEngine/Console/logs, on macOS ~/Library/Application Support/PayrollEngine/Console/logs. The console no longer creates a folder logs in the working directory. Rolling (daily, 7 files) is unchanged
  • Existing configuration — a file path set in the Serilog section of appsettings.json applies as before, with the same meaning (a relative path is relative to the working directory). An appsettings.json of an earlier release that still contains "path": "logs/log-.log" therefore keeps writing to the working directory; remove the setting to use the new default
  • Unusable folder — if the default folder cannot be created, the console writes a warning to stderr and runs without a log file
  • Scripts or monitoring that read the log file from the working directory must use the new location

Fixes

  • The load test report (Markdown) and the range value of lookup values imported from Excel use the invariant culture; numbers no longer depend on the culture of the machine
  • The setup case files of the load test and the collector results of the employee payrun tests are ordered ordinally, independent of the culture

Lex

PayrollEngine.Lex 1.3.1 adds the packaging of lex packages and reads more number formats in the source verification. Existing public signatures are unchanged.

  • New namespace PayrollEngine.Lex.Packaging — create, read, install, list, verify, remove and compare lex packages (LexPackageBuilder, PackageInstaller, LexPackageStore, LexPackageDiff) and handle server packages (ServerPackageStore, ServerPackageManifest); the Payroll Console commands are thin wrappers over it
  • Installation result — PackageInstallOutcome.Repaired: the same version with the same content whose installed files differ from the package is replaced; the first difference is the first warning of the result. ServerPackageStore.InstallAsync returns ServerInstallResult (outcome, manifest, folder, expected outcome for a dry run, warnings), like LexPackageStore.InstallAsync returns LexInstallResult
  • Package rules — the content hash of a server package covers platform, entry point and profiles (server packages built with an earlier build are reported as damaged); package paths with control or format characters are rejected; LexPack rejects links as source; a manifest with two satellites of the same authority, regulation and validFrom is rejected, and StoreLexSource lists a second version with an already loaded manifest id as damaged; Uninstall determines the versions while it holds the store lock
  • SnapshotLexInfo (new) — maps a snapshot to the answer model of ILexSource: a snapshot is a sealed state, so its state and the state of every entry are Current
  • StoreLexSource (new, ILexSource) — reads the snapshots of the lex packages installed in a package store; versions without installation record are skipped, damaged versions are listed with their error
  • Schema lex-package.schema.json (embedded resource) for the package declaration lex-package.json; the Payroll Console ships it as PayrollEngine.LexPackage.schema.json in Schemas

Source verification — number formats. The number lookup of the source verification reads:

  • Scale abbreviations directly after an amount with a currency sign ($10m, $1.5bn, $250k); without currency sign or with a space (10m, $10 m) it is no amount
  • Minor currency units after a number (91 cents is 0.91), case-sensitive, also when the unit starts the next line
  • Written dates with day, month name and year (1 January 2026) as yyyymmdd values (20260101), rated positive
  • Percent columns: in a table with tab-separated cells (HTML, docx, odt) a column whose header is a percent sign or percent word only (Rate (%)) holds percentages, so 12.00 matches 0.12
  • A middle dot, dot operator or bullet operator between two digits is a decimal point (4⋅85% is 0.0485)
  • HTML tables: paragraphs, line breaks and lists inside a table cell are read as spaces, so a table row stays one line with tab-separated cells; a table inside a cell is read as its own table
  • A Partial result lists the year-weak numbers among its found numbers in SourceResult.Ambiguity, so a fixed missing number does not reveal a year finding only on the next run
  • Language files: new optional word arrays scaleAbbreviations and minorUnits, validated on load (letters only for abbreviations, factor between 0 and 1 for minor units); the shipped language files define the minor units of their language, the English file also the scale abbreviations k, m, bn

A newly readable number can stand next to another year and is then rated year-weak like any other hit. The shipped language files changed, so the language hash in the method of automatic verification records changes and the next run of LexVerifySource renews these records.

MCP

  • PayrollEngine.Mcp.Core 1.3.1 — version change only; the public API is unchanged
  • PayrollEngine.Mcp.Tools 1.3.1 — version and reference change only (references PayrollEngine.Mcp.Core 1.3.1 and PayrollEngine.Lex 1.3.1); tools and behavior are unchanged

Packages

From 1.3.1 the libraries are released in three version lines: the platform libraries, PayrollEngine.Lex, and the MCP libraries. A line is released only when it changes, so the package versions of one release can differ.

Line Packages Version
Platform PayrollEngine.Core, Serilog, Document, Client.Core, Client.Scripting, Client.Test, Client.Services 1.3.0 (not released again)
Lex PayrollEngine.Lex 1.3.1
MCP PayrollEngine.Mcp.Core, PayrollEngine.Mcp.Tools 1.3.1

Apps

The Backend and the Payroll Console are released as 1.3.1; both build on the platform libraries 1.3.0, the Payroll Console on PayrollEngine.Lex 1.3.1. The Web App and the MCP server have no change and stay at 1.3.0. The REST API routes, the Scripting API, and the database schema (1.2.0) are unchanged.

Behavior changes — forecast jobs and tenant isolation, see Backend and Security; the location of the Payroll Console log file and the exit code -1 (instead of 0) for an unknown command or an unhandled error, see Payroll Console. Legal jobs and requests of a tenant on its own objects are unchanged.

v1.3.0 - Nov 2026

Highlights

  • Regulator role for MCP — the new MCP role Regulator works with the provenance manifests (lex.json) of data regulations: list manifests, read entries, check (development and release mode, optional URL check), verify snapshots and sources, validate. The tools need no backend connection, only read files below configured workspace folders and are off by default (McpServer:Permissions:Regulator = None), so existing deployments gain no file access after an update
  • Workspace isolation — every path argument is resolved below the configured roots (McpServer:Regulator:Roots, RepoMask); parent segments, absolute paths outside the roots and link escapes are rejected
  • MCP server without backend — PayrollEngine.Mcp.Server starts without a backend connection when only the Regulator role is granted; a startup error names the missing setting otherwise. get_server_info reports the Lex library version, the regulator mode and the backend mode
  • Lex library operations — source verification (including the write rules for locations and automatic records), entry validation, attestation rules, snapshot, apply and rollover cycle are library operations; the console commands are thin wrappers with unchanged output and exit codes

Lex

  • ManifestEditor: update entries (content, legal reference, source URLs, quote, reference year, description, documentRef, rangeValue), add, update and remove exclusions, add, update and remove sources, remove entries; property order is kept. RemoveVerification removes the verification record of an entry and returns it; EntryUpdate.InvalidatesVerification tells whether an update requires removing the verification record
  • Workspace read model: ILexSource with WorkspaceLexSource (manifests below a root folder and repository mask) returns manifest and entry summaries with sources, review rule, matching exclusions and snapshot state; ManifestHash is the content hash of lex.json
  • Range lookups: LexApply sets the range value of a new row in a range lookup (rangeMode other than None): a key in the format yyyy-MM-dd yields the number yyyyMMdd, any other key needs the new entry property rangeValue (PayrollEngine.Lex.schema.json), otherwise the apply stops with rangeValueMissing and writes nothing. Existing rows are never recomputed. The check reports range rows without range value as rangeValueMissing (finding in release mode, new last CSV column)
  • Checker.CheckSources has the optional parameters vocabulary (folder of additional language files) and sources (local verification already computed by the caller). Binary breaking: assemblies built against 1.2.0 that call CheckSources must be rebuilt; source code compiles unchanged
  • Fix: the check of evidence tracked in git no longer hangs inside a host that communicates over stdio (for example an MCP server); the git query closes its input, reads its output concurrently and ends after 30 seconds
  • Check report: warnings are listed once with the affected satellites; a missing git or a folder outside a repository is a warning, never a finding
  • Extended vocabulary files
  • CheckResult.EvidenceVersioningChecked (new): true when the check of evidence tracked in git ran; false when it was skipped (no git, or a folder outside a repository), in addition to the existing warning
  • Fetcher.FetchAsync has a new overload with the parameter targetGuard (FetchAsync(client, url, lexDirectory, fileName, overwrite, targetGuard), all parameters required, targetGuard may be null). The existing signature FetchAsync(client, url, lexDirectory, fileName = null, overwrite = false) stays as an overload: existing calls and assemblies built against an earlier version keep working without a rebuild (binary and source compatible)
  • Fetcher: the manifest (lex.json) and the snapshot (snapshot.json) are no fetch targets. Fetcher.IsReservedFileName tests a name (case, trailing dots and spaces ignored); FetchAsync refuses a reserved explicit name before the request and a reserved name derived from the URL before writing, and, in the overload with targetGuard, checks the full target path before anything is written
  • Fetcher: a reserved target is refused with the new ReservedFileNameException, a subclass of ArgumentException (parameter fileName, property FileName, message unchanged), so callers no longer depend on the message text. A target in the .lex folder that is a symbolic link resolving outside the real .lex folder, to the manifest or the snapshot, or to no existing file, is neither read nor written, with or without overwrite (FetchTargetLinkException, an IOException with the properties FileName and ResolvedPath); links in the path of the .lex folder itself are resolved first. Hard links are not detected

Payroll Console

  • Lex commands use the library operations; LexAttest with ReviewedBy records the second review (four-eyes) of existing manual records; usage texts updated
  • The cycle determination of LexRollover is part of the library
  • LexFetch refuses the manifest and the snapshot as target file name (exit code 6, nothing is written)
  • LexAttest: VerifiedBy defaults to the environment variable PAYROLL_ENGINE_LEX_USER; an explicit value wins, the default is never used for a review, and the output names the origin of the person
  • LexApply and LexCheck support the range value of new range lookup rows (rangeValue, finding rangeValueMissing); the dry run of LexApply shows the range value per change
  • LexCheck /release reads additional language files from PAYROLL_ENGINE_LEX_VOCABULARY, as LexVerifySource does

MCP

  • PayrollEngine.Mcp.Core: role Regulator, tool base without backend client (public API of existing tools unchanged), workspace context with startup validation (McpServer:Regulator: Roots, RepoMask, AgentIdentities, Backend = None (default) or Read; any other Backend value stops the start)
  • PayrollEngine.Mcp.Server: the backend connection is required only for a backend role (HR, Payroll, Report, System) or Regulator:Backend = Read; Permissions:Regulator other than None requires at least one workspace root; a failed start exits with code 1. The README documents the Regulator profile, also as container with the workspace mounted as volume
  • PayrollEngine.Mcp.Core: extensible role model — a server defines own roles with McpRoleDefinition (name, applicable isolation levels, backend requirement); tool classes reference them with [ToolRole("<Name>")]; McpPermissions.FromConfiguration(configuration, roles) reads McpServer:Permissions:<Name> (default None); ToolRegistrar.GetPermittedTypes(assembly, permissions, level, roles) registers them. The built-in roles and all existing signatures are unchanged; a tool class whose role the server does not define is not registered
  • get_server_info reports the permissions of the roles defined by the server (customRoles, empty without own roles)
  • Behavior change — startup errors instead of silent fallbacks: an McpServer:IsolationLevel that is not MultiTenant, Tenant, Division or Employee, and a value under McpServer:Permissions that is not None, Read or Write, now stop the server at startup with a message that names the setting, the value and the allowed values. Before, a misspelled isolation level selected MultiTenant and a misspelled permission selected None without a message. A missing or empty setting behaves as before (MultiTenant; None for a key missing in an existing Permissions section; defaults for a missing section). Check the configuration of existing deployments before updating
  • McpPermissions.FromConfiguration throws InvalidOperationException for an unknown permission text; the documentation of IsolationContext.Permissions names the actual defaults (Read for the backend roles, None for Regulator)
  • PayrollEngine.Mcp.Tools: tool group RegulatorTools with lex_list_manifests, lex_get_entry, lex_check, lex_verify_snapshot, lex_verify_source, lex_validate; filters onlyProblems, summaryOnly, countsOnly, a sizeWarning for results above 32,000 characters and progress notifications; THIRD-PARTY-NOTICES.md added
  • PayrollEngine.AiContext: the Regulator role and its read-only tools are described in the overview and MCP tools context

Packages

All platform libraries are released as 1.3.0 (one version line).

Apps

All apps are released as 1.3.0 (Backend, PayrollConsole, WebApp, Mcp.Server). Backend and WebApp contain no functional change: the REST API is unchanged, and the database schema stays at version 1.2.0 (no database update is required).

Breaking changes — REST API, Scripting API and database schema are unchanged. Breaking are:

  • The MCP server stops at startup on an invalid McpServer:IsolationLevel or permission value instead of falling back silently (see MCP)
  • PayrollEngine.Lex: Checker.CheckSources gains optional parameters; assemblies built against 1.2.0 that call it must be rebuilt

v1.2.0 - Nov 2026

Highlights

  • Lex — source-traced compliance values — the new library PayrollEngine.Lex and nine Payroll Console commands trace every statutory value of a data regulation to its official source: a lex.json manifest with source, location, legal reference and verification record per value, frozen evidence files with a hash snapshot, automatic verification against the source documents, manual four-eyes attestation, transfer into the regulation lookups, consistency and release gate, and the rollover to the next cycle. Complete tariff tables are taken from the authority text file itself (fixed columns or tab-delimited, also inside a ZIP archive) and written as compressed lookup archives
  • Pay date — every payrun job has a pay date: period end plus the calendar PayDateOffset, or an explicit override per job (e.g. early payment before a holiday). The pay date is stored on the payrun job and on all payroll results
  • Regulation date by pay date — when the pay date differs from the period end date, regulations, case fields, and lookups are resolved at the pay date; tax years that follow the pay date (e.g. a December period paid in January) are calculated with the regulation version of the pay date
  • Calendar cycle assignment — the calendar CycleAssignment selects the date that assigns a period to the cycle (tax year) and to the regulation version: PayDate (default, for tax systems taxing on receipt — a December period paid in January belongs to the next year) or PeriodEnd (for tax systems taxing by the period worked — the period belongs to the year of its end, regardless of the pay date). Cycle start, year-to-date consolidation, and cycle result queries follow the assignment
  • Anchored weekly and bi-weekly periods — the calendar PeriodAnchorDate produces continuous 7-day and 14-day periods across year boundaries; bi-weekly periods no longer restart at the beginning of the year or overlap in years with 53 weeks. Calendars without an anchor keep the previous week-of-year behavior
  • Signed webhooks — a webhook with a secret signs its requests (X-PE-Timestamp, X-PE-Signature, HMAC-SHA256); scripting webhook responses must be signed (X-PE-Response-Signature), otherwise the payrun job aborts. The secret is write-only and encrypted at rest
  • Isolated console extensions — each Payroll Console extension lives in its own folder with an extension.json manifest (file hashes, required console version) and runs in its own load context; a failing extension affects neither the console nor other extensions

Backend

Database Update required — the backend requires schema 1.2.0 (minimum schema version 1.2.0) and refuses to start against an older schema. The Update-Model scripts migrate schema 1.1.0 → 1.2.0 for SQL Server, MySQL, and — for the first time — PostgreSQL (Update-Model.pg.sql). The update adds the new columns and fills existing data: PayrunJob.PayDate is set to the period end date, and the result pay date is taken from its payrun job.

New Features

  • Calendar — PeriodAnchorDate (anchor of continuous weekly and bi-weekly periods) and PayDateOffset (pay date = period end + offset days)
  • Payrun job pay date — PayrunJobInvocation.PayDate (optional override) and PayrunJob.PayDate; without override the pay date is calculated from the payroll calendar
  • Retro payruns — retro jobs reuse the pay date of the original payrun job of the retro period
  • Results — PayDate on wage type results, wage type custom results, collector results, collector custom results, and payrun results, including consolidated result queries
  • Scripting — PayDate, PayDateYear, and GetPayDate(periodMoment) in all payroll functions
  • Calendar cycle assignment — Calendar.CycleAssignment (PayDate, PeriodEnd; default PayDate). With PayDate, the payrun job cycle is taken from the job pay date, and the year-to-date consolidation includes the periods paid within the cycle up to the current pay date, using the pay dates of the payrun jobs (early and late payments, pay date overrides). With PeriodEnd, the cycle and the regulation date are taken from the period end
  • Scripting calendar — CycleTimeUnit, PeriodTimeUnit and TimeMap in all payroll functions; the CalendarTimeUnit value is the number of periods per year (e.g. Week 52, BiWeek 26, SemiMonth 24, CalendarMonth 12); TimeMap lets a regulation guard reject a calendar whose Cycle time map would divide calendar period case values it already annualizes
  • Scripting cycle — CycleDate, GetCyclePeriodRange(offset) in all payroll functions; GetConsolidatedPeriodStarts(periodMoment) in payrun functions. Cycle result queries (GetWageTypeCycleResults, GetCollectorCycleResults, previous cycle values) use the period range of the cycle
  • Calendar validation — the PeriodAnchorDate and the CycleAssignment of a calendar cannot be changed once payrun jobs exist for the calendar (division or employee calendar); the update is rejected with 400 Bad Request
  • Signed webhooks — Webhook.Secret (write-only; on update omitted keeps, empty removes, a value replaces) and read-only Webhook.Signed. Request signature v1= + HMAC-SHA256 over {timestamp}.{body}; response signature for scripting webhooks over {timestamp}.{requestSignature}.{responseBody}. A secret that cannot be read stops the dispatch, nothing is sent unsigned. Exchange exports contain signed, never the secret — set the secret again after an import
  • Webhook tracking mode — PayrollServerConfiguration:WebhookTracking (None, Notification, All)
  • Data protection keys — the secret is encrypted with ASP.NET Core data protection; PayrollServerConfiguration:DataProtectionKeyPath sets the persistent key ring location (required for containers and multiple instances; lost keys require setting the secrets again)
  • Webhook performance — tenant and user are loaded once per dispatched message instead of once per webhook; scripting webhook calls (InvokeWebhook) query the webhook of the action once per payrun job instead of once per call

Behavior Change

  • Webhook tracking — the setting PayrollServerConfiguration:WebhookTracking (None, Notification, All; default Notification) controls tracking. Notification webhooks (case change added, payrun job process/finish, task change) are tracked as webhook messages with response status and message. Scripting webhook calls (InvokeWebhook) are tracked only with All
  • Scripting webhook connection error — an unreachable receiver or a failed response status of a scripting webhook aborts the payrun job with an exception, instead of returning the error text or an empty value to the script
  • Removed webhook actions — the never-triggered actions PayrunFunctionRequest and ReportFunctionRequest are removed; script webhook calls always use CaseFunctionRequest. The database update deletes existing webhooks with these actions; imports using them are rejected
  • Payroll validation — the payrun validates the payroll regulations at the regulation date (period end, or pay date when it differs) instead of the period start, consistent with the payrun processing

Bug Fixes

  • Retro detection — a payrun job invocation with a period start within the period (e.g. the 5th of a bi-weekly period) did not trigger retro jobs: the retro date was taken from the running job itself. The previous job is now determined by the calendar period start
  • Lookup ranges of namespaced regulations — GetLookupRanges did not apply the regulation namespace (unlike GetLookup and GetRangeLookup), so range lookups of namespaced regulations returned no brackets. Names that already carry the namespace are unchanged
  • Webhook message response — ResponseDate, ResponseStatus and ResponseMessage of webhook messages were never stored, because the response arrives after the message is created; they are now written on update, a missing response date is stored as NULL

Existing calendars — calendars without CycleAssignment use PayDate. Without PayDateOffset the pay date is the period end date, so cycles and regulation dates of existing payrolls remain unchanged.

Database

  • New columns: Calendar.PeriodAnchorDate, Calendar.PayDateOffset, Calendar.CycleAssignment, PayrunJob.PayDate, and PayDate in WageTypeResult, WageTypeCustomResult, CollectorResult, CollectorCustomResult, and PayrunResult
  • New column Webhook.Secret (encrypted secret, nullable)
  • Webhooks with the removed actions PayrunFunctionRequest (20) and ReportFunctionRequest (30) are deleted
  • PostgreSQL result functions return PayDate as the last column; the update script recreates the affected functions

WebApp

New Features

  • Calendar editor — pay date offset, period anchor date, and cycle assignment fields; the period anchor date and the cycle assignment are read-only once payrun jobs exist for the calendar, and a hint is shown when the anchor weekday differs from the first day of week
  • Payrun jobs — optional pay date override when starting a payrun job; pay date column in the payrun job history
  • Webhooks — write-only secret field (with remove option and visibility toggle) and a Signed column
  • New labels in all localizations

Changes

  • Excel download — uses the Document Excel export; the direct NPOI reference is removed

Docker

  • The compose files keep the data protection keys in the volume backend-keys; docker-compose down -v removes it together with the database (see DOCKER.md)

PayrollConsole

  • Load test commands (LoadTestGenerate, PayrunLoadTest) carry over the pay date of the invocation template
  • Exchange import and export include the new calendar and payrun job fields (PayrollEngine.Exchange.schema.json updated)
  • Excel — Excel imports (RegulationExcelImport, CaseChangeExcelImport) and the payrun load test Excel report are based on ClosedXML (MIT); NPOI is no longer used
  • Excel import dates — a numeric cell is read as date when its number format is a date format; rows are read up to the last used row, rows after empty rows are no longer skipped
  • Lex commands — complete command set for source-traced compliance values (see Lex):
    • LexFetch — download a source document unchanged into the .lex folder and declare it as evidence
    • LexAdd — add a value with source URLs, location, legal reference and evidence document
    • LexVerifySource — look up the numbers of every value in its sources, local evidence (/local, default) or live (/live); weak matches (short numbers, numbers in words, numbers next to another year) are rated ambiguous, sourceQuote anchors a value to a text passage, /writelocations and /refreshlocations write source locations and auto verification records, /strict returns exit code 6
    • LexAttest — manual verification by a person against an evidence document, and the four-eyes review of sources with FourEyes rule
    • LexSnapshot — freeze values and evidence in snapshot.json (file hashes, value hash, text hash of every readable source URL); /overwrite regenerates, existing local copies are kept, build output is ignored
    • LexVerify — confirm that the snapshot is intact and current
    • LexApply — write the lex values into the lookup values of the regulation; open entries are skipped
    • LexCheck — coverage, value differences (all differing properties of a structured value), traceability fields, evidence tracked in git, validFrom, verification records, open entries, changed sources (/checkurls), Markdown and CSV report, Root/RepoMask for many repositories; /release is the release gate: precise locations, official main sources, no weak automatic matches, every value verifiable locally or live, zero values justified, no evidence file that backs no entry
    • LexRollover — create the data regulation of the next cycle from the payroll calendar of a tenant, with all entries open
  • Lex sources — HTML, text, CSV, spreadsheets (xls, xlsx, xlsb, ods), PDF with text layer and form fields, docx, odt; several source URLs per value; language files for English, German, French, Spanish, Italian, Dutch and Portuguese in the LexVocabulary folder, further languages with LexVerifySource Vocabulary:<folder> or the environment variable PAYROLL_ENGINE_LEX_VOCABULARY
  • Lex text tables — a lex entry with contentFile and contentMap takes a complete tariff table from the authority text file (fixed columns or tab-delimited); archive.zip!entry.txt reads a file of a ZIP archive in place. The map selects the columns and filters the record types:
    • LexApply replaces all values of the lookup when the table differs; a lookup file with lookups only is written as deterministic ZIP archive (Regulation/Lookups.Name.json → Regulation/Lookups.Name.zip), reported as [ZIP] old -> new with the hint to update the install files, the project file and the setup script; the summary counts the tables
    • LexCheck compares the table row by row (table <lookup> +added, -removed, ~changed)
    • LexVerifySource verifies a text table by file identity (the archive is declared with its source URLs and present in the .lex folder), reported as file identity <n>; no numbers are looked up
    • LexSnapshot hashes the table and its map; LexRollover renames the year of the archive reference (tariffs-2026.zip!tariff-a26.txt → tariffs-2027.zip!tariff-a27.txt)
  • LookupTextImport — uses the text table classes of PayrollEngine.Lex; the mapping file accepts filters (line filters by column text, e.g. record types) and is validated before the import
  • Extensions (breaking change) — assemblies placed directly into the extensions folder are no longer loaded. Each extension requires the folder extensions/<Name>/ with an extension.json manifest (name, version, required console version, assemblies, SHA-256 file hashes). One load context per extension; PayrollEngine.Client.Core, PayrollEngine.Core and PayrollEngine.Lex are shared with the console. Core commands take precedence, a duplicate command name rejects the whole extension. See the migration guide in the PayrollConsole README
  • Extension commands — Extensions lists the loaded extensions with status and commands; ExtensionManifest creates or updates the manifest with the hashes of all files; Help shows the source of a command (core or extension)
  • Command display — all commands show their title and parameters (display level full)

Libraries

New

  • Lex — PayrollEngine.Lex (MIT, NuGet): manifest and snapshot model, JSON schema and validation, manifest editor that keeps unknown properties and order, fetcher, snapshot writer and verifier, checker with release gate, source verifier with rating of weak matches and year context (calendar and tax years, validity phrases, enactment citations), applier and rollover
    • Source readers detect the format from the content: HTML, text, CSV, PDF via PdfPig (Apache-2.0), spreadsheets .xls, .xlsx, .xlsb via ExcelDataReader (MIT) and .ods, .docx, .odt; one section per sheet, page or heading; readers passed by file extension override the built-in readers
    • Language files {language}.json (en, de, fr, es, it, nl, pt) in the LexVocabulary content folder; further languages from a folder given by the caller, selected per manifest with languages
    • Exclusion kinds coverage, orphan, sourceLocation, autoVerification, derived, notApplicable; entry properties sourceUrls, sourceQuote, referenceYear, open; source properties review (SingleAuthor, FourEyes) and official
    • Text tables: TextTable and TextTableMap (fixed columns and tab-delimited, line filters, implied decimals), ContentSource for files and ZIP archive entries, entry property contentMap, target kind Table; RegulationReader reads the JSON entries of Regulation/*.zip, the applier writes deterministic lookup archives (ApplyResult.ReplacedFiles), ManifestVerifier.FileIdentityVerification

Features

  • Core — CalendarCycleAssignment enum; WebhookAction.PayrunFunctionRequest and ReportFunctionRequest removed (breaking change)
  • Client.Core — Calendar.PeriodAnchorDate, Calendar.PayDateOffset, Calendar.CycleAssignment, PayrunJobInvocation.PayDate, PayrunJob.PayDate, and PayDate on wage type, collector, and payrun results
  • Client.Core — Webhook.Secret and Webhook.Signed (exchange schema secret, signed)
  • Client.Core — atomic command registration: CommandManager.RegisterAssemblies(assemblies, origin) registers all commands of an extension or none, CommandOrigin (core or extension), case-insensitive command names, ExtensionApiVersion 1.2 with IsExtensionApiSupported
  • Client.Scripting — IPayrollRuntime.PayDate, GetPayDate(), CycleDate, GetCyclePeriodStart(), CycleTimeUnit, PeriodTimeUnit, and TimeMap; IPayrunRuntime.GetConsolidatedPeriodStarts(); PayrollFunction.PayDate, PayDateYear, GetPayDate(), CycleDate, GetCyclePeriodRange(), CycleTimeUnit, PeriodTimeUnit, and TimeMap; PayrunFunction.GetConsolidatedPeriodStarts(); enums CalendarTimeUnit and CalendarTimeMap
  • Client.Scripting — CycleStartOffset, CycleEndOffset, FirstCyclePeriod, and LastCyclePeriod are based on the first period of the cycle according to the calendar cycle assignment
  • Client.Services — local script runtime calculates the pay date, the cycle date, the cycle periods, and the calendar time units from the payroll calendar
  • Client.Services — the API reference includes PayrollEngine.Lex
  • Client.Test — payrun preview test result carries the invocation pay date
  • Document — Excel export (ExcelMergeAsync) is based on ClosedXML (MIT); NPOI is no longer used. The public API exposes no Excel library types: the extension classes CellExtensions and WorkbookExtensions are removed
  • Core, Serilog — version alignment

Fixes

  • Client.Core — console error output failed with "The handle is invalid" on redirected output (CI, scripts), hiding the original error
  • Client.Core — FileReader read a YAML entry of a ZIP archive with the archive name instead of the entry content; JSON entries were not affected
  • Client.Scripting — PayrollFunction.PeriodsInCycle returned a wrong period count (the negative start offset was subtracted)
  • Client.Services — CalendarExtensions.IsWorkDay evaluated Tuesday against the Thursday work day setting
  • Client.Test — company case tests without employee failed with a NullReferenceException

Build

  • Third-party notices — Backend, WebApp, PayrollConsole and MCP Server ship THIRD-PARTY-NOTICES.md in the build output; third-party libraries updated

Tutorials

  • LexComplianceValues — new client tutorial for PayrollEngine.Lex: the life cycle of a lex manifest on a fictitious data satellite — validate, add a value with source quote, verify against the local evidence, attest manually, snapshot, check, apply to the regulation lookups, release check with report, and rollover to the next cycle. Runs offline without backend
  • WebhookConsumer — verifies signed webhook requests (X-PE-Timestamp, X-PE-Signature, max. request age) and signs the response of function requests (X-PE-Response-Signature); the secret is configured with Webhook:Secret, without secret the receiver works unsigned
  • PayrollConsoleExtension — new extension layout: own extension folder with extension.json manifest (Extension.cmd builds the folder and creates the manifest with ExtensionManifest); references only the shared contract assembly PayrollEngine.Client.Core

Tests

  • Backend unit tests — anchored weekly and bi-weekly periods (year change, before anchor, 53-week year), pay date offset, regulation date, and cycle assignment (job cycle, cycle period start, year-to-date periods with early and late payments)
  • PayDate.Test — payrun test for anchored bi-weekly periods, pay date offset and override, cycle assignment by pay date and by period end (cycle year, year to date, cycle periods, regulation selection across the year change), and retro jobs with the pay date of the original job
  • Webhook unit tests — dispatch, signature, response verification (Domain.Application.Tests)
  • Webhook.Test — receiver and runner for unsigned and signed webhooks (Tests/Webhook.Test, not part of Test.All)
  • Lex unit tests — text tables: fixed and tab-delimited lines, filters, implied decimals, ZIP archive entries, snapshot and verification, table check and apply with deterministic archives, file identity, rollover of archive references
  • Client.Core unit tests — new test project Client.Core.Tests: reading JSON and YAML entries of ZIP archives with FileReader
  • Test-DbProviders.ps1 — runs the platform tests and examples against SQL Server, MySQL, and PostgreSQL, for new databases and for the update from the previous release (devops/scripts)

Breaking changes — REST API and Scripting API changes are additive. The database schema update to 1.2.0 is required. Breaking are:

  • Payroll Console extensions require their own folder with an extension.json manifest (ExtensionManifest creates it)
  • WebhookAction.PayrunFunctionRequest and ReportFunctionRequest are removed; existing webhooks with these actions are deleted by the database update
  • The Document library removes the Excel extension classes CellExtensions and WorkbookExtensions; use IDocumentService.ExcelMergeAsync for Excel export

Docker Images (Linux)

App Version Pull Command
PayrollEngine.Backend 1.2.0 docker pull ghcr.io/payroll-engine/payrollengine.backend:1.2.0
PayrollEngine.PayrollConsole 1.2.0 docker pull ghcr.io/payroll-engine/payrollengine.payrollconsole:1.2.0
PayrollEngine.WebApp 1.2.0 docker pull ghcr.io/payroll-engine/payrollengine.webapp:1.2.0
PayrollEngine.Mcp.Server 1.2.0 docker pull ghcr.io/payroll-engine/payrollengine.mcp.server:1.2.0

📦 NuGet Packages

Package Line GitHub Packages NuGet.org
PayrollEngine.Core Platform 1.3.0 1.3.0
PayrollEngine.Serilog Platform 1.3.0 1.3.0
PayrollEngine.Document Platform 1.3.0 1.3.0
PayrollEngine.Client.Core Platform 1.3.0 1.3.0
PayrollEngine.Client.Scripting Platform 1.3.0 1.3.0
PayrollEngine.Client.Test Platform 1.3.0 1.3.0
PayrollEngine.Client.Services Platform 1.3.0 1.3.0
PayrollEngine.Lex Lex 1.3.1 1.3.1
PayrollEngine.Mcp.Core MCP 1.3.1 1.3.1
PayrollEngine.Mcp.Tools MCP 1.3.1 1.3.1

🐳 Docker Images (Linux)

App Version Pull Command
PayrollEngine.Backend 1.3.1 docker pull ghcr.io/payroll-engine/payrollengine.backend:1.3.1
PayrollEngine.PayrollConsole 1.3.1 docker pull ghcr.io/payroll-engine/payrollengine.payrollconsole:1.3.1