fix(subscription): preserve valid persisted fallback - #1082
Open
Zhanfg wants to merge 1 commit into
Open
Conversation
github-actions
Bot
force-pushed
the
fix/persist-subscription-integrity-1076
branch
from
August 16, 2026 04:56
28e742b to
7623b8f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
Persistent
http-file/https-filesubscriptions are intended to provide a last-known-good fallback when a remote subscription cannot be refreshed.Previously, a successful HTTP request could overwrite the persisted file before the response was proven to contain usable subscription nodes. An empty, invalid, locked, or otherwise unusable response could therefore destroy the valid fallback.
This change validates fetched subscription content before persistence, falls back to the existing persisted subscription for invalid responses and non-2xx HTTP responses, and replaces valid persisted data atomically using a temporary file and rename.
The persisted file remains mode
0600.There is partial overlap with #1058, which also contains persistence handling as part of the much larger group-entry-chain feature. This PR intentionally keeps the subscription integrity fix independent and narrowly scoped, and additionally covers non-2xx HTTP fallback behavior.
Checklist
Full Changelogs
0600.Issue Reference
Closes #1076.
Also addresses #1007.
Related: #1058 contains partially overlapping persistence handling inside a larger feature PR.
Test Result
go test -tags dae_stub_ebpf ./...passed on the fork runner.git diff --checkpassed.