Skip to content

INTER-2921: test: run functional tests on a 29-day window and enable ruleset checks in CI - #313

Merged
JuroUhlar merged 2 commits into
mainfrom
test-functional-search-29-days
Nov 17, 2026
Merged

JuroUhlar merged 2 commits into
mainfrom
test-functional-search-29-days

Conversation

@JuroUhlar

@JuroUhlar JuroUhlar commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

Ticket: INTER-2921

Why

Test workspaces on the default data retention reject event searches older than 30 days, and the ruleset checks never ran in CI because RULESET_ID wasn't passed.

Things to note

  • The tests only need recent events, so 29 days works on any retention.
  • Rule IDs are no longer hard-coded: the checks assert the ID's shape and compare everything else, so a recreated ruleset only needs the RULESET_ID secret updated.

Verification

  • Ran node functionalTests.mjs locally against the test workspace with RULESET_ID set: all checks passed, including both ruleset checks.

Change outline

  functionalTests.mjs
- search start = now - 89 days
+ search start = now - 29 days
- rule_id: 'r_PMwGXkWtG20KZn'        // block rule
- rule_id: 'r_OPnYaU9dKEke9X'        // allow rule
+ rule_id must match /^r_/; rest of rule_action compared as before

  .github/workflows/functional_tests.yml
+ RULESET_ID: ${{ secrets.RULESET_ID }}

Test workspaces on the default data retention reject search start times older than 30 days. The tests only need recent events, so a 29-day window works on any retention.
@changeset-bot

changeset-bot Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: d84f5b3

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Coverage report

St.❔
Category Percentage Covered / Total
🟢 Statements 98.25% 168/171
🟢 Branches 97.03% 98/101
🟢 Functions 100% 37/37
🟢 Lines 98.21% 165/168

Test suite run success

137 tests passing in 32 suites.

Report generated by 🧪jest coverage report action from d84f5b3

Show full coverage report
St File % Stmts % Branch % Funcs % Lines Uncovered Line #s
🟢 All files 98.24 97.02 100 98.21
🟢  src 98.54 98.76 100 98.51
🔴   ...edApiTypes.ts 0 0 0 0
🔴   index.ts 0 0 0 0
🟢   sealedResults.ts 100 100 100 100
🟢   ...rApiClient.ts 96.15 97.22 100 96.15 364,368
🟢   types.ts 100 100 100 100
🟢   urlUtils.ts 100 100 100 100
🟢   webhook.ts 100 100 100 100
🟢  src/errors 97.05 90 100 96.96
🟢   apiErrors.ts 100 100 100 100
🟢   ...orResponse.ts 100 100 100 100
🟢   toError.ts 87.5 88.88 100 87.5 21
🟢   unsealError.ts 100 50 100 100 14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues were identified for the functional-test search window adjustment to 29 days.

No open issues 🎉

What changed in this PR

This PR narrows the functional tests’ event search window to avoid rejection by workspaces with the default 30-day data retention.

Changes:

  • Reduces the search window from 89 days to 29 days, also narrowing the oldest-event check.
  • Updates the inline comment to explain the retention constraint.
File Description
tests/​functional-tests/​functionalTests.mjs Uses a 29-day event search window and updates its explanatory comment.

Review effort: Balanced

Pass RULESET_ID to the functional tests and check rule_id by shape, so a recreated ruleset needs only the secret updated.
@JuroUhlar JuroUhlar changed the title test: shorten functional test search window to 29 days test: run functional tests on a 29-day window and enable ruleset checks in CI Nov 17, 2026
@JuroUhlar
JuroUhlar requested a balanced review from Copilot November 17, 2026 17:28
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ This PR doesn't contain any changesets. If there are user-facing changes, don't forget to run:

pnpm exec changeset

to create a changeset.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are reported for the functional-test and CI updates.

No open issues 🎉

Review effort: Balanced

@JuroUhlar
JuroUhlar marked this pull request as ready for review November 17, 2026 20:52
@JuroUhlar
JuroUhlar merged commit a3f52e4 into main Nov 17, 2026
20 checks passed
@JuroUhlar
JuroUhlar deleted the test-functional-search-29-days branch November 17, 2026 20:52
@JuroUhlar JuroUhlar changed the title test: run functional tests on a 29-day window and enable ruleset checks in CI INTER-2921: test: run functional tests on a 29-day window and enable ruleset checks in CI Nov 17, 2026
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.

3 participants