Skip to content

test: isolate Grok test home directories - #303

Merged
HemSoft merged 2 commits into
mainfrom
test/issue-298-unique-grok-test-folders
Nov 5, 2026
Merged

HemSoft merged 2 commits into
mainfrom
test/issue-298-unique-grok-test-folders

Conversation

@HemSoft

@HemSoft HemSoft commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Grok's Home test helper and grok_activity used the same process-local temp folder. Parallel tests could delete each other's files and fail with Access is denied or NotSignedIn.

Give Home fixtures their own codexbar-grok-home- prefix. Test names, assertions, cleanup and production behavior are unchanged.

Acceptance Criteria

  • The Home namespace is disjoint from grok_activity's empty, activity and bad folders. The existing provider test names were checked for other collisions.
  • Both fixtures retain their original cleanup paths.

Definition of Done

  • Test-only change, one file, 3 insertions and 2 deletions.
  • Actual failing-before and passing-after evidence on Home, Windows with 32 logical processors.
  • All seven required CI checks passed on e4a555b7250ba4b2abebc7ea2f88cd5817063e4b in run 42116861363. Authenticated SFL Round 2 PASS and Codex clean, zero unresolved threads, zero formal approvals required.

Validation

Initial local reproduction: base d213f24be8c939bdbe345fce371cd7efd0e88ef3, candidate 1c5b8cc1841f3f4383b01521e8bc47c6da010416.

Current head e4a555b7250ba4b2abebc7ea2f88cd5817063e4b merges fixed main 9df7787f0a68e8f23ee5235b89d1ad01014f6a97 after fixture repair #305. The Grok diff against the new base is byte-identical to the initial validated diff. Formatting and diff checks passed after this update. All seven hosted CI checks and fresh SFL/Codex reviews passed for this head. The completed rust-metrics job log verifies actual METRICS_BASE: 9df7787f0a68e8f23ee5235b89d1ad01014f6a97, which includes the fixture repair.

  • Built each revision with cargo test -p codexbar-providers --lib --locked --no-run --message-format=json, then ran its resulting library test binary with the default parallel test harness. Each run used fresh synthetic HOME/USERPROFILE, AppData, XDG and temp directories.
  • Unchanged base failed on the first bounded reproduction attempt: 355 passed, 1 failed, 5 existing ignored tests. grok_activity::tests::local_metadata_deduplicates_and_keeps_exact_seven_day_bounds panicked at grok_activity.rs:168 with Access is denied while removing the shared folder.
  • Fixed binary: 20/20 complete library runs passed, each with 356 passed, 0 failed and the same 5 existing ignored tests. No retry after failure or assertion change.
  • cargo fmt --all --check: pass.
  • cargo clippy -p codexbar-providers --all-targets --locked -- -D warnings: pass.
  • git diff --check: pass.
  • Full workspace/native tests passed in hosted CI on all three platforms. The normal local commit hook executes desktop/console fixtures forbidden on Home, so this commit used a command-local empty hooks path after the safe checks above. The integration merge used the same command-only hook exclusion and ran formatting/diff checks. No repository hook/config or CI gate was changed; the full local hook is not claimed to have passed.

The Rust test-harness documentation describes the shared-file interference this reproduces. No path-string-only test was added; the unchanged suite supplied the regression proof.

Risks and deferred work

Production code and dependencies are unchanged. Dependency repair #296 is separate. The original audit report and the other writer's lockfile bytes were preserved. Claude Opus 5.5 prepared the bounded source edit; the initiating GPT-6.1 Sol parent independently verified, packaged and validated it.

Closes #298

Merge evidence

Checked head e4a555b7250ba4b2abebc7ea2f88cd5817063e4b; all seven GitHub Actions checks passed with integration ID 15368, authenticated SFL/Codex clean, zero unresolved threads and zero formal approvals required. The metrics log confirms repaired base 9df7787f0a68e8f23ee5235b89d1ad01014f6a97. Guarded squash merge landed as a444e81a375fad4677b99a6fc09a56dd322ea424. Mini and Home main both fast-forwarded to that commit, with the audit report preserved.

@HemSoft HemSoft added the model:gpt-6.1-sol PR authored by gpt-6.1-sol label Nov 5, 2026
@HemSoft

HemSoft commented Nov 5, 2026

Copy link
Copy Markdown
Collaborator Author

@sfl review

@HemSoft

HemSoft commented Nov 5, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-05T21:57:18.199330Z e4a555b Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

Reviewed commit: 1c5b8cc184

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@hemsoft-sfl-reviewer hemsoft-sfl-reviewer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Verdict: PASS • Round 1

Review done by claude-opus-5-5 (adversarial to codex)

This test-only change renames the Grok Home fixture's temp folder from codexbar-grok-{name}-{pid} to codexbar-grok-home-{name}-{pid}. The old name Home::with("activity") produced the same path as the grok_activity test folder codexbar-grok-activity-{pid}, and the new prefix keeps the two sets of folders apart. No Critical, High or Medium defect was found, so nothing blocks approval.

🔨 Full-Spectrum Review Summary

Effort: high
Review time: 1m 5s
Token count: Unavailable

Pass 🔴 Critical 🟠 High 🟡 Medium ⚪ Low
🔒 Security 0 0 0 0
✅ Accuracy 0 0 0 0
🧰 Quality & Maintainability 0 0 0 0
Total 0 0 0 0

Key Findings

No material defects found.

