Skip to content

Adaptive Queue V2#30

Open
dxenes1 wants to merge 6 commits into
mainfrom
adaptive-queue
Open

Adaptive Queue V2#30
dxenes1 wants to merge 6 commits into
mainfrom
adaptive-queue

Conversation

@dxenes1
Copy link
Copy Markdown
Collaborator

@dxenes1 dxenes1 commented May 27, 2026

Previously handled through ad-hoc notebook and custom scripting, now an official feature on NeuVue

Summary
This branch adds optional server-side adaptive priority scoring for tasks. Tasks can now carry an adaptive_priority object using the weighted_sum_v1 strategy, allowing the API to compute scalar priority from numeric or categorical priors, weights, bias, min/max clamps, and provenance metadata.

Changes

  • Added adaptive_priority schema support on tasks, including priors, weights, categories, bias, score, contributions, provenance, and updated.
  • Added src/utils/adaptive-priority.ts for normalization, validation, weighted score calculation, shallow patch merging, and task payload application.
  • Added PATCH /tasks/{taskId}/adaptive_priority to merge adaptive priority inputs and recompute scalar priority when enabled.
  • Updated task creation so adaptive tasks compute priority before Mongoose validation, while existing scalar-priority tasks remain backward compatible.
  • Added a task index for adaptive queue reads: { active, status, namespace, priority }.
  • Updated OpenAPI docs with the new AdaptivePriority schema, endpoint, examples, and queue query guidance.
  • Refactored controller update paths toward promise-based Mongoose APIs and shared update error handling.
  • Updated Restify/Mongoose/runtime dependencies and moved the project to Node >=20.19.0.
  • Updated Docker local dev/runtime setup to Node 20, MongoDB 8, health checks, .dockerignore, and host port 9005.

Testing

yarn run build: passed
yarn run unit-test: passed, 18 tests
yarn run tslint: currently fails on existing project-wide lint issues unrelated to the adaptive priority change.

@dxenes1 dxenes1 requested a review from vrose99 May 27, 2026 00:42
@dxenes1 dxenes1 self-assigned this May 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants