[PR #1316] [CLOSED] spec: re-probe stale full chains when shorter chains pay #3377

Closed
opened 2026-11-07 14:41:03 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/1316
Author: @hulkbig
Created: 10/7/2026
Status: ❌ Closed

Base: main ← Head: fix/draft-policy-stale-costs


📝 Commits (2)

  • 8e0a7b3 spec: re-probe stale lookup window costs
  • 1ec9422 Merge upstream main and preserve stale chain re-probes

📊 Changes

2 files changed (+30 additions, -2 deletions)

View changed files

📝 src/spec/draft_policy.cpp (+6 -2)
📝 src/spec/draft_policy_test.cpp (+24 -0)

📄 Description

Summary

Follow-up to the upstream stale-cost fix in 48d2e6cabc and #1252.

A profitable shorter chained lookup returns before the stale full-size check. Consequently, the full chain can remain permanently excluded even though the upstream policy now re-probes stale sizes in other selection paths.

This PR now contains only the remaining chain-selection correction and its regression test. Check a confident stale full size before returning the profitable shorter chain. Preserve upstream's 300-round policy, EMA, header and plain lookup behavior. The earlier 64-round/reset proposal is removed from the final diff.

Validation

  • Current upstream plus the new regression fails two assertions: the full chain is never re-probed when a shorter chain stays profitable.
  • The corrected policy passes all 17 assertions, including bounded re-probe spacing and the MTP confidence gate.
  • CPU CMake tests pass: draft_policy_test, suffix_drafter_test and controller_test (3/3).
  • Direct build passes with -O2 -Wall -Wextra -Werror.
  • AddressSanitizer and UndefinedBehaviorSanitizer pass; leak detection is disabled in this ptrace environment.
  • git diff --check passes; independent source review found no remaining must-fix issue.

Scope

Two files only. No GPU throughput/output benchmark was run, and no speedup percentage is claimed.


🔄 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/1316 **Author:** [@hulkbig](https://github.com/hulkbig) **Created:** 10/7/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/draft-policy-stale-costs` --- ### 📝 Commits (2) - [`8e0a7b3`](https://github.com/Niko1221/Strata/commit/8e0a7b36ec2a427f879b218b354cde2fdf4487a2) spec: re-probe stale lookup window costs - [`1ec9422`](https://github.com/Niko1221/Strata/commit/1ec94221b736fafe13eda7671950589d8003671b) Merge upstream main and preserve stale chain re-probes ### 📊 Changes **2 files changed** (+30 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `src/spec/draft_policy.cpp` (+6 -2) 📝 `src/spec/draft_policy_test.cpp` (+24 -0) </details> ### 📄 Description ## Summary Follow-up to the upstream stale-cost fix in 48d2e6cabcf4991b5b772975b0b0eb0828473ded and #1252. A profitable shorter chained lookup returns before the stale full-size check. Consequently, the full chain can remain permanently excluded even though the upstream policy now re-probes stale sizes in other selection paths. This PR now contains only the remaining chain-selection correction and its regression test. Check a confident stale full size before returning the profitable shorter chain. Preserve upstream's 300-round policy, EMA, header and plain lookup behavior. The earlier 64-round/reset proposal is removed from the final diff. ## Validation - Current upstream plus the new regression fails two assertions: the full chain is never re-probed when a shorter chain stays profitable. - The corrected policy passes all 17 assertions, including bounded re-probe spacing and the MTP confidence gate. - CPU CMake tests pass: draft_policy_test, suffix_drafter_test and controller_test (3/3). - Direct build passes with -O2 -Wall -Wextra -Werror. - AddressSanitizer and UndefinedBehaviorSanitizer pass; leak detection is disabled in this ptrace environment. - git diff --check passes; independent source review found no remaining must-fix issue. ## Scope Two files only. No GPU throughput/output benchmark was run, and no speedup percentage is claimed. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 14:41:03 +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#3377
No description provided.