mirror of
https://github.com/n8n-io/n8n.git
synced 2026-10-19 16:55:02 +02:00
A subscription is a cron expression, a timezone and a set of inputs, provisioned as one durable job owned by the subscription rather than by any node. Creating one records consent in the same transaction: a schedule is the only reason the grant exists, so asking twice would be asking the same question twice. Two stores have to agree — the rows here and the jobs the scheduler runs from — and nothing keeps them in step, so every path deprovisions before it deletes and treats a failed provision as a reason to put the row back rather than leave the two disagreeing. The handler proves again everything a live request would have proved: that the person still exists and is enabled, still consents, and may still execute the workflow. None of those is an error when it fails — consent gets withdrawn and access gets removed in the ordinary course of things — so the occurrence reports no dispatch. It loads the subscriber with their role, since there is no authenticated request to take a fully-loaded user from and the access check reads the scopes it carries. Identity is minted per occurrence rather than stored: the token is short-lived by design, and one written at subscribe time would be long expired by the first run. The occurrence's dedup key means a redelivered task recognises the execution a previous delivery already created. `RunnerBindingService` now reads the binding row instead of an in-memory map. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| integration | ||
| migration | ||
| shared | ||
| unit/utils | ||
| extend-expect.ts | ||
| global-setup.ts | ||
| setup-mocks.ts | ||
| setup-test-folder.ts | ||
| setup-testcontainers.ts | ||