GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(server): storage cleanup tests pass with the macOS default TMPDIR by whoisaldo · Pull Request #19541 · pingdotgg/t3code

Conversation

@whoisaldo

@whoisaldo whoisaldo commented Oct 14, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Closes #19532

Problem

On macOS with the default TMPDIR (/var/folders/...), storageCleanup.test.ts fails locally. ServerConfig.layerTest({ prefix }) hands the raw makeTempDirectoryScoped path to deriveServerPaths. /var is a symlink to /private/var, so storage cleanup's symlink protection rejects the whole non-canonical root and reports files as kept instead of removed. The server suite in CI runs on Ubuntu, where the temp dir has no symlink, so main stays green.

Change

makeTest resolves the generated temp directory with fs.realPath. Explicit test paths are unchanged, and on a temp dir with no symlink the resolved path is the same as before.

Scope and approval

Julius triaged #19532, labeled it accepted, and approved this exact change before I opened the PR (comment): "The fix you describe is the right size: call fs.realPath on the generated directory in makeTest only, and leave explicit baseDir arguments alone. A small PR doing just that is welcome." This PR is that one-line change in apps/server/src/config.ts.

Verification

Rechecked on 2026-10-16 against current main (bf990c625). The PR diff applies cleanly. macOS 15 (arm64), TMPDIR=$(getconf DARWIN_USER_TEMP_DIR), vp test run src/storageCleanup.test.ts:

  • main: 15 failed, 122 passed, including the test reported in [Bug]: storageCleanup test fails on macOS with the default TMPDIR #19532 (aggregates expired artifacts and rotated logs while retaining current logs).
  • main with this PR: 2 failed, 135 passed.
  • main with this PR and TMPDIR=/private/tmp (no symlink in the path): 137 passed.

The 2 remaining failures are reports an orphan under a managed root inside a project (direct and symlink), added after #19532 was filed. They fail the same way, but the test makes its own repo with makeTempDirectoryScoped({ prefix: "cleanup-repo-" }) (storageCleanup.test.ts:250), outside makeTest. The approved scope leaves them out; resolving that path in the test would fix them, as in #9570 and #9573.

Earlier run, on the PR's original base: the storage cleanup file went from 1 failed, 59 passed to 60 passed. Across every server test file that uses layerTest with a prefix (93 files, 2,326 tests), the only failures were three tests that fail the same way on unmodified main and don't go through makeTest's temp dir. vp fmt and vp lint on apps/server/src/config.ts were clean.

Model: Claude Opus 5.5 via Claude Code, in T3 Code; reviewed by GPT-6.1-Sol (Codex).

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Oct 14, 2026
@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Path: .coderabbit.config.ts
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e17a7862-95a1-47ea-82b2-bd39afde04b5
📥 Commits

Reviewing files that changed from the base of the PR and between aaf1c29865b82d7c9db4a33addd14e555aa17b4b and 8c87fef.

📒 Files selected for processing: 1
  • apps/server/src/config.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.

📝 Walkthrough

makeTest now resolves prefix-based temporary directories to their real paths. Explicit string base directories remain unchanged.

Changes: Test path resolution

Layer / File(s) Summary
Resolve prefix-based temporary paths
apps/server/src/config.ts
For prefix-based temporary directories, makeTest now applies fs.realPath. The explicit string-path branch is unchanged.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Bug fix · Severity of issue fixed: Low

Suggested reviewers: t3dotgg

Merge Risk: ⚪ Minimal · up to 8c87f

The change canonicalizes generated test paths while leaving explicit paths unchanged. No concrete merge risk is identified; proceed with normal checks.

### Architecture Summary

Architecture risk: 🔵 Low · up to 8c87f

The change affects 1 system.

Changed systems: apps/server

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — apps/server (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in apps/server/src/config.ts: For prefix-generated test directories, makeTest now canonicalizes the temporary directory with fs.realPath; previously it used the path returned by makeTempDirectoryScoped directly. Explicit string base directories are unaffected.
Pre-merge checks: Passed 3 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Description check Warning The description explains the problem, the fix, and focused verification results. It does not include the required "Scope and approval" section or explain why the change qualifies for an approval exemp… Add a "## Scope and approval" section. Link issue #19532 with the relevant maintainer approval comment, or explain why this focused fix is an obvious bug that qualifies without prior approval.
Passed Passed checks: 3 passed
Check name Status Explanation
Linked Issues check Passed Issue #19532 requires storage cleanup tests to pass with macOS's default symlinked TMPDIR. In apps/server/src/config.ts, makeTest applies fs.realPath to generated temporary directories before …
Out of Scope Changes check Passed The whole-pull-request diff changes only apps/server/src/config.ts. The change canonicalizes generated test directories to implement issue #19532. It does not change unrelated production behavior or…
Title check Passed The title clearly identifies the server test fix for storage cleanup on macOS with the default TMPDIR. It is concise and specific.
Full details: Description check

Explanation

The description explains the problem, the fix, and focused verification results. It does not include the required "Scope and approval" section or explain why the change qualifies for an approval exemption.

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@whoisaldo
fix(server): storage cleanup tests pass with the macOS default TMPDIR
8c87fef
@whoisaldo
whoisaldo force-pushed the fix/storage-cleanup-realpath branch from aaf1c29 to 8c87fef Compare October 14, 2026 19:03
@maria-rcks

maria-rcks commented Oct 17, 2026

Copy link
Copy Markdown
Collaborator

Note

Written by claude-opus-5-5 on behalf of Maria

Thanks for this. I'm closing it as part of PR triage. Right now we're only taking focused bug fixes from outside contributors (see Read this first), and this PR is not one.

From the review: This resolves generated test roots through realPath so storage cleanup tests accept macOS temporary directories. Test maintenance needs maintainer agreement before implementation.

If you think this was a mistake, message me on Twitter at @maria_rcks and I'll take another look.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@maria-rcks maria-rcks closed this Oct 17, 2026
@whoisaldo

whoisaldo commented Oct 17, 2026

Copy link
Copy Markdown
Contributor Author

@maria-rcks this was closed as test maintenance without maintainer agreement, but Julius approved this exact change on #19532 before I opened it (comment) and labeled the issue accepted. I didn't link that approval in the description; it's now under Scope and approval.

I also rechecked against current main. The diff still applies cleanly. On macOS, storageCleanup.test.ts now has 15 failures on main and 2 with this PR. The 2 that remain create their own temp repo outside makeTest, so the approved change doesn't reach them; details are under Verification.

Could you reopen it?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@only21mil only21mil mentioned this pull request Oct 23, 2026
fix(server): clean old logs and artifacts under a symlinked T3 home #24097
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

[Bug]: storageCleanup test fails on macOS with the default TMPDIR

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@whoisaldo @maria-rcks
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.