Skip to content

docs(gateway): define the fault occurrence timestamps in the REST reference - #678

Open
bburda wants to merge 3 commits into
mainfrom
docs/first-occurred-in-rest-reference
Open

docs(gateway): define the fault occurrence timestamps in the REST reference#678
bburda wants to merge 3 commits into
mainfrom
docs/first-occurred-in-rest-reference

Conversation

@bburda

@bburda bburda commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

The fault detail in the REST reference showed first_occurrence and last_occurrence as example values with no definition.

The reference now defines both where the fault object's fields are described. first_occurrence is the start of the current occurrence. It is reset when a FAILED event reactivates a CLEARED fault, so it moves with occurrence_count. last_occurrence advances on FAILED events only. The second commit states the mapping to Fault.msg's first_occurred and last_occurred.

These are the definitions #618 settled at the message layer. The naming question in #672 stays open.

Issue

Type

  • Bug fix
  • New feature or tests
  • Breaking change
  • Documentation only

Testing

Docs only. From docs/, both clean:

sphinx-build -b linkcheck . _build/linkcheck
sphinx-build -b html . _build/html -W --keep-going

pre-commit passes.

Checklist

  • Breaking changes are clearly described (and announced in docs / changelog if needed)
  • Tests were added or updated if needed
  • Docs were updated if behavior or public API changed

…erence

The fault detail response showed first_occurrence and last_occurrence as
example values without saying what they mean. The REST reference now
describes both where the fault object's fields are described, matching the
Fault.msg definitions: first_occurrence marks the start of the current
occurrence and is reset when a FAILED event reactivates a CLEARED fault,
and last_occurrence advances on FAILED events only.
…estamps

The REST reference points at Fault.msg for the occurrence timestamps, but
the message reference documents first_occurred and last_occurred, not the
extended_data_records names. State the mapping so a reader following the
link does not have to work it out.
@bburda bburda self-assigned this Sep 10, 2026
@bburda
bburda marked this pull request as ready for review September 10, 2026 20:09
Comment thread docs/api/rest.rst
**Extended Data Records:**

The ``environment_data.extended_data_records`` object carries the fault's
occurrence timestamps, which are ``Fault.msg``'s ``first_occurred`` and

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"under their REST names" reads as if first_occurrence/last_occurrence were the names everywhere. The list route serves the same instants as first_occurred/last_occurred epoch-seconds floats (fault_msg_conversions.cpp:36-37, dto/faults.hpp:52-53); only the detail route renames them and formats ISO-8601 UTC with ms. Worth one sentence: "the list route serves them as first_occurred/last_occurred in epoch seconds; the detail route uses these names in ISO-8601 UTC". The reset rules themselves match sqlite_fault_storage.cpp:724-754.

… which names

The list route serves first_occurred and last_occurred in epoch seconds.
Only the fault detail route renames them to first_occurrence and
last_occurrence and formats them as ISO-8601 UTC. The extended data
records section names both.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants