fix(web): denylist both tilde+absolute path forms on disable (INT-2799 follow-up)#302
Merged
Merged
Conversation
…9 follow-up) The initial INT-2799 fix added only the toggle's path form to removedConfigPaths. But config.ts loads allowedProjects WITHOUT expandPath, so a config-defined repo lands in the runner as the tilde form (~/dev/x) while the dashboard toggle sends an absolute path — and the denylist filter is a raw string match. A single-format entry lets the config.yaml tilde path slip the filter and the project revives. Add a pathDenylistVariants helper and record/clear BOTH tilde+absolute forms on disable/enable/pin. Also fixes the re-enable trap where only the absolute form was cleared and a lingering tilde entry kept the repo denied.
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 hardening on #301 (INT-2799).
The initial fix recorded only the dashboard toggle's path form in
removedConfigPaths. Butconfig.tsloadsallowedProjectswithoutexpandPath, so a config-defined repo enters the runner as the tilde form (~/dev/x) while the dashboard toggle sends an absolute path — and the denylist filter inapplyReposConfigis a raw string match. A single-format entry lets config.yaml's tilde path slip the filter, so the project still revives on restart.Fix: add a
pathDenylistVariantshelper and record/clear both tilde + absolute forms on disable / enable / pin. Also closes the re-enable trap where only the absolute form was cleared and a lingering tilde entry kept the repo denied.Validation
npx tsc --noEmit— cleanweb.reposReload.test.ts: 7 pass incl. new "denylists the tilde form so config.yaml raw allowedProjects is caught"🤖 Generated with Claude Code