Skip to content

Commit bf16780

Browse files
committed
chore: remove internal task ID references from comments and docs
Strips tracking identifiers (T1-xx, T2-xx, T3-xx, T4-xx) from inline comments, doc strings, and test names across the codebase. Descriptions are reworded to stand on their own without referencing internal task IDs. Also removes backward-compat prose tied to pre-existing legacy clients from `CrdtAuthContext` (device_id/seq_no now required fields, no `#[serde(default)]`) and from the `HlcState` clock-skew comment. Tightens `backup_envelope.rs` constants doc to remove a forward-compat claim that is now simply the default behavior.
1 parent 34b4fbc commit bf16780

10 files changed

Lines changed: 21 additions & 30 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

nodedb-codec/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ mod tests {
465465
}
466466
}
467467

468-
// ── T1-05 ResolvedColumnCodec tests ────────────────────────────────────────
468+
// ── ResolvedColumnCodec tests ──────────────────────────────────────────────
469469

470470
/// Discriminants of ResolvedColumnCodec must exactly match those of the
471471
/// corresponding ColumnCodec variants so on-disk byte values are unchanged.

nodedb-columnar/src/predicate.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,7 @@ mod tests {
654654

655655
// ── Bloom filter parameter persistence ─────────────────────────────────
656656

657-
/// T1-18: bloom parameters (k, m) must survive a BlockStats MessagePack
657+
/// Bloom parameters (k, m) must survive a BlockStats MessagePack
658658
/// roundtrip so that future readers can reconstruct the filter without
659659
/// relying on compile-time constants.
660660
#[test]
@@ -693,7 +693,7 @@ mod tests {
693693
assert!(bloom_may_contain(&persisted, "world"));
694694
}
695695

696-
/// T1-18: a filter built with non-default k=7, m=8192 uses those params
696+
/// A filter built with non-default k=7, m=8192 uses those params
697697
/// for bit-position calculations — not the default BLOOM_BITS_DEFAULT/K.
698698
#[test]
699699
fn bloom_custom_params_functional() {

nodedb-columnar/src/reader.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ mod tests {
556556
.expect("write")
557557
}
558558

559-
// ── T1-05 ResolvedColumnCodec reader tests ─────────────────────────────────
559+
// ── ResolvedColumnCodec reader tests ──────────────────────────────────────
560560

561561
/// The `ResolvedColumnCodec` type statically excludes `Auto` (discriminant 0).
562562
///

nodedb-columnar/src/writer/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ mod tests {
205205
.expect("valid")
206206
}
207207

208-
// ── T1-05 ResolvedColumnCodec integration tests ────────────────────────────
208+
// ── ResolvedColumnCodec integration tests ─────────────────────────────────
209209

210210
/// The writer resolves Auto to a concrete codec before writing.
211211
/// The resulting footer must not contain codec byte 0 (Auto discriminant).

nodedb-crdt/src/lib.rs

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,18 @@
3131
/// than `last_seen[(user_id, device_id)]` on the server. The HMAC input
3232
/// binds the seq_no and device_id so they cannot be altered after signing.
3333
///
34-
/// ## Wire compatibility
34+
/// ## Required fields
3535
///
36-
/// Both `device_id` and `seq_no` have `#[msgpack(default)]` so that old
37-
/// clients (pre-T4-D) that don't send these fields will deserialize with
38-
/// 0/0. Note: seq_no=0 is never accepted (must be > last_seen=0), so old
39-
/// unsigned deltas will be rejected unless the caller sets delta_signature
40-
/// to all-zeros (unsigned path, which bypasses the replay check).
36+
/// All fields, including `device_id` and `seq_no`, must be present in the
37+
/// serialized form. Missing fields are a hard decode error.
4138
#[derive(Debug, Clone, Copy, Default, serde::Serialize, serde::Deserialize)]
4239
pub struct CrdtAuthContext {
43-
/// Authenticated user_id (0 = unauthenticated/legacy).
40+
/// Authenticated user_id (0 = unauthenticated).
4441
pub user_id: u64,
4542
/// Tenant this operation belongs to.
4643
pub tenant_id: u64,
4744
/// Unix timestamp (milliseconds) when this auth session expires.
48-
/// 0 = no expiry (trust mode / legacy).
45+
/// 0 = no expiry (trust mode).
4946
/// Agents accumulating deltas offline must re-authenticate before
5047
/// syncing if their auth context has expired.
5148
pub auth_expires_at: u64,
@@ -54,13 +51,9 @@ pub struct CrdtAuthContext {
5451
/// before accepting, and also enforces replay protection.
5552
pub delta_signature: [u8; 32],
5653
/// Stable per-device identifier assigned by the server on first bind.
57-
/// 0 = legacy / pre-T4-D client that does not participate in replay protection.
58-
#[serde(default)]
5954
pub device_id: u64,
6055
/// Monotonically increasing per-device sequence number.
6156
/// Must be strictly greater than last_seen[(user_id, device_id)] on the server.
62-
/// 0 = legacy / pre-T4-D client.
63-
#[serde(default)]
6457
pub seq_no: u64,
6558
}
6659

nodedb-crdt/src/signing.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -343,11 +343,10 @@ mod tests {
343343
);
344344
}
345345

346-
// ── Backward-compat: pre-T4-D context (device_id=0, seq_no=0) ────────────
347-
// With device_id=0, seq_no=0: check_seq(0) <= last_seen(0) → ReplayDetected.
348-
// This pins the behavior: old unsigned clients are rejected in signed mode.
346+
// ── seq_no=0 is rejected ─────────────────────────────────────────────────
347+
// With seq_no=0: check_seq(0) <= last_seen(0) → ReplayDetected.
349348
#[test]
350-
fn pre_t4d_context_seq_zero_rejected() {
349+
fn seq_zero_rejected() {
351350
let registry = DeviceRegistry::new();
352351
// seq_no=0 is never > last_seen=0.
353352
let err = registry.check_seq(1, 0, 0).unwrap_err();

nodedb-types/src/backup_envelope.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,10 @@ pub const DEFAULT_MAX_TOTAL_BYTES: u64 = 16 * 1024 * 1024 * 1024;
5353
pub const DEFAULT_MAX_SECTION_BYTES: u64 = 16 * 1024 * 1024 * 1024;
5454

5555
/// Sentinel `origin_node_id` values that mark sections carrying
56-
/// metadata rather than per-node engine data. The envelope format is
57-
/// backward-compatible: V1 readers that don't know about these
58-
/// sentinels still decode the envelope (the bytes just aren't applied
59-
/// at restore time), but the section CRCs still validate. Restore
60-
/// handlers recognize the sentinel and route the body to the correct
61-
/// catalog writer.
56+
/// metadata rather than per-node engine data. Restore handlers
57+
/// recognize the sentinel and route the body to the correct
58+
/// catalog writer. Section CRCs validate independently of whether
59+
/// the reader acts on the section body.
6260
pub const SECTION_ORIGIN_CATALOG_ROWS: u64 = 0xFFFF_FFFF_FFFF_FFF0;
6361
pub const SECTION_ORIGIN_SOURCE_TOMBSTONES: u64 = 0xFFFF_FFFF_FFFF_FFF1;
6462

nodedb-types/src/columnar/column_type.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use crate::value::Value;
1010
/// Typed column definition for strict document and columnar collections.
1111
///
1212
/// `#[non_exhaustive]` — this enum grows with each type system expansion
13-
/// (e.g. T3-07 adds `Decimal { precision, scale }`, T4-10 splits
13+
/// (e.g. future variants may add `Decimal { precision, scale }` or split
1414
/// `Timestamp`/`TimestampTz`). External exhaustive `match` arms must handle
1515
/// future variants via a typed error arm rather than `_ => unreachable!()`.
1616
#[non_exhaustive]

nodedb-types/src/hlc.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ use serde::{Deserialize, Serialize};
2121
///
2222
/// # Wire format note
2323
///
24-
/// `logical` was widened from `u32` to `u64` (T4-11) to eliminate
24+
/// `logical` was widened from `u32` to `u64` to eliminate
2525
/// saturation under high-frequency burst writes. Persisted zerompk
2626
/// blobs from before this change carry a 32-bit logical counter;
2727
/// MessagePack integers decode by value (not by declared width), so
@@ -95,7 +95,7 @@ impl HlcClock {
9595
let wall = wall_now_ns();
9696
let mut st = self.state.lock().unwrap_or_else(|p| p.into_inner());
9797
// Clamp wall to at least st.wall_ns so the HLC never regresses on
98-
// clock skew or NTP adjustments (T4-15).
98+
// clock skew or NTP adjustments.
9999
let wall = wall.max(st.wall_ns);
100100
let next = if wall > st.wall_ns {
101101
Hlc::new(wall, 0)

0 commit comments

Comments
 (0)