Refactoring: Introduce overlay/caching.ts#3819
Merged
henrymercer merged 1 commit intomainfrom Apr 13, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors overlay database caching by moving the Actions cache upload/download and cache-key logic out of src/overlay/index.ts into a dedicated src/overlay/caching.ts module, and extracts OverlayDatabaseMode into its own file.
Changes:
- Introduce
src/overlay/caching.ts(andcaching.test.ts) to own overlay-base database caching operations and cache key generation. - Extract
OverlayDatabaseModeintosrc/overlay/overlay-database-mode.tsand update imports across the codebase. - Remove caching-related code and tests from
src/overlay/index.ts/src/overlay/index.test.ts, keepingindex.tsfocused on overlay file/OID helpers and constants.
Show a summary per file
| File | Description |
|---|---|
| src/testing-utils.ts | Updates OverlayDatabaseMode import to the new dedicated module. |
| src/status-report.ts | Repoints overlay-base download stats type import to overlay/caching. |
| src/overlay/overlay-database-mode.ts | New home for OverlayDatabaseMode enum. |
| src/overlay/index.ts | Removes caching implementation, leaving overlay constants and file/OID helpers. |
| src/overlay/index.test.ts | Removes caching-related tests now covered by overlay/caching.test.ts. |
| src/overlay/caching.ts | New module containing overlay-base database cache upload/download + key generation. |
| src/overlay/caching.test.ts | New test suite covering overlay caching behavior and cache key stability. |
| src/init-action.ts | Updates imports to use overlay/caching and overlay/overlay-database-mode. |
| src/init-action-post-helper.ts | Updates OverlayDatabaseMode import to new module. |
| src/init-action-post-helper.test.ts | Updates OverlayDatabaseMode import to new module. |
| src/database-upload.ts | Updates OverlayDatabaseMode import to new module. |
| src/config-utils.ts | Updates OverlayDatabaseMode import to new module; keeps overlay constants import from ./overlay. |
| src/config-utils.test.ts | Updates OverlayDatabaseMode import to new module; keeps overlay constants import from ./overlay. |
| src/codeql.ts | Updates OverlayDatabaseMode import to new module; keeps overlay file helper imports from ./overlay. |
| src/analyze.ts | Updates OverlayDatabaseMode import to new module. |
| src/analyze-action.ts | Updates overlay caching call site to import from overlay/caching. |
| lib/upload-sarif-action-post.js | Generated build output reflecting the refactor. |
| lib/upload-lib.js | Generated build output reflecting the refactor. |
| lib/start-proxy-action-post.js | Generated build output reflecting the refactor. |
| lib/resolve-environment-action.js | Generated build output reflecting the refactor. |
| lib/init-action.js | Generated build output reflecting the refactor. |
| lib/init-action-post.js | Generated build output reflecting the refactor. |
| lib/autobuild-action.js | Generated build output reflecting the refactor. |
| lib/analyze-action.js | Generated build output reflecting the refactor. |
| lib/analyze-action-post.js | Generated build output reflecting the refactor. |
Copilot's findings
- Files reviewed: 16/28 changed files
- Comments generated: 0
mbg
approved these changes
Apr 13, 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.
Refactor caching logic into
overlay/caching.tsin preparation for #3809.Risk assessment
For internal use only. Please select the risk level of this change:
Which use cases does this change impact?
None yet.
How did/will you validate this change?
.test.tsfiles).If something goes wrong after this change is released, what are the mitigation and rollback strategies?
How will you know if something goes wrong after this change is released?
Are there any special considerations for merging or releasing this change?
Merge / deployment checklist