Repository navigation
Record tester scripts into the corpus (npm run record-corpus); the four issue repros - #486
Merged
Merged
Conversation
…starting with the four issue repros A scenario can now be a script (test/contract/scripts/*.js): an async function given one connection and helpers that log in the corpus format (query, act, settled, section, note). It is for what one query can't say: several cases in sequence, a repro from an issue. npm run record-corpus -- <tester.js> copies a script into scripts/, runs it three times in separate processes, reports whether it is deterministic, and writes corpus/scripts/<name>.txt and its native recording. The replay and the jittered-timing replay then cover it like any other scenario. dhensby's repros for #478 - #481 are recorded this way, as scripts/issue-478 to -481, so whether an issue is fixed is now a diff on its own transcript. They pin what happens now: #480 and #481 are fixed; #479 A (done before the cancel callback), B (an extra done on a late cancel) and C (a cancel after a print cancels nothing) are not, its points 4 and 5 are; #478 is not. The fake sql module now inherits the real one's helpers (PollingQuery and the rest), and capture.js has --exact. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
On Linux an error at execute followed by a result ends the batch: case D gives error 2627 more=false and loses the select after it, as errors/dup-key-d does. Recorded on WSL Fedora, where the other three issue scripts match Windows exactly. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
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.
Stacked on #485. GitHub retargets this to
masterwhen #485 is merged.npm run record-corpus -- <tester.js>A corpus scenario can now be a script (
test/contract/scripts/*.js): an async function that gets one connection and helpers that log in the corpus format. It's for what a single-query scenario can't say: several cases in sequence, or a repro from an issue.The command:
scripts/, so its source is kept beside its transcript;corpus/scripts/<name>.txtand its native recording.From then on the real-server contract test, the replay and the jittered-timing replay all cover it. The helpers are documented in
test/contract/scripts/README.md.The issue repros
dhensby's repros for #478 – #481 are recorded this way as
scripts/issue-478…-481. Whether an issue is fixed is now a diff on its own transcript. They pin what happens today (unreviewed):donebefore the cancel callback), B (an extradoneon a late cancel) and C (a cancel after a PRINT cancels nothing) are notinfo 3621beforeerror 2627in A – CAs the fixes land, each transcript gets edited to the agreed sequence and marked
agreed.Also
sqlmodule inherits the real one's helpers (PollingQueryand the rest).capture.js --exact <name>.scripts/.Testing (Windows, localdb)
🤖 Generated with Claude Code