Skip to content

Update prod#493

Merged
e11sy merged 3 commits intoprodfrom
master
Dec 15, 2025
Merged

Update prod#493
e11sy merged 3 commits intoprodfrom
master

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

Auto-generated prod update suggestion

talyguryn and others added 3 commits December 8, 2025 17:38
* Improve quota notification and blocking logic

Refactored the quota check to ensure workspaces are blocked and notified only when appropriate. Added logging for both blocking and approaching quota limits, and clarified notification task handling.

* Suppress magic number lint warning in logger

Added an ESLint directive to ignore the magic number warning for the percentage calculation in the workspace events limit log message.
* pull new hawk types

* Track blocked date for workspaces in LimiterWorker

Adds a 'blockedDate' property to workspaces when blocking and unblocking them. This allows tracking when a workspace was blocked or cleared, improving auditability and state management.

* Add and populate blockedDate for blocked workspaces

Introduces the blockedDate field to workspace updates in dbHelper and ensures it is set for all blocked workspaces, including a temporary fix for existing records missing this field. This change supports better tracking of when a workspace was blocked and prepares for future removal of the migration code.

* Add tests for blockedDate handling in workspaces

Extended tests to cover setting and clearing the blockedDate field when blocking and unblocking workspaces. Added scenarios for updating blockedDate when missing and verifying correct behavior during workspace state transitions.

* Update index.ts

* Refactor blocked workspace reminder to use days after block

Renamed variables and template placeholders from 'daysAfterPayday' to 'daysAfterBlock' to more accurately reflect the time since a workspace was blocked. Updated related logic, types, and templates to use the new naming and calculation. Added a utility function to compute days after block in payday.ts.

* Update yarn.lock to deduplicate and reorder entries

This commit cleans up the yarn.lock file by removing duplicate entries, consolidating package references, and reordering dependencies for consistency. No package versions were changed; this improves maintainability and reduces lockfile bloat.

* Rename daysAfterPayday to daysAfterBlock in payload

Updated variable and property names from daysAfterPayday to daysAfterBlock in SenderWorker to reflect the correct payload structure and improve clarity.

* Handle undefined daysAfterBlock in reminders logic

Updated countDaysAfterBlock to return undefined instead of null when blockedDate is missing. Adjusted paymaster worker logic to check for undefined, ensuring reminders are sent only when daysAfterBlock is valid.

* Adjust blockedDate calculation in PaymasterWorker test

Updates the blockedDate assignment to subtract days based on expectedDaysAfterBlock in the PaymasterWorker test, improving test accuracy for blocked subscriptions.

* Update workers/paymaster/tests/index.test.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update workers/paymaster/src/index.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update lib/utils/payday.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update dbHelper.test.ts

* Remove obsolete test and update blocked workspace logic

Deleted a test for setting blockedDate on already blocked workspaces in limiter tests, as the scenario is no longer relevant. Updated workspace mock to include blockedDate as undefined. Simplified reminder logic in PaymasterWorker by removing unnecessary undefined check for daysAfterBlock.

* Refactor blockedDate handling in workspace mocks

Removed redundant logic for setting blockedDate when workspace is already blocked in LimiterWorker. Standardized blockedDate type to Date (not Date | null/undefined) in test mocks and updated test cases to use null instead of undefined where appropriate.

* Update index.test.ts

* Update dbHelper.test.ts

* Update index.test.ts

* Update index.test.ts

* Update workers/paymaster/tests/index.test.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update index.test.ts

* Update workers/paymaster/src/index.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update lib/utils/payday.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update workers/paymaster/src/index.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update emailOverview.ts

* Update workers/limiter/src/index.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update lib/utils/payday.ts

Co-authored-by: Peter <specc.dev@gmail.com>

* Update index.test.ts

* Update index.test.ts

* Update index.ts

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Peter <specc.dev@gmail.com>
…orks (#492)

* feat(): arrange babel plugins respectfully to vue and svetle frameworks

* chore(): add context to hawk errors and cover utils with tests

* chore(): clean up

* Update workers/javascript/src/utils.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* chore(): fix tests description

* imp(): move getFunctionContext to utils

* chore(): lint fix

* chore(): improve jsdoc

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@e11sy e11sy merged commit d18c7ec into prod Dec 15, 2025
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants