Skip to content

Select the most accomplished TRACE observation for each tag - #353

Draft
n30nex wants to merge 7 commits into
devfrom
codex/trace-summary-progress-20261123
Draft

n30nex wants to merge 7 commits into
devfrom
codex/trace-summary-progress-20261123

Conversation

@n30nex

@n30nex n30nex commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #352. Addresses the storage side of web #250.

The TRACE trailer describes the requested hops. Each reached hop adds one on-air SNR byte, including zero dB. Rank a tag’s representative packet by the shorter of those two arrays. Duplicate broker hearings retain their existing packet count. The list continues to read the precomputed tag summary.

Migration 098 scores each incoming TRACE at the database write boundary, so an older ingest binary in a rolling upgrade cannot replace a better observation with a longer itinerary. The one-time repair compares saved evidence with packets still retained for that tag. Equal scores keep the saved observation. Tag identity, counters, scope and timestamps survive, including tags whose best packet has expired.

On a restored preview database, 1,007 of 3,552 tags had a more complete retained packet than their saved summary. The final repair statement took 104 ms on that copy and left zero such mismatches. The transaction was rolled back. Size and concurrency will affect the duration on a larger installation. The PostgreSQL tests cover a mixed-version writer, zero dB, duplicate hearings, overlong SNR arrays, pagination and retention.

November 26 qualification

Dev now contains the dependency fix from #355. The refreshed Traces branch passes its own PostgreSQL, plan, backup, security and generated API checks. Tested against dev 5fb32926f719 at 731a9f9a9060. CI · Preview handoff

November 29 review

The trace repair now follows upstream migrations 089–095 as 096_trace_summary_reached_hops.sql. It also tolerates the functions and trigger left by an earlier draft. PostgreSQL regression tests passed for pagination, mixed-version writes, retained summaries and repeat migration. This draft at 17da425d8de5 merges cleanly into dev 0c1d7b7d0d84. The resulting files match both GitHub’s test-merge tree and the tested draft head. CI · Preview handoff

November 30 review

Upstream 2.3.4 uses 096 for telemetry-stopped alerts and 097 for reading sensors. The Traces repair now follows both as 098_trace_summary_reached_hops.sql. The PostgreSQL tests applied it over the earlier 088 and 096 draft filenames and verified pagination, mixed writers and retained evidence. Tested at 5f0e72ff2767 against dev d67ab0c7a9d9. CI · Canadaverse handoff

@n30nex n30nex added bug Something isn't working p2-medium Medium priority release:patch Candidate patch work: fixes/hardening without a new feature line; not release acceptance. labels Nov 23, 2026
@MrAlders0n MrAlders0n added this to the 2.3.1 milestone Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working p2-medium Medium priority release:patch Candidate patch work: fixes/hardening without a new feature line; not release acceptance.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rank TRACE tag summaries by the hops actually reached

2 participants