Coverage for placement + telemetry, and resource-pooling API docs #2085

Closed
opened 2026-10-29 14:12:30 +00:00 by ben · 4 comments
Owner

Why

The M3 Resource Pooling acceptance criteria ask for 80% test coverage and resource-pooling API documentation. Tests exist (readings_test.go, fleetTelemetryColumns.test.ts, assess_test.go, deploy_test.go) but no coverage figure is measured.

Scope

internal/monitor, internal/controlapi fleet read, the assess/deploy placement code, the dashboard fleet-telemetry columns.

Done when

  • CI reports coverage for these packages, at ≥80%
  • The fleet / placement endpoints are documented (OpenAPI + a docs/ page on resource pooling)
## Why The M3 Resource Pooling acceptance criteria ask for 80% test coverage and resource-pooling API documentation. Tests exist (`readings_test.go`, `fleetTelemetryColumns.test.ts`, `assess_test.go`, `deploy_test.go`) but no coverage figure is measured. ## Scope `internal/monitor`, `internal/controlapi` fleet read, the assess/deploy placement code, the dashboard fleet-telemetry columns. ## Done when - [ ] CI reports coverage for these packages, at ≥80% - [ ] The fleet / placement endpoints are documented (OpenAPI + a `docs/` page on resource pooling)

This was generated by AI during triage.

Agent Brief

Category: enhancement
Summary: Measure and enforce ≥80% test coverage for the M3 Resource Pooling packages in CI, and publish resource-pooling API docs (OpenAPI + a docs/ page).

Current behavior:
Tests exist for the placement/telemetry surface — internal/monitor/readings_test.go, internal/provision/assess_test.go, internal/provision/deploy_test.go, and dashboard/tests/unit/fleetTelemetryColumns.test.ts (all present on 2026-10-29) — but no coverage figure is measured in CI, and the fleet/placement endpoints have no OpenAPI entry or docs/ page.

Desired behavior:
CI measures and reports coverage for the resource-pooling packages and gates below 80%. The fleet read / placement endpoints are documented.

Scope (packages): internal/monitor, the internal/controlapi fleet read, the assess/deploy placement code (internal/provision), and the dashboard fleet-telemetry columns.

Acceptance criteria:

  • CI reports a coverage figure for the named packages and fails below 80%
  • Where a package is under 80%, tests are added to reach it (no behaviour change)
  • The fleet/placement endpoints are documented in the project's OpenAPI spec
  • A docs/ page on resource pooling exists and links those endpoints

Out of scope:

  • New placement/telemetry behaviour (coverage + docs only)
  • Raising coverage on packages outside the named set
> *This was generated by AI during triage.* ## Agent Brief **Category:** enhancement **Summary:** Measure and enforce ≥80% test coverage for the M3 Resource Pooling packages in CI, and publish resource-pooling API docs (OpenAPI + a `docs/` page). **Current behavior:** Tests exist for the placement/telemetry surface — `internal/monitor/readings_test.go`, `internal/provision/assess_test.go`, `internal/provision/deploy_test.go`, and `dashboard/tests/unit/fleetTelemetryColumns.test.ts` (all present on 2026-10-29) — but no coverage figure is measured in CI, and the fleet/placement endpoints have no OpenAPI entry or `docs/` page. **Desired behavior:** CI measures and reports coverage for the resource-pooling packages and gates below 80%. The fleet read / placement endpoints are documented. **Scope (packages):** `internal/monitor`, the `internal/controlapi` fleet read, the assess/deploy placement code (`internal/provision`), and the dashboard fleet-telemetry columns. **Acceptance criteria:** - [ ] CI reports a coverage figure for the named packages and fails below 80% - [ ] Where a package is under 80%, tests are added to reach it (no behaviour change) - [ ] The fleet/placement endpoints are documented in the project's OpenAPI spec - [ ] A `docs/` page on resource pooling exists and links those endpoints **Out of scope:** - New placement/telemetry behaviour (coverage + docs only) - Raising coverage on packages outside the named set

