fix(assess): skip gitlink dirs, snapshot symlinks without following - #1
Open
mavxdegods wants to merge 1 commit into
Open
mavxdegods wants to merge 1 commit into
mavxdegods wants to merge 1 commit into
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
git ls-filesincludes gitlink (mode 160000) submodule entries and symlinks (mode 120000); the assessment source snapshot handled neither.IsADirectoryError→ASSESSMENT_SOURCE_READaborted assess on any repo with submodules.ASSESSMENT_SOURCE_ESCAPE.session_ux._source_identityand theproject.pydigest).contracts/evm/lib/layerzero-v2submodule,contracts/xel-v2-refsymlink);assess --repo daynow returns a full assessment.Tests
# intent:comments (gitlink viaupdate-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