answer string | call_path list | data_flow list | source_code string | flow_summary string | user_question string | pipeline_stages list | status_callback string |
|---|---|---|---|---|---|---|---|
The worker retries only when result.retryable is true and the task has fewer than two recorded attempts. It increments attempts, sets retry_wait, and schedules the same task ID using Date.now() plus attempts multiplied by 5000. Otherwise it stores the gateway message ID and maps accepted to sent or failed. A later rece... | [
"SmsRequestHandler.submit",
"SmsScheduler.schedule",
"SmsWorker.handle",
"SmsGateway.send",
"SmsScheduler.schedule (retry branch)",
"GatewayReceiptController.receive",
"SmsReceiptHandler.handle",
"SmsRepo.setStatus",
"EventBus.publish"
] | [
{
"data_name": "phone and text",
"origin": "The request passed to SmsRequestHandler.submit.",
"transformations": [
"The handler checks both fields for presence.",
"It stores them on a new task.",
"SmsWorker.handle reads them and passes them to SmsGateway.send."
],
"destination"... | class SmsRequestHandler {
constructor(private repo: SmsRepo, private scheduler: SmsScheduler) {}
async submit(input: { phone: string; text: string; sendAt?: number }) {
if (!input.phone || !input.text) throw new Error('phone and text are required');
const task = await this.repo.create({
phone: input.... | The request handler validates and stores the phone number and text as a pending task, then schedules it at the requested time. The worker marks the task sending and calls the gateway. A retryable result is rescheduled while the attempt limit allows; otherwise, the gateway message ID and immediate sent or failed status ... | How does the SMS worker handle retryable send results, and how is a later delivery receipt matched to the task before its status is updated? | [
{
"stage_name": "Request validation and task scheduling",
"code_location": "SmsRequestHandler.submit",
"responsibility": "Validates that phone and text are present, creates a pending task with zero attempts, and schedules its task ID.",
"input_data": "Request phone, text, and optional sendAt value."... | GatewayReceiptController.receive is the receipt entry point. SmsReceiptHandler.handle loads the task and returns without changes if it is missing or its stored gatewayId differs from the receipt messageId. For a match, it updates the status from the delivered flag and publishes an sms.status event. |
PushWorker.handle first checks pushEnabled. If it is false, it records suppressed and queues a callback without querying devices. If enabled, it loads active tokens; an empty list produces no_devices and a callback. Otherwise, the worker submits those tokens with the notice title, body, and noticeId. It sets sent when ... | [
"PushRequestController.submit",
"PushQueue.add",
"PushWorker.handle",
"PreferenceStore.get",
"DeviceStore.activeTokens",
"PushGateway.sendMulticast",
"PushWorker.finish",
"CallbackQueue.add",
"PushCallbackWorker.handle",
"PushCallbackSink.deliver"
] | [
{
"data_name": "userId, title, and body",
"origin": "The request passed to PushRequestController.submit.",
"transformations": [
"The controller stores the request fields on a queued notice.",
"The worker reads userId for preference and device lookups.",
"For an enabled user with tokens... | class PushRequestController {
constructor(private repo: PushRepo, private queue: PushQueue) {}
async submit(input: { userId: string; title: string; body: string }) {
const notice = await this.repo.insert({
userId: input.userId,
title: input.title,
body: input.body,
status: 'queued'
... | The controller stores a push notice and queues its ID. The worker loads the notice, checks the user's push preference, and either finishes it as suppressed or loads active device tokens. With no tokens it finishes as no_devices; otherwise it sends the title, body, and notice ID to the gateway and derives sent or failed... | How do user preferences and active device tokens affect push delivery, and what information is included in the callback for each terminal outcome? | [
{
"stage_name": "Notice creation and queueing",
"code_location": "PushRequestController.submit",
"responsibility": "Persists the user ID, title, body, and queued status, then schedules processing by notice ID.",
"input_data": "Request userId, title, and body.",
"output_data": "A stored notice an... | Every terminal branch calls PushWorker.finish. That method stores the status and queues a callback job. PushCallbackWorker.handle forwards the notice ID, status, accepted device IDs, and rejected device IDs to PushCallbackSink.deliver. For preference-disabled and no-device branches, the ID lists use the empty-array def... |
NoticeController.submit stores recipient, templateId, and variables, then queues only the resulting notice ID. EmailDeliveryWorker.handle uses that ID to reload the stored data, renders the template, and sends the recipient the rendered subject and text. It maps the gateway acceptance result to sent or failed and publi... | [
"NoticeController.submit",
"DeliveryQueue.add",
"EmailDeliveryWorker.handle",
"TemplateRenderer.render",
"EmailGateway.send",
"NoticeRepo.setStatus",
"EventBus.publish",
"StatusCallbackHandler.handle",
"CallbackSink.notify"
] | [
{
"data_name": "recipient, templateId, and variables",
"origin": "The EmailNotice passed to NoticeController.submit.",
"transformations": [
"The controller checks recipient and templateId for presence.",
"The input fields are persisted in a notice record.",
"The worker passes templateI... | interface EmailNotice { recipient: string; templateId: string; variables: Record<string, string>; }
class NoticeController {
constructor(private repo: NoticeRepo, private queue: DeliveryQueue) {}
async submit(input: EmailNotice) {
if (!input.recipient || !input.templateId) throw new Error('recipient and templ... | The controller validates the recipient and template ID, stores the notice with its variables and queued status, then adds its ID to the delivery queue. The worker loads that record, renders the template, sends the resulting subject and text, records the outcome, and publishes a status event that the callback handler fo... | How do recipient and template data move from request submission to email delivery, and what triggers the status callback? | [
{
"stage_name": "Request intake and persistence",
"code_location": "NoticeController.submit",
"responsibility": "Rejects requests missing a recipient or template ID, persists the request fields, and marks the new notice queued.",
"input_data": "EmailNotice input: recipient, templateId, and variables... | After the gateway returns, the worker derives sent or failed from result.accepted, updates the notice, and publishes a notice.status event carrying the notice ID, status, and provider message ID. StatusCallbackHandler filters for that event type and forwards those fields to CallbackSink.notify. |
Notification Delivery Pipeline Code Tracing Dataset
Focused on source code from enterprise notification and broadcast communication platforms, this dataset covers delivery stages such as request handling, queue scheduling, channel dispatch, and status callbacks. Samples use tracing questions, call paths, flow summaries, and key data flows to explain component responsibilities, execution order, and how data moves through the pipeline. It supports code understanding and code SFT training, as well as code retrieval, workflow analysis, and developer learning.
Technical Specifications
| Field | Type | Description |
|---|---|---|
| answer | string | Answer to the tracing question, using the call path and data flows to explain the responsibilities and connections between delivery stages. |
| call_path | array | Functions, methods, or handlers involved in notification delivery, listed in execution order. |
| data_flow | array | Sources, transformations, and destinations of notification data as it moves through the workflow. |
| source_code | string | Source code snippet used to trace notification request handling, queue scheduling, channel dispatch, or status callbacks. |
| flow_summary | string | Summary of the overall notification delivery process, from incoming request to dispatch completion or status callback. |
| user_question | string | Question about understanding the notification delivery workflow represented by the source code. |
| pipeline_stages | array | Responsibilities and connections between stages such as request handling, queue scheduling, channel dispatch, and status callbacks. |
| status_callback | string | Explanation of how dispatch results are written back, trigger callbacks, or update notification status; explicitly states when the workflow has no callback. |
Compliance Statement
| Authorization Type | CC-BY-NC-SA 4.0 (Attribution–NonCommercial–ShareAlike) |
| Commercial Use | Requires exclusive subscription or authorization contract (monthly or per-invocation charging) |
| Privacy and Anonymization | No PII, no real company names, simulated scenarios follow industry standards |
| Compliance System | Compliant with China's Data Security Law / EU GDPR / supports enterprise data access logs |
Source & Contact
- Downloads last month
- 5