Skip to content

The 'analyze' queue job never updates document status; handleAnalyze is dead code, so uploads stay PENDING #1479

Closed

Description

@mftee

DocumentProcessor handles the analyze job by calling riskService.assessDocument directly. The private handleAnalyze method (which moves the document PENDING -> ANALYZING -> FLAGGED/VERIFIED and emits WebSocket events) is never called. As a result a freshly uploaded document keeps status PENDING forever and no document:status-changed event is sent for analysis. handleAnalyze also hard-codes the 60 flag threshold instead of using risk-thresholds.config.ts.

Where

  • backend/src/queue/document.processor.ts
  • backend/src/risk-assessment/risk-thresholds.config.ts

Suggested fix
Call handleAnalyze for analyze jobs, read the threshold from the shared config, and add a processor test that asserts status transitions and gateway notifications.

Acceptance criteria

  • Uploaded documents reach ANALYZING then FLAGGED or VERIFIED
  • WebSocket events are emitted for each transition
  • Threshold comes from config

Activity

  1. sanntotal commented on Oct 17, 2026

    @sanntotal

    @sanntotal has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

    Hello Maintainer, I’ve reviewed the issue and understand why uploaded documents remain stuck in "PENDING". I’d be glad to fix the analysis job flow, integrate the shared risk threshold configuration, and add tests to verify status transitions and WebSocket notifications. Please consider assigning this issue to me.

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @sanntotal to this issue.

  2. oladev2026-tech commented on Oct 17, 2026

    @oladev2026-tech
    Contributor

    @oladev2026-tech has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

    Hi can i work on this?

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @oladev2026-tech to this issue.

  3. drips-wave commented on Oct 17, 2026

    @drips-wave

    Congratulations, @oladev2026-tech! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on October 22, 2026.

    🧑‍💻 @oladev2026-tech: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.

    Warning

    When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.

    🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.

    🌊 Happy Wave 🌊

  4. grantfox-oss commented on Oct 17, 2026

    @grantfox-oss

    🎉 This issue has been marked as completed on GrantFox!

    @oladev2026-tech's PR #1546 was approved and merged by @mftee.

    🏆 @oladev2026-tech: You earned 40 FoxPoints for this contribution! Your current tier: Builder (1,689 total points). Track your full progress on GrantFox.

    👏 Great work, @oladev2026-tech! Keep contributing to CodeGirlsInc.

  5. drips-wave commented on Oct 17, 2026

    @drips-wave

    This issue has been completed by @oladev2026-tech as part of the Stellar Wave Program's 10th Wave 🥳

    😎 @oladev2026-tech: You earned 200 Points for completing this issue! Once the Wave's rewards are finalized, you'll be eligible for a percentage of the Wave's reward pool based on the percentage of total points you've earned. Learn more here. You can also Leave a review to share your experience working on this issue.

    🧑‍💻 Repo maintainers: How'd the contributor do? Leave a review to share your experience working with them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Stellar WaveIssues in the Stellar wave programbackendbugSomething isn't workingnestjs

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions