NeuralBridge · Industrial Autonomous Assurance: evidence that a machine's safety software still matches what was verified

The watch

Everything else here is invoked by somebody who already suspects something. This is the component that finds a change on the day it happened rather than the day somebody remembered to look — and it is what makes €1,290/month a subscription rather than a tool licence.

Hash-chained ledger anatomy above three distinct assurance watch exit codes: 0 quiet, 1 findings, 2 could not see.
Immutable ledger anatomy and assurance watch contract: EXIT 2 (could not look) never shares a code with EXIT 0 (nothing moved).assurance watch (exit 0/1/2)

NeuralBridge hash-chained ledger records manifests, interventions, ISO/TS 15066 verifications, cases, and counter-signed heads. assurance watch enforces EXIT 0 quiet, EXIT 1 findings, EXIT 2 could-not-see with checks_skipped, never collapsing 'could not look' into clean.

assurance watch run watch.json --ledger register.db
assurance watch status watch.json --ledger register.db
0 6 * * 1  assurance watch run watch.json --ledger register.db || mail -s "fleet" ...

Exit codes are the interface. 0 quiet, 1 something changed since the last pass, 2 the watch could not see part of the fleet. "I could not look" and "nothing moved" must never share an exit code.

A folder of exports is not a look at the machine. A watch reads the export folder each target names, and a folder cannot show which machine it came off. So a target is supplied_by_vendor (tier ceiling community) unless its entry in the watch configuration says, as the JSON value true (nothing else counts), that the watch runs on the machine itself:

{"serial": "0412", "plan": "plan.json", "root": "exports/0412", "read_from_machine": true}

That is the operator's assertion, recorded in every manifest the run seals; the software cannot check it. Without it an unchanged hash is reported as [EXP ] ... this is an export folder, not a look at the machine, the run is degraded (exit 2), never quiet, and watch push of the same ledger is refused by the hosted ingest for the same reason (manifest_not_a_look_at_the_machine): the local verdict and the hosted one use one rule (machinery.manifest.not_a_look). A changed hash is still a finding (exit 1) either way.

Four judgements that decide whether anybody reads it

Seal only on change — but record every look. A weekly watch over forty machines that sealed forty identical manifests would add two thousand records a year saying nothing, and the real changes would drown. But a ledger with no record cannot tell "we looked and it was the same" from "we never looked", and those are opposite facts. So every run seals one lightweight observation naming what was seen, and a full manifest only when the configuration moved.

New is not the same as outstanding. A watch that reports the same stale function every week trains its reader to skim. Each run diffs against the last:

  [DRIFT] 0501  configuration moved 849a1dd1a879 → e3881c29e874: ITM-ZONES content_changed
           still uncovered (reported before): SF-01, SF-02
  [ok   ] 0412  unchanged at 492476c2676e

NEWLY UNCOVERED leads. still uncovered (reported before) is demoted. A function that came back is reported as recovered.

A machine that could not be collected is not unchanged. A missing export folder is an absence of observation, not an observation of absence:

  [BLIND] 0501  could not be collected: ...
           ! an absent export is not an unchanged machine.

Silence expires. A watch that stopped running looks exactly like a fleet that stopped changing, and the second is the comfortable reading. max_age_hours declares the cadence, and any machine whose last successful look is older becomes a finding in itself:

  NOT LOOKED AT RECENTLY ENOUGH: 0501
  A watch that stopped running looks exactly like a fleet that stopped changing.

A real three weeks

=== week 1 — first look ===
  [NEW  ] 0412  first observation; configuration 492476c2676e, 4 item(s)
           NEWLY UNCOVERED: SF-01, SF-02

=== week 2 — only the export headers moved ===
WATCH-PLANT2 — QUIET — every machine was looked at and nothing moved
  [ok   ] 0412  unchanged at 492476c2676e
  [ok   ] 0501  unchanged at 849a1dd1a879

=== week 3 — somebody reshaped 0501's protective zone ===
  [DRIFT] 0501  ITM-ZONES content_changed   affects SF-01
  [ok   ] 0412  unchanged at 492476c2676e

Week 2's export headers moved on both machines — new timestamp, new operator, new sequence number, on four items each. Zero reported. That is the assurance.collect normalisation doing its job, and it is why week 3 gets read.

The configuration

{
  "watch_id": "WATCH-PLANT2",
  "max_age_hours": 168,
  "targets": [
    {"serial": "0412", "plan": "plan.json", "root": "exports/0412",
     "site": "Plant 2, Line 4", "country": "DE"}
  ]
}

Plan and root are resolved relative to the config file, because a watch outlives whatever directory it was first run from. A target missing a serial, plan or root is refused rather than skipped — a silently skipped target reads exactly like a machine that never changes.

country is flagged on every machine that lacks it, because a unit with no territory recorded cannot be named in a CRA Article 14 filing's Member State list, and 03:00 on the day the clock starts is not when to find that out.

