Skip to content

fix(assess): skip gitlink dirs, snapshot symlinks without following - #1

Open
mavxdegods wants to merge 1 commit into
mainfrom
day-fix-assess-gitlink-symlink
Open

mavxdegods wants to merge 1 commit into
mainfrom
day-fix-assess-gitlink-symlink

Conversation

@mavxdegods

Copy link
Copy Markdown
Member

Summary

  • git ls-files includes gitlink (mode 160000) submodule entries and symlinks (mode 120000); the assessment source snapshot handled neither.
  • Reading a gitlink as a file raised IsADirectoryErrorASSESSMENT_SOURCE_READ aborted assess on any repo with submodules.
  • Resolving a tracked symlink with an out-of-repo target aborted with ASSESSMENT_SOURCE_ESCAPE.
  • Fix: snapshot symlinks as their target text (exact git blob semantics, never followed) and skip gitlink directories — in both snapshot implementations (session_ux._source_identity and the project.py digest).
  • Found live on dayprotocol/day (contracts/evm/lib/layerzero-v2 submodule, contracts/xel-v2-ref symlink); assess --repo day now returns a full assessment.

Tests

  • 2 regression tests with # intent: comments (gitlink via update-index --cacheinfo 160000, external symlink); sabotage-checked — both fail without the fix.
  • pytest tests/test_project.py tests/test_cli.py: 62 passed.

🤖 Generated with Claude Code

…owing

git ls-files lists gitlink (160000) submodule entries and symlinks (120000).
Reading a gitlink as a file raised IsADirectoryError; resolving a symlink with
an external target aborted with ASSESSMENT_SOURCE_ESCAPE. Snapshot symlinks as
their target text (exact git blob semantics) and skip gitlink directories, in
both snapshot implementations (session_ux._source_identity, project digest).
Found live on dayprotocol/day (layerzero-v2 submodule, xel-v2-ref symlink).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

1 participant