Skip to content

0.2.0

Reference. What this release does, what it does not, and what is simulated.

Released: 2026-09-17, on PyPI the same day. Previous: 0.1.2, 2026-09-08.


What 0.2.0 is

Thirty pull requests, #8 to #37. Three things happened between 0.1.2 and here.

The ERP connector stopped being a claim. A real ERPNext v15.120.0 now stands up in containers in CI, pinned by digest, and the whole round trip is asserted against ERPNext's own documents: a Work Order submitted there, pulled, acknowledged, confirmed, then read back. Three things that had never been measured now are — what a missing custom field does (Frappe answers 200 and drops the value, so every write is read back now), what ERPNext does with an over-run (inside its allowance it books everything; beyond it it refuses the entry whole with HTTP 417 and books nothing, and the connector marks that dead at once with ERPNext's own sentence rather than retrying for an hour), and which custom fields the connector needs at all (five, on Work Order, created by fsmes erp setup and checked by fsmes erp check). What the ERPNext connector learned was then promoted into the port itself — requirements(), setup(), check() — with a conformance suite of eight obligations that ships inside the package, so the next ERP is not the first one all over again.

Everything a first plant needs to run beside the MES already in charge. MES_SHADOW=true is one setting that closes every outbound path: no setpoint reaches a machine, no live ERP is contacted, nothing is published to a broker, the file adapter reads its inbox and moves nothing. Every outbound path in the package is listed in one place with what shadow mode does to it, a test walks each closed path, and a second test reads the source so a new path cannot be added without the register hearing about it. Around that: inbound events from whatever system the plant already has — by file, by read-only SQL query, or over MQTT — each carrying who supplied it and when they recorded it; the confirmation handoff published as a JSON Schema with six worked example files and fsmes erp validate; the shadow scorecard, which puts the incumbent's export beside this MES's confirmations and names every difference without ever saying which side is right; fsmes backup and fsmes restore; and one front-door page for the engineer standing it up.

A plant is a pack, and a fleet has a console. One directory — plant.toml and the files it names — is the whole answer to which plant is this?: identity, clock, profile, which modules it serves, what it calls things, its tag map, its master data. fsmes pack check refuses a bad one offline, with every problem rather than the first. A plant now knows its own name and keeps its own clock, so shifts and "today" are drawn on the plant floor's time rather than the server's. MES_MODULES makes decision 0002 a mechanism instead of a sentence: nine of the twenty-three modules are the kernel, fourteen can be switched off, and off means the routes answer 404 and the screens are gone. fsmes fleet manages the plants this installation owns and refuses every other one, and fsmes fleet console is a page that observes and has no write path at all — four tests parse its source to keep it that way.

The full record is CHANGELOG 0.2.0.

What 0.2.0 does not do

  • It has not run a real plant. Not one. Every number in this repository comes from a simulated line, and says so where it appears. The point of shadow mode is to make a first real plant possible; nobody has done it.
  • No SAP, Odoo, Oracle or NetSuite connector exists. The port, the conformance suite and a published confirmation schema exist. The confirmations are SAP-shaped and no SAP has consumed one.
  • No MQTT broker has been on the other end. fsmes uns publish and fsmes inbound subscribe are both built and both driven by a fake transport in the suite. Node-RED, United Manufacturing Hub and Grafana are untested for the same reason.
  • ERPNext Job Card confirmations are not built. Order-level round trip is proven; whether Job Card is even the right place is a question put to the ERPNext community and not yet answered.
  • The upgrade gate proves one plant's shape. It installs the previous release from PyPI, makes a database, upgrades it with the wheel under test and asks whether it is at head — on SQLite, with the demo plant's schema. Not yours. Take the backup. See upgrading.
  • PLC write-back is still a guarded recommendation queue, not a control loop, and that is deliberate.
  • The fleet console cannot start a plant on its own. There is no reconciler, and the console has no write path; the write verbs are in fsmes fleet, a local command, gated on ownership.

What is simulated

Everything that produces a number. The plant behind every screenshot, scored run and CI check is a deterministic line simulator in src/fsmes/sim/, replayed over a real OPC UA server. The largest is an 83-station cutlery works that serialises every piece, and it is the public demo. Three lab packs run from one wheel — two that disagree about the line, and a third invented to disagree with the pack format itself and to serve two modules fewer.

The ERPNext in CI is real software in a container, not a simulation, but it is a clean instance seeded by the job — not anybody's books.

Compatibility is the claims table: every row carries the date it was last checked and what was run on that date, and rows nothing has ever run against say never.

Upgrading from 0.1.2

fsmes backup --out /mnt/nas/fsmes
# stop the agent and the API
pip install --upgrade factorysemantics-mes
fsmes db-status
fsmes init-db
fsmes db-status
# start them again

Five migrations, all additive. If you run plants from a plants.toml registry, it is fleet.toml and a pack per plant now, and fsmes pack migrate writes the packs. The full procedure, including the six changes that alter what something already deployed will see, is upgrading between versions.

Thanks

Every one of the thirty pull requests in this release was opened by the maintainer. There are no outside contributors to thank yet — the repository went public on 2026-09-08 and this is its second release. If you are reading this and you run a plant, Discussions is the front door.