What it will not tell you

A machine not listed in the configuration is not watched, and its silence means nothing. The configuration is compared against the last manifest sealed for that machine, so a change made and reverted between two runs leaves no trace. And the watch reports that verification evidence is in doubt after a safety-relevant drift — it cannot re-run the verification, and it says so.


Watching the suppliers, not just the machines

The machine watch answers "did anything on my floor change". Add feeds to the configuration and it answers the other half — did the world change underneath machines that did not — which is the half that wakes somebody up.

A supplier publishes a signed advisory at 09:00. Nothing on the plant floor moved. Every manifest still matches. The machine watch reports QUIET, correctly, and the integrator learns about it when their insurer asks.

{
  "watch_id": "plant-1",
  "targets": [ ... ],
  "feeds": [
    {
      "supplier_id": "controlco",
      "feed": "feeds/controlco.jsonl",
      "public_key": "keys/controlco.pub",
      "notes": "fingerprint confirmed against the 2025 supply contract"
    }
  ]
}

The key is a separate file on purpose. A feed that carries its own key authenticates nothing — the forged feed will carry one too. It has to be a file the operator put there, obtained from the supplier by a route the advisories do not travel on. See SUPPLIER.md.

What one run looks like when it matters

plant-1 — FINDINGS — something changed since the last run
  [ok   ] CELL-0412  unchanged at e0045e0e1110
  [ok   ] CELL-0501  unchanged at 6ec7ca52368e

  suppliers: 1 STOP-USE advisory(ies) match this fleet; 1 new

  ** STOP USE ** CTRL-2026-11 (controlco) — Authentication bypass in safety controller firmware
       machines: Grimaldi/AR-7#CELL-0412, Grimaldi/AR-7#CELL-0501
       remedy:   Update to 3.9.1.
       source:   https://controlco.example/psirt/CTRL-2026-11

Both machines are unchanged. That is the point.

Four judgements, and each is a way this is normally built wrong

New is not the same as outstanding. Run it again and the same advisory does not reappear as new — but it has not been forgotten either; it is carried as outstanding until the fleet stops matching it or the supplier withdraws it. A watch that re-reports everything trains the reader to skim by the third Monday, at which point it has become an expensive way to generate silence.

A feed that cannot be checked is DEGRADED, never quiet.

  suppliers: 1 feed(s) could not be checked
    !! controlco: absent — feeds/controlco.jsonl does not exist. The watch is
       blind to this supplier; that is not the same as this supplier having
       nothing to say.

Exit 2, not 0. This is where a signed-advisory mechanism most easily turns into decoration: the fetch fails, verification is skipped, the run reports quiet, and the absence of alarms is read as the absence of danger. A feed that fails signature verification is treated the same way, and nothing in it is acted on — an advisory that cannot be authenticated must not drive a change to a safety system.

A withdrawal is a finding.

    WITHDRAWN  CTRL-2026-11     Authentication bypass in safety controller firm
               reason: 3.9.0 is not affected; the range was wrong
               You were told about this one. If somebody changed a machine
               because of it, that change now rests on a retracted advisory.

Announced exactly once, and only to a fleet that was actually told about the original — an advisory published and retracted between two runs is not mentioned, because nothing here was acted on. Nothing else in this industry tells an integrator that the bulletin they acted on in March has been retracted.

Stop-use is said first and alone. An advisory the supplier marked stop_use against a machine that matched is not one line among forty.

Order of operations

The advisory pass runs after the machine pass, against the manifests this run has just sealed. Asking first would report yesterday's fleet against today's advisories, which is the one combination guaranteed to be wrong.

What it does not establish

Carried in checks_skipped on every run:

  • That the key belongs to the supplier. Confirm the fingerprint by the route in SUPPLIER.md — not by a link in an advisory.
  • That the advisories are correct, complete or timely. A supplier who has not noticed a vulnerability publishes nothing, and no amount of signing detects silence.
  • That the feed on disk is current. This watch learns of an advisory when the subscribed file changes. Whatever puts the supplier's feed there must fail loudly, never silently stop and look like a supplier with nothing to report. For a feed hosted at GET /v1/supplier/feed/{account_id}, assurance supplier fetch <url> --out <path> --public-key <key> is that thing: it refuses to write a feed that does not verify (leaving the previous good copy in place), and a network failure or a bad HTTP status exits non-zero rather than being read as an empty feed. Run it on a cron ahead of watch run, or wire it into whatever schedules this watch.

Public intelligence as an advisory source (intel)

Besides signed supplier feeds, a watch can read a local intel store (the SQLite file assurance intel ingest|refresh writes: CISA KEV, NVD, FIRST EPSS, CSAF). The watch only reads it, from disk, offline. It never fetches and never refreshes; watch modules import no network client. Refreshing stays the separate, opt-in intel refresh --live verb, so the pipeline is two steps:

