fix(review): register the /v1/internal/status route so handleInternalStatus is reachable - #8974
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
…Status is reachable handleInternalStatus (src/review/ops.ts) is fully implemented, documented, and unit-tested, but its route was never added to routes.ts — unlike its two siblings handleInternalDecision and handleInternalCalibration, which are registered at /v1/internal/decision and /v1/internal/calibration. Register /v1/internal/status the same way (same INTERNAL_JOB_TOKEN gate, same internalOpsAgentConfig), so the operator agent-health endpoint is actually reachable. Closes JSONbored#8904 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8974 +/- ##
==========================================
+ Coverage 90.56% 91.02% +0.46%
==========================================
Files 96 97 +1
Lines 22490 24954 +2464
Branches 3884 4677 +793
==========================================
+ Hits 20367 22714 +2347
- Misses 1945 1975 +30
- Partials 178 265 +87
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Tip ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-26 14:59:28 UTC
Review summary Nits — 2 non-blocking
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
Summary
handleInternalStatus(src/review/ops.ts) is fully implemented, documented, and unit-tested, but arepo-wide grep confirms it is imported nowhere except its own test — its route was simply never added
to
src/api/routes.ts, unlike its two siblings from the same port batch (handleInternalDecision,handleInternalCalibration), which ARE registered at/v1/internal/decisionand/v1/internal/calibration.Registers
/v1/internal/statusthe same way — same/v1/internal/*INTERNAL_JOB_TOKENgate, sameinternalOpsAgentConfig(c.env)— so the operator agent-health endpoint is actually reachable.Test plan
/v1/internal/status401s without the internal token, and 200s (fail-safe empty) with it, returning the expectedproject/counts/healthpayload, slug-scoped, with no actor/trust internals leakednpx vitest run test/unit/routes-internal-decision-calibration.test.ts— 9/9 pass;tsc --noEmitcleanCloses #8904