Commission and replay a feeder
Validate assignments, compare feeder inputs and trace a decision to its source.
Rehearse a handoff with the installed serviceπ
From a new directory, write the two synthetic exports embedded in the locally built service.
fmsd example baseline --out baseline.json
fmsd example corrected --out corrected.json
fmsd compare baseline.json corrected.json
Each writer prints the SHA-256 of the file it created. An existing destination is preserved. The corrected export changes both arrivals of the same premises reading from 25 to 21 kW. Compare returns 1 and identifies bay-1 at cycle-1, where the proposed limit changes from 6.065 kW to 4.2 kW. Exit 0 means the decisions and coverage agree. Exit 2 means the inputs are invalid or incomparable.
Set FMS_REVIEW_TOKEN in your environment. Open either file with fmsd serve --bundle baseline.json --expect-sha256 DIGEST, substituting the digest printed for that file. Search for bay-1, open its first limit and select Original evidence. Copy link includes that record, its evidence page, the evidence head and the exact export identity. Reopening the link requires access to the same desk address and replay.
If a colleague has loaded a corrected or extended replay, the desk identifies the mismatch. Restore the original input at that address and choose Recheck snapshot to reopen the record, or choose Open current incident register to begin a fresh investigation. Control-room notification links continue to track their incident in the current register. A copied link contains no search text, file path or sign-in credential.
Review a feeder logπ
fms sim cold-snap --out run
export FMS_REVIEW_TOKEN="$(openssl rand -hex 32)"
fmsd serve --log run/evidence.jsonl --feeder "North feeder"
Sign in as operator with the token as the password. For an independently recorded chain head, add --expect-head HASH. The daemon verifies the complete file before serving any data. Internal consistency alone cannot establish origin or detect a valid truncated prefix. The read view stays at the last recorded event until you restart with another snapshot. Times in the browser include the Berlin UTC offset.
Reproduce a decision from meter inputsπ
From the checkout root, replay the synthetic export, retain the JSON report and open the same inputs in the desk.
bundle=services/fmsd/fixtures/feeder-export.json
cargo run -p fmsd -- replay-input "$bundle" --evidence proposed.jsonl > run-report.json
export FMS_REVIEW_TOKEN="$(openssl rand -hex 32)"
cargo run -p fmsd -- serve --bundle "$bundle"
In Incidents, search for H1, open its power limit and expand Source readings. The 11 kW meter reading in row m-001 leads to a proposed 8.55 kW limit. The second copy of the reading counts once across both arrivals. Six minutes after measurement, the next tick raises a missing-observations incident. The engine models an unconfirmed retry. All dispatch records in this run are proposals.
For a repeat review, pass --expect-sha256 HEX to either command using the file digest retained independently at intake. The report pairs the exact input bytes with the executable digest, configuration revisions and output chain head. Reformatting the JSON changes the input digest. The same revision label with different configuration bytes also changes it. A matching digest establishes identity with the retained copy. The DSO supplies the export's origin and authorisation separately.
Review observation coverageπ
Expand Observation coverage above the incident register, including on a quiet replay. Each row represents one physical premises. Each evaluated decision tick contributes to exactly one column.
| Column | What the estimator used at that tick |
|---|---|
| Direct meter | A fresh, accepted measurement at the premises |
| Upstream estimate | An accepted upstream asset reading to constrain the premises estimate |
| Unobserved | The prior estimate alone |
The first unobserved tick gives its ordinal and timestamp. A single gap at two premises counts once in the feeder summary. Duplicate input rows count once. Inactive rule-set ticks are listed separately. These counts describe the explicit decision ticks in the export. The report's clock_gaps field identifies long intervals between ticks.
For the mixed-feeder fixture, H1 has two direct-meter ticks and one unobserved tick. Its two control targets share that one meter. Expand Source readings on a power limit to see the simultaneous 25 kW readings for premises H1 and grid asset T1. Both came from smgw-H1. Their original row IDs are m-001 and t-001. The CLI lists both under proposed_limits[].input_rows. At the last tick, open Rejected observation to inspect the later transformer spike in row t-spike. The incident shows its measured value and the reason for rejection. In the report, rejections[].source_row identifies the measurement and trigger_row identifies the arrival or tick that rejected it. To reproduce the desk view from the checkout, run:
cargo run -p fmsd -- replay-input crates/fms-adapters/fixtures/mixed-feeder.json | jq .coverage
An authenticated client can read the same object from GET /api/v1/replay/coverage or the read-only MCP tool get_replay_coverage. The input digest identifies the export. Output-only logs and the bundled incident demo contain insufficient input to compute coverage.
Feeder export v2π
Use the checked-in example as the starting point. Declare one feeder, topology revision, assignment revision, power unit (kW) and rule set (bk6-22-300/netzorientiert). Set nominal grid voltage in kV and line resistance in ohms. Each electrical connection maps to one node and declares its devices and control targets. A supplied market resource identifier must be unique. Supply up to 128 connections, 256 lines and 10,000 rows in an export of at most 8 MiB.
Each row carries a stable ID, the manifest feeder and an offset-qualified arrival timestamp. A measurement adds its source, measured timestamp and a connection or asset reading. The source, measured instant and typed target together identify one reading. One gateway can report several connections and grid assets at the same instant. A second row ID claiming the same source, instant and typed target makes the export ambiguous and the import fails. A tick runs one decision cycle at its arrival time. Keep rows in nondecreasing arrival order. File order breaks ties, so place a reading before the tick that should use it. The first arrival wins for an identical retransmission. Reusing an ID with different content rejects the export.
Include ticks during expected observation gaps and through the end of the review window. The report lists intervals between decision ticks longer than the five-minute freshness window, readings already stale on arrival, engine rejections and stale/restored transitions. Counts and gaps describe the supplied interval. The importer stops at its last row and the evidence file is created only for a valid run.
Commission direct and EMS targetsπ
From the checkout root, inspect the same feeder before and after a decision.
bundle=crates/fms-adapters/fixtures/mixed-feeder.json
cargo run -p fmsd -- commission "$bundle" --on 2026-01-15
cargo run -p fmsd -- replay-input "$bundle"
export FMS_REVIEW_TOKEN="$(openssl rand -hex 32)"
cargo run -p fmsd -- serve --bundle "$bundle"| Meter | Target | Devices | Protected floor |
|---|---|---|---|
| H1 | bay-1 Β· direct | One 11 kW wallbox | 4.20 kW |
| H1 | ems-1 Β· EMS | Two 7 kW wallboxes | 7.56 kW |
Search H1 in the desk to find both target histories. Open ems-1 to inspect the devices, calculation and source reading. Both proposals use the same household measurement. With aggregate metering, the allocator attributes only the demand that remains after allowing the sibling targets their full installed capacity. Acknowledgements correlate by target and message ID.
For commissioning alone, the export may omit rows. Replay requires at least one decision tick. The commissioning preview lists the date, effective membership, device evidence references, and the Annex 1 calculation for each target. A future eligible member can appear in the declared membership before it contributes to the floor. A valid preview exits with status zero. An invalid mapping produces JSON with status: "needs-review", a diagnostic and a nonzero exit code. Correct the inventory and rerun before reviewing any proposed order.
Participation and routingπ
Each device declares its operator, commissioning date and participation basis. Use a local reference to the DSO's source record in each evidence field. FMS checks the declarations and their dates. The commissioning engineer verifies the referenced records.
participation.basis | Required information |
|---|---|
standard | A qualifying new device commissioned from 1 January 2024 |
legacy | Pre-2024 commissioning, reduced_charge and evidence. An agreed early transfer adds transfer.on and transfer.evidence. A qualifying reduced-charge device transfers by 1 January 2029. Legacy night storage retains its separate regime. |
technical-exception | Both cannot_control_evidence and unreasonable_retrofit_evidence, with commissioning by 31 December 2026 |
special-rights / non-space-thermal | An evidence reference and a matching charging-point or thermal device category |
Declare each target's feeder-wide id, mode and members (device IDs local to the premises). Heat pumps and cooling equipment are grouped separately by operator before the 4.2 kW threshold and assignment checks. A direct target covers one legal unit. An EMS target can cover several. Every qualifying member, including one due to participate later, needs exactly one route. Keep permanently exempt and below-threshold devices in inventory without a route. A target may carry its assigned market resource (SR-ID). Replay uses local IDs. Check the SR-ID against the operatorβs assignment before dispatch. Annex 1 Β§Β§2.4, 4.4β4.5 and 10 Β· Bundesnetzagentur operator guidance
Compare a corrected feeder exportπ
From the repository root, simulate a quiet feeder and remove one meter observation. Use a temporary directory for both copies.
work=$(mktemp -d)
jq '.grid.transformer.rating = 200' crates/fms-adapters/fixtures/mixed-feeder.json > "$work/baseline.json"
jq '.rows |= map(select(.id != "m-001"))' "$work/baseline.json" > "$work/corrected.json"
cargo run -p fmsd -- compare "$work/baseline.json" "$work/corrected.json"
At cycle-1, H1 changes from measured to reconciled. The transformer observation still supports an estimate. Both runs have zero changed target actions. The command returns 1 for this difference. Comparing a file with itself returns 0. A different feeder, changed target membership or mismatched decision clock returns 2. Invalid input also returns 2 with a private inspection hint.
Add --json for a deterministic v1 report. Read same_input, same_evidence, and outcome separately. A reformat changes the input digest while preserving the decisions. Counts cover every aligned tick. The first difference includes all tied entities, both tick row IDs, and separate evidence sequence numbers and source rows for each available action.
Open each original in turn with fmsd serve --bundle FILE --expect-sha256 DIGEST using its own input_sha256 and the desk credentials. For a quiet tick, find its row in the retained input and inspect Observation coverage. For a proposed action, open the corresponding evidence record and its source readings. Both runs stay offline.