# cron / scheduler, in this order
assurance intel refresh --source kev  --store intel.db --live            # the only networked step
assurance intel refresh --source nvd  --store intel.db --live --cve CVE-2026-0001
assurance intel refresh --source epss --store intel.db --live --cve CVE-2026-0001
assurance watch run watch.json --ledger evidence.db                      # offline

(assurance intel ingest --kev FILE ... records files you already have, with no network.) Configuration, next to feeds:

"intel": [
  { "kind": "intel_store", "store": "intel/intel.db",
    "sources": ["nvd", "csaf", "kev", "epss"], "supplier_id": "public-intel" }
]

sources names what to read; at least one of nvd or csaf is required, as KEV and EPSS carry no versions and only add context. The store path is relative to the config.

What a candidate from this source is, and is not:

  • Not a supplier statement. trust_basis is none, trust_state unauthenticated_public_source. Every finding is inspect-only, the same machinery as an unsigned CSAF import: it lists the machines the existing impact logic matched (inspect_machines) but machines stays empty, so no stop-use is raised and no Art. 14 intake is drafted, and the watch opens no case. A new or changed finding still makes the run exit 1: a person has something to read. A case is opened by a named person through assess_advisory (for a CSAF candidate additionally with the unsigned-import override and a reason), and the case records that the advisory was unauthenticated. Software drafts; people decide.
  • Matching is the existing impact logic. No version arithmetic is added. An NVD record gives an affected component only for a CPE entry naming one exact version, and it matches a manifest only if the manifest uses the same supplier/name/version strings; a bounded range is kept as text and is not matched. A run with no match says so, and also lists what that does not establish.
  • Enrichment is context. KEV, EPSS, NVD/CVSS and NVD-vs-CSAF conflicts are attached to the finding (intel.enrichment) with citations and never change a match or verdict. KEV not listed is not "not exploited"; EPSS with no score is unavailable, never 0; no KEV catalogue recorded is unchecked.
  • Seen and changed. The advisory's content hash is remembered per run. The same recorded content is outstanding and not announced again; changed content is updated and announced once.
  • Never quiet by accident. A store that is missing, an empty file, holds no observations, is not an intel store, whose latest observation of a series was rejected, that has no observation of a source the watch was told to read, or whose payloads cannot be re-read, makes the run DEGRADED (exit 2) with the reason in the feed outcome (absent, empty, unreadable, rejected_latest, incomplete, stale). Older accepted data in the store is still assessed. A fleet with no machines yields not_assessed, also degraded.

What it does not establish: that the public record is correct, complete or current, or that a machine is unaffected because nothing matched. Whether the store is current is the next check.

Staleness: max_age_hours (always checked, 72 h unless you say otherwise)

A refresh job that silently stopped looks exactly like a quiet week, so the age of an advisory source is always judged. A subscription may state its own limit; with none, the conservative default of 72 hours (watch.config.DEFAULT_SOURCE_MAX_AGE_HOURS) applies:

{ "kind": "intel_store", "store": "intel/intel.db", "max_age_hours": 26 }

max_age_hours is optional and, when given, must be a positive number of hours (at most a year). There is no way to switch the check off: a longer tolerance is written down as a number, becomes part of the watch file's hash, and every run records age: {checked, limit_hours, limit_basis} on the feed outcome, where limit_basis is explicit (the file states it) or default. For each selected source (nvd, csaf, kev, epss) the watch takes its newest accepted observation and computes run clock - recorded retrieved_at. The feed's own stamp (a KEV catalogue date, an NVD lastModified, an EPSS date) is never the clock: it says when the publisher wrote something, not when this store last succeeded. A rejected observation does not count as a refresh.

  • Older than the limit, or no accepted observation of a selected source at all: the feed outcome is stale and the run is DEGRADED (exit 2). The problem names the source, its last accepted retrieval time and the limit. A retrieval time after the run's clock cannot establish an age and is treated the same way. Older data is still assessed and the findings still appear.
  • A rejected latest observation keeps its own status, rejected_latest; the staleness lines are added to its problems when they also apply.
  • Absent: the 72 h default applies and the run's not checked list says so ("the conservative default"). A source with no observation at all keeps the status word incomplete under the default limit (it is degraded either way); any observed-but-old source is stale. A fresh retrieval means the store was refreshed, not that the source had nothing newer to publish.

Set it a little above your refresh interval (a daily job: 26-30).

