Repository navigation
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 commandsLexPack,LexInstall,LexPackagesandLexUninstall, and compares two package versions withLexDiff(see Payroll Console) - Server packages — the Payroll Console installs, lists, configures and removes server packages (
.mcppkg) with the new commandsMcpInstall,McpServers,McpConfigandMcpUninstall(see Payroll Console) - Extension packages — the Payroll Console installs and removes console extensions from a package (zip) with the new commands
ExtensionInstallandExtensionUninstall, 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
-1instead of0(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
logsof 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 statusForecast. 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
CompleteorForecast. Jobs of the forecast in other states, such asDraftorAbort, 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, thenId). 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, thenId - 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
completedJobStatusends in statusForecast; before it stayed inDraft, 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 inDraft - 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 —
GetRetroWageTypeResultsin 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
GETof a regulation case field binds the case field id of the route (.../cases/{caseId}/fields/{fieldId}); the action declared the id ascaseFieldId, so the id of the route was not bound. The OpenAPI document names the path parameterfieldId(integer) and no longer lists the query parametercaseFieldId(breaking change for clients generated from the 1.3.0 document: regenerate them; a query parametercaseFieldIdis ignored). The route is unchanged- The OpenAPI document
swagger.jsonis 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 routeactionsand the typeRetroTimeType - 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
404for 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 declarationlex-package.json(/dryrun,Output:,Evidence:,/schema). The declaration schema isPayrollEngine.LexPackage.schema.jsoninSchemas. All findings of a rejected declaration are listed; a package file is never overwrittenLexInstall— install a package from a file, a file mask with one match or anhttpsURL (/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 isRepairedand names the first difference. A download sends the token of the environment variablePAYROLL_ENGINE_PACKAGE_TOKEN, if set, as bearer token to the host of the URL only;httpURLs are rejectedLexPackages— list the installed packages and their state,/verifychecks every installed fileLexUninstall— remove a version or all versions of a packageLexDiff— 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 code0); a missing or invalid version or file and an unknown satellite are exit code6. The comparison is available to other tools asLexPackageDiffinPayrollEngine.Lex- Package store —
Store:argument, else the environment variablePAYROLL_ENGINE_PACKAGE_STORE, else<LocalApplicationData>/PayrollEngine/packagesof the user. Relative and network paths are rejected - Arguments — the package commands (
LexPack,LexInstall,LexPackages,LexUninstall,LexDiffand the fourMcpcommands) reject unknown switches, misspelled named arguments and surplus positional arguments with exit code5, before they read or write anything - Exit codes — the existing codes:
3download failed,5invalid arguments or store,6invalid package, rejected declaration, not installed or unknown satellite,-1unexpected error - File type —
Register-PecmdExtension.ps1(Windows) andregister-pecmd.sh(Linux, macOS) also register.lexpkg: opening a package runsLexInstall "<file>" /wait. Unregistering removes both file types. Run the script again to register.lexpkgon 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 anhttpsURL (/dryrun,Store:). The platform of the package must be the platform of the machine (exit code6otherwise); 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 (resultRepaired). Downloads follow the rules ofLexInstallMcpServers— list the installed packages with platform, profiles and state,/verifychecks every installed fileMcpConfig— check every file of the installed version, then write the entry for the configuration of an MCP client (Client:mcpServersorClient: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 configurationMcpUninstall— 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 runsMcpInstall "<file>" /wait. Registration adds no script to a package. Run the script again to register.mcppkgon 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 asAlreadyInstalled. A running console keeps the version it has loaded; its next start loads the installed versionExtensionUninstall— 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
extensionswhose name starts with a dot (staging and backup folders of the installation) - Exit codes —
5invalid arguments,6invalid package, another installed version without/overwriteor extension not installed,-1extension folder in use
Lex commands.
LexVerifySourcereads the new number formats ofPayrollEngine.Lex1.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;ProgramEndruns 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/logsor~/.local/share/PayrollEngine/Console/logs, on macOS~/Library/Application Support/PayrollEngine/Console/logs. The console no longer creates a folderlogsin the working directory. Rolling (daily, 7 files) is unchanged - Existing configuration — a file path set in the
Serilogsection ofappsettings.jsonapplies as before, with the same meaning (a relative path is relative to the working directory). Anappsettings.jsonof 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.InstallAsyncreturnsServerInstallResult(outcome, manifest, folder, expected outcome for a dry run, warnings), likeLexPackageStore.InstallAsyncreturnsLexInstallResult - 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;
LexPackrejects links as source; a manifest with two satellites of the same authority, regulation andvalidFromis rejected, andStoreLexSourcelists a second version with an already loaded manifest id as damaged;Uninstalldetermines the versions while it holds the store lock SnapshotLexInfo(new) — maps a snapshot to the answer model ofILexSource: a snapshot is a sealed state, so its state and the state of every entry areCurrentStoreLexSource(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 declarationlex-package.json; the Payroll Console ships it asPayrollEngine.LexPackage.schema.jsoninSchemas
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 centsis 0.91), case-sensitive, also when the unit starts the next line - Written dates with day, month name and year (
1 January 2026) asyyyymmddvalues (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, so12.00matches 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
Partialresult lists the year-weak numbers among its found numbers inSourceResult.Ambiguity, so a fixed missing number does not reveal a year finding only on the next run - Language files: new optional word arrays
scaleAbbreviationsandminorUnits, 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 abbreviationsk,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.Core1.3.1 — version change only; the public API is unchangedPayrollEngine.Mcp.Tools1.3.1 — version and reference change only (referencesPayrollEngine.Mcp.Core1.3.1 andPayrollEngine.Lex1.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
Regulatorworks 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.Serverstarts without a backend connection when only the Regulator role is granted; a startup error names the missing setting otherwise.get_server_inforeports 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.RemoveVerificationremoves the verification record of an entry and returns it;EntryUpdate.InvalidatesVerificationtells whether an update requires removing the verification record- Workspace read model:
ILexSourcewithWorkspaceLexSource(manifests below a root folder and repository mask) returns manifest and entry summaries with sources, review rule, matching exclusions and snapshot state;ManifestHashis the content hash oflex.json - Range lookups:
LexApplysets the range value of a new row in a range lookup (rangeModeother thanNone): a key in the formatyyyy-MM-ddyields the numberyyyyMMdd, any other key needs the new entry propertyrangeValue(PayrollEngine.Lex.schema.json), otherwise the apply stops withrangeValueMissingand writes nothing. Existing rows are never recomputed. The check reports range rows without range value asrangeValueMissing(finding in release mode, new last CSV column) Checker.CheckSourceshas the optional parametersvocabulary(folder of additional language files) andsources(local verification already computed by the caller). Binary breaking: assemblies built against 1.2.0 that callCheckSourcesmust 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
gitor 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 (nogit, or a folder outside a repository), in addition to the existing warningFetcher.FetchAsynchas a new overload with the parametertargetGuard(FetchAsync(client, url, lexDirectory, fileName, overwrite, targetGuard), all parameters required,targetGuardmay be null). The existing signatureFetchAsync(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.IsReservedFileNametests a name (case, trailing dots and spaces ignored);FetchAsyncrefuses a reserved explicit name before the request and a reserved name derived from the URL before writing, and, in the overload withtargetGuard, checks the full target path before anything is writtenFetcher: a reserved target is refused with the newReservedFileNameException, a subclass ofArgumentException(parameterfileName, propertyFileName, message unchanged), so callers no longer depend on the message text. A target in the.lexfolder that is a symbolic link resolving outside the real.lexfolder, to the manifest or the snapshot, or to no existing file, is neither read nor written, with or without overwrite (FetchTargetLinkException, anIOExceptionwith the propertiesFileNameandResolvedPath); links in the path of the.lexfolder itself are resolved first. Hard links are not detected
Payroll Console
- Lex commands use the library operations;
LexAttestwithReviewedByrecords the second review (four-eyes) of existing manual records; usage texts updated - The cycle determination of
LexRolloveris part of the library LexFetchrefuses the manifest and the snapshot as target file name (exit code6, nothing is written)LexAttest:VerifiedBydefaults to the environment variablePAYROLL_ENGINE_LEX_USER; an explicit value wins, the default is never used for a review, and the output names the origin of the personLexApplyandLexChecksupport the range value of new range lookup rows (rangeValue, findingrangeValueMissing); the dry run ofLexApplyshows the range value per changeLexCheck /releasereads additional language files fromPAYROLL_ENGINE_LEX_VOCABULARY, asLexVerifySourcedoes
MCP
PayrollEngine.Mcp.Core: roleRegulator, tool base without backend client (public API of existing tools unchanged), workspace context with startup validation (McpServer:Regulator:Roots,RepoMask,AgentIdentities,Backend=None(default) orRead; any otherBackendvalue stops the start)PayrollEngine.Mcp.Server: the backend connection is required only for a backend role (HR,Payroll,Report,System) orRegulator:Backend=Read;Permissions:Regulatorother thanNonerequires at least one workspace root; a failed start exits with code1. The README documents the Regulator profile, also as container with the workspace mounted as volumePayrollEngine.Mcp.Core: extensible role model — a server defines own roles withMcpRoleDefinition(name, applicable isolation levels, backend requirement); tool classes reference them with[ToolRole("<Name>")];McpPermissions.FromConfiguration(configuration, roles)readsMcpServer:Permissions:<Name>(defaultNone);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 registeredget_server_inforeports the permissions of the roles defined by the server (customRoles, empty without own roles)- Behavior change — startup errors instead of silent fallbacks: an
McpServer:IsolationLevelthat is notMultiTenant,Tenant,DivisionorEmployee, and a value underMcpServer:Permissionsthat is notNone,ReadorWrite, now stop the server at startup with a message that names the setting, the value and the allowed values. Before, a misspelled isolation level selectedMultiTenantand a misspelled permission selectedNonewithout a message. A missing or empty setting behaves as before (MultiTenant;Nonefor a key missing in an existingPermissionssection; defaults for a missing section). Check the configuration of existing deployments before updating McpPermissions.FromConfigurationthrowsInvalidOperationExceptionfor an unknown permission text; the documentation ofIsolationContext.Permissionsnames the actual defaults (Readfor the backend roles,NoneforRegulator)PayrollEngine.Mcp.Tools: tool groupRegulatorToolswithlex_list_manifests,lex_get_entry,lex_check,lex_verify_snapshot,lex_verify_source,lex_validate; filtersonlyProblems,summaryOnly,countsOnly, asizeWarningfor results above 32,000 characters and progress notifications;THIRD-PARTY-NOTICES.mdaddedPayrollEngine.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:IsolationLevelor permission value instead of falling back silently (see MCP) PayrollEngine.Lex:Checker.CheckSourcesgains 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.Lexand nine Payroll Console commands trace every statutory value of a data regulation to its official source: alex.jsonmanifest 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
CycleAssignmentselects 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) orPeriodEnd(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
PeriodAnchorDateproduces 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.jsonmanifest (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) andPayDateOffset(pay date = period end + offset days) - Payrun job pay date —
PayrunJobInvocation.PayDate(optional override) andPayrunJob.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 —
PayDateon wage type results, wage type custom results, collector results, collector custom results, and payrun results, including consolidated result queries - Scripting —
PayDate,PayDateYear, andGetPayDate(periodMoment)in all payroll functions - Calendar cycle assignment —
Calendar.CycleAssignment(PayDate,PeriodEnd; defaultPayDate). WithPayDate, 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). WithPeriodEnd, the cycle and the regulation date are taken from the period end - Scripting calendar —
CycleTimeUnit,PeriodTimeUnitandTimeMapin all payroll functions; theCalendarTimeUnitvalue is the number of periods per year (e.g.Week52,BiWeek26,SemiMonth24,CalendarMonth12);TimeMaplets a regulation guard reject a calendar whoseCycletime 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
PeriodAnchorDateand theCycleAssignmentof a calendar cannot be changed once payrun jobs exist for the calendar (division or employee calendar); the update is rejected with400 Bad Request - Signed webhooks —
Webhook.Secret(write-only; on update omitted keeps, empty removes, a value replaces) and read-onlyWebhook.Signed. Request signaturev1=+ 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 containsigned, 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:DataProtectionKeyPathsets 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; defaultNotification) 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 withAll - 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
PayrunFunctionRequestandReportFunctionRequestare removed; script webhook calls always useCaseFunctionRequest. 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 —
GetLookupRangesdid not apply the regulation namespace (unlikeGetLookupandGetRangeLookup), so range lookups of namespaced regulations returned no brackets. Names that already carry the namespace are unchanged - Webhook message response —
ResponseDate,ResponseStatusandResponseMessageof 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 asNULL
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, andPayDateinWageTypeResult,WageTypeCustomResult,CollectorResult,CollectorCustomResult, andPayrunResult - New column
Webhook.Secret(encrypted secret, nullable) - Webhooks with the removed actions
PayrunFunctionRequest(20) andReportFunctionRequest(30) are deleted - PostgreSQL result functions return
PayDateas 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
Signedcolumn - 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 -vremoves it together with the database (seeDOCKER.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.jsonupdated) - 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.lexfolder and declare it as evidenceLexAdd— add a value with source URLs, location, legal reference and evidence documentLexVerifySource— 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,sourceQuoteanchors a value to a text passage,/writelocationsand/refreshlocationswrite source locations andautoverification records,/strictreturns exit code6LexAttest— manual verification by a person against an evidence document, and the four-eyes review of sources withFourEyesruleLexSnapshot— freeze values and evidence insnapshot.json(file hashes, value hash, text hash of every readable source URL);/overwriteregenerates, existing local copies are kept, build output is ignoredLexVerify— confirm that the snapshot is intact and currentLexApply— write the lex values into the lookup values of the regulation; open entries are skippedLexCheck— 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/RepoMaskfor many repositories;/releaseis 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 entryLexRollover— 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 theLexVocabularyfolder, further languages withLexVerifySource Vocabulary:<folder>or the environment variablePAYROLL_ENGINE_LEX_VOCABULARY - Lex text tables — a lex entry with
contentFileandcontentMaptakes a complete tariff table from the authority text file (fixed columns or tab-delimited);archive.zip!entry.txtreads a file of a ZIP archive in place. The map selects the columns and filters the record types:LexApplyreplaces 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 -> newwith the hint to update the install files, the project file and the setup script; the summary counts the tablesLexCheckcompares the table row by row (table <lookup> +added, -removed, ~changed)LexVerifySourceverifies a text table by file identity (the archive is declared with its source URLs and present in the.lexfolder), reported asfile identity <n>; no numbers are looked upLexSnapshothashes the table and its map;LexRolloverrenames 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 acceptsfilters(line filters by column text, e.g. record types) and is validated before the import - Extensions (breaking change) — assemblies placed directly into the
extensionsfolder are no longer loaded. Each extension requires the folderextensions/<Name>/with anextension.jsonmanifest (name, version, required console version, assemblies, SHA-256 file hashes). One load context per extension;PayrollEngine.Client.Core,PayrollEngine.CoreandPayrollEngine.Lexare 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 —
Extensionslists the loaded extensions with status and commands;ExtensionManifestcreates or updates the manifest with the hashes of all files;Helpshows 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,.xlsbvia 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 theLexVocabularycontent folder; further languages from a folder given by the caller, selected per manifest withlanguages - Exclusion kinds
coverage,orphan,sourceLocation,autoVerification,derived,notApplicable; entry propertiessourceUrls,sourceQuote,referenceYear,open; source propertiesreview(SingleAuthor,FourEyes) andofficial - Text tables:
TextTableandTextTableMap(fixed columns and tab-delimited, line filters, implied decimals),ContentSourcefor files and ZIP archive entries, entry propertycontentMap, target kindTable;RegulationReaderreads the JSON entries ofRegulation/*.zip, the applier writes deterministic lookup archives (ApplyResult.ReplacedFiles),ManifestVerifier.FileIdentityVerification
- Source readers detect the format from the content: HTML, text, CSV, PDF via PdfPig (Apache-2.0), spreadsheets
Features
- Core —
CalendarCycleAssignmentenum;WebhookAction.PayrunFunctionRequestandReportFunctionRequestremoved (breaking change) - Client.Core —
Calendar.PeriodAnchorDate,Calendar.PayDateOffset,Calendar.CycleAssignment,PayrunJobInvocation.PayDate,PayrunJob.PayDate, andPayDateon wage type, collector, and payrun results - Client.Core —
Webhook.SecretandWebhook.Signed(exchange schemasecret,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,ExtensionApiVersion1.2 withIsExtensionApiSupported - Client.Scripting —
IPayrollRuntime.PayDate,GetPayDate(),CycleDate,GetCyclePeriodStart(),CycleTimeUnit,PeriodTimeUnit, andTimeMap;IPayrunRuntime.GetConsolidatedPeriodStarts();PayrollFunction.PayDate,PayDateYear,GetPayDate(),CycleDate,GetCyclePeriodRange(),CycleTimeUnit,PeriodTimeUnit, andTimeMap;PayrunFunction.GetConsolidatedPeriodStarts(); enumsCalendarTimeUnitandCalendarTimeMap - Client.Scripting —
CycleStartOffset,CycleEndOffset,FirstCyclePeriod, andLastCyclePeriodare 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 classesCellExtensionsandWorkbookExtensionsare 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 —
FileReaderread a YAML entry of a ZIP archive with the archive name instead of the entry content; JSON entries were not affected - Client.Scripting —
PayrollFunction.PeriodsInCyclereturned a wrong period count (the negative start offset was subtracted) - Client.Services —
CalendarExtensions.IsWorkDayevaluated 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.mdin 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 withWebhook:Secret, without secret the receiver works unsigned - PayrollConsoleExtension — new extension layout: own extension folder with
extension.jsonmanifest (Extension.cmdbuilds the folder and creates the manifest withExtensionManifest); references only the shared contract assemblyPayrollEngine.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 ofTest.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 withFileReader - 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.jsonmanifest (ExtensionManifestcreates it) WebhookAction.PayrunFunctionRequestandReportFunctionRequestare removed; existing webhooks with these actions are deleted by the database update- The Document library removes the Excel extension classes
CellExtensionsandWorkbookExtensions; useIDocumentService.ExcelMergeAsyncfor 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 |