8000 fix(queue): preserve readiness and live priority order by adeelahmad · Pull Request #722 · adeelahmad/lense · GitHub
[go: up one dir, main page]

Skip to content

fix(queue): preserve readiness and live priority order - #722

Draft
adeelahmad wants to merge 1 commit into
mainfrom
fix/queue-readiness-order
Draft

adeelahmad wants to merge 1 commit into
mainfrom
fix/queue-readiness-order

Conversation

@adeelahmad
Copy link
Copy Markdown
Owner

Summary

Two reproducible queue defects:

  • Workers filtered capabilities for the first claimed step, then passed all capabilities to the pipeline runner. A later step could execute before its deferred engine/model was ready. Pass the filtered capabilities through the existing hand-off path, retaining completed work.
  • Live job updates used newest-first order before truncating cached queue pages. Sort with the existing worker-priority comparator first, so low-priority arrivals do not displace earlier work.

No defaults, new dependencies, API schemas, or stored-data changes. These defects are demonstrated in code; deployment logs were unavailable, so this is not a claim that every observed queue symptom has been diagnosed.

Validation

  • Baseline failures reproduced with actual source functions and isolated dependency doubles.
  • Backend defer → wait → resume passes without rerunning the completed first step.
  • Three cache tests pass using actual stripped TypeScript with a minimal QueryClient double: priority/truncation, reprioritization/status removal, FIFO ties and existing namespace/batch filtering.
  • Python compilation passes.
  • Added normal pytest/Jest regressions. Not run locally: those full suites, Ruff/mypy, frontend lint/typecheck/build, strict MkDocs. Fallback workspace lacks pytest, SurrealDB and Jest, and is not a Git checkout, so ci/local-ci.sh cannot start. GitHub CI is required.
  • Independent review found no blocking defect. Limited cache pages still rely on a later refetch to refill rows after visible jobs leave; this pre-existing limitation is not changed here.

Done questions

  1. Goal: Two demonstrated defects fixed in draft; full CI and merge pending.
  2. Agents: Existing queue API/MCP unchanged.
  3. Zero setup: Yes, no new prerequisite.
  4. Fewest clicks: Existing controls unchanged.
  5. Configurable: Existing capabilities and readiness settings reused.
  6. Light: Yes, no new dependency.
  7. Private and secure: No new access or data flow.
  8. Cost: Prevents premature steps, uses existing component fetching.
  9. User decides: Existing queue/worker choices unchanged.
  10. Upgrades: N/a, no stored-data change.
  11. Honest: Evidence and limits stated above.
  12. Tested/documented: Tests, processing docs and changelog included; full CI pending.
  13. Open: Existing code and protocols reused.
  14. Reported: PR and limits returned to requester.
  15. Reuse: Existing hand-off logic and queue comparator reused.

This branch has not been deployed

No deployments
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.

1 participant

32F8
0