Skip to content

Docs: HA cluster developer guide; fix cluster status when HA off#3889

Draft
cursor[bot] wants to merge 2 commits into
developfrom
cursor/technical-documentation-updates-efcc
Draft

Docs: HA cluster developer guide; fix cluster status when HA off#3889
cursor[bot] wants to merge 2 commits into
developfrom
cursor/technical-documentation-updates-efcc

Conversation

@cursor
Copy link
Copy Markdown

@cursor cursor Bot commented May 25, 2026

Summary

This PR keeps technical documentation aligned with the HA cluster dashboard and related APIs, and fixes a small correctness bug in getClusterStatus that prevented the cluster UI from loading when HA was disabled.

Changes

Documentation

  • docs/developer/README.md — Index of in-repo developer notes (distinct from user docs and docs/plans/ roadmaps).
  • docs/developer/ha-cluster-dashboard.md — Describes intent and usage of /cluster, admin-only /api/cluster and /api/cluster/tasks (including DELETE clear semantics), TaskStateSnapshot / ClearScope, feature gating via GET /api/infofeatures.high_availability, and used_runner_name on task payloads.
  • README.md — Link to developer notes under Documentation.
  • CONTRIBUTING.md — Reminder to update docs/developer/ when adding non-obvious admin or HA HTTP APIs.

Code (verified against tests)

  • api/cluster.go — Return immediately after writing the HA-disabled JSON so the handler does not emit a second 503 response when no ClusterInspector is wired (matches updated comment).
  • api/cluster_test.go — Assert 200 and ha_enabled: false for the HA-disabled case.

Codepaths covered

  • api/cluster.go, api/router.go (admin /cluster routes)
  • services/tasks/task_state_store.go, TaskPool state store surface
  • web/src/views/Cluster.vue, web/src/App.vue, PageMixin / GET /api/info
  • db.Task.UsedRunnerName / db/sql/task.go join for task details

Gaps addressed

  • No in-repo overview of the cluster dashboard or cluster REST contract for contributors/operators.
  • Cluster page failed to load task snapshots when HA was off because the first request in reload() errored after a double response from the server.
Open in Web View Automation 

cursoragent and others added 2 commits May 25, 2026 16:04
getClusterStatus wrote a 200 body then attempted a second response with
503 when no ClusterInspector was present, which broke the cluster UI
reload path and contradicted the handler comment. Return immediately
after the HA-disabled payload. Update the unit test to assert the JSON
shape.

Co-authored-by: Denis Gukov <fiftin@outlook.com>
Add docs/developer index and ha-cluster-dashboard.md covering the
admin cluster routes, REST semantics, task state snapshot/clear, and
task runner name in API payloads. Link from the root README and note
the location in CONTRIBUTING for future API changes.

Co-authored-by: Denis Gukov <fiftin@outlook.com>
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