Skip to content

Fix unknown-size file attrs#21

Merged
elithrar merged 1 commit into
mainfrom
fix-issue-16-empty-files
Jun 13, 2026
Merged

Fix unknown-size file attrs#21
elithrar merged 1 commit into
mainfrom
fix-issue-16-empty-files

Conversation

@elithrar

Copy link
Copy Markdown
Collaborator

Fixes #16. Unknown-size blobless files should not be exposed through FUSE as real zero-byte files.

Issue #16 reports that after batch size resolution fails, tracked blobless files can stat as 0 bytes, cat returns no content, and git status marks them modified before prefetch catches up.

  • Hydrate unknown-size base file attrs during lookup and cached getattr
  • Keep known-size, overlay, directory, and symlink attrs on the cheap metadata path
  • Preserve GIT_NO_LAZY_FETCH=1 and retain partial batch size results if cat-file exits after writing stdout
  • Return EIO for attr hydration failures instead of making existing files look deleted

User-facing result:

stat packages/wrangler/src/index.ts
cat packages/wrangler/src/index.ts
git status --short --untracked-files=no packages/wrangler/src/index.ts

The target file now reports its hydrated size, reads its Git blob content, and remains clean once hydration succeeds.

Tests passed:

  • go build ./cmd/artifact-fs
  • go vet ./...
  • go test ./...
  • go test ./internal/fusefs ./internal/gitstore
  • AFS_RUN_BENCH=1 go test -run TestBenchRepos -v
  • AFS_RUN_E2E_TESTS=1 go test -run '^TestE2E$' -v .\n- AFS_RUN_E2E_TESTS=1 go test -run TestE2E -v . passed on retry

@elithrar elithrar merged commit e0c27a9 into main Jun 13, 2026
5 checks passed
@elithrar elithrar deleted the fix-issue-16-empty-files branch June 13, 2026 14:42
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.

git status shows all files as modified on fresh blobless-clone mount

1 participant