Skip to content

maintainability: split processors.ts (16.2k lines, 437 touches) — the structural cause of this audit's drift and determinism gaps #9541

Description

@JSONbored

Parent: #9492

Summary

src/queue/processors.ts is 16,200 lines with 437 touches since 2026-07-01, 86 of them in a single week. It is where most of the 2026-07-27 audit's confirmed bugs physically live:

The drift is mechanical, not careless: a guard is added to the instances someone greps for, and the next one is 8,000 lines away in the same file, so it does not read as a separate site needing the same change.

Deliverables, in value order

Prior art already in place

Requirements

  1. Behaviour-preserving. No verdict, no reason code, and no public surface may change. This is a structural change and must be reviewable as one.
  2. Land it separately from any behavioural fix — bundling the two makes both unreviewable, and their risk profiles are entirely different.
  3. Each extracted seam gets its own direct tests; the existing suites must pass unmodified except where a symbol genuinely moved.

Note on src/api/routes.ts (6,906 lines, 173 touches)

The requiresApiToken exemption list plus the canSessionAccessPath allowlist is a proven drift generator — #9120 was literally "route doc said unauthenticated, list said 401", and three later routes carry comments promising to update both "in the SAME PR so the two can never drift", by convention only. A route-registration structure co-locating auth posture with the route would retire the class. Lower priority than the above; recorded so it is not rediscovered. (Partly overlapping with #9519's route-registration seam.)

Metadata

Metadata

Assignees

Labels

maintainer-onlyOwner-only work — yields no Gittensor points.orbGittensory Orb related - maintainer self-hosting analytics.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions