1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
//! The repository-change token (design `LC-4`; RFC 003).
//!
//! stikk holds no repository authority (`INV-1`): every derived view and armed preview is valid only
//! as long as the repository has not changed underneath it. [`ChangeToken`] is the cheap, comparable
//! signal that answers "has anything changed since we last looked?" — composed from prikk-observable
//! state the seam already reads (ref pointers, queue extent), never from `.prikk/` bytes stikk is
//! forbidden to read (`CON-1`).
//!
//! **It is a detection primitive, not a lock** (`CT-05`/`NFR-R02`). Between reading a token and acting
//! on it, the repository can change again — prikk's own locking is the real guard against a mutation
//! racing another writer. What the token gives is that a preview cannot be *executed* against a
//! repository that has demonstrably moved since the preview was computed; it does not make execution
//! atomic, and nothing in the UI may imply that it does.
//!
//! **It is not an identity.** [`ChangeToken`] changes with ordinary history growth, so it cannot serve
//! as a stable fingerprint for "is this the same repository" — that question is answered by canonical
//! path plus `INV-5`'s re-resolution-on-load discipline (RFC 003 decision 4), not by this type.
use DefaultHasher;
use ;
/// An opaque, cheap-to-store staleness marker (design `LC-4`). Two tokens composed from an unchanged
/// signal set are equal; that is the only guarantee — nothing above the seam may branch on, decode, or
/// otherwise interpret a token's contents (RFC 003 decision 3). Its `Debug` prints the digest only, on
/// purpose: there is no structure in it worth reading.
;