Refactor: extract shared utils, fix logging, async pattern, and missing guards#1
Merged
HiGarfield merged 1 commit intomainfrom Mar 25, 2026
Merged
Conversation
…d guards Co-authored-by: HiGarfield <32226909+HiGarfield@users.noreply.github.com> Agent-Logs-Url: https://github.com/HiGarfield/cachewrtbuild/sessions/b6c68633-68f8-4d69-b554-894c31229c91
Copilot created this pull request from a session on behalf of
HiGarfield
March 25, 2026 16:14
View session
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
fetch.jsandsave.jsduplicated boolean parsing and cache key/path building logic, usedconsole.loginstead ofcorelogging APIs, mixedasync/awaitwith.then()/.catch(), and had several correctness gaps (redundantprocess.exit(1), no guard against empty paths,save.jsignoring thecleaninput entirely).Changes
New
utils.jsparseBooleanInput— consolidated from both filesbuildBaseConfig— consolidates prefixchdir, key string construction, and toolchain path building shared by both stepsfetch.jsutils.js; removes local duplicationconsole.log(keyString, restoreKeys)→core.debug(...)with individual labeled entriesprocess.exit(1)aftercore.setFailed()(already sets exit code 1)cache.restoreCachewhenpathsis emptysave.jsutils.js; removes local duplicationclean=true— previously the input was silently ignored, risking an unintended save after a cache-busting runcore.debugmessage.then()/.catch()chained ontoawaitwith pureasync/awaitconsole.log→core.info/core.debugcache.saveCachewhenpathsis empty