Skip to content

Commit 24a140e

Browse files
authored
docs: inventory operator contracts (#1108)
1 parent f9a2f94 commit 24a140e

9 files changed

Lines changed: 1019 additions & 12 deletions

File tree

‎.github/pull_request_template.md‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,24 @@ concrete benefit and use user-facing language. If there is no user-visible
5252
impact, say so plainly.
5353
-->
5454

55+
## OpenClaw Bay Impact
56+
57+
<!--
58+
For lifecycle/review-publication, queue/workflow, status/telemetry, or dashboard
59+
data-contract changes, name the affected Bay surface and its proof. Otherwise,
60+
state why Bay is unaffected. See AGENTS.md.
61+
-->
62+
63+
## Documentation Lifecycle
64+
65+
<!--
66+
For new or changed documentation, classify it as active, proposed,
67+
compatibility-only, or historical. Active runbooks and volatile references must
68+
name their role owner, source of truth, verified scope/revision, and update
69+
triggers. Otherwise state that no documentation lifecycle changes. See
70+
CONTRIBUTING.md.
71+
-->
72+
5573
## Evidence
5674

5775
<!--

‎AGENTS.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
ClawSweeper is the conservative maintenance bot for OpenClaw repositories.
44
Keep changes narrow, evidence-backed, and automation-safe.
55

6+
`AGENTS.md` is the canonical repository-wide coding-agent policy. Task-specific
7+
workflows under `.agents/skills/` are opt-in procedures and do not override this
8+
file. This repository does not currently maintain `AGENT.md`, `CLAUDE.md`, or
9+
Cursor aliases; agents that do not discover `AGENTS.md` automatically must be
10+
directed here rather than given a duplicated policy copy.
11+
612
## Structure
713

814
- Main code: `src/clawsweeper.ts`.

‎config/documentation-site.json‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
"name": "Operations",
2424
"pages": [
2525
"limits.md",
26+
"public-api.md",
27+
"operator-configuration.md",
2628
"live-dashboard.md",
2729
"openclaw-bay-demo.md",
2830
"openclaw-event-hooks.md",

‎config/operator-documentation.json‎

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"version": 1,
3+
"publicObserverRoutes": [
4+
{ "path": "/api/health", "method": "ANY" },
5+
{ "path": "/api/exact-review-queue", "method": "GET" },
6+
{ "path": "/api/durable-lifecycle-bay", "method": "GET" },
7+
{ "path": "/api/live-activity-bay", "method": "GET" },
8+
{ "path": "/api/recent-durable-publication-events", "method": "GET" },
9+
{ "path": "/api/exact-review-queue/item", "method": "GET" },
10+
{ "path": "/api/exact-review-queue/reviews", "method": "GET" },
11+
{ "path": "/api/review-observability", "method": "GET" },
12+
{ "path": "/api/review-coverage", "method": "GET" },
13+
{ "path": "/api/apply-observability", "method": "GET" },
14+
{ "path": "/api/health-history", "method": "GET" },
15+
{ "path": "/api/automerge-metrics", "method": "GET" },
16+
{ "path": "/api/status", "method": "ANY" },
17+
{ "path": "/api/triage", "method": "ANY" },
18+
{ "path": "/api/pr-proof-triage", "method": "ANY" }
19+
],
20+
"auditedDashboardVariables": [
21+
"CLAWSWEEPER_REPO",
22+
"WORKER_DETAIL_RUN_LIMIT",
23+
"WORKER_JOB_FETCH_CONCURRENCY",
24+
"WORKER_JOB_CACHE_TTL_SECONDS",
25+
"WORKER_HEALTH_CACHE_TTL_SECONDS",
26+
"WORKER_HEALTH_FETCH_CONCURRENCY",
27+
"AUTOMERGE_CACHE_TTL_SECONDS",
28+
"RECENT_CLOSED_CACHE_TTL_SECONDS",
29+
"INCLUDE_CI_STATUS",
30+
"REVIEW_OBSERVABILITY_REQUIRED",
31+
"REVIEW_RECOVERY_ENABLED"
32+
],
33+
"auditedWorkflowSecrets": [
34+
"ANTHROPIC_API_KEY",
35+
"GEMINI_API_KEY",
36+
"KIMI_API_KEY",
37+
"OPENROUTER_API_KEY",
38+
"CLOUDFLARE_ACCESS_CLIENT_ID",
39+
"CLOUDFLARE_ACCESS_CLIENT_SECRET",
40+
"OPENCLAW_CLOUDFLARE_ACCESS_API_TOKEN",
41+
"OPENCLAW_CLOUDFLARE_CONFIG_API_TOKEN",
42+
"OPENCLAW_CLOUDFLARE_PAGES_API_TOKEN",
43+
"OPENCLAW_REPORTS_ACCESS_CLIENT_ID",
44+
"OPENCLAW_REPORTS_ACCESS_CLIENT_SECRET"
45+
]
46+
}

‎docs/README.md‎

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,17 @@ manual.
1515

1616
## Start here
1717

18-
| Goal | First page | Next step |
19-
| --- | --- | --- |
20-
| Understand the product boundary | [Project vision](../VISION.md) | [Orchestration](orchestration.md) |
21-
| Set up a development checkout | [Contributing](../CONTRIBUTING.md) | [Local run](../README.md#local-run) |
22-
| Understand review and scheduling | [Scheduler](scheduler.md) | [Automation limits](limits.md) |
23-
| Add or operate a target repository | [Target repositories](target-repositories.md) | [Target dispatcher](target-dispatcher.md) |
24-
| Inspect production without mutation | [Live dashboard](live-dashboard.md) | [OpenClaw Bay](openclaw-bay-demo.md) |
25-
| Operate repair or automerge | [Repair entry point](repair/README.md) | [Repair operations](repair/operations.md) |
26-
| Prepare proof for a change | [Contributing](../CONTRIBUTING.md) | [Agent instructions](../AGENTS.md) |
27-
| Review a local committed range | [Local branch review](commit-sweeper.md) | `pnpm local-review -- --base origin/main` |
18+
| Goal | First page | Next step |
19+
| --------------------------------------------------- | --------------------------------------------- | --------------------------------------------------- |
20+
| Understand the product boundary | [Project vision](../VISION.md) | [Orchestration](orchestration.md) |
21+
| Set up a development checkout | [Contributing](../CONTRIBUTING.md) | [Local run](../README.md#local-run) |
22+
| Understand review and scheduling | [Scheduler](scheduler.md) | [Automation limits](limits.md) |
23+
| Add or operate a target repository | [Target repositories](target-repositories.md) | [Target dispatcher](target-dispatcher.md) |
24+
| Inspect production without mutation | [Live dashboard](live-dashboard.md) | [OpenClaw Bay](openclaw-bay-demo.md) |
25+
| Inspect observer routes and configuration ownership | [Public observer API](public-api.md) | [Operator configuration](operator-configuration.md) |
26+
| Operate repair or automerge | [Repair entry point](repair/README.md) | [Repair operations](repair/operations.md) |
27+
| Prepare proof for a change | [Contributing](../CONTRIBUTING.md) | [Agent instructions](../AGENTS.md) |
28+
| Review a local committed range | [Local branch review](commit-sweeper.md) | `pnpm local-review -- --base origin/main` |
2829

2930
Production mutation commands are intentionally not repeated here. Follow the
3031
linked runbook, confirm its status and source of truth, and keep all execution,

‎docs/operator-configuration.md‎

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Operator configuration ownership
2+
3+
- Status: active operator reference
4+
- Owner: ClawSweeper deployment and workflow maintainers
5+
- Source of truth: `dashboard/wrangler.toml` and `.github/workflows/`
6+
- Last verified: `openclaw/clawsweeper@2b5b345063efe1690e1d802fb1a738aa6a408707`
7+
- Update when: an audited name is removed, renamed, or changes responsibility, or a source-verified ownership gap is added to this inventory
8+
- Checked by: `pnpm run check:docs`
9+
10+
This page records names and ownership boundaries only. Never copy secret values
11+
into documentation, issues, logs, or pull requests. The committed Wrangler file
12+
is authoritative for selected deployment values; GitHub repository or
13+
environment settings are authoritative for workflow variables and secrets.
14+
15+
## Dashboard Worker variables
16+
17+
| Name | Responsibility |
18+
| --------------------------------- | --------------------------------------------------------------------- |
19+
| `CLAWSWEEPER_REPO` | Repository used by ClawSweeper-specific projections. |
20+
| `WORKER_DETAIL_RUN_LIMIT` | Maximum workflow-run detail set fetched for dashboard assembly. |
21+
| `WORKER_JOB_FETCH_CONCURRENCY` | Concurrency for workflow-job detail fetching. |
22+
| `WORKER_JOB_CACHE_TTL_SECONDS` | Workflow-job cache lifetime. |
23+
| `WORKER_HEALTH_CACHE_TTL_SECONDS` | Workflow-health cache lifetime. |
24+
| `WORKER_HEALTH_FETCH_CONCURRENCY` | Concurrency for workflow-health fetching. |
25+
| `AUTOMERGE_CACHE_TTL_SECONDS` | Automerge metrics cache lifetime. |
26+
| `RECENT_CLOSED_CACHE_TTL_SECONDS` | Recently closed item cache lifetime. |
27+
| `INCLUDE_CI_STATUS` | Enables CI status in dashboard assembly when selected. |
28+
| `REVIEW_OBSERVABILITY_REQUIRED` | Selects whether review observability is required for status assembly. |
29+
| `REVIEW_RECOVERY_ENABLED` | Selects review recovery behavior in the deployed Worker. |
30+
31+
## Workflow credential names
32+
33+
Provider keys used by the optional OpenClaw runner are `ANTHROPIC_API_KEY`,
34+
`GEMINI_API_KEY`, `KIMI_API_KEY`, and `OPENROUTER_API_KEY`. Maintainer-report
35+
and Cloudflare access workflows reference `CLOUDFLARE_ACCESS_CLIENT_ID`,
36+
`CLOUDFLARE_ACCESS_CLIENT_SECRET`, `OPENCLAW_CLOUDFLARE_ACCESS_API_TOKEN`,
37+
`OPENCLAW_CLOUDFLARE_CONFIG_API_TOKEN`, `OPENCLAW_CLOUDFLARE_PAGES_API_TOKEN`,
38+
`OPENCLAW_REPORTS_ACCESS_CLIENT_ID`, and `OPENCLAW_REPORTS_ACCESS_CLIENT_SECRET`.
39+
Their consuming workflows own whether they are required; no values are recorded
40+
here.
41+
42+
`config/operator-documentation.json` pins this deliberately scoped audited set so
43+
`pnpm run check:docs` fails if a name disappears from its owning source or this
44+
page. It does not require every repository workflow secret or dashboard setting
45+
to be duplicated here. [Automation limits](limits.md) remains canonical for
46+
capacity and timing values.

‎docs/public-api.md‎

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Public observer API
2+
3+
- Status: active operator reference
4+
- Owner: ClawSweeper dashboard maintainers
5+
- Source of truth: `dashboard/worker.ts` request routing and its focused tests
6+
- Last verified: `openclaw/clawsweeper@2b5b345063efe1690e1d802fb1a738aa6a408707`
7+
- Update when: a public observer route, method, query parameter, response source, or authentication boundary changes
8+
- Checked by: `pnpm run check:docs`
9+
10+
The dashboard Worker exposes the following unauthenticated observer routes. They
11+
support current dashboard and operator diagnostics; this inventory does not
12+
promise a versioned compatibility period. Routes under `/internal/`, event
13+
ingest, and the GitHub webhook are mutation or trust-boundary surfaces and are
14+
deliberately not public API. `ANY` records a current method-agnostic routing
15+
branch, not a promise that every method will remain supported.
16+
17+
| Route | Method | Purpose and authoritative source |
18+
| ---------------------------------------- | ------ | ------------------------------------------------------------------------------------------- |
19+
| `/api/health` | `ANY` | Service liveness and deployed source marker from the Worker environment. |
20+
| `/api/exact-review-queue` | `GET` | Exact-review queue statistics from the queue Durable Object. |
21+
| `/api/durable-lifecycle-bay` | `GET` | Durable lifecycle Bay projection from `durableLifecycleBaySnapshot`. |
22+
| `/api/live-activity-bay` | `GET` | Live activity Bay projection from `liveActivityBaySnapshotForRequest`. |
23+
| `/api/recent-durable-publication-events` | `GET` | Recent durable publication events from the queue Durable Object; forwards query parameters. |
24+
| `/api/exact-review-queue/item` | `GET` | One queue item's status; forwards query parameters. |
25+
| `/api/exact-review-queue/reviews` | `GET` | Per-item review lookup used by observer surfaces. |
26+
| `/api/review-observability` | `GET` | Review observability from the queue Durable Object; forwards query parameters. |
27+
| `/api/review-coverage` | `GET` | Review coverage from the queue Durable Object. |
28+
| `/api/apply-observability` | `GET` | Apply-lane observability from `applyObservabilityJson`. |
29+
| `/api/health-history` | `GET` | Historical health from `healthHistoryJson`. |
30+
| `/api/automerge-metrics` | `GET` | Automerge metrics from `automergeMetricsJson`. |
31+
| `/api/status` | `ANY` | Main dashboard status payload from `statusJson`. |
32+
| `/api/triage` | `ANY` | Issue-triage payload from `triageJson`. |
33+
| `/api/pr-proof-triage` | `ANY` | Pull-request proof-triage payload from `prProofTriageJson`. |
34+
35+
`config/operator-documentation.json` is the checked route inventory. Adding or
36+
removing a literal observer route in `dashboard/worker.ts` requires updating
37+
that manifest and this table. The checker excludes `/api/events`, because it is
38+
an ingest mutation rather than an observer route.
39+
40+
For field interpretation, use [Live dashboard](live-dashboard.md). For the
41+
rendered lane model, use [OpenClaw Bay](openclaw-bay-demo.md).

0 commit comments

Comments
 (0)