Skip to content

fix(validation): support nested Git worktrees without leaking linked private files (#663) - #667

Merged
tt-a1i merged 4 commits into
mainfrom
pi/fix-validation-663-direct-3-056048
Oct 4, 2026
Merged

tt-a1i merged 4 commits into
mainfrom
pi/fix-validation-663-direct-3-056048

Conversation

@tt-a1i

@tt-a1i tt-a1i commented Oct 4, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

Related to #663. Validation differs for otherwise identical worktrees placed below .git: Biome omits React domain inference, and Vite's absolute **/.git/** denial matches the checkout's ancestor and prevents jsdom tests from loading ordinary source modules. Paired inside/outside probes used the same revision, dependencies, lockfile, and relative test filter.

Value

Make isolated worktree validation reproducible without deleting existing suppressions or globally allowing Git metadata.

Approach

  • Move disposable Windows fixtures out of TEMP short-path aliases such as RUNNER~1. Vite intentionally rejects these aliases before its deny matcher; retain that restriction, strict allowlists and sensitive-target denial. Unix continues using the ordinary temporary directory.

  • Explicitly enable Biome's recommended React domain for web UI TS/TSX files.

  • For Vitest roots nested under .git, wrap the resolved filesystem-denial matcher so ordinary checkout files are matched relative to that root while .git components inside the checkout remain denied.

  • Check both lexical paths and read-only realpaths, preserving strict filesystem access and the original matcher for targets outside the root. This fixes an independently reproduced HTTP leak through a nonsensitive alias to a sensitive target. Missing paths retain ordinary 404 responses; other realpath failures deny access. The development web server configuration is unchanged.

  • Add paired Git-worktree and real Vite matcher regressions; document the investigation in docs/research/WORKTREE_VALIDATION_663.md.

Validation

Current head: 00025148.

  • Current-head Linux/Windows runtime, UI and Web E2E CI passed. The real HTTP and paired nested/external Git-worktree regressions passed on Windows.
  • Local bun run check passed; HTTP/worktree regressions passed 2/2; process-group coverage and real Pi setup fixture passed 5/5.
  • A real Windows failure established that Vite rejects short-path TEMP aliases before the custom deny matcher. Moving only disposable fixtures fixed it without widening filesystem access.
  • The remaining Windows setup subprocess timeout was resolved through the existing isolated-process group, keeping its original time bound.
  • git merge-tree against main 94f6dfb2 found no conflicts.
  • No live installation/reload or TUI smoke. Human approval remains pending.

Impact

  • User-visible: no shipped application behavior change intended.
  • Model-visible: none.
  • Runtime/lifecycle: validation configuration only; development server settings are not changed.
  • Persisted config/data: no user configuration changes.
  • Compatibility/risk: relies on Vite 8.2.0's private resolved fsDenyGlob hook and fails closed if that hook disappears; future upgrades need review.

@tt-a1i

tt-a1i commented Oct 4, 2026

Copy link
Copy Markdown
Collaborator Author

Independent post-publication review

Reviewed exact HEAD 2b80444bcc2e28674df409ec82af3a279d7c0e10, base 94f6dfb29343a699010440f37734ac14582c84af. Published diff matches the independently reviewed candidate and excludes the preserved untracked dependency symlink.

Security / compatibility

  • [Fixed/re-reviewed] Sensitive symlink targets are checked through lexical and real paths; the focused HTTP regression denies the prior leak while ordinary files, modules, linked modules and dependencies remain accessible. Strict mode and allowlist are unchanged.
  • [Information] Private Vite-hook upgrade failures remain fail-closed; Windows junction/file-symlink test boundaries are disclosed. Production Web configuration is unchanged.

Validation

  • [Information] Final focused checks are correctly distinguished from the previous revision's check/full UI results and failed full Node suite. No baseline attribution or full-suite green claim.
  • [Information] Single post-publication CI snapshot was queued/pending, with one observed in progress and notification skipped. No polling or reruns.

No dropped or misrepresented work found. Draft only; no approval, merge, release, or live installation.

@tt-a1i
tt-a1i marked this pull request as ready for review October 4, 2026 06:39
@tt-a1i
tt-a1i merged commit cbd30de into main Oct 4, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant