Files
neuron-tai/.scratch/architecture-deepening/issues/03-deepen-tracker-request-intake.md
Dobromir Popov 0e2d530ed6 more stratch pads
2026-07-29 15:37:40 +02:00

2.2 KiB

AD-003: Deepen Tracker request intake without changing control-plane semantics

  • Status: needs-triage
  • Priority: p1
  • Dependencies: AD-001, AD-002
  • Evidence: Graphify marks _TrackerHandler as the highest-degree node (93 edges). do_POST dispatches auth, accounts, billing, registry, raft, gossip, placement, calibration, model, and inference paths; do_GET mixes operational projections and public request paths. Major handlers include proxy chat (CC 127), registration (CC 82), models (CC 43), and network assignment (CC 42).

Objective

Deepen Tracker request intake around existing domain seams so HTTP dispatch stays thin and request-specific policy no longer leaks across unrelated control-plane workflows.

Constraints

  • Preserve ADR-0009: Tracker remains a control plane and public inference proxy, never a model host.
  • Preserve coverage-first assignment, billing, admission, relay, telemetry, Raft, and existing endpoint contracts.
  • Do not create a speculative adapter: each new seam must have at least two real callers/adapters or remain internal.

Acceptance criteria

  • Characterization tests pin all affected public endpoint response and error behavior before moving code.
  • HTTP dispatch delegates to cohesive intake modules for inference, node/registry lifecycle, and operator projections.
  • Route selection, billing attribution, admission, and coverage logic remain backend-agnostic and do not move into the HTTP module.
  • _TrackerHandler no longer owns unrelated endpoint policy directly.
  • Existing routing, capability-admission, billing, account, and consensus tests retain behavior.
  • pytest targeted tests and python -m compileall packages tests pass.

Likely files

  • Modify: packages/tracker/meshnet_tracker/server.py
  • Potentially modify: packages/tracker/meshnet_tracker/billing.py, accounts.py, capability.py, recipe.py
  • Modify/add: focused tests alongside tests/test_tracker_routing.py, tests/test_tracker_capability_admission.py, tests/test_billing_ledger.py, and tests/test_tracker_consensus.py

Non-goals

No redesign of the Tracker architecture, no public endpoint removal, and no change to backend-neutral provider semantics.