Repository navigation
test: make later-epoch delta-read rewrite deterministic - #7904
Merged
Merged
Conversation
[Low impact] The PR appears safe to merge. Reviews (1) · Last reviewed commit: "test: sequence later-epoch delta rewrite..." · Reviewed by Greptile |
Owner
|
Speaking as Kun's firstmate: this is merged. Thank you @WTF-Am-ID — really appreciate you taking the time on this. Test-only change: the later-epoch rewrite now runs through the existing stat/hash shims instead of a 1.1s sleep, and still asserts strictly |
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.
Closes #6404
Review was single-family Codex by the owner's temporary choice.
The following scenarios were covered by
bash bin/fm-test-run.sh tests/fm-remote-delta-read.test.sh, rather than driven live:The two unshimmed live-reader checks covered a same-inode rewrite and a genuine truncation.
Firstmate approved the Test step's live-validation exception on that basis.
Intent
ok same instructions i gave you before pick high value issues from scan, in all the repos you scanning and use codex only to close them
Context: this task is scan pick P8: upstream issue #6404 in kunchenguid/firstmate. The later-epoch delta-read rewrite fixture can observe the truncate-before-write gap and fail with reason=truncated. Triage contract class: restore. Scan notes for this pick:
Issue: #6404
The later-epoch delta-read rewrite fixture can observe the truncate-before-write gap and fail with reason=truncated.
The latest maintainer note names a remaining CI race after the original same-second race was fixed.
Size S.
Contract class: restore.
Maintainer triage.
Evidence:
tests/fm-remote-delta-read.test.sh:116-121starts a reader, sleeps 1.1 seconds, then rewrites with>before asserting prefix-changed at line 124.Competing work: The exact reference in #6407 says its own turn-end test has the same timing-dependency class. It does not fix this delta-read fixture. #7822 changes remote reply collection files, not this test. #7068 fixes other named CI races. No complete target found.
Closure test: Replace the later-epoch write/read race with deterministic sequencing while preserving same inode, same size and prefix-change coverage. Repeated runs must always report prefix-changed, never win by relaxing the assertion to accept truncated. Disable the subsecond/stat or prefix-integrity detection in a temporary mutation and prove the relevant regression fails. Run bin/fm-test-run.sh tests/fm-remote-delta-read.test.sh. Do not claim the old same-ctime race is still present.
The owner approved fixing the scan's high-value picks upstream through PRs, written and reviewed by Codex only.
What Changed
tests/fm-remote-delta-read.test.shwith deterministic sequencing through the existing stat and hash shims.reason=prefix-changedassertion and same-second coverage.Risk Assessment
✅ Low: The test-only change deterministically sequences the rewrite while preserving same-inode, same-size, later-epoch and prefix-change coverage.
Testing
Two unshimmed live reader checks passed. Three focused runs, the delayed-write baseline/candidate comparison, and two mutation checks passed their expected controlled-test outcomes but do not establish live results for scenarios 3–5. CLI responses and logs were retained. No visual surface, lint, full-suite run, or source edits.
Evidence: Verification report
Source: Verification report
Evidence: Real reader responses and file identities
Source: Real reader responses and file identities
Evidence: Baseline truncate-before-write reproduction
Source: Baseline truncate-before-write reproduction
Evidence: Candidate delayed-write verification
Source: Candidate delayed-write verification
Evidence: Prefix-integrity mutation rejected
Source: Prefix-integrity mutation rejected
Evidence: Timestamp-key mutation rejected
Source: Timestamp-key mutation rejected
Evidence: Reproduction driver
Source: Reproduction driver
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
TMPDIR="$PWD/.test-6404/tmp" bash bin/fm-test-run.sh tests/fm-remote-delta-read.test.shpassed three times.The exported printf command delayingOMEGA\nbeta\nby 0.5 seconds failed on the baseline fixture withreason=truncatedand passed on the candidate.The real reader ran without dependency shims against isolated same-inode rewrite and genuine truncation scenarios.Disposable prefix-integrity and timestamp-key mutations each made the focused regression fail as expected.Verified candidate files match d85b4d839c3fadadc2df30cb26c047baf41e9e2c, removed testing scratch, and confirmed a clean working tree.✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.