fix(setup): implement isSetup() to check for matched.json marker#513
Open
karthik120710 wants to merge 2 commits into
Open
fix(setup): implement isSetup() to check for matched.json marker#513karthik120710 wants to merge 2 commits into
karthik120710 wants to merge 2 commits into
Conversation
Implement the isSetup function to check for the existence of the matched-rules file, indicating whether the setup has been completed. Add unit tests for isSetup to verify its behavior when the matched.json file is present and absent. Signed-off-by: Karthik Rajan <karthikrajanmr@gmail.com>
|
The title of this pull request does not match the conventional commits format. Refer to the CONTRIBUTING.md file for more information. |
|
The title of this pull request does not match the conventional commits format. Refer to the CONTRIBUTING.md file for more information. |
Author
|
Hi @txabman42 @kakkoyun can u review my pr |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #513 +/- ##
=========================================
+ Coverage 0 62.88% +62.88%
=========================================
Files 0 62 +62
Lines 0 4766 +4766
=========================================
+ Hits 0 2997 +2997
- Misses 0 1525 +1525
- Partials 0 244 +244
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
y1yang0
approved these changes
May 18, 2026
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.
Description:
Summary
Fixes the unimplemented
isSetup()guard intool/internal/setup/setup.go.Resolves #
Changes
isSetup()to check for the presence ofmatched.json(written bystore()at the end of a successfulSetuprun) instead of alwaysreturning
falseWhy
Without this fix, the guard at
Setup()line 149 would never short-circuit, causing setup to re-run on every build once the guard is wired in —resulting in redundant re-initialization.
Test Plan
go test ./tool/internal/setup/... -run TestIsSetuppassesgo test ./tool/internal/setup/...Notes from the guidelines:
[chore] if reviewers flag it, or ask a maintainer to add the Skip Changelog label.
isSetup() is unimplemented and hard-codes false #512