[PR #320] [CLOSED] verify: fix STRATA_VERIFY_PROFILE stage columns (unsigned stamp wrap + slot collision) #2573

Closed
opened 2026-11-04 02:01:27 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/320
Author: @xyzzing
Created: 10/1/2026
Status: ❌ Closed

Base: main ← Head: pr/d8-verify-columns-20260930


📝 Commits (1)

  • 833cc85 verify: profile columns stop wrapping (unsigned stamp deltas) and the hc-read second half stops overwriting the next layer's base stamp

📊 Changes

2 files changed (+19 additions, -8 deletions)

View changed files

📝 include/strata/core/verify.hpp (+2 -1)
📝 src/core/verify.cpp (+17 -7)

📄 Description

Fixes the STRATA_VERIFY_PROFILE stage report so its derived columns ((gap), head, hc0 norm/down/up) print sane ms/window values instead of \~1e14 ms. Metrics-only — no computed model value changes; this only affects the profiler's reported columns.

Two integer-arithmetic defects:

  1. Slot collision (kProfPer 32 -> 33). The hc-read second half's up stamp was written to slot 32, which is the next layer's slot 0. That both corrupted the next layer's base stamp and left the up-stamp unreadable.

  2. Unsigned wrap on absent/out-of-order stamps. A slot no kernel stamped is 0; an unsigned to - from where from wrapped to \~1e19 ns, which is the \~1e14 ms we were seeing.

The fix introduces a gap(to, from) helper that contributes 0 unless both stamps are nonzero and monotonic (to >= from), bumps kProfPer to 33, and shows the hc-read0 norm/down/up split only when the whole split chain is present (so it isn't counted twice). The column-header array is extended to match.

With the columns sane, the verify-window residual could be attributed: it is the wait for rings column (28 ms/round), and a no-doorbell floor (STRATA_VERIFY_DEVICE_PLAN=1) leaves it unchanged, so it is host-ring submission latency, not the expert-pool doorbell round-trip. Deliverable 3 of #228, re-scoped to stand alone per your request.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/320 **Author:** [@xyzzing](https://github.com/xyzzing) **Created:** 10/1/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `pr/d8-verify-columns-20260930` --- ### 📝 Commits (1) - [`833cc85`](https://github.com/Niko1221/Strata/commit/833cc85a5265a872d1ea2f98ea83ed74293f73cd) verify: profile columns stop wrapping (unsigned stamp deltas) and the hc-read second half stops overwriting the next layer's base stamp ### 📊 Changes **2 files changed** (+19 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `include/strata/core/verify.hpp` (+2 -1) 📝 `src/core/verify.cpp` (+17 -7) </details> ### 📄 Description Fixes the `STRATA_VERIFY_PROFILE` stage report so its derived columns (`(gap)`, `head`, `hc0 norm/down/up`) print sane ms/window values instead of `\~1e14 ms`. Metrics-only — **no computed model value changes**; this only affects the profiler's reported columns. **Two integer-arithmetic defects:** 1. **Slot collision (`kProfPer` 32 -> 33).** The hc-read second half's `up` stamp was written to slot 32, which is the *next* layer's slot 0. That both corrupted the next layer's base stamp and left the up-stamp unreadable. 2. **Unsigned wrap on absent/out-of-order stamps.** A slot no kernel stamped is `0`; an unsigned `to - from` where `from` wrapped to `\~1e19 ns`, which is the `\~1e14 ms` we were seeing. **The fix** introduces a `gap(to, from)` helper that contributes `0` unless both stamps are nonzero and monotonic (`to >= from`), bumps `kProfPer` to 33, and shows the hc-read0 norm/down/up split only when the whole split chain is present (so it isn't counted twice). The column-header array is extended to match. With the columns sane, the verify-window residual could be attributed: it is the `wait for rings` column (28 ms/round), and a no-doorbell floor (`STRATA_VERIFY_DEVICE_PLAN=1`) leaves it unchanged, so it is host-ring submission latency, not the expert-pool doorbell round-trip. Deliverable 3 of #228, re-scoped to stand alone per your request. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-04 02:01:27 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#2573
No description provided.