Skip to content

Add administrator Core operational metrics - #97

Merged
SaladDay merged 7 commits into
mainfrom
codex/core-metrics
Sep 24, 2026
Merged

SaladDay merged 7 commits into
mainfrom
codex/core-metrics

Conversation

@SaladDay

@SaladDay SaladDay commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

The administrator console cannot currently read Core operational metrics. Add GET /core/v1/admin/core-metrics matching #96, with deployment authentication and complete 1h/6h/24h/7d buckets. The endpoint reads existing worker, PostgreSQL, daemon registry and background-job observations; unknown measurements and restart gaps stay null.

This is backend-only: frontend files, Agent metrics and public /v1 schemas are unchanged. Fixed-capacity samples preserve observed peaks despite probe timing jitter. Turn history remains queryable after restart, and release builds inject the source commit. The response, measurement sources and null semantics are documented in contracts/agents-api/core-metrics.md and the management OpenAPI.

Validation:

  • Full make check passed on mx1, including PostgreSQL integration, sqlc regeneration, standalone builds and 147 existing Web acceptance tests. The private test copy used pinned Playwright Chromium because branded Chrome was absent; the configuration was restored.
  • Final corrections passed targeted race tests, OpenAPI regeneration and verification of all 28 nullable response fields; the public schema remains byte-identical. Full gate ran on b44cf84; later bounded collector/startup/schema corrections received targeted regression.
  • Real Kimi execution on e662b86 verified queued/waiting Turns, connected daemon, active execution, queue waits, interruption count, restart gaps and real database outages. The final 622693f received a separate real Core/PostgreSQL complete-minute sampling regression. Test services, Runtime, volumes and private credential copies were cleaned up.
  • Fresh independent GPT-6 Astra high review of the complete final diff found no substantiated blockers.

Limits: live runs covered complete minute buckets, not full 1h/7d lifetimes, and exercised one live execution slot; longer ranges, shared capacity and concurrent access have directed tests. Process-local rejection totals stay null for intervals predating startup. The pre-existing allocation-threshold test fails under -race on unchanged main as well; normal make check passes, and no full API race-suite pass is claimed.

@SaladDay
SaladDay marked this pull request as ready for review September 24, 2026 21:04
@SaladDay
SaladDay merged commit 7322982 into main Sep 24, 2026
2 of 3 checks passed
SaladDay added a commit that referenced this pull request Sep 24, 2026
Conflicts: the client package keeps the console's template projection
module and exports the administrator types explicitly (Skill and
SkillVersion come from ./types). The Web docs take main's rewritten
structure and now describe the React console as implemented; the page
map and a current overview screenshot replace the old product tour.
protocol-coverage keeps the console's route-by-route use and adds main's
evidence section.

Core metrics: #97 serves the contract this branch proposed, so its
requirements draft is removed in favour of
contracts/agents-api/core-metrics.md. The console server now forwards
GET /core/v1/admin/core-metrics; without it the Core metrics page and the
Core popover could not reach Core.
SaladDay added a commit that referenced this pull request Sep 25, 2026
Core Web is rebuilt as the administrator console for a Core deployment, on
the management contract from #92 and the Core metrics from #97. The browser
talks only to the console service (/console, /core/v1/admin,
/core/v1/sandbox) and never to /v1.

- Monitor: Overview (status tiles, 24-hour activity, Core and its nodes as a
  topology with popovers, Sessions needing attention, usage by project),
  Core metrics, Agent metrics, Sandbox metrics and a read-only Session log
  with conversation, trace and Turns.
- Resources: Agents, environment templates, Skills, files and Vaults:
  inspection, confirmed deletion keeping Core's reason, copies to another
  project.
- Platform: projects and keys (key shown once, revocation, archive), nodes
  (enrollment, removal), system.
- Onboarding: sign-in and first run on a dark stage; first project and key,
  then a three-chapter tour; View Transitions; reduced motion respected.
- Foundation: Tailwind v4 utilities for registry components only (Beautiful
  UI tokens, coss ui select and popover, Magic UI), Inter, Parsar indigo;
  TanStack Query caching and prefetch with skeletons only on first load;
  Motion and NumberFlow for state-reporting motion.
- Honest data: missing figures stay missing, failed reads are reported,
  uncertain writes are reported and never replayed.
- Console service forwards read-only GET /core/v1/admin/core-metrics.
- Browser acceptance rewritten as one test per behavior against a synthetic
  console service; every test asserts nothing reaches /v1.
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