Repository navigation
facts: re-check follow-ups - #1067
Merged
Merged
Conversation
- a project name taken from a match ending in "." or ".." is dropped; a remote's ".git" is dropped - a record folder that is a link out of the record repo is not searched - the record search's time limit is checked for each folder, not only each file; files with a NUL byte are not text - --records names the state-table copy when that is the only hit, and prints a note (exit 0) when no record repo is configured - uninstall's running-code check ignores an OPTIONAL_LINKS path that belongs to another program Refs #1063 Co-Authored-By: Claude Opus 5.5 <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.
Follow-up to #1065 (the
factscommand, #1063). It fixes the points the re-check review found after the merge.What
facts.pyproject_name):matchthat ends in/.or/..(or is only/) goes through the same name rule as the config'snamekey. If it fails, the row gets no record folder. Before,/srv/example/..gave.., so the search would have looked at the repo's root..git(github.com/example/project.git) givesproject. A folder match keeps its name as it is.projectsDiror a shared folder that is a link to a place outside the record repo is not searched. Its real path must be inside the repo's real path. A record repo that is itself reached by a link still works.facts --records:facts --no-records <words>for the rows. Before, it said "no line holds all of".note:line and exits 0.OPTIONAL_LINKSpath that belongs to another program. A program running from an unrelated/usr/local/bin/factsno longer blocks uninstall. Our own link still does.factsexisted leaves a link to a file that is not there, until a newer release is installed or the kit is uninstalled.General vs project
factscommand, its record search and the shared installer. No project, person, path or machine is named. Tests use temp folders and/srv/example/...andgithub.com/example/...names.Tests
fork-kit/agent-guards/tests/facts.test.py: 47 tests, up from 42. Covered:.,..,/and.gitmatches;projectsDirand a shared folder linked out of the repo;--recordswhen only a mirrored copy matches;--recordswith no record repo.The mirrored-table test uses the new
search_recordsresult(lines, notes, copies).install.test.py: a program running from an unrelated/usr/local/bin/factsdoes not block uninstall, and a program running from our own link does.These pass locally:
fork-ci-testsforfork-kit/agent-guards/(9 files) andfork-kit/common/;The desk, schedule-kick and update-policy kits pass except for checks tied to this host: a full disk, a group-writable temp folder, and a stray
__pycache__in a local checkout. None of these touches this change.The seam check, the upstream-files check and fork-tests-drift (78 tests) also pass.
🤖 Generated with Claude Code