Skip to content

test(desktop): contract test — every cron helper is profile-scoped - #67602

Merged
teknium1 merged 1 commit into
mainfrom
tests/cron-scope-contract
Jul 19, 2026
Merged

test(desktop): contract test — every cron helper is profile-scoped#67602
teknium1 merged 1 commit into
mainfrom
tests/cron-scope-contract

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Summary

Adds a vitest contract test locking every desktop cron helper to profileScoped(), so the multi-profile/remote cron routing fixed in #67493 can't silently regress. Salvaged from #59888 by @isfttr — his PR independently found and fixed the same missing-scope bug (#49948#67493 landed the fix first), but his contract test is a real addition we didn't have; authorship preserved.

Changes

  • apps/desktop/src/hermes-cron-scope.test.ts (new): asserts all 9 cron helpers (list/get/runs/create/update/pause/resume/trigger/delete) omit profile when none is active and attach it when setApiRequestProfile() is set.
  • contributors/emails/lucas.fernandes.df@gmail.com: contributor mapping for release attribution.

Validation

Check Result
npx vitest run src/hermes-cron-scope.test.ts 2/2 pass
tsc / eslint / prettier clean

Infographic

cron-scope-contract

Salvaged from #59888 by @isfttr: the profileScoped() fix itself landed
via #67493 (salvaged from the earlier #49948), but this PR contributed a
contract test locking all 9 cron helpers to the active gateway profile —
omitted when none is set (single-profile users unaffected), attached when
one is active. Keeps the multi-profile/remote cron routing from silently
regressing.
@alt-glitch alt-glitch added type/test Test coverage or test infrastructure P3 Low — cosmetic, nice to have comp/desktop Electron desktop app (apps/desktop/*) comp/cron Cron scheduler and job management area/profiles Multi-profile isolation, HERMES_HOME scoping sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades labels Jul 19, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

This was generated by AI during triage.

Related to #47429: this is test-only contract coverage for the active-profile cron-helper behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/profiles Multi-profile isolation, HERMES_HOME scoping comp/cron Cron scheduler and job management comp/desktop Electron desktop app (apps/desktop/*) P3 Low — cosmetic, nice to have sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades type/test Test coverage or test infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants