Repository navigation
fix(start): suggest gate commands only from exactly named files (#249, #251) - #252
Merged
Merged
Conversation
…#251) discover_gate_commands opened its well-known files by name, so on a case-insensitive filesystem opening "makefile" found "Makefile" and the suggestion named a file that is not on disk (and "PACKAGE.JSON" was read as package.json). It now reads a file only when a directory entry has exactly its name, so the source is true to the disk and the result is the same on every filesystem. This also fixes the test that failed on macOS. The TUI Details test (#251) depended on git's error being one line: on a runner where git stops at a filesystem boundary the error is two lines, Details escapes the newline, and the raw string no longer matched. The test now pins the source-check failure (one-line and two-line) and compares the escaped form Details shows. 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.
Closes #249
Closes #251
What changes
syncmill startgate discovery (#249)discover_gate_commandsopened its well-known files by name. On a case-insensitive filesystem (the macOS default), openingmakefilefoundMakefile, so a repository with only aMakefileshowedmake testas coming frommakefile. The same applied to the other files:PACKAGE.JSONwas read aspackage.json.os.scandir) and reads a file only when a directory entry has exactly its name. This coverspyproject.toml,package.json,GNUmakefile/makefile/Makefile(still in GNU make's order),Cargo.tomlandgo.mod._readsafeguards (regular file, no symlink, bounded read) are unchanged.Flaky TUI test (#251)
test_details_and_compare_share_wording_with_the_cli_jsonchecked the raw apply-blocker string inside the Details text. The blocker carries git's stderr. On a runner where git stops at a filesystem boundary that stderr is two lines; Details escapes the newline as\x0a, so the raw string no longer matched. That is the 3.14 failure on Send approved project lessons to Room rounds (#174) #250.repository_fingerprintraises a one-line or a two-line reason). It checks that the JSON keeps the raw reason and that Details shows each blocker as one escaped line (printable_name). Test-only, so no CHANGELOG entry.Tests
test_discovery_names_the_makefile_as_it_is_stored(Makefile / makefile / GNUmakefile) andtest_discovery_ignores_a_file_whose_name_differs_only_in_case(5 files). Both make opening case-insensitive, so they bite on case-sensitive Linux too.test_discovery_reads_known_files_and_never_runs_them, which failed on macOS before, now passes.ruff check .passes.🤖 Generated with Claude Code