You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- bench_baseline.md: Phase 2 numbers vs Phase 1. Decode/hash counters
byte-exact unchanged (micro 2/2, macro 6/5), throughput equal-or-better.
occupied_mem_delta flat by design (retained-memory metric dominated by
archive-stored messages; refc frees the eliminated transient copies
deterministically so they never accumulate). No residual deep-copy bug.
- phase2_mutation_audit.md: classification of every field-mutation and
nil-safety sweep hit (FINE vs FIXED).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
| 5 |`logos_delivery/waku/waku_core/message/message.nim:31` (`ensureTimestampSet`) |`result = message; result.timestamp = ...`|**FIXED**| aliased+mutated the shared input. Rewritten to clone-when-unset (non-mutating) |
29
+
| 6 |`logos_delivery/waku/waku_core/message/codec.nim:32–72` (`decode`) |`msg.payload/…=` on `var msg = WakuMessage()`| FINE | freshly constructed in same scope |
30
+
| 7 |`logos_delivery/waku/waku_archive/driver/postgres_driver/postgres_driver.nim:284–288`| field writes on `var wakuMessage`| FINE after fix | fresh per loop iteration; needed nil-init (see nil-safety #A) — no cross-row aliasing |
31
+
| 8 |`postgres_driver.nim:832`|`m.timestamp = l.timestamp`| FINE | inside a SQL query string literal, not Nim code |
32
+
| 9 |`logos_delivery/waku/persistency/sds_persistency.nim:136`|`data.meta = ...`| FINE |`data` is `ChannelData`, not `WakuMessage`|
33
+
| 10 |`apps/chat2/chat2.nim:96`|`msg.timestamp = ...`| FINE |`msg` is a `Chat2Message`, not `WakuMessage`|
34
+
| 11 |`apps/chat2/chat2.nim:200`|`message.proof = proofRes.get()`| FINE |`message` freshly constructed locally at chat2.nim:184 (`var message = WakuMessage(...)`), owned in scope |
35
+
| 12 |`apps/chat2mix/chat2mix.nim:118`|`msg.timestamp = ...`| FINE |`msg` is a `Chat2Message`, not `WakuMessage`|
36
+
37
+
## Nil-safety hits (`var x: WakuMessage` now defaults to `nil`)
38
+
39
+
| # | Site | Class | Action |
40
+
|---|---|---|---|
41
+
| A |`postgres_driver.nim:260` — `var wakuMessage: WakuMessage` in the row-decode loop |**FIXED**| default-init is now `nil`; following field writes would deref nil. Changed to `= WakuMessage()`|
42
+
| B |`not_delivered_storage.nim:22` — `msg: WakuMessage` field of `TrackedWakuMessage`| FINE |`TrackedWakuMessage` is not constructed on any active path (`archiveMessage` is a stub returning `ok()`); no nil deref reachable |
43
+
| C |`recv_service.nim:63` — `let otherwiseMsg = WakuMessage()`| FINE | explicit construction used as `Option.get` default; non-nil |
0 commit comments