Migration / compatibility. Before this change a subscription without max_age_hours was not age-checked, and an old store read as a quiet week with only a caveat. Existing watch files are unchanged byte for byte and keep their content_hash (the field is written only when stated), so a stored run is not flagged as made under another configuration; but a store or feed that is older than 72 h now makes the run degraded (exit 2) where it used to say quiet. To keep a longer tolerance, state it: "max_age_hours": 168. Hosted GET /v1/intel/* responses carry the same judgement as store_freshness.

Staleness of a signed supplier feed file

A feeds subscription takes the same optional max_age_hours (default 72 h):

{ "supplier_id": "controlco", "feed": "feeds/controlco.jsonl",
  "public_key": "keys/controlco.pub", "max_age_hours": 48 }

A feed file carries no receipt time, and the age of its newest advisory says how long the supplier has been quiet, not when this machine last synced. The age is therefore the file's modification time on this machine, against the run's clock. A feed older than its limit has the status stale and the run is DEGRADED (exit 2); the advisories it holds are still assessed and labelled. The outcome records age: {checked, basis: feed_file_modified_time, modified_at, age_hours, limit_hours, limit_basis, state}. watch status re-judges every feed file against the clock (feed_staleness in --json) and exits 2 if one is stale, so a sync that stopped after the last run is found at status time. Limit of the check: copying an old file refreshes its modification time, which this cannot see.

Setting the clock: --now

To see what a watch would say at a later (or earlier) moment without waiting, watch run and watch status take --now YYYY-MM-DDTHH:MM:SSZ:

# would this watch be degraded by staleness 30 hours from the last refresh?
assurance watch run watch.json --ledger evidence.db --dry-run --now 2026-11-02T18:00:00Z
assurance watch status watch.json --ledger evidence.db --now 2026-11-02T18:00:00Z
  • The clock for assessment only: staleness and age checks, and the run record's assessed-at (started_at / finished_at). The limit is exclusive at the edge: with max_age_hours: 24, 24h00m old is not stale, 24h01m is.
  • watch run --now is refused (exit 2) unless --dry-run is also given. A run that seals records must use the real clock; otherwise a caller could write history that never happened. The refusal happens before the ledger is opened, so nothing is written. watch status only reads, so it accepts --now on its own.
  • A malformed value is refused (exit 2): it must be a full UTC instant ending in Z (no date alone, no zone offset, no guessed zone).
  • watch open-case has no --now. It writes a case, so its record cannot be given a forged clock; it uses the real one for the warning below.

watch status: how old is each source

When the config has an intel subscription, status also prints, per selected source, the retrieval time and age of its newest accepted observation, the limit, and fresh / STALE / NEVER OBSERVED (computed by the same function the run uses, so the two cannot disagree). The limit is shown with its basis (explicit or default); age is never reported as not checked. A missing, empty or unreadable store prints the run's own wording (does not exist ... blind to this source). --json adds an intel_staleness object.

Exit codes are unchanged (0 quiet, 1 findings, 2 degraded or never run), with one addition that applies only when an intel subscription exists: status exits 2 when any selected source is stale, never observed, unreadable, or its store cannot be read.

From a finding to a case: watch open-case

The hosted twin is POST /v1/change/assess/advisory/intel (Cell tier, {advisory_id, actor, role, accept_unsigned?, reason?, sources?}): it reads the operator's ASSURANCE_INTEL_STORE read-only (503 when unconfigured or unreadable), re-derives the candidate for the caller's fleet with the same functions as this command, and applies the same rules below. A CSAF-derived candidate additionally needs an operator key with the decider role over HTTP. It is not an MCP tool. See CHANGE.md.

The pipeline has three steps and only the first is networked:

assurance intel refresh --source nvd --store intel.db --live --cve CVE-2026-0001   # fetch (opt-in)
assurance watch run watch.json --ledger evidence.db                                 # offline; reports
assurance watch open-case --config watch.json --ledger evidence.db \
    --advisory-id nvd:CVE-2026-0001 --actor "Dana Reviewer" --role "safety engineer"

open-case is a named person's act. It re-derives the finding from the local store with the same function the watch uses (no matching is duplicated), and opens the case in --ledger through assess_advisory. Reading the store is offline; nothing is fetched.

  • Refused (exit 1, reason on stderr, nothing written): an empty name or one automation goes by (automation, watch, system, ...); an empty role, or a role containing = or ;; an advisory id that is not a current finding (not in the store's selected sources, an unusable store, or matching no machine in the ledger's fleet); a case that already exists and is closed, rejected or deferred (reopening is a person's decision through change).

  • CSAF-derived candidates are unsigned imports: --accept-unsigned and a non-empty --reason (what you checked, against what) are both required, as for change assess-advisory. NVD candidates need neither; the case is still marked unauthenticated.

  • Idempotent. Re-running returns the same case id and writes nothing new. A second person re-running does not re-attribute who accepted it.

  • Prints the case id, the trust state (unauthenticated_public_source; the case provenance records it with the person who opened it), what is not established (the advisory is not shown genuine; matches are on recorded labels; an unmatched machine is not shown unaffected; nothing is verified), and the next human steps. --json gives the same.

  • Never closes, decides, waives, advances or claims anything, and the next watch run shows the finding as outstanding, not new.

  • Warns when the store is stale (only when max_age_hours is set): one warning: line per stale or never-observed source on stderr, saying how old the data is and the limit, and an intel_age_warnings list in --json (empty when fresh or unchecked). It is a warning, not a refusal: a person may knowingly open a case from older data. Refresh the store and re-check the advisory if you did not mean to.

Exit codes: 0 opened or already open, 1 refused, 2 usage or I/O (missing config, missing ledger; it never creates a ledger).


From an advisory to a drafted filing

The watch finds a stop-use advisory against a still machine at 09:00. Then what? Without this: somebody reads the output, opens a spreadsheet, and starts working out which Member States the affected serial numbers went to. That is field 5 of the ENISA form, and it is the reason a 24-hour deadline is hard rather than merely short.

Declare the duty — explicitly, because it is a legal question about your role and not something a fleet can imply:

{
  "watch_id": "plant-1",
  "targets": [ ... ],
  "feeds":   [ ... ],
  "article_14": {
    "as_manufacturer": true,
    "received_by": "product.security@yourcompany.example"
  }
}

Art. 14 is addressed to manufacturers of products with digital elements (open-source software stewards only to the extent Art. 24(3) provides). The watch cannot decide whether that is you; a person declares it. While article_14 is absent, no intake is drafted at all — the safe direction to be wrong in.

What a run produces

  Article 14: 1 newly drafted
    drafted    CTRL-2026-11  received 2026-09-14T18:45:36Z
               0 confirmed affected (matched by hash)
               2 machine(s) in NEITHER column — a person has to look:
                 Grimaldi/AR-7#CELL-0412
                 Grimaldi/AR-7#CELL-0501
               field 5: CANNOT BE COMPLETED
               still to be decided by a person:
                 - Whether this is an actively exploited vulnerability, a severe
                   incident, or neither...
                 - Whether and when awareness was established, per C(2026) 5252
                   Annex §213...

Confirmed and unconfirmed are printed separately and always. 0 machines on its own reads as "you are fine", and here it means ControlCo published no artefact hashes, so nothing is confirmed and field 5 cannot be completed — the opposite of fine. This is the same argument SUPPLIER.md makes to suppliers, arriving from the other end.

What it refuses to decide

Awareness is a determination; the track is a decision. This makes neither.

Art. 14(2)(a) runs twenty-four hours from awareness, not from receipt. A tool that quietly equated the two would either start a manufacturer's clock early — inventing a filing obligation — or start it late, which is worse. C(2026) 5252 Annex §213 defines awareness as a reasonable degree of certainty after an initial assessment; §214 requires that assessment to be prompt. The word "prompt" is doing the work, and only a person can be prompt.

So srp_prefill() still omits notification_type and awareness_datetime, and always will.

What it watches instead: the signal nobody assessed

  ** UNASSESSED 39h ** CTRL-2026-11
       Art. 14(2)(a) runs 24 hours from AWARENESS, not from receipt — but
       C(2026) 5252 Annex §214 requires the initial assessment to be prompt,
       and this has been outstanding since 2026-09-14T18:45:36Z.

Nobody is told they are late. They are told what is outstanding, how long it has been, and the provision that makes it matter. That is the alarm worth paying for: not "you have a deadline", which everybody knows, but "this one has been sitting for thirty-nine hours and nobody has made the determination."

Deliberately not called a breach: the window runs from awareness and awareness has not been established, so nothing is late yet.

Receipt is measured from the run that first saw the advisory, carried forward between runs. Resetting it each run would turn the one number a market surveillance authority asks about first — the interval from receipt to awareness — into a number that is always small.

The prompt stops when a person records awareness. From that moment the register holds the clock, and a second system nagging about a decision already taken is how people learn to close the tab.


From a finding to a case

A finding that is only printed is a finding somebody has to remember. Since the change-assurance layer (deploy/assurance/CHANGE.md), a watch run with sealing on opens and keeps the case itself, so what it found is already a row in the queue when the Monday mail arrives.

  [DRIFT] 0501  configuration moved 849a1dd1a879 → e3881c29e874: ITM-ZONES content_changed
           case case-5b2e0c91a7d4f336 [open]
The run found It does Where it shows
A safety-relevant drift opens (or finds) the machine's drift case, before sealing the new manifest MachineOutcome.case_id, sealed: case …
An advisory, new or outstanding, that exposes the fleet opens one case for the advisory naming every exposed machine; a standing advisory is folded in and writes nothing unless the exposure grew AdvisoryFinding.case_id (sealed with the run)
A withdrawal of an advisory with a case adds a question to the owner ("decide whether the work still stands"); closes and rejects nothing the case's human_decisions_required
A recorded intervention nobody has a case for, that invalidated evidence opens an intervention case, unless an open case on that machine already owns the same functions MachineOutcome.intervention_case_ids
A dry run (--dry-run) nothing. No case is opened, because nothing is sealed case_id is empty

The case is opened first, then the manifest is sealed. The manifest becomes the next run's baseline, so sealing it first would let a crash between the two swallow the drift: the next run would compare the new manifest with itself and report observed. In this order a crash leaves the old baseline in place, the next run sees the same drift, and assess_drift lands on the same case without writing a duplicate. Both directions of the failure are tested.

Running it twice writes nothing the second time. A run over an unchanged configuration reports observed and touches no case. A run that does re-assess a case (a standing advisory, a recovered crash) leaves the ledger as it was unless the reading actually differs. A case already past review is never re-inflated by a later look.

A machine that could not be collected never moves a case. An uncollectable machine is BLIND, the run is degraded, and no case on it advances, closes or is touched; its open cases are named in the warning so that is not left to be inferred. Silence is not progress.

The watch opens; it never decides. It runs as an automation actor, which decide, resume and resolve-decision refuse. Nothing the watch does can close a case.

What this does not do: the watch runs where the exports are, in the customer's kit or from their cron, against their ledger. The hosted API does not run it and cannot collect from a machine; it can only serve and work the cases that ledger holds.

A partial look is not a configuration. If a run does not find or read every item the plan names, the manifest it seals is marked [collection incomplete: …] and the observation records complete: false with the missing item ids. The drift it shows can still open a case, with the existing warning, but it can never make a closed case look as if the machine "left" its configuration and came back.


Reporting to your hosted workspace (watch push)

Watch runs where the exports are — your kit, your cron, your ledger. The hosted API cannot collect from a machine and never sees a run, a failed run or a machine nobody has looked at lately, so the /assurance workspace of a paying customer would show nothing unless somebody posted manifests by hand. watch push is the explicit, opt-in way to change that:

read -rs NB_ASSURANCE_KEY && export NB_ASSURANCE_KEY   # paste your Cell-plan key; it stays out of shell history
assurance watch run  watch.json --ledger register.db      # offline, as always
assurance watch push watch.json --ledger register.db \
    --api-url https://<your-api-host> --key-env NB_ASSURANCE_KEY
assurance watch push watch.json --ledger register.db \
    --api-url https://<your-api-host> --key-env NB_ASSURANCE_KEY --dry-run

Exit codes: 0 reported, 1 the server refused part of it (or something could not be put in a report), 2 it could not run — no run in the ledger, no key, the network or a 5xx. A 2 is safe to answer by running the same command again: the server records each observation once (below).

It is separate on purpose

watch push is src/assurance/watch/push.py. The offline kit, assurance watch run, watch status and collect never import it or any HTTP client; a test walks their import graph (and runs watch run in a fresh interpreter) and fails if that changes. The airgap guard tests are untouched. Nothing leaves the plant unless an operator types watch push with an explicit --api-url and the name of an environment variable that holds the key. The key is never an argument (a mistyped --key … is refused without echoing it), never printed, never written. --api-url must be https; plain http is accepted only for localhost. Redirects are never followed, so the key goes to the host you named and no other.

What is sent

From the latest sealed run in your local ledger:

  • the watch id, the run's start time and verdict, and the max_age_hours cadence from your configuration (accepted range 1 to 720 hours);
  • per machine: serial, machine key, status — unchanged, changed, uncollectable or incomplete — when it was observed, whether the collection was complete, a one-line detail, and the ids of plan items an incomplete look did not find;
  • for a machine that was collected, its SafetyManifest: item ids, names, versions, content hashes, supplier names, safety-function ids, site, country, and the collection provenance (method, notes, who or what took it);
  • for an unchanged machine whose sealed manifest is older than the look, also the earlier local look at which that manifest was first sealed (its own date, its own manifest, not marked relayed), so the hosted ledger can hold the manifest the relayed entry points at; it is the same manifest sent twice, not new information;
  • for a machine that is uncollectable or incomplete, also the last observation that did succeed (with its manifest), so the workspace can say how long the machine has been unobserved instead of "never".

What is not sent

Any export file, program, firmware image or configuration. The collection plan. Local file system paths (the collection root and the plan path are blanked in the hosted record). The reason a collection failed — it can contain a path — which stays in your local ledger; the hosted record says only that the look failed. The ledger itself. Supplier advisory findings and Article 14 drafts from your run: use POST /v1/change/assess/advisory for an advisory, and awareness and the Art. 14 track remain human decisions.

--dry-run prints exactly the request bodies (formatted for reading; compact on the wire, same content) and opens no socket. It does not need the key.

A large fleet is split: each request stays under --max-body-bytes (default 900,000, below the server's 1 MiB cap) and at most 200 machines; push says how many requests it made and why. A single machine report too large for any request is named and not sent.

What the hosted side does with it

POST /v1/watch/report (Cell plan, the same Machine gate as /v1/change: 401 with no or an invalid key, 402 when authenticated but not entitled) writes to your own per-account ledger and nowhere else.

  • It records the manifest with record_manifest and calls the same assess_drift that /v1/change/assess/drift and watch run use, over the divergence compare() computes against the manifest this ledger holds. It derives no safety finding of its own, and it does not trust the changed / unchanged you send: it compares, and records what it computed beside what you claimed. A machine with no earlier manifest there gets a baseline, not a finding.
  • The case is opened before the manifest is sealed — the order run_watch uses — so a crash between the two leaves a retry landing on the same case.
  • Each observation is sealed as the same watch.observation record the runner seals, so _last_observation_at and the stale logic read the hosted ledger unchanged. plan and root are empty there. It also records received_at, the server's clock when the report arrived, beside the reporter-declared observed_at, and basis: "client_reported".
  • A failed look is recorded as a failed look. uncollectable and incomplete are never a successful observation, never advance or close a case (the open ones are named in the response and left exactly where they were), and never make a machine current. A failed look may not carry a manifest. A positive look must carry one, and it is refused if the manifest says its collection was incomplete. Cases are only ever opened by this route, as an automation actor; nothing a report does can close one.
  • Idempotent. Every machine entry has a digest; one already held writes nothing (already_recorded), so a retry after a timeout opens no second case and no second record. An entry older than what is recorded for that machine is ignored (superseded_by_newer_observation), so a delayed report cannot rewind the record; a different observation at an instant already recorded is refused. An observed_at more than 60 seconds ahead of the server's clock is refused, and one inside that margin is read as no later than the moment the server received it (received_at) or wrote it, so it cannot outrank a real failure that follows it and cannot make a machine look fresher than the server's clock allows. When observed_at and received_at differ by more than 24 hours (OBSERVED_AT_SKEW_BOUND) the observation is flagged observed_at_skew. The flag is a warning, not a refusal (a Watch that was offline and then pushed is late, not necessarily lying), and a skewed look is never read as later than the reporter said or than the server received it. Entries are applied in order of the instant they name, whatever offset they are spelled in.
  • A failure never creates a machine. A failed look is recorded only against a machine the account has already enrolled (a successful look with a manifest): it carries the full manufacturer/model#serial key, or a bare serial that matches exactly one enrolled key. Otherwise it is refused (unenrolled_machine, ambiguous_serial), so a typo cannot leave a ghost row while the real machine reads current. A machine blind from its very first run is therefore not shown until one look succeeds, and watch push exits 1 saying so.
  • Bounded. An account tracks at most 1000 machines and a report may introduce at most 200 new ones. The route runs in the threadpool, and ingest into one ledger is serialised across threads and processes by an advisory file lock beside the ledger (POSIX), so overlapping retries from several workers still write once. The wait for that lock is bounded (30 s, per ledger): past it the route answers 503 ingest_busy with Retry-After: 5 and has written nothing, and watch push retries 5xx. The assurance image runs one worker by design; the repository's root Dockerfile serves neuralbridge.main, not this API.

The response says, per machine, recorded / already_recorded / refused and why, which case a drift opened or found, and a limitations list.

What the workspace shows

GET /v1/fleet/observations (Cell): per machine, the last successful observation, the last attempt and its status, how old the last success is, consecutive_failed_attempts, open case ids, cadence_hours and stale. A machine is stale when its last successful observation is older than its cadence, or when it has never been reported — an enrolled machine nobody reported is stale, not current. The cadence is per machine: the one declared with the latest successful look of that machine by each watch that reported it, the shortest if several did, and 168 h if none declared one. A cadence comes only from a successful look of the machine it applies to; a report of failures, or of other machines, can never lengthen it. An account that has never pushed sees "No Watch report received", not a green list.

The age of a look is measured from the later-bounded instant described above (never later than received_at, the server's clock). Each row carries basis (client_reported), the reporter's own last_successful_observed_at_declared, last_successful_received_at and last_successful_observed_at_skew.

A positive look must also rest on a manifest that is not older than that same window at the moment of the look (observed_at minus the manifest's taken_at; the declared cadence, 168 h if none). Only that reporter-relative age gates. The manifest's age at the server's receipt is recorded (manifest_age_at_receipt_hours) and shown, but it is recorded, not gating: an honest late delivery has an old manifest at receipt. Older than the window, a look is recorded as manifest_stale: an attempt that does not count, opens no case and does not move the baseline, and for a machine the account has not enrolled it is refused rather than creating one. The row shows last_attempt_manifest_age_hours and last_successful_manifest_age_hours. watch push sends the manifest sealed when an unchanged machine's configuration last changed, so it marks that entry manifest_relayed: true. That mark is a claim. The server honours it on exactly two grounds, and says which in relay_basis:

  • the account's own ledger holds that exact manifest for that machine (the same content hash, which includes the manifest's own taken_at): held_from_earlier_report, or planted_in_same_report when an earlier entry of the same report is what put it there;
  • the account's ledger holds, as that machine's current baseline, a manifest of the same configuration (same configuration hash) with a different content hash: same_configuration_held. This is the honest case where the account was enrolled with a newer manifest of an unchanged machine and Watch relays the older one it sealed when the configuration last changed. A relayed manifest of a different configuration, or for a machine with no manifest held, is never honoured.

A look made current this way is shown with its age and its basis instead of being judged. For any other manifest the mark is not accepted: an older-than-window manifest is recorded as manifest_stale with reason relayed_manifest_not_held and a remedy (a machine the account has not enrolled is refused, not created). So that an honest first push can be accepted, watch push also sends the local look at which that manifest was first sealed, as its own entry with its own date, ahead of the relayed one; the server reads it as already recorded on every later push. If the local ledger holds no such look and the account holds nothing of the same configuration, the relayed entry is not made current.

This is a label, not a barrier. A reporter holding the account key can fabricate a current-looking observation: one entry carries an old or invented manifest (with an observed_at just after its taken_at, which is recorded and counted), the next relays it as current. That is also exactly what the honest watch push anchor and relayed pair look like, so the server cannot prevent the one without refusing the other, and it does not refuse. It labels. Each counted look carries relay_basis (unrelayed, held_from_earlier_report, planted_in_same_report, same_configuration_held) in POST /v1/watch/report, in GET /v1/fleet/observations as last_successful_relay_basis, and in the /assurance panel, beside last_successful_manifest_first_received_in_this_report, last_successful_manifest_age_at_receipt_hours and last_successful_manifest_age_exceeds_window_at_receipt. An honest first push reads planted_in_same_report; every later push of an unchanged machine reads held_from_earlier_report. A person who sees planted_in_same_report, or a relayed look whose manifest age at receipt is far past the window, is reading freshness the reporter asserted.

Remedy for a refused relay: report a manifest taken inside the freshness window. A machine whose configuration has not changed seals no new manifest locally, so until the local Watch seals a fresh one, a relayed old manifest is made current only through the local look that first sealed it (sent as the anchor) or through a manifest of the same configuration this account already holds.

One behaviour change in the local watch, made so both sides agree: an incomplete look (the plan named items it did not find) no longer counts as a look for stale_observations. It never was an observation of the whole machine.

What this does not establish

  • The hosted service cannot tell a true report from a false one. These are observations reported by the holder of your key; it did not watch any machine. Every observation GET /v1/fleet/observations serves, and the /assurance workspace, carries basis: "client_reported" and is shown as reported by the customer, not independently observed. observed_at and the cadence are declared by the client.
  • Anyone holding the account key, or a compromised Watch, can fabricate a current-looking observation, and nothing here prevents it. An old, replayed or invented manifest sent in one entry and relayed in the next reads as current, and the service cannot tell that from an honest look at a machine that did not change. What the server provides is: a record of when it received each report (received_at), which the reporter's observed_at is never read as later than; a flag (observed_at_skew) where the two differ by more than 24 h; the label client_reported on everything; the relay_basis and manifest ages above, so a human can see how a look became current; and refusal of a naive replay: an old manifest relayed with no earlier or same-report entry of that configuration holding it. A manifest freshly fabricated, or a held one re-presented, defeats all of it. It is a stated limit of an opt-in reporting channel, not a proof of observation.
  • Cases and divergences opened from a hosted report are capped at medium confidence and carry a checks_skipped line saying both manifests were client-reported through hosted ingest and the service did not observe the machine. The hash sources the reporter declares would otherwise let a reporter-built manifest read as validated and the case as high. The verdict, changed items and case id are unchanged. A retry of a manifest_stale or failed attempt answers already_recorded with counts_as_observation taken from the held record, not from the retried entry.
  • A timestamp that cannot be expressed in UTC (for example 0001-01-01T00:00:00+01:00) is 422 in a report's own observed_at / run_started_at, and refused (invalid_manifest) for one entry's manifest date: the rest of the report is recorded. It is never a 500 or a partial write.
  • Remaining limits, not fixed here. (1) Threadpool. The wait for the per-ledger ingest lock (up to 30 s) holds a request thread, so one tenant sending many concurrent reports can occupy the worker's threadpool and delay other tenants until they answer 503 ingest_busy. There is no per-account concurrency cap yet. (2) Cadence window. The freshness window uses the max_age_hours the report declares (1 to 720 h, the only ceiling in the code; there is no per-account configured ceiling to cap it by), so a reporter can widen what counts as a fresh manifest up to 30 days. stale does not look at relay_basis: a look that was honoured on a relay is as current as any other until the cadence passes. Both are visible on the record (relay_basis, manifest_age_*, cadence_hours) but not refused.
  • It is as good as the export and the plan, exactly as the local watch is.
  • A machine omitted from a report is not reported as anything; its silence shows as staleness once the cadence has passed.
  • Hosted Watch — scheduled collection run for you — does not exist. Watch still runs in your kit or cron; the workspace shows what you choose to report.
Contact