swarm-claim host=elitebook-distributed-server-03 run=56882
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=elitebook-distributed-server-03 run=56882 (automated multi-host claim — lowest live claim id works this ticket)

close-report for #2085 — status success

⛔ close-report gates REFUSED this close — the following claims did not verify:

  • status:success but test 'COVERAGE_THRESHOLD=95 bash scripts/coverage-gate.sh (threshold-fail path proof)' exited 1 (a claimed-passing run that did not pass)
envelope
{
  "issue": 2085,
  "status": "success",
  "commits": [
    "48faa907f87f2638dfd86287574a0e2dba295844"
  ],
  "changed_files": [
    "STATUS.md",
    "dashboard/package.json",
    "docs/resource-pooling.md",
    "pnpm-lock.yaml",
    "scripts/coverage-gate.sh",
    "scripts/seam-smoke.sh"
  ],
  "tests": [
    {
      "command": "bash scripts/coverage-gate.sh",
      "exit_code": 0
    },
    {
      "command": "go test ./internal/monitor/ ./internal/provision/ ./internal/controlapi/",
      "exit_code": 0
    },
    {
      "command": "COVERAGE_THRESHOLD=95 bash scripts/coverage-gate.sh (threshold-fail path proof)",
      "exit_code": 1
    },
    {
      "command": "pnpm run lint",
      "exit_code": 0
    },
    {
      "command": "pnpm install --frozen-lockfile",
      "exit_code": 0
    }
  ],
  "criteria": {
    "CI reports a coverage figure for the named packages and fails below 80%": "scripts/coverage-gate.sh prints a per-unit statement-coverage table (internal/monitor 90.5%, internal/provision 83.8%, internal/controlapi/fleet.go 88.0%, dashboard fleet-telemetry columns 98.8%) and exits non-zero below the floor; wired as the last stage of scripts/seam-smoke.sh (the command CI runs). Fail path proven with COVERAGE_THRESHOLD=95 -> exit 1.",
    "Where a package is under 80%, tests are added to reach it (no behaviour change)": "Every named unit was already >=80% (go test -cover: monitor 90.5%, provision 83.8%, controlapi 80.7%/fleet.go 88.0%; v8: telemetry columns 98.8%), so no tests and no behaviour changed — the commit touches no Go/Vue/TS source, only the gate script, seam wiring, docs, STATUS, package.json+lockfile.",
    "The fleet/placement endpoints are documented in the project's OpenAPI spec": "All fleet/placement routes already carry OpenAPI entries in packages/openapi-spec/openapi.yaml (/fleet, /fleet/{node_id}/telemetry, /provision/devices/{device_id}/assessment, .../change-assessment, .../selection, /provision/impact, /provision/deploy, .../deploy snapshot, .../fit/{service}, .../removal/{service}, and the act endpoints) — verified present; docs/resource-pooling.md cross-references them.",
    "A docs/ page on resource pooling exists and links those endpoints": "docs/resource-pooling.md (new) describes the placement/headroom/telemetry model, lists the code homes, and links every fleet/placement endpoint to packages/openapi-spec/openapi.yaml with its operationId, citing the backing ADRs/DDRs."
  },
  "summary": "Added a CI statement-coverage gate (>=80%) over the M3 resource-pooling placement + telemetry units and a docs/ page documenting the fleet/placement API.",
  "blockers": []
}
**close-report** for #2085 — status `success` :no_entry: **close-report gates REFUSED this close** — the following claims did not verify: - status:success but test 'COVERAGE_THRESHOLD=95 bash scripts/coverage-gate.sh (threshold-fail path proof)' exited 1 (a claimed-passing run that did not pass) <details><summary>envelope</summary> ```json { "issue": 2085, "status": "success", "commits": [ "48faa907f87f2638dfd86287574a0e2dba295844" ], "changed_files": [ "STATUS.md", "dashboard/package.json", "docs/resource-pooling.md", "pnpm-lock.yaml", "scripts/coverage-gate.sh", "scripts/seam-smoke.sh" ], "tests": [ { "command": "bash scripts/coverage-gate.sh", "exit_code": 0 }, { "command": "go test ./internal/monitor/ ./internal/provision/ ./internal/controlapi/", "exit_code": 0 }, { "command": "COVERAGE_THRESHOLD=95 bash scripts/coverage-gate.sh (threshold-fail path proof)", "exit_code": 1 }, { "command": "pnpm run lint", "exit_code": 0 }, { "command": "pnpm install --frozen-lockfile", "exit_code": 0 } ], "criteria": { "CI reports a coverage figure for the named packages and fails below 80%": "scripts/coverage-gate.sh prints a per-unit statement-coverage table (internal/monitor 90.5%, internal/provision 83.8%, internal/controlapi/fleet.go 88.0%, dashboard fleet-telemetry columns 98.8%) and exits non-zero below the floor; wired as the last stage of scripts/seam-smoke.sh (the command CI runs). Fail path proven with COVERAGE_THRESHOLD=95 -> exit 1.", "Where a package is under 80%, tests are added to reach it (no behaviour change)": "Every named unit was already >=80% (go test -cover: monitor 90.5%, provision 83.8%, controlapi 80.7%/fleet.go 88.0%; v8: telemetry columns 98.8%), so no tests and no behaviour changed — the commit touches no Go/Vue/TS source, only the gate script, seam wiring, docs, STATUS, package.json+lockfile.", "The fleet/placement endpoints are documented in the project's OpenAPI spec": "All fleet/placement routes already carry OpenAPI entries in packages/openapi-spec/openapi.yaml (/fleet, /fleet/{node_id}/telemetry, /provision/devices/{device_id}/assessment, .../change-assessment, .../selection, /provision/impact, /provision/deploy, .../deploy snapshot, .../fit/{service}, .../removal/{service}, and the act endpoints) — verified present; docs/resource-pooling.md cross-references them.", "A docs/ page on resource pooling exists and links those endpoints": "docs/resource-pooling.md (new) describes the placement/headroom/telemetry model, lists the code homes, and links every fleet/placement endpoint to packages/openapi-spec/openapi.yaml with its operationId, citing the backing ADRs/DDRs." }, "summary": "Added a CI statement-coverage gate (>=80%) over the M3 resource-pooling placement + telemetry units and a docs/ page documenting the fleet/placement API.", "blockers": [] } ``` </details>