Coverage

  • Files reviewed:
    • crates/codexbar-providers/src/grok.rs
  • Context read:
    • crates/codexbar-providers/src/grok_activity.rs
    • crates/codexbar-providers/src/lib.rs
    • crates/codexbar-providers/src/*.rs (all 43 crate sources, searched for the `codexbar-grok` prefix)
    • AGENTS.md
  • Verified:
    • Compare base_commit.sha is d213f24be8c939bdbe345fce371cd7efd0e88ef3 and the last commit is 1c5b8cc1841f3f4383b01521e8bc47c6da010416: 1 ahead, 0 behind
    • The diff changes 1 file, adding 3 lines and removing 2: a doc comment and the format! path in Home::with
    • At base, Home::with("activity") in activity_is_a_fallback_and_never_replaces_a_reported_quota built codexbar-grok-activity-{pid}, the same path grok_activity test local_metadata_deduplicates_and_keeps_exact_seven_day_bounds builds and then removes
    • At head, all Home names (activity, quota-before-activity, renew, plan-without-pool, x-subscription, renew-403, other) sit under codexbar-grok-home-, apart from the grok_activity names empty, activity and bad
    • Within the crate, only grok.rs and grok_activity.rs use the codexbar-grok prefix. The fixed path codexbar-grok-nothing-here does not overlap the home- namespace
    • Cleanup is unchanged: the Drop for Home still removes the same self.0 path it created
    • The production code paths in grok.rs, including the grok_activity::read calls, are untouched
  • Not verified:
    • The PR's claims of a failing run before the change and 20 passing runs after it on Windows; no code could be executed
    • Collisions with temp folders created by other crates or by other processes on the same machine; only codexbar-providers sources were searched
    • The status of CI checks
  • Tests run: None. Reviewer execution is disabled.

HemSoft full-spectrum review • 3 evidence-based passes • Reviewed head 1c5b8cc1841f3f4383b01521e8bc47c6da010416 • SFL v0

@HemSoft

HemSoft commented Nov 5, 2026

Copy link
Copy Markdown
Collaborator Author

@sfl review

@HemSoft

HemSoft commented Nov 5, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: e4a555b725

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@hemsoft-sfl-reviewer hemsoft-sfl-reviewer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Verdict: PASS • Round 2

Since round 1

New: 0; still open (repeated): 0; resolved: 0.
Resolved means no matching finding in this review, not independent proof of a fix.

New (0)

  • None.

Still open (repeated) (0)

  • None.

Resolved (0)

  • None.

Review done by claude-opus-5-5 (adversarial to codex)

The change only touches tests. It renames the Grok Home fixture's temp folder from codexbar-grok-{name}-{pid} to codexbar-grok-home-{name}-{pid}, so Home::with("activity") no longer resolves to the same folder as the codexbar-grok-activity-{pid} folder in grok_activity's test, and it updates the doc comment. Approve: I found no Critical, High, Medium or Low defect. The new prefix is disjoint from every other temp folder name in the crate that I checked.

🔨 Full-Spectrum Review Summary

Effort: high
Review time: 1m 18s
Token count: Unavailable

Pass 🔴 Critical 🟠 High 🟡 Medium ⚪ Low
🔒 Security 0 0 0 0
✅ Accuracy 0 0 0 0
🧰 Quality & Maintainability 0 0 0 0
Total 0 0 0 0

Key Findings

No material defects found.

Coverage

  • Files reviewed:
    • crates/codexbar-providers/src/grok.rs
  • Context read:
    • crates/codexbar-providers/src/grok_activity.rs
    • crates/codexbar-providers/src/lib.rs
    • crates/codexbar-providers/src (all other module sources, temp_dir usages)
    • AGENTS.md
  • Verified:
    • The compare response's base_commit.sha is 9df7787f0a68e8f23ee5235b89d1ad01014f6a97, its last commit SHA is e4a555b7250ba4b2abebc7ea2f88cd5817063e4b, status is ahead by 2 and behind by 0, and only one file changed (3 lines added, 2 removed)
    • PR #303's head and base SHAs match the reserved SHAs
    • The base collision is real: Home::with("activity") at grok.rs:696 produced codexbar-grok-activity-{pid}, the same path as grok_activity.rs:152, which that test removes with remove_dir_all
    • The new codexbar-grok-home- prefix does not overlap grok_activity's empty, activity or bad folders, nor codexbar-grok-nothing-here at grok.rs:858
    • The Home::with names in grok.rs (activity, quota-before-activity, renew, plan-without-pool, x-subscription, renew-403, other) are unique, so no two Home fixtures share a folder
    • No other provider module or file under crates/codexbar-providers/tests uses a codexbar-grok temp prefix
    • The Drop cleanup and every home.0 use derive from the new path, so cleanup still removes the folder each fixture created
    • No production code, dependency or configuration changed
    • The test: commit prefix follows the conventional-commit rule in AGENTS.md
  • Not verified:
    • The PR's claims of failing-before and 20/20 passing-after runs, because executing tests is forbidden
    • CI status and the merge commit's non-Grok content from main, because they are outside this diff's scope
    • Collisions with temp folders created by other crates' test binaries running at the same time, which is unlikely given the per-process pid suffix but was not checked
  • Tests run: None. Reviewer execution is disabled.

HemSoft full-spectrum review • 3 evidence-based passes • Reviewed head e4a555b7250ba4b2abebc7ea2f88cd5817063e4b • SFL v0

@HemSoft
HemSoft merged commit a444e81 into main Nov 5, 2026
7 checks passed
@HemSoft
HemSoft deleted the test/issue-298-unique-grok-test-folders branch November 5, 2026 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

model:gpt-6.1-sol PR authored by gpt-6.1-sol

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stop Grok tests sharing a temp folder in parallel runs

1 participant