fix issue

This commit is contained in:
Marshal
2026-08-02 10:26:36 +00:00
parent 53d8655dc3
commit ff772fddef
63 changed files with 10927 additions and 14 deletions

View File

@@ -62,7 +62,40 @@ export default defineConfig({
// can be cancelled out from under it.
const runStartedAt = new Date().toISOString();
// Per-RUN stamp specs use to build unique fixture references. Must live
// here, not in the spec: `const stamp = Date.now()` at module scope is
// regenerated when Cypress re-evaluates the bundle on a cross-origin
// visit, so a spec whose portal step sits mid-sequence re-seeds its
// contracts under a second stamp and orphans the first set — which then
// shows up on the board as unexpected "Expired" rows.
const runStamp = String(Date.now());
/** Keys claimed by `run:claim` in this cypress run. */
const claimedKeys = new Set<string>();
on("task", {
/** Reload-stable per-run stamp (see `runStamp` above). */
"run:stamp"() {
return runStamp;
},
/**
* Claim `key` for this run: true the first time, false afterwards.
*
* For arrange-work that spans several commands and so cannot go
* through `db:queryOnce` (which guards a single statement). A spec
* whose portal step sits mid-sequence has its bundle re-evaluated by
* the cross-origin visit, which re-runs `before()` — re-seeding
* fixtures the run had already created. Gating on this makes the
* second pass a no-op. The plugin process outlives the reload, so the
* claim survives it; browser-side state does not.
*/
"run:claim"(key: string) {
if (claimedKeys.has(key)) return false;
claimedKeys.add(key);
return true;
},
/**
* Cancel a previous run's contracts of one shape so a spec can run
* again against a warm DB (the API allows one active contract per