close-report for #2085 — status success

✅ close-report gates passed — every claim verified against main; issue closed.

envelope
{
  "issue": 2085,
  "status": "success",
  "commits": [
    "48faa907f87f2638dfd86287574a0e2dba295844"
  ],
  "changed_files": [
    "STATUS.md",
    "dashboard/package.json",
    "docs/resource-pooling.md",
    "pnpm-lock.yaml",
    "scripts/coverage-gate.sh",
    "scripts/seam-smoke.sh"
  ],
  "tests": [
    {
      "command": "bash scripts/coverage-gate.sh",
      "exit_code": 0
    },
    {
      "command": "go test ./internal/monitor/ ./internal/provision/ ./internal/controlapi/",
      "exit_code": 0
    },
    {
      "command": "pnpm run lint",
      "exit_code": 0
    },
    {
      "command": "pnpm install --frozen-lockfile",
      "exit_code": 0
    }
  ],
  "criteria": {
    "CI reports a coverage figure for the named packages and fails below 80%": "scripts/coverage-gate.sh prints a per-unit statement-coverage table (internal/monitor 90.5%, internal/provision 83.8%, internal/controlapi/fleet.go 88.0%, dashboard fleet-telemetry columns 98.8%) and exits non-zero below the floor; wired as the last stage of scripts/seam-smoke.sh (the command CI runs). The fail path was verified locally by running the gate with COVERAGE_THRESHOLD=95, which exited 1 and named the three Go units below that floor.",
    "Where a package is under 80%, tests are added to reach it (no behaviour change)": "Every named unit was already >=80% (go test -cover: monitor 90.5%, provision 83.8%, controlapi 80.7%/fleet.go 88.0%; v8: telemetry columns 98.8%), so no tests and no behaviour changed — the commit touches no Go/Vue/TS source, only the gate script, seam wiring, docs, STATUS, package.json+lockfile.",
    "The fleet/placement endpoints are documented in the project's OpenAPI spec": "All fleet/placement routes already carry OpenAPI entries in packages/openapi-spec/openapi.yaml (/fleet, /fleet/{node_id}/telemetry, /provision/devices/{device_id}/assessment, .../change-assessment, .../selection, /provision/impact, /provision/deploy, .../deploy snapshot, .../fit/{service}, .../removal/{service}, and the act endpoints) — verified present; docs/resource-pooling.md cross-references them.",
    "A docs/ page on resource pooling exists and links those endpoints": "docs/resource-pooling.md (new) describes the placement/headroom/telemetry model, lists the code homes, and links every fleet/placement endpoint to packages/openapi-spec/openapi.yaml with its operationId, citing the backing ADRs/DDRs."
  },
  "summary": "Added a CI statement-coverage gate (>=80%) over the M3 resource-pooling placement + telemetry units and a docs/ page documenting the fleet/placement API.",
  "blockers": []
}
**close-report** for #2085 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 2085, "status": "success", "commits": [ "48faa907f87f2638dfd86287574a0e2dba295844" ], "changed_files": [ "STATUS.md", "dashboard/package.json", "docs/resource-pooling.md", "pnpm-lock.yaml", "scripts/coverage-gate.sh", "scripts/seam-smoke.sh" ], "tests": [ { "command": "bash scripts/coverage-gate.sh", "exit_code": 0 }, { "command": "go test ./internal/monitor/ ./internal/provision/ ./internal/controlapi/", "exit_code": 0 }, { "command": "pnpm run lint", "exit_code": 0 }, { "command": "pnpm install --frozen-lockfile", "exit_code": 0 } ], "criteria": { "CI reports a coverage figure for the named packages and fails below 80%": "scripts/coverage-gate.sh prints a per-unit statement-coverage table (internal/monitor 90.5%, internal/provision 83.8%, internal/controlapi/fleet.go 88.0%, dashboard fleet-telemetry columns 98.8%) and exits non-zero below the floor; wired as the last stage of scripts/seam-smoke.sh (the command CI runs). The fail path was verified locally by running the gate with COVERAGE_THRESHOLD=95, which exited 1 and named the three Go units below that floor.", "Where a package is under 80%, tests are added to reach it (no behaviour change)": "Every named unit was already >=80% (go test -cover: monitor 90.5%, provision 83.8%, controlapi 80.7%/fleet.go 88.0%; v8: telemetry columns 98.8%), so no tests and no behaviour changed — the commit touches no Go/Vue/TS source, only the gate script, seam wiring, docs, STATUS, package.json+lockfile.", "The fleet/placement endpoints are documented in the project's OpenAPI spec": "All fleet/placement routes already carry OpenAPI entries in packages/openapi-spec/openapi.yaml (/fleet, /fleet/{node_id}/telemetry, /provision/devices/{device_id}/assessment, .../change-assessment, .../selection, /provision/impact, /provision/deploy, .../deploy snapshot, .../fit/{service}, .../removal/{service}, and the act endpoints) — verified present; docs/resource-pooling.md cross-references them.", "A docs/ page on resource pooling exists and links those endpoints": "docs/resource-pooling.md (new) describes the placement/headroom/telemetry model, lists the code homes, and links every fleet/placement endpoint to packages/openapi-spec/openapi.yaml with its operationId, citing the backing ADRs/DDRs." }, "summary": "Added a CI statement-coverage gate (>=80%) over the M3 resource-pooling placement + telemetry units and a docs/ page documenting the fleet/placement API.", "blockers": [] } ``` </details>
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/idss#2085
No description provided.