Skip to content

feat: support on-demand retrieval tasks without affecting RSR scoring #134

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

Hany-Almnaem
Copy link
Contributor

Summary

This PR adds support for on-demand retrieval tasks in Spark Checker, allowing storage providers (SPs) or developers to request ad-hoc checks for debugging or configuration validation — without affecting RSR scoring.

Implements: #103 – Allow SP to request more frequent checks


What’s Included

Core Logic

  • tasker.js

    • Added queueOnDemandTask() and a private #onDemandTasks queue
    • Updated next() to prioritize on-demand tasks
    • Tagged tasks with isOnDemand: true
  • spark.js

    • submitMeasurement() includes excludeFromRSR: true when submitting on-demand tasks

Test

  • tasker.test.js: Verifies that on-demand tasks are returned before round tasks
  • spark.test.js: Confirms excludeFromRSR is included in the measurement payload when isOnDemand is set

Manual Testing Script

  • scripts/trigger-on-demand.js
    • Demonstrates how to queue an on-demand task manually

Notes

  • No HTTP endpoint was added. This should be considered separately to ensure secure access and abuse prevention.
  • All changes are backward-compatible

Let me know if any adjustments are needed .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

1 participant