Skip to content

Commit ab07781

Browse files
committed
fix(s024): a signer that signs again clears the signer alarm
References the red test in the previous commit: sign_if_needed/2 and sign_checkpoint/1 clear the alarm on a successful signature when it is set, which Alarm's doc has promised since 024. Signed-off-by: Ayla Croft <aylacroft@proton.me>
1 parent eda618f commit ab07781

4 files changed

Lines changed: 269 additions & 0 deletions

File tree

‎coverage.tsv‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ slice_id percent sha date
1515
030 78.40 c657da8 2026-09-21
1616
033 78.50 3b5e89e 2026-09-21
1717
034 78.83 3a5785f 2026-09-21
18+
032 79.01 732238c 2026-09-21

‎lib/trinity/receipts/chain_writer.ex‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,9 @@ defmodule Trinity.Receipts.ChainWriter do
226226
if Receipt.signed?(kind) do
227227
case KeyCustody.sign(bytes) do
228228
{:ok, sig} ->
229+
# fix(s024) at slice 032: a signer that signs again clears the alarm, as Alarm's
230+
# doc has said since 024; before this nothing did.
231+
if Trinity.Receipts.Alarm.set?(), do: Trinity.Receipts.Alarm.clear()
229232
{:ok, sig}
230233

231234
{:error, reason} ->
@@ -322,6 +325,7 @@ defmodule Trinity.Receipts.ChainWriter do
322325
defp sign_checkpoint(bytes) do
323326
case KeyCustody.sign(bytes) do
324327
{:ok, signature} ->
328+
if Trinity.Receipts.Alarm.set?(), do: Trinity.Receipts.Alarm.clear()
325329
{:ok, signature}
326330

327331
{:error, why} ->

‎slices/032-semantic-memory/NOTES.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,14 @@ produced each vector is recorded on the row (decision 4).
191191
On this machine: dim 384, 0.858, 0.062, three embeds in 281 ms. The owner's manual queue keeps AC2 all the
192192
same, on their machine.
193193

194+
12. **An HNSW scan with a WHERE clause can come back short.** The postgres job (run 35604770525) answered two
195+
of three rows for the smoke's vector check: pgvector's HNSW scan hands back its `ef_search` (40) nearest
196+
index entries and the filter (persona, scope, model) is applied after; the index held other personas'
197+
entries and dead tuples from rolled-back inserts, so a small persona's rows fell outside the candidates.
198+
Reproduced locally one run in three; closed by `SET LOCAL hnsw.iterative_scan = strict_order` inside the
199+
search's own transaction (pgvector 0.8, `fix(s032)` de55660), which walks on until the LIMIT is met with the
200+
order exact. Four runs of the three memory files on the container after: 21 passed each.
201+
194202
## Follow-ups
195203

196204
- **A local embedding backend for the Linux bundle and for Windows.** The Linux bundle boots with the tier

0 commit comments

Comments
 (0)