records: the record is read where it is written

A module keeping a checkout of a repository of decisions, designs and issues from the git seat,
current on every announced merge and on a timer, answering records_search / records_read /
records_list / records_status / records_sync at the commit it read (novox/hq ADR 0025, ADR 0153).
The repository is a setting; it names no mesh.
This commit is contained in:
2026-09-30 17:45:39 +02:00
parent 96fb441f30
commit 6512878eef
9 changed files with 630 additions and 0 deletions
+41
View File
@@ -0,0 +1,41 @@
# records
The record, read where it is written (novox/hq [ADR 0025](https://git.novox.be/novox/hq), ADR 0153).
A module that keeps a checkout of a repository of decisions, designs and issues — the mesh's own
`hq`, or any repository of markdown on the forge — and answers questions about it over the bus, so
whoever holds the console sees `records_search` beside every other tool and a symptom can be looked up
in the design record without knowing it is there.
**A checkout, not a copy.** The same bytes the repository holds, at a commit every answer names,
brought up to date on every merge the forge announces (`gitea.pull.merged`) and every ten minutes
besides. Nothing is indexed, transformed or summarised, so nothing can drift from the source except by
lagging behind it, and the lag is in `records_status`.
## Tools
| tool | answers |
|---|---|
| `records_search` `{query, limit?}` | where a phrase appears, as written: document, line, nearest heading, and the commit read |
| `records_read` `{path}` | one document, whole |
| `records_list` `{folder?}` | what a folder holds |
| `records_status` | repository, forge, commit and its date, last sync, document count, last error |
| `records_sync` | bring the checkout up to date now |
## Configuring it
The module names no mesh (ADR 0112). It requires the `git` provision — the forge — and reads the
repository its **settings** name:
```
settings set records repository.json # {"repository": "<owner>/<name>"}
```
Public repositories only: it asks for no credential. Until a repository is set, it serves no tools and
says so in its log.
## The check ADR 0025 names
Search the mesh, through the console, for a phrase that appears only in one design document here, and
get it back. `records_search {"query": "…"}` is that search; its test does the same against a
repository it makes.