Skip to content

Refactoring: Introduce overlay/caching.ts#3819

Merged
henrymercer merged 1 commit intomainfrom
henrymercer/refactor-overlay-caching
Apr 13, 2026
Merged

Refactoring: Introduce overlay/caching.ts#3819
henrymercer merged 1 commit intomainfrom
henrymercer/refactor-overlay-caching

Conversation

@henrymercer
Copy link
Copy Markdown
Contributor

Refactor caching logic into overlay/caching.ts in preparation for #3809.

Risk assessment

For internal use only. Please select the risk level of this change:

  • Low risk: Changes are fully under feature flags, or have been fully tested and validated in pre-production environments and are highly observable, or are documentation or test only.

Which use cases does this change impact?

None yet.

How did/will you validate this change?

  • Unit tests - I am depending on unit test coverage (i.e. tests in .test.ts files).

If something goes wrong after this change is released, what are the mitigation and rollback strategies?

  • Rollback - Change can only be disabled by rolling back the release or releasing a new version with a fix.

How will you know if something goes wrong after this change is released?

  • Telemetry - I rely on existing telemetry or have made changes to the telemetry.
    • Alerts - New or existing monitors will trip if something goes wrong with this change.

Are there any special considerations for merging or releasing this change?

  • No special considerations - This change can be merged at any time.

Merge / deployment checklist

  • Confirm this change is backwards compatible with existing workflows.
  • Consider adding a changelog entry for this change.
  • Confirm the readme and docs have been updated if necessary.

@henrymercer henrymercer requested a review from mbg April 13, 2026 15:29
@henrymercer henrymercer requested a review from a team as a code owner April 13, 2026 15:29
Copilot AI review requested due to automatic review settings April 13, 2026 15:29
@github-actions github-actions bot added the size/XXL May be extremely hard to review label Apr 13, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 (and caching.test.ts) to own overlay-base database caching operations and cache key generation.
  • Extract OverlayDatabaseMode into src/overlay/overlay-database-mode.ts and update imports across the codebase.
  • Remove caching-related code and tests from src/overlay/index.ts / src/overlay/index.test.ts, keeping index.ts focused 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

@henrymercer henrymercer enabled auto-merge April 13, 2026 15:44
@henrymercer henrymercer added this pull request to the merge queue Apr 13, 2026
Merged via the queue into main with commit 8339b92 Apr 13, 2026
229 checks passed
@henrymercer henrymercer deleted the henrymercer/refactor-overlay-caching branch April 13, 2026 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XXL May be extremely hard to review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants