fix(apps): require scheduler app id suffix
MR
7h ago+15+15+01234567890123456789-1-1-0123456789
Proposed changes
Scheduler job IDs were considered namespaced whenever _<appId> appeared anywhere in the ID. If an app ID occurred in the middle of a job ID, the suffix was omitted, risking collisions and preventing cancelJob from finding the namespaced job. The runtime now checks for the exact suffix, and a regression test covers both an already-suffixed ID and an embedded app ID.
Reference
Follow-up 4 in ADR 0001.
Validation
- Added regression coverage to
modifyAccessors.test.ts. - Suffix behavior assertions and
git diff --checkpass. - The focused Node test could not run: Node.js/Yarn are unavailable. Deno also cannot resolve the workspace package import
@rocket.chat/apps/dist/lib/jsonrpc.
Summary by CodeRabbit
- Bug Fixes
- Scheduled job IDs now consistently end with the app’s ID namespace, including when the app ID already appears elsewhere in the job ID. This prevents IDs from being mistaken as already namespaced and keeps job cancellation behavior consistent.