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
{{ message }}
Repository navigation
ping_triggers outlive packet retention (1884 of 3682 on staging) — confirm it is intended for ping-score history, document or prune #241
The post-migration verification of #222 on staging found ping_triggers rows whose tx_id no longer exists in transmissions. The pre-migration snapshot has the same count, so this does not come from the migration.
Count
ping_triggers total
3682
without a transmission
1884
without a transmission inside the packet retention window
0
The orphaned rows span first_seen 2026-07-14 to 2026-09-05. The oldest remaining transmission is from 2026-09-05. In other words, every orphan is older than the packet retention window.
Cause.PruneOldPackets in cmd/ingestor/maintenance.go deletes observations and route_mask_changes together with an aged transmission, but leaves ping_triggers in place. PruneOrphanRouteMaskChanges exists for route_mask_changes. There is nothing equivalent for ping_triggers.
Question: intentional or a gap?
This may be by design. cmd/server/ping_score_history.go describes the ping-score history store as "the ONLY remaining source for that ping's contribution to the all-time records" once packets are pruned, and the history engine reconciles against ping_triggers. If the all-time ping records rely on ping_triggers outliving the packets, these rows are not orphans in the harmful sense.
Tasks
Confirm from the ping-score history code and its tests whether ping_triggers must outlive packet retention. Check what the engine does with a trigger whose transmission is gone (DataPruned, Unscorable).
If intentional: document it at PruneOldPackets and in the schema notes. Note it in deploy-verification guidance, so that "orphan ping_triggers" is not reported as an integrity error. Decide whether an upper bound is needed. Today the table grows by roughly 100 rows a day on staging.
If not intentional: prune ping_triggers with the transmission in PruneOldPackets, or add PruneOrphanPingTriggers like the route_mask_changes one, with a test. First confirm that the ping-score history keeps the all-time records without them.
Acceptance
The intended lifetime of ping_triggers is decided, documented and pinned by a test.
Activity
test(retention): cover channel ping trigger pruning (#241)
test(ingestor): lock ping_triggers out of the table retention (#329)
fix(ingestor): drop the pingTriggerDays knob; ping_triggers is kept (#…
reviewfix(retention): split orphan triggers from retained, cover the …
Merge pull request #349 from dborup/codex/ping-trigger-retention-241
dborup commentedon Oct 7, 2026
Fixed by #349 (merged as
a2d60497a330a03c146a7089d28b02ab2da7b54c).