Repository navigation
Serve operator metrics and health natively - #562
Conversation
GET /api/system/operator-metrics and GET /api/system/health follow Workflow 2.5.5's OperatorMetrics and HealthCheck over the shared tables: PHP's counts and predicates, whole-second "now" comparisons, the twelve health checks and 503 on error, admin-only in any namespace. Policy sections describe native, and the timeline, timer and lineage projections native reads from history are reported as not maintained. New tasks now carry PHP's creation and dispatch timestamps, and run summaries classify a task's transport (lease expired, dispatch failed, claim failed, dispatch overdue) as PHP's projector does instead of declining to summarize. An operator-metrics parity fixture checks seven stages of one run against published PHP 2.5.14. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rics # Conflicts: # .github/workflows/server-parity.yml # docs/rust-server-port.md
DELETE /api/workers/{id} now works in a named namespace and removes only
that namespace's registration, as published PHP allows. The operator
metrics probe deregisters its worker again. PHP's maintenance loop may
redispatch the overdue task before the probe reads it, so the contract
accepts PHP's repaired state for that stage; native runs no repair loop.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… fixture Published PHP's health check runs a task-queue build-id query that MariaDB rejects under ONLY_FULL_GROUP_BY once an activity exists (#569), so it answers 500 from the activity_scheduled stage on. The probe now records the runtime each stage reports and the MySQL-family job's database image; the contract accepts that 500 only for published PHP on MariaDB at those stages. Native must still answer 200 everywhere. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rics # Conflicts: # .github/workflows/server-parity.yml # docs/rust-server-port.md
|
Updated with main (84541fe) and fixed the MariaDB fixtures failure from run 39530541048. Cause. Published PHP 2.5.14's Change (31f7d77f8).
The earlier PHPUnit failure on dedd08a was a cancelled action-policy preflight. It will rerun on this head. |
|
Cancelled this head's CI runs (39547329348, 39547329452) after #566 merged and left this branch in conflict. The branch will be updated, and CI rerun, when it reaches the head of the merge train. |
…rics # Conflicts: # .github/workflows/server-parity.yml # docs/rust-server-port.md
…rics # Conflicts: # docs/rust-server-port.md
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rics # Conflicts: # docs/rust-server-port.md # rust/src/runtime/http.rs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…racts outside the store Sonar read the per-operation rejection lists as duplicates and the query attempt as too complex. The lists are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Native answers /api/system/operator-dashboard and /bounded from the run summaries by OperatorDashboardSummary's rules. The workflow-type variant validates its list, then answers PHP's 501 for an observer that cannot filter by type. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nto rust-325-query-responses
…rics # Conflicts: # docs/rust-server-port.md
…rust-325-operator-dashboard
…oard Native operator dashboard, so Waterline's landing page loads
|
The intermittent |
|
#584 (operator dashboard, so Waterline's landing page loads) was stacked on this branch and has merged into it, so this PR now also carries the dashboard port. Its integration tests passed on SQLite, PostgreSQL and MySQL; the port log has both checkpoints. |
…rics # Conflicts: # docs/rust-server-port.md
…rust-325-operator-metrics # Conflicts: # rust/tests/execution.rs
…nto rust-325-query-responses
…rics # Conflicts: # docs/rust-server-port.md
# Conflicts: # docs/rust-server-port.md # rust/tests/execution.rs
…rics # Conflicts: # docs/rust-server-port.md # rust/src/runtime/store.rs
# Conflicts: # docs/rust-server-port.md # rust/tests/execution/query_arguments.rs
…rics # Conflicts: # docs/rust-server-port.md
…ust-325-query-responses
…rust-325-operator-metrics
# Conflicts: # docs/rust-server-port.md # rust/tests/execution.rs
…rics # Conflicts: # docs/rust-server-port.md
# Conflicts: # docs/rust-server-port.md
|



Part of #325 (operations gate: health and metrics; CLI
system:*commands and Waterline service mode read these documents).Native now serves the operator metrics and health documents as published PHP 2.5.14 builds them, from the rules of Workflow 2.5.5's
OperatorMetricsandHealthCheck.Operator metrics (
GET /api/system/operator-metrics).oldest_*timestamp and its age. Command-contract backfill uses the same WorkflowStarted rule native's run observation already ports.capacity_evidencereported as unavailable.maintained: falseinstead of aligned.Health (
GET /api/system/health). PHP's twelve checks with their names, categories, statuses and messages, the category summary, namespace retention, and 503 while a check reports an error. Both routes are admin-only, as PHP'ssystemroute group is, and work in named namespaces.Task rows and run summaries.
created_at,updated_at,last_dispatched_atandlast_dispatch_attempt_at, as PHP sets them in poll mode.RunSummaryProjector::taskLivenessdoes: lease expired, dispatch failed, claim failed (<type>_task_claim_failed), dispatch overdue, then leased or ready. They use PHP's wait reasons and task-problem flag.dispatch_overdueandtasks_added_last_minutewould always read zero.Fixture
operator-metrics. A fresh namespace goes through seven stages:The contract requires PHP's counts at every stage. It requires each timestamp exactly when its count is not zero, and PHP's health checks and warnings. It deliberately normalizes or excludes:
tasks_dispatched_last_minute(PHP stamps some new tasks and not others), and the selected-run projection check, which PHP fills asynchronously.The contract has 27 unit tests.
Local checks.
operator-metrics, and the comparison passed. The schedule and visibility fixtures need CI's scheduler and CLI artifact.Known gaps (port log).
history_size_bytesdiffers from PHP's (8 events: PHP 10,351 bytes, native 7,961).🤖 Generated with Claude Code