Skip to content

chore(zero-trust): cleanup, server-computed site labels, run-targets region-filter fix - #152

Merged
guohai merged 2 commits into
mainfrom
chore/zero-trust-cleanup
Sep 3, 2026
Merged

chore(zero-trust): cleanup, server-computed site labels, run-targets region-filter fix#152
guohai merged 2 commits into
mainfrom
chore/zero-trust-cleanup

Conversation

@guohai

@guohai guohai commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

Cleanup pass over the zero-trust/geoip surfaces plus two functional improvements that fell out of it.

What

  • Server-computed siteLabel on GET /api/eval-agents and GET /api/eval-agent-tokens ("Santa Clara 01"), reusing the existing regionMetadata helper — one catalog fetch per request, no per-row queries. The console renders it directly, eliminating the brief raw-siteId flash when a freshly-detected city isn't in the client's cached catalog yet (the server just created the row; it always knows the name).
  • run-targets regression fix: the mine list's ?region= filter matched eval_agent_tokens.region — permanently NULL for non-public tokens since zero-trust — so selecting a region emptied the list (hit by run-your-own). The filter now matches the effective (detected) region, with a both-directions test.
  • Dead code/comments removed (each grep-verified): stale ">24h" comment after the 2h re-check change, changelog-style history in the LOCATION_RECHECK_HOURS comment, the unread count(*) field in getAvailableRegions, and the caller-less getPendingEvalJobsByRegion.

Verification

  • Targeted suites 152+ tests green (location, geoip-refresh, zero-trust-region-api incl. new filter + siteLabel cases, zero-trust-metrics, run-picker, regions, tier-pool-dispatch, site-id-wire); npm run check clean; eslint unchanged.
  • Independent review: approved, zero issues (all five named risks verified clean, incl. wire-contract compatibility and no-per-row-DB-calls).

Generated with SMT smt@agora.build

…computed site labels

🤖 Built with SMT <smt@agora.build>
…emptied for non-public tokens

🤖 Built with SMT <smt@agora.build>
@guohai
guohai merged commit c4c20ea into main Sep 3, 2026
@guohai
guohai deleted the chore/zero-trust-cleanup branch September 3, 2026 08:04
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.

1 participant