Skip to content

fix(storage): ignore invalid ancestor Git markers - #4807

Open
faga295 wants to merge 1 commit into
apache:mainfrom
faga295:fix/invalid-enclosing-git-marker
Open

fix(storage): ignore invalid ancestor Git markers#4807
faga295 wants to merge 1 commit into
apache:mainfrom
faga295:fix/invalid-enclosing-git-marker

Conversation

@faga295

@faga295 faga295 commented Sep 4, 2026

Copy link
Copy Markdown

Summary

Ignore structurally invalid .git entries in strict ancestors when classifying a selected folder, while preserving fail-closed behavior for a malformed .git entry in the selected folder itself. Valid Git directories, gitdir: indirection files, repositories, and linked worktrees continue to resolve normally.

Add regression coverage for Project Catalog classification and workspace identity marker publication.

Fixes #4806

Verification

  • npm --workspace @maka/storage run build
  • npm --workspace @maka/storage run typecheck
  • npm --workspace @maka/storage run test:dist — 1,112 passed, 8 skipped, 0 failed
  • npx biome check packages/storage/src/git-entry.ts packages/storage/src/__tests__/project-catalog.test.ts packages/storage/src/__tests__/workspace-identity.test.ts
  • npm run check:asf-headers
  • Verified the affected real-world folder now resolves with kind: 'folder'

AI use

Select exactly one:

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Tool(s) and scope: OpenAI Codex — root-cause analysis, implementation, regression tests, verification, and PR drafting.

Checklist

  • Tests cover the change and fail without it
  • Lint, format, typecheck and the affected suites pass locally

Does this PR entail a change in behavior?

  • Yes — described under Summary above
  • No

Generated-by: OpenAI Codex
@github-actions github-actions Bot added the effort/M Under 500 readable lines label Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/M Under 500 readable lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Invalid ancestor .git marker prevents adding a plain folder

1 participant