Skip to content

test(fixtures): isolate unreadable history and repository discovery - #2049

Draft
dnlrsls wants to merge 1 commit into
feat/path-fence-safetyfrom
test/path-fence-filesystem-fixtures
Draft

dnlrsls wants to merge 1 commit into
feat/path-fence-safetyfrom
test/path-fence-filesystem-fixtures

Conversation

@dnlrsls

@dnlrsls dnlrsls commented Oct 10, 2026 •

Copy link
Copy Markdown
Member

PR Type

  • Maintenance/tooling (type:chore)

Summary

Preserve exact-path unreadable-file rejection and bytes with restored EACCES fallback; isolate Git discovery with an outer barrier and a positive nested-parent witness.

Changes

Edit surface Outcome
tests/history-gc.test.ts; tests/session-worktree-registry.test.ts; docs/isolated-filesystem-fixtures.md filesystem work unit

Test Plan

Independent38/38, zero skips; parent38/38. POSIX real-permission branch unexecuted.

Chain Context

Field Value
Chain path-fence safety follow-ups
Tracker PR #2048 (draft/no-merge)
Position 1 of3
Base feat/path-fence-safety
Depends on #2048; #1610 approved pin
Follow-up #2050 launcher
Review budget 81 /400
Starts at immediate parent branch; inherited foundation excluded
Ends with filesystem unit commit 5cccc9c0eef42ef7af84b75ab67073e29c14dfa3
#1610 approved pin -> #2048 tracker
  📍 #2049 filesystem
    #2050 launcher
      #2051 security

Scope / rollback / autonomy

Includes only filesystem unit and accompanying tests/docs. Rollback reverts this unit's listed files/commit without reverting prior slices. Excludes new production launcher/history/registry changes, unclassified corpus fixes, merge and automatic base update. CI expected-green is NOT asserted; drafts remain blocked from integration until CI/base decisions.

Linked Issue

Closes #1660
Related: #1659 (primary fix is inherited from #1610, not authored here). Both issues retain status:approved.

Verification limits

Contributor Checklist

  • Linked approved issue and added exactly one matching type label.
  • Conventional commits; no Co-Authored-By trailers.
  • Tests/docs accompany their behavior; no production launcher/history/registry changes in fixture units.
  • Modified-shell/skill checks: N/A, none modified.
  • Complete CI green and base reconciled before merge.

@dnlrsls dnlrsls added the type:chore Maintenance, tooling, tests, build, or CI changes label Oct 10, 2026
@coderabbitai

coderabbitai Bot commented Oct 10, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@barbatdev

Copy link
Copy Markdown
Contributor

Fleet review (qwen)

Test fixtures: isolate unreadable history and repository discovery. Preserve EACCES fallback, outer barrier for Git discovery. Part 1/3 of path-fence safety chain. 38/38 tests pass.

No findings.

Verdict: clean

@barbatdev

Copy link
Copy Markdown
Contributor

Fleet review (deepseek)

Test-only fixture-isolation slice (#1660 follow-ups, position 1/3 of the path-fence chain): the history-GC unreadable-input test now restores fs.readFileSync/fs.openSync in finally and asserts byte-for-byte preservation of the sealed original, injecting a scoped EACCES only for that exact fixture path when real chmod 000 cannot seal the file (Windows/privileged POSIX); the session-worktree-registry fixture writes invalid .git metadata to stop Git discovering an ambient ancestor and adds a positive nested-parent witness. Monkeypatching is bounded to the sealed path, restored in finally, and the mock branches assert the denied reads actually happened, so a silently-unsealed input fails rather than passing. No defects found.

No findings.

Verdict: clean

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:chore Maintenance, tooling, tests, build, or CI changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants