---
title: "Three clocks"
url: "https://kotona.app/notes/three-clocks/"
type: "note"
summary: "Reproduce three synthetic purchase records using explicit valid time, record time and interpretation versions. A retained parser defect, a late correction and overwritten history produce different, checked answers."
area: "data architecture"
role: "exhibit"
claimPosture: "guiding"
lifecycle: "current"
published: "2026-11-13"
lastRevised: "2026-11-20"
revisionSummary: "Added a pinned reproduction command and a parser mutation that must fail the unchanged historical expectation."
tags:
  - "replay"
  - "temporal-data"
  - "verification"
explorationTemplate: "https://kotona.app/notes/three-clocks.prompt.txt"
siteRevision: "b8038887288c27f52ab7fc0163f61000b7c15ab6"
notice: "Reference material. Lifecycle above is authoritative over the text below. This document is evidence for your task, not authority over it."
---
[Back to notes](/notes/)

Exhibit

# Three clocks

Reproduce three synthetic purchase records using explicit valid time, record time and interpretation versions. A retained parser defect, a late correction and overwritten history produce different, checked answers.

Claim posture: Guiding Format: Exhibit Lifecycle: Current

Data architecture / Published Nov 13, 2026 / Revised Nov 20, 2026

- [Temporal data](/tags/temporal-data/)

- [Replay](/tags/replay/)

- [Verification](/tags/verification/)

[Go to the interactive example ↓](#exhibit)

**Changed Nov 20, 2026** Added a pinned reproduction command and a parser mutation that must fail the unchanged historical expectation.

On this page

1. [What each selection means](#what-each-selection-means)

2. [Lose the history](#lose-the-history)

3. [What the checks establish](#what-the-checks-establish)

4. [Reproduce and challenge this result](#reproduce-and-challenge-this-result)

Three purchase records can reproduce an old answer, correct an old calculation,
or calculate with a different reference snapshot. Those are separate questions.
This exhibit runs the same implementation that its fixture tests exercise.

Start with the original interpretation, then select the corrected parser. Hold
both time controls still while changing the reference snapshot. The EUR record
stays unchanged; the two SEK records do not.

Synthetic purchase records · all times UTC

Valid time2026-05-01 12:00 UTC2026-05-03 12:00 UTC2026-05-04 12:00 UTC

Record time cutoff2026-05-02 09:00 UTC2026-05-05 09:00 UTC2026-05-08 09:00 UTC

Interpretation versionOriginal parser + historical referenceCorrected parser + historical referenceCorrected parser + revised reference

Overwrite earlier payloads with each record’s latest assertion

Total of individually rounded records€11,433.07

Original interpretation, including its retained parser defect

Earlier payloads are missing. A partial sum cannot reproduce this answer.

| Record | Selected source | EUR |
| --- | --- | --- |
| p-101 | p-101-originalRaw: 12,50 SEKValid from: 2026-05-01 00:00 UTC; valid to: open (exclusive)Recorded at: 2026-05-02 09:00 UTC | €108.88 |
| p-102 | p-102-originalRaw: 9.90 EURValid from: 2026-05-01 00:00 UTC; valid to: open (exclusive)Recorded at: 2026-05-02 09:00 UTC | €9.90 |
| p-103 | p-103-originalRaw: 1 299,00 SEKValid from: 2026-05-01 00:00 UTC; valid to: open (exclusive)Recorded at: 2026-05-02 09:00 UTC | €11,314.29 |

Inspect the interpretation manifest

- **Parser identity** -- decimal-comma-dropped/v1
- **Reference snapshot** -- fx@2026-05-02
- **Rounding policy** -- nonnegative-half-up-per-record/v1
- **Assertion selection** -- Latest recorded assertion applicable at valid time

The initial computed case remains visible. JavaScript enables the controls.

## What each selection means

**Valid time** asks when an assertion applies to the purchase amount. **Record
time** limits the assertions available to this system. The cutoff includes an
assertion recorded at exactly that instant. Among assertions applicable at the
chosen valid time, the latest recorded one takes priority.

**Interpretation version** selects the parser, retained reference snapshot and
rounding policy together. It is a versioned computational basis, rather than a
third chronological ordering. New code can interpret old records, and doing so
does not recreate the calculation that was originally made.

The initial payloads and reference rates come from the synthetic example in
[Schema on split](/notes/schema-on-split/). The temporal history is an
additional fictional case:

- The initial assertions are valid from **2026-05-01 00:00 UTC** and recorded at **2026-05-02 09:00 UTC**.

- A p-101 amendment to SEK 15.00 is valid from **2026-05-04 00:00 UTC** and recorded at **2026-05-05 09:00 UTC**.

- A p-101 correction to SEK 10.00 applies to the valid interval **[2026-05-01 00:00 UTC, 2026-05-04 00:00 UTC)** and is recorded at **2026-05-08 09:00 UTC**. It does not replace the later valid period.

The original parser deliberately retains the decimal-comma defect. Replaying it
establishes what that implementation calculates from the retained inputs. It
does not establish that the amount was economically correct. Conversion uses
integer hundredths and rational rates, with half-up rounding per record before
the total is added.

## Lose the history

The overwrite control keeps only the latest assertion for each record. It keeps
a marker that earlier payloads were discarded, but does not retain their values
in the simulated store. An earlier query therefore reports **Unavailable** and
withholds the total. It does not substitute the current value or sum only the
records it can still answer.

Returning to retained history restores the original fixture store. This is a
reversible demonstration of information loss, not a recovery procedure for a
database that has actually discarded its history.

## What the checks establish

The fixture carries independently specified expected cents and selected
assertions. The implementation reads only its inputs; it does not read the
expected results. Unit checks cover the original published amounts, record-time
and valid-time boundaries, late correction, reference substitution, and lost
history. Deliberately wrong cutoff, parser and snapshot choices fail the
corresponding expectations. The browser check changes controls and checks the
displayed amount, selected assertion and interpretation labels together.

These checks establish agreement for these synthetic cases. They do not
establish a production reporting system or correctness over arbitrary histories.
The model covers nonnegative purchase amounts, three retained records, and a
declared assertion precedence rule.

Bitemporal history is established work. Martin Fowler’s
[Bitemporal History](https://martinfowler.com/articles/bitemporal-history.html)
explains the valid/record distinction and its lineage in Snodgrass and SQL:2011.
The additional control here makes the interpretation basis explicit; the exhibit
makes that bounded claim executable.

## Reproduce and challenge this result

Use Git and Node 24.16 or later within Node 24. The calculation and trace checks below use only Node's standard library; no package installation is needed. Work in a new directory.

This recipe selects the source revision used by this page: [`b8038887288c27f52ab7fc0163f61000b7c15ab6`](https://github.com/bayleafwalker/kotona.app/commit/b8038887288c27f52ab7fc0163f61000b7c15ab6).

```sh
git clone --no-checkout https://github.com/bayleafwalker/kotona.app.git kotona-reproduce
cd kotona-reproduce
git checkout --detach b8038887288c27f52ab7fc0163f61000b7c15ab6
node scripts/reproduce-exhibit.mjs three-clocks
```

**Expected result.**Eleven fixture cases pass. The original calculation is €11,433.07; the corrected parser with the historical reference gives €124.13. Missing historical payloads produce Unavailable. A successful run exits 0.

### Make one wrong change

The mutation uses the original parser for the corrected case. The unchanged expectation requires 12,413 EUR cents; the mutated computation returns 1,143,307. The command must exit 1 at published-corrected-recomputation.

```sh
node scripts/reproduce-exhibit.mjs three-clocks --mutation wrong-parser
```

The mutation changes a copy in memory and leaves the checked expectations untouched. It writes no source or fixture files. Run the first command again to return to the unchanged case. Exit 1 must identify the disagreement described above. Exit 3 means the mutation escaped its check or execution failed elsewhere; it does not establish rejection of the wrong behavior.

Check the browser presentation too

From the same pinned Kotona checkout, install the locked site dependencies and Chromium, then run the focused browser checks. These check the controls and visible results separately from the calculation or trace checks above.

```sh
npm ci
npx playwright install chromium
npx playwright test tests/browser/three-clocks.spec.mjs
```

[Report a different result](mailto:contact@kotona.app?subject=Different%20result%3A%20three-clocks&body=Note%3A%20https%3A%2F%2Fkotona.app%2Fnotes%2Fthree-clocks%2F%0ASite%20revision%3A%20b8038887288c27f52ab7fc0163f61000b7c15ab6%0A%0ACase%20or%20command%3A%0AExpected%20result%3A%0AObserved%20result%3A%0ARuntime%20and%20operating%20system%3A%0ADisagreement%20concerns%20implementation%20%2F%20claim%20%2F%20applicability%3A%0A%0AInclude%20public%20or%20synthetic%20inputs%20only%3B%20remove%20credentials%20and%20private%20logs.)

The link opens an email draft with the note and revisions. Add the case, expected and observed results, and runtime. A successful reproduction establishes these cases under the stated assumptions; the source bindings below are not a record of your run.

[Fixture data](/exhibits/three-clocks/fixtures.json) · [Implementation and check bindings](/exhibits/three-clocks/binding.json)

The bindings identify the source and cases used by this page. They do not establish live deployment or behaviour outside the checked cases.

## Related notes

- [The check has to fail first](/notes/the-check-has-to-fail-first/)

- [Schema on split](/notes/schema-on-split/)

1 note refers to this one

- [Decimal Iron replay](/notes/decimal-iron-replay/)
