{#- The node's own facts — time, what the run read, what it found, what it ran with — as the **one** block both pages render (ADR-0044 decision 8, questions §4.8 answered: the container gets the detail page it never had, built by reuse rather than as a second surface). The leaf detail page owned all of this and the container owned none of it: `/status/` is a dashboard *of the children*, so a container's `config` was stored by two checks in the tree and rendered by nothing, and its run facts had nowhere to land. Same partial on both pages, so the two can no longer drift. Five cards, in the order a reader wants them: **when** it ran, **what it read** (`record` — the reading, where the run kept one, ADR-0085), **how it has read over time** (the curves that stand on this node, where any do, ADR-0097), **what it found** (`report` — the run's outputs), **what it ran with** (`config` — its inputs). Report before config on purpose: the outputs are why you opened the page, the inputs are the reference beside them. Those two are Markdown through the hardened renderer (ADR-0018) — checks author them with `config_markdown()`, and rendering that bullet list as literal text was a leftover from before the renderer landed. The record is data, not Markdown, and is shown in the one list a line's record is shown in (`_record_list.html`). Beside them, where the node says something of itself, its **About** card (`_about_card.html`, ADR-0133 decision 1): the facts stand in a column of their own at their measure, and the card in a second one to the right of *Time*, reaching down beside them, where the block is wide enough for both — a leaf's page widens for it (`check.html`). Where the block is narrower the two columns are one: the facts' own column gives its cards to the block (`display: contents`), and the card stands among them before *Configuration*, which is there to look things up, where the card answers what the reader came with (`overview.css`). The card follows the facts in the document, so a narrow block orders it in. A node with nothing to say of itself has neither the second column nor the card, and its block is as it was; one that has nothing else, a container with an `about` that no check has written or the root, whose overview has no facts (``facts_shown`` false, from `_status_grid.html`), has the card alone, at the facts' measure. Context: ``node`` (a StatusSnapshot), ``branch`` (its path), ``since`` (the start of the current own-status period, or None), ``shows`` (the period of what a node above others shows, or None), ``made_by`` (the node beneath it that makes what it shows, or None) and ``node_curves`` (the curves that stand on the node, or None — and allowed to be absent, for a caller that has no engine to ask). Never included by the kiosk, which keeps none of this. -#} {%- from '_record_list.html' import record_list %} {%- from '_series.html' import curve %} {%- from '_status_cue.html' import status_cue %} {%- from '_rule_block.html' import rule_mark, handled_mark with context %} {%- set facts_shown = facts_shown if facts_shown is defined else true %} {%- set with_about = about_card(node) %} {%- set columns = with_about and facts_shown %} {%- if columns %}
{%- endif %} {%- if facts_shown %}

Time

{#- Observation time (ADR-0027). No timestamp means no check has ever written this node — say so, rather than inventing an instant. With a timestamp but no recorded transition of its own (``since`` is None) there is no period to state either, so report the single observation. A status that still holds is stated by when it began and when it was last observed, on two lines, also where the two are one instant (ADR-0099 decision 1). Where the tree did not see the period begin — a first reading, or a beginning lost before the tree kept it — it began *before* a bound, the furthest back the tree can vouch that nothing changed, which History's row for the period states too (ADR-0102 decision 3). A period that a pin's end began says so — *since …, when its maintenance ended* — because the node began to show its status then, which is not when its check began to read it; an edit of a pin begins no period, so a pinned node holds *since* its pin was set (decisions 6 and 8). So does one that a line's pin began: *when a line's pin was set*, *when a line's maintenance ended* (ADR-0107 decision 3, its words ADR-0135 decision 2). The words are `_began`'s, in `app.py`, and the Copy document writes the same. It read *from … until …*, and the second instant was the latest reading, never an end: an active failure read as one that had stopped, and a node read once in its period as *from 19:32:39 until 19:32:39*. *Until* belongs to a period that has ended, which the History tab lists. The period is bounded by the **own**-status event log, so it is the own status's, and on a node above others it is **named** that — *Its own status ok since …* (ADR-0123 decision 3). What such a node shows counts the nodes beneath it, and its own status's period stated as the node's said *Status ok since Monday* of a branch whose child was red on Tuesday, and under a head that says *error*. Where the node shows something its own status does not account for, a line before it says that, and from where: the node beneath it that makes it so, with that node's own *since* — *Status error, from staging/codepipeline/load-fixtures beneath it, error since 10:42, and 2 more*. It said *from the nodes beneath it* and no more, and nothing on the page said since when the branch had been red. The node named counts the code for itself; a branch on the way down that only passes it on is never the one. Of several it is the one that has counted the code the longest, and the line says how many others do; one that counts it only because its own reading went stale is *stale, last observed …*, since its period is of something else. A status no one node makes — *ok*, *maintenance* — is *from the nodes beneath it*. Which node, and the words of its period, are `_made_by`'s, which reads them where its own page does. A node in maintenance keeps *Status maintenance since …*: its pin, or its check's own word, cancels what is beneath it, so that period is the node's. A container that declares nothing has no own status for a period to name — its `UNDEFINED` is the roll-up's to skip, and its page heads with what it rolls up to — so it states the observation, as a node with no transition of its own does, beneath the same first line: the route hands it no ``since``. All of that is decided once, in `_since_of` and `_made_by`, from the node before a filter takes its children away — which status the period names, whether it is named the node's own, and which node makes what it shows — and the Copy document takes its period from the same place, so the two cannot differ. A leaf's `UNDEFINED` is its own, and keeps its period. **A period is stated wherever there is one** (ADR-0115 decision 6): a pinned node that no check has written has shown *maintenance* since its pin, and *Not yet observed* alone would say nothing of that. The sentence is for a node with neither an observation nor a period. **A node above others states first the period of what it shows** (ADR-0132 decision 5): *Status error since 10:00*, the period the tree keeps beside its log, so a branch that turned red from one node and stays red from another says the first one's instant, not the second's. The node beneath that makes it so keeps its own *since* only where that began after the branch's — *Status error since 10:00, from load-fixtures beneath it, error since 10:42, and 2 more* — and where one node made the whole period the instant is said once: *Status error since 10:00, from load-fixtures beneath it*. A well branch says *Status ok since …*, true now of everything beneath it, and a bound is *since before …*. *Its own status … since …* stays beneath it, and a container that declares nothing says its observation there, as before. Where the period the tree keeps is not of what the node shows — after a restart until the units beneath it have run, and for the moment a reading has gone stale before the tick dates it (decision 3) — the line says the status without a *since*, and the node beneath with its own, as ADR-0123 decision 3 had it. What began the period is History's and the Copy document's to say. A pinned node's own status cancels what is beneath it, so its own period is what it shows, and it keeps the one line it had: ``shows`` is None there, as on a leaf (`_shows`, in `app.py`). -#} {%- if shows %}

Status {{ shows.status.name.lower() }} {%- if shows.at %} since {% if shows.before %}before {% endif %}{{ shows.at | localtime }}{% endif %} {%- if made_by %}, from {{ made_by.name }} beneath it {%- if made_by.observed %}, stale, last observed {{ made_by.observed | localtime }} {%- elif made_by.since %}, {{ made_by.since.status.name.lower() }} since {% if made_by.since.before %}before {% endif %}{{ made_by.since.at | localtime }} {%- if made_by.since.began %}, {{ made_by.since.began }}{% endif %} {%- endif %} {%- if made_by.more %}, and {% if why is defined and why %}{{ made_by.more }} more{% else %}{{ made_by.more }} more{% endif %}{% endif %} {%- elif node.derived %}, from the nodes beneath it {%- endif %}

{%- endif %} {% if since %}

{% if since.own %}Its own status{% else %}Status{% endif %} {{ since.status.name.lower() }} since {% if since.before %}before {% endif %}{{ since.at | localtime }} {%- if since.began %}, {{ since.began }}{% endif %}

{% if node.timestamp is not none %}

Last observed {{ node.timestamp | localtime }}

{% endif %} {% elif node.timestamp is none and not (shows and shows.at) %}

Not yet observed.

{% elif node.timestamp is none %} {% else %}

Observed {{ node.timestamp | localtime }}.

{% endif %} {#- The run facts (ADR-0044 decisions 2 and 4), present exactly where this node carries them — the sole owning check's mount and the unwritten ancestors above it. This is where **wall time** surfaces: stored since the run-object slice, rendered nowhere until this header. The next update stays **absolute** here, as on the grid. §10.5 of the working note reserved the relative "in 4m" for this header, on the grounds that the reader is looking deliberately and the stale banner is directly above — but that argument needs a *live* page, and this partial is on one page that polls and one that does not. A relative form on the leaf page would go on claiming "in 4m" for as long as the tab is open, which is the same freeze the absolute form was chosen to survive. One partial, one form, and the safe one wins. -#} {% if node.run and node.run.next_run_at %}

Next update {{ node.run.next_run_at | localtime }}

{% endif %} {% if node.run and node.run.wall_seconds is not none %}

Last run took {{ node.run.wall_seconds | elapsed }}

{% endif %} {#- The period where there is one, and the **tolerance** where there is not (ADR-0081). "Checked every" is a claim that a subject was read on that interval, and it is only true of a check: the instance's own nodes are recorded state re-asserted on the scheduler tick and readiness measured its trust store once, at startup, so the line used to say "Checked every 1s" about something nothing checks. Such a node carries no period at all now — nor does a paced unit, which has none to carry — and what both do carry is the freshness they promise, which is the fact a reader of either wants and the one the server actually applied. One rule, both kinds, no discriminator: a node with a period shows it, a node without shows what it promises instead. -#} {% if node.frequency_seconds %}

Checked every {{ node.frequency_seconds | duration }}

{% elif node.stale_after_seconds %}

Goes stale after {{ node.stale_after_seconds | tolerance }}

{% endif %} {#- How often this node changed its mind lately. It sits next to the History button because it is the same question asked in one number, and it is **not** on a card: a card says what a node is now, and churn is history. A subject that flaps is the case the escalation counter deliberately does not catch — every recovery clears that counter — so without this there is no number anywhere that says *this thing is flapping*, only a list of events to count by eye. Suppressed transitions are in it: a check flapping underneath a pin is exactly what is worth seeing, which is the opposite of what the History list wants. It counts what the node's own check reported, so on a node above others it is named as the period is (ADR-0123 decision 3). -#} {% if node.changes %}

{{ node.changes }} {%- if since and since.own %} {{ "change" if node.changes == 1 else "changes" }} of its own status {%- else %} status {{ "change" if node.changes == 1 else "changes" }} {%- endif %} in the last hour

{% endif %} {#- The dependency graph, from whichever end this node stands at. Both sentences are about **reachability**, which is why they sit here with the freshness facts rather than on a status card: neither is a claim about how the subject is doing. Being shielded is the more urgent of the two — the node is not reaching the level above, and an operator who does not know that will read a quiet parent as good news — so it is said in the node's own words and links to the thing to go and look at. The other direction is the risk the feature carries: one dependency can quiet dozens, and a number that says how many is the only thing standing between that and a silence nobody can account for. -#} {%- if node.shielded_by %}

Reached through {{ node.shielded_by }}, which is failing — nothing from here reaches the level above until it answers.

{%- endif %} {%- if dependents %} {%- set reached = dependents | length %}

{{ reached }} {{ "check is" if reached == 1 else "checks are" }} reached through this{% if node.code.name == 'ERROR' %}, and not reaching the level above while it is failing{% endif %}.

{%- endif %} {#- The History page is a tab of its own now (ADR-0097 decision 3), beside Status and Series under the node's title; this card keeps the numbers that ask the same question, and no second way there. -#}
{%- if why is defined and why %} {#- **Why a branch has its color** (ADR-0135 decision 7): a card of its own right after Time, titled by its question, wherever the branch fails or holds something handled. First what counts — each part whose failure reaches the branch, with the status it counts as and since when, errors first and the longest first — then what is handled beneath it, the ringed diamond and the total, grouped by job under its mark, each rule with the part it stands on, what that reads where it fails, who set it and until when, linked to where it stands, each list showing its first rows and folding the rest. Time's *and 2 more* links here. A node with rules of its own keeps them as the blocks at the head of its frame (ADR-0104 decision 8). -#} {%- macro why_part(part) -%}
  • {{ status_cue(part.status) }} {% if part.own %}Its own reading{% else %}{{ part.name }}{% endif %}, {{ part.status.name.lower() }} {%- if part.observed %}, stale, last observed {{ part.observed | localtime }} {%- elif part.since %} since {% if part.since.before %}before {% endif %}{{ part.since.at | localtime }}{% endif %}
  • {%- endmacro %} {%- macro why_rule(row) -%}
  • {% if row.slug %}a line of {{ row.name }} — {{ row.line | markdown_inline(node=row.path) }}{% else %}{{ row.name }}{% endif %} {%- if row.reads %}, reads {{ row.reads.name.lower() }}{% endif %} {%- if row.rule %}, counts {{ row.rule.counts.name.lower() if row.rule.counts else 'nothing' }} · by the rule {{ row.rule.rule.name }} since {{ row.rule.rule.since.isoformat() }} {%- else %} · by {{ row.entry.set_by or 'an admin' }} until {{ row.entry.expires_at | localtime }} · {{ row.entry.expires_at | time_left }}{% endif %}
  • {%- endmacro %} {#- A list of the card's, its first `why.open` rows open and the rest folded beneath *N more*, the browser's own disclosure, as History folds its earlier periods. -#} {%- macro why_list(rows, row_macro) -%}
      {%- for row in rows[:why.open] %} {{ row_macro(row) }} {%- endfor %}
    {%- if rows | length > why.open %}
    {{ rows | length - why.open }} more
      {%- for row in rows[why.open:] %} {{ row_macro(row) }} {%- endfor %}
    {%- endif %} {%- endmacro %}

    {{ why.title }}

    {%- if why.counting %}

    What counts{% if why.counting | length > 1 %}, {{ why.counting | length }} parts{% endif %}:

    {{ why_list(why.counting, why_part) }} {%- endif %} {%- if why.handled %}

    {{ handled_mark() }}{{ why.handled | length }} handled beneath it

    {%- for job, rows in why.by_job %}

    {{ rule_mark(job) }}{{ 'In maintenance' if job == 'maintenance' else 'By a rule' }}

    {{ why_list(rows, why_rule) }} {%- endfor %} {%- endif %}
    {%- endif %} {%- endif %} {% if node.record %} {#- **What this run measured** (ADR-0085): the reading the node's code, lines and children are derived from, and the object it was taken on. The same list the entry records are shown in, so one place decides what a field is and one says how it reads: its times in the configured timezone, everything else as stored. A card above says what the node *is now*; this says what was *read*. It is data and never a claim: anything that should alarm is a reason. -#}

    Measured

    {%- if node.subject %}

    On {{ node.subject }}

    {%- endif %} {{ record_list(node.record, "mb-0") }}
    {% endif %} {%- set here = node_curves if node_curves is defined else none %} {%- if here %} {#- **How it has read over time** (ADR-0097 decision 2): the curves that stand on this node — an aspect's own, or a check's own node's for a measure that names no other — beside its status, its reasons and its configuration. The rest, and the readings they were drawn from, are on the Series view; every reading is on the History page. A polled branch page renders it again, curves and nothing more. -#}

    Series

    {%- for c in here.curves %} {{ curve(c) }} {%- endfor %}

    {%- if here.source == branch -%} Beside every curve beneath this node on its Series view; every reading is on its History page. {%- else -%} Drawn from the readings of {{ here.source }} — beside the rest on its Series view, every reading on its History page. {%- endif -%}

    {%- endif %} {% if node.report %} {#- What the run **found** (ADR-0044 decision 6) — the roster, the scope, the enumeration — and never a status claim: anything that should alarm is a reason, and this field must not become a second, quieter reason channel. Never on a card either: volume is exactly what `reason_cap` exists to keep off the grid. -#}

    Report

    {{ node.report | markdown(node=node.path) }}
    {% endif %} {% if node.config %}

    Configuration

    {{ node.config | markdown(node=node.path) }}
    {% endif %} {%- if columns %}
    {% include '_about_card.html' %}
    {%- elif with_about %} {% include '_about_card.html' %} {%- endif %}