unraid / unraid/api

Work Intent: Repair and fully verify arraySubscription event payloads

Open
#2,058 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
113
Forks
22
Avg merge
10h 40m
Merged PRs (30d)
13

Description

Overview

Fix the confirmed arraySubscription GraphQL event payload mismatch reported in #2056. The resolver exposes arraySubscription, but the event listener currently publishes { array }, causing non-null subscription failures when an update is emitted.

No implementation work will begin until this Work Intent is approved.

Technical Approach

  • Create a focused branch from current main.
  • Change the array event publisher to emit the GraphQL subscription root field expected by the resolver.
  • Add a regression test that exercises the publisher/resolver contract, not merely resolver construction.
  • Prefer an end-to-end GraphQL subscription test that subscribes, publishes an array update, and asserts a complete non-null payload.
  • Preserve the regular array query and existing array event timing/debouncing behavior.
  • Run pnpm --filter ./api test, API lint, API type-check, and the repository build.
  • Build and deploy a test artifact to a controlled Unraid 7.3.2 target.
  • Subscribe through the real GraphQL WebSocket endpoint, trigger a real array event, and prove the former non-null error is replaced by a valid arraySubscription payload.
  • Re-run representative working subscriptions to guard against shared pub/sub regressions.

A PR will only be submitted if repository tests and the live end-to-end proof all pass. If the live proof cannot be completed safely and conclusively, no fix PR will be opened.

Scope

  • API
  • Plugin
  • Web UI
  • Build/Deploy Process
  • Documentation

Timeline & Impact

  • Estimated time needed: 1-2 focused development sessions after approval
  • Potential impacts: Array subscription clients only. No array mutations or lifecycle behavior will be changed.

Pre-submission Checklist

  • I have searched for similar work/issues
  • I understand this needs approval before starting
  • I am willing to make adjustments based on feedback

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file paths are named; start by locating the array event publisher, the arraySubscription resolver, and existing API subscription tests. Run the API tests, lint, type-check, and repository build; done requires a complete non-null subscription payload, preserved array behavior, and the specified live WebSocket proof.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, typescript
Domain
api, testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.