Skip to content

feat(api): cross-repo queue health federation and pressure index (#479) - #1435

Closed
kiannidev wants to merge 3 commits into
JSONbored:mainfrom
kiannidev:feat/queue-health-federation
Closed

feat(api): cross-repo queue health federation and pressure index (#479)#1435
kiannidev wants to merge 3 commits into
JSONbored:mainfrom
kiannidev:feat/queue-health-federation

Conversation

@kiannidev

@kiannidev kiannidev commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Summary

Test plan

  • npm run typecheck
  • npm run db:migrations:check
  • npm run test:coverage
  • npm run ui:openapi:check
  • test/unit/queue-federation.test.ts — scoring, ranking, snapshot cache, route auth/validation
  • test/unit/mcp-upstream.test.ts — operator gate for federation MCP tool
  • test/unit/mcp-output-schemas.test.ts — output schema + privacy guard

Closes #479

Expose operator-only federated queue pressure ranking across registered installed repos, with MCP tool, dashboard wiring, and snapshot cache.

Co-authored-by: Cursor <cursoragent@cursor.com>
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@codecov

codecov Bot commented Jun 26, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.71795% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 95.45%. Comparing base (8309b23) to head (ca85c02).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/mcp/server.ts 90.90% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1435      +/-   ##
==========================================
+ Coverage   95.44%   95.45%   +0.01%     
==========================================
  Files         194      195       +1     
  Lines       21054    21132      +78     
  Branches     7619     7640      +21     
==========================================
+ Hits        20094    20171      +77     
- Misses        383      384       +1     
  Partials      577      577              
Files with missing lines Coverage Δ
src/api/routes.ts 94.63% <100.00%> (+0.03%) ⬆️
src/db/repositories.ts 96.13% <100.00%> (+0.02%) ⬆️
src/db/schema.ts 68.51% <100.00%> (+0.19%) ⬆️
src/openapi/schemas.ts 100.00% <100.00%> (ø)
src/openapi/spec.ts 99.40% <100.00%> (+0.01%) ⬆️
src/services/operator-dashboard.ts 100.00% <100.00%> (ø)
src/services/queue-federation.ts 100.00% <100.00%> (ø)
src/services/weekly-value-report.ts 100.00% <100.00%> (ø)
src/signals/engine.ts 97.06% <100.00%> (+<0.01%) ⬆️
src/mcp/server.ts 95.53% <90.90%> (-0.08%) ⬇️
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Cover stale snapshot recompute, malformed cache payloads, route auth/limit guards, operator dashboard critical-repo metric, and MCP limit handling.

Co-authored-by: Cursor <cursoragent@cursor.com>

@JSONbored JSONbored left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kiannidev — I'm closing this, and there are two layers to it, so let me be straight about both.

The clean one first: it doesn't pass the coverage gate. codecov/patch is red with an uncovered line in src/mcp/server.ts — our bar is every changed line and branch covered, and we don't merge a red patch, full stop. On its own that's a one-shot close.

But I don't want you to just cover that line and re-push, because the deeper reason is scope, and that's mine to own: cross-repo queue-health federation (#479) is a community-filed request, not something on our active line right now — current effort is anti-gaming, contributor governance, and the Orb/self-host stack. What this lands is a whole new federation subsystem — a service, a migration 0074, an MCP surface, plus operator-dashboard, engine, and weekly-report wiring across 18 files — that I'd be maintaining indefinitely, and for where we are today that surface outweighs the value. And 778 lines of net-new subsystem isn't something I'll one-shot-merge cold regardless of how clean it is.

None of this is a knock on you — you've shipped a lot of solid work here (#388, #389, #390, #462), this is real and coherent, and you've got my trust. It's a direction call, not a quality one. If I put federation back on the roadmap this is a strong starting point and I'll come back to it with you. In the meantime the live work is in contributor-governance / anti-gaming — say the word and I'll point you at a concrete issue there. Appreciate the effort on this one.

@JSONbored JSONbored closed this Jun 26, 2026
@kiannidev

Copy link
Copy Markdown
Contributor Author

@kiannidev — I'm closing this, and there are two layers to it, so let me be straight about both.

The clean one first: it doesn't pass the coverage gate. codecov/patch is red with an uncovered line in src/mcp/server.ts — our bar is every changed line and branch covered, and we don't merge a red patch, full stop. On its own that's a one-shot close.

But I don't want you to just cover that line and re-push, because the deeper reason is scope, and that's mine to own: cross-repo queue-health federation (#479) is a community-filed request, not something on our active line right now — current effort is anti-gaming, contributor governance, and the Orb/self-host stack. What this lands is a whole new federation subsystem — a service, a migration 0074, an MCP surface, plus operator-dashboard, engine, and weekly-report wiring across 18 files — that I'd be maintaining indefinitely, and for where we are today that surface outweighs the value. And 778 lines of net-new subsystem isn't something I'll one-shot-merge cold regardless of how clean it is.

None of this is a knock on you — you've shipped a lot of solid work here (#388, #389, #390, #462), this is real and coherent, and you've got my trust. It's a direction call, not a quality one. If I put federation back on the roadmap this is a strong starting point and I'll come back to it with you. In the meantime the live work is in contributor-governance / anti-gaming — say the word and I'll point you at a concrete issue there. Appreciate the effort on this one.

@JSONbored anti-gaming is important, but you have to block correctly.
Today I was blocked accidently. actually other miner copied my PR but I was blocked.
That miner created PR before my PR but after creating my PR, he updated his PR..
It was accident, but maybe you already know that.
you have to be sure who copies who in this case.

@kiannidev

Copy link
Copy Markdown
Contributor Author

And actually today I tried to register my repo to help miners, but rejected...
They are asking opening PR to metagraphed and gittensor-hub instead of creating my own project.
I envy you.
How happy you are building your own project with your decision toward what you want.
I am trying to build it alone...

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Cross-repo queue health federation and comparative pressure index

2 participants