Answers failing authentication, including answers signed by a key a
newer roster no longer names, count under cause unauthenticated; another
@@ -226,6 +262,26 @@
-
+
A writer of a directory of segments now holds an exclusive lock on the log
+directory itself, so a second writer (prune beside a running collect)
+is refused with segmentlog: the directory is held by another writer even
+with segments.lock unlinked or replaced and no live segment. Before,
+such a prune could open beside the collector, and the collector's next
+seal left a log that refused to open with
+segment-00000001.jsonl is named sealed and is not there. The log also
+refuses a live segment its opener did not lock
+(segmentlog: the live file was opened and not locked). After a seal, a
+collect that finds a file holding bytes at live.jsonl when it opens
+the next live segment fails the log and writes nothing to that file, with
+segmentlog: the live file no longer holds what the log counted: live.jsonl held N bytes when it was opened;
+before, it appended onto those bytes and the next seal named a segment by
+counts that did not match its file, which only the next open refused. Stop
+every collect and prune of an earlier version before running this one
+on the same directory, because while an earlier writer runs there, one
+writer per log rests on segments.lock and the live segment's lock, as
+before.
+
+-
Before, a retry read the ledger, then closed on a refusal. It now gives up
the approval (not resumed) first. Give-up and spend share one
compare-and-swap in both ledgers. If spend wins, the spender runs once and
diff --git a/site/docs/concepts/glossary.html b/site/docs/concepts/glossary.html
index 66c3b9cfc..2aafc05c7 100644
--- a/site/docs/concepts/glossary.html
+++ b/site/docs/concepts/glossary.html
@@ -192,7 +192,7 @@
Glossary
stop list
- Meaning
stops.jsonl in the directory reaction.stops names: a header naming the route, then stop, covered and lift lines, appended and never rewritten, which react and the stops commands write under the list's lock; a plane reads it every poll interval and takes no lock- Defined in
internal/reaction/stoplist/, internal/reaction/stopwrite/, reference/reaction
stop list header
- Meaning
- the first line of a stop list
3.0: an envelope over a reaction-list-header/3.0 body a roster operator signs, naming the list, its serial, the plane's plane_id, tenant, project and stop list file, the route and, for a list carried from another, the previous header's digest; a lift names it and the stop list floor keeps it - Defined in
HeaderSigned in internal/reaction/header2.go, reference/reaction-signed
trail file
- Meaning
- a file of events, one per line in the protobuf JSON mapping, each event id once; what
trail and trail export read - Defined in
trailfile.Writer in internal/trailfile/writer.go
-trail segments
- Meaning
- the directory the collector writes, bound to one tenant and project: sealed segments, each a trail file, a live one appends go to, and
segments.json naming each, sealed or pruned; bounded in bytes, pruned only by an operator - Defined in
trailfile.Log in internal/trailfile/log.go over internal/segmentlog/
+trail segments
- Meaning
- the directory the collector writes, bound to one tenant and project: sealed segments, each a trail file, a live one appends go to, and
segments.json naming each, sealed or pruned; bounded in bytes, pruned only by an operator - Defined in
trailfile.Log in internal/trailfile/log.go over the record log port internal/recordlog/, whose one kind is internal/segmentlog/
trust
- Meaning
- how far an observation's source can be believed, from its descriptor:
TRUST_SELF_REPORTED (the agent's own process), TRUST_PLATFORM (the platform it runs on) or TRUST_INDEPENDENT (something the agent cannot influence) - Defined in
Trust in api/proto/guardana/control/observe/v1alpha1/source.proto
trust roster
- Meaning
- the signed file that names operator keys and the tenant, project and level each may act on, under a pinned root, for at most 7 days at a serial that only climbs; a plane reads one only under the signed authority, through
trust.* - Defined in
internal/trust/, ADR-0071
unrecorded read
- Meaning
- a read that ran with a trail the sink did not take, under the explicit evidence setting; counted, never held and never closed
- Defined in
Config.AllowReadsUnrecorded in internal/gateway/config.go
diff --git a/site/docs/contracts.html b/site/docs/contracts.html
index 84e62205f..8236835ac 100644
--- a/site/docs/contracts.html
+++ b/site/docs/contracts.html
@@ -1468,12 +1468,17 @@ What is read
when it was opened, and holds no lock. The bytes after the last newline are a
line a collector is still writing while one holds the file: the trailer counts
them, writer_held is true, and the next export reads them once they end.
-Whether a writer holds the file is asked only when such bytes exist. When none
-holds it they are a partial_tail gap. A gap takes a record like any other, so
-an export whose limit leaves no room for it ends with end_reached false and
-the next export writes it. A reader refuses an export whose trailer counts
-such bytes with end_reached true, writer_held false and no
-partial_tail gap.
+Whether a writer holds the file is asked only when such bytes exist; for a
+directory of segments the export asks the directory's lock, segments.lock
+and the live segment's lock in order. Any held lock answers held. The
+export is refused if the path no longer names that directory or its lock
+cannot be asked. With none held, all locks must answer free, counting a
+missing live segment as free, or the export is refused.
+When none holds it they are a partial_tail gap. A gap
+takes a record like any other, so an export whose limit leaves no room for it
+ends with end_reached false and the next export writes it. A reader refuses
+an export whose trailer counts such bytes with end_reached true,
+writer_held false and no partial_tail gap.
end_reached is true when every whole line was read and the bytes after the
last newline were reported.
The cursor
diff --git a/site/docs/guides/watch-a-plane-without-a-collector.html b/site/docs/guides/watch-a-plane-without-a-collector.html
index 5b7105b2f..4936d71ac 100644
--- a/site/docs/guides/watch-a-plane-without-a-collector.html
+++ b/site/docs/guides/watch-a-plane-without-a-collector.html
@@ -226,14 +226,14 @@ 5. Read across segments, and prune
evidence-report -state follows the log from segment to
segment.
-trail segments prints the manifest: the segments sealed, pruned and
-dropped, then each one's state, lines, bytes, key and dates, and whether a
-collect holds it. prune removes the sealed segments up to the one named,
-after writing each one's tombstone, which keeps its lines, bytes and digests.
-A file is unlinked only while its name names the one read, though POSIX
-leaves a moment between that check and the unlink. Stop collect first: a held
-directory is refused, and so is a clock before the segment's seal. The live
-segment is never pruned.
+trail segments prints the manifest, whether a collect holds it, the log's
+kind and line bound, with the collector's byte bounds and budget refusals
+printed unknown; it exits 1 when whether a collect holds it is unknown.
+prune removes sealed segments through the named one, writing tombstones
+first with lines, bytes and digests. A file is unlinked only while its name
+names the one read, though POSIX leaves a moment between check and unlink.
+Stop collect first: a held directory or a clock before the seal is refused.
+The live segment is never pruned.
What the collector promises
Rendered from docs/index.md on main. It describes the tree as it is now; a release's notes say what a tag holds. The latest release is v0.19.1, and its documentation is in its tag.
diff --git a/site/docs/status.html b/site/docs/status.html
index b09a1928f..943d39e02 100644
--- a/site/docs/status.html
+++ b/site/docs/status.html
@@ -1093,14 +1093,20 @@ trail-collector
adapters/otel/ also reads what the exporter sends, strictly, answers only
after the records are synced, and refuses 401 a request without the
collector's bearer credential
-internal/segmentlog/ keeps a directory of segments bound to one tenant and
-project, sealed at a byte bound, refused past a log bound, pruned only by an
-operator with a tombstone first, and completed or refused after a crash
+internal/recordlog/ declares the port: Log appends, seals, prunes, reads
+back the lines it wrote and counts its statistics; Reader reads the
+manifest and opens segments without a lock, and says whether a writer holds
+the log as held, free or unknown, unknown never read as free.
+internal/segmentlog/ is its one kind, segments: it keeps a directory of
+segments bound to one tenant and project, sealed at a byte bound, refused
+past a log bound, pruned only by an operator with a tombstone first, and
+completed or refused after a crash.
internal/trailfile/ writes each live segment under an exclusive lock,
refuses another project's event, cuts a torn last line at open, and reads a
-file or every segment back with each trail's chain checked;
-guardana-gateway collect (a unix socket, --tenant, --project,
---credential-file), trail, trail segments and prune
+file or every segment back with each trail's chain checked; trail segments
+prints the log's statistics; guardana-gateway collect (a unix socket,
+--tenant, --project, --credential-file), trail, trail segments and
+prune