Skip to content

fix(er-cli): give each dictionary test file a unique temp path (#1203) - #1314

Merged
athvin merged 1 commit into
mainfrom
fix/1203-dictionary-temp-path
Nov 27, 2026
Merged

athvin merged 1 commit into
mainfrom
fix/1203-dictionary-temp-path

Conversation

@athvin

@athvin athvin commented Nov 27, 2026 •

Copy link
Copy Markdown
Owner

Closes #1203

Post-merge is part of this pull request. The ledger below records whether
the follow-up work actually happened. /land-pr closes it.

What

er-cli's test helper with_dictionary now names its temp CSV with a process-wide AtomicU64 counter instead of a SystemTime timestamp. Test-only; no new dependency.

Why

macOS's clock has microsecond resolution, so two dictionary tests running in parallel in the same process could build the same er-cli-dictionary-{pid}-{nanos}.csv path and read each other's rows ("found record with 1 fields"). That made make check flaky locally, about 1 run in 3.

Proof

  • cargo test -p er-cli --lib dictionary: 50 consecutive passes on macOS (the ticket's done-when).
  • cargo clippy -p er-cli --all-targets: clean.

Risk & rollback

Test code only. Rollback is git revert <merge-sha>.

Post-merge ledger

Closed by: agent · session Claude Code:53287b21-66da-458d-b0c9-8bb6f370b47b on brians-MacBook-Pro · 2026-11-27T06:21:35Z

  • main is green with this change on it — the merge SHA, and the run
    that proves it. A later head SHA with this commit as an ancestor counts;
    a cancelled run with zero jobs does not: e025c92; rust 45950108827, frontend 45950108807, images 45950108883, infra 45950108852, devcontainer 45950108914, all success.
  • images built, or correctly never ran because nothing that goes into
    an image changed: built, run 45950108883 success (test-only change; no image input moved).
  • deploy converged — proved by a line the running process emitted, not
    by the image digest and not by the workflow conclusion: n/a: test-only change, so the deployed binary is behaviourally unchanged. Deploy run 45950512686 on e025c92 concluded success.
  • the push-only surface no pull request can pre-test (deploy, drift,
    kind's nightly leg) is green, or knowingly red for a reason that is not
    this change: deploy green on e025c92; drift and kind nightly untouched by a test-only er-cli change.
  • the board card reached Done through the automation rather than by
    hand, and the issue closed: er-cli dictionary tests race on a shared temp path on macOS #1203 closed by the merge.
  • follow-ups are open for everything deferred here — numbers: none.
  • what was learned is written down where the next session will find it
    (a skill, a reference, memory) — or nothing new was learned: nothing new: the ticket already described the cause.

Specific to this change

🤖 Generated with Claude Code

with_dictionary named its file from the pid and a SystemTime timestamp. macOS's
clock is microsecond-resolution, so parallel tests in one process could pick the
same path and read each other's CSV. A process-wide counter replaces the stamp.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@athvin
athvin merged commit e025c92 into main Nov 27, 2026
43 of 44 checks passed
@athvin
athvin temporarily deployed to marketing-preview November 27, 2026 06:10 — with GitHub Actions Inactive

This branch was previously deployed

1 inactive deployment
marketing-preview — 36b4b194 Deployed Nov 27, 2026 by athvin via remove closed PR previews #98
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

er-cli dictionary tests race on a shared temp path on macOS

2 participants