🚀 The fast, Pythonic way to build MCP servers and clients.
Chart public backlog counts and closure outcomes (#5942)
nate nowack75ee327562d6
diff --git a/.github/workflows/backlog-status.yml b/.github/workflows/backlog-status.ymlnew file mode 100644index 000000000..87728c171--- /dev/null+++ b/.github/workflows/backlog-status.yml@@ -0,0 +1,69 @@+name: Backlog history+on:+ schedule:+ - cron: "7,37 * * * *"+ workflow_dispatch:+ pull_request:+ paths:+ - ".github/workflows/backlog-status.yml"+ - "scripts/backlog_status.py"+ - "tests/test_backlog_status.py"+permissions: {}+concurrency:+ group: backlog-status-${{ github.event.pull_request.number || 'publisher' }}+ cancel-in-progress: false+jobs:+ build:+ runs-on: ubuntu-latest+ timeout-minutes: 15+ permissions:+ contents: read+ issues: read+ pull-requests: read+ steps:+ - uses: actions/checkout@v7+ - name: Read published history+ env:+ GH_TOKEN: ${{ github.token }}+ run: |+ gh api -H 'Accept: application/vnd.github.raw+json' 'repos/PrefectHQ/fastmcp/contents/backlog.json?ref=status' > "$RUNNER_TEMP/previous-backlog.json"+ - name: Collect counts and outcomes+ env:+ GH_TOKEN: ${{ github.token }}+ run: python scripts/backlog_status.py --previous "$RUNNER_TEMP/previous-backlog.json" --output "$RUNNER_TEMP/backlog.json"+ - uses: actions/upload-artifact@v7+ with:+ name: backlog+ path: ${{ runner.temp }}/backlog.json+ retention-days: 3+ publish:+ needs: build+ if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'+ runs-on: ubuntu-latest+ timeout-minutes: 5+ permissions:+ contents: write+ concurrency:+ group: maintenance-status-publish+ cancel-in-progress: false+ steps:+ - uses: actions/download-artifact@v8+ with:+ name: backlog+ path: snapshot+ - name: Preserve the public time series+ env:+ GH_TOKEN: ${{ github.token }}+ REPOSITORY: ${{ github.repository }}+ run: |+ git init -q site+ cd site+ git remote add origin "https://x-access-token:${GH_TOKEN}@github.com/${REPOSITORY}.git"+ git fetch -q --depth 1 origin status+ git checkout -q -b status FETCH_HEAD+ cp ../snapshot/backlog.json .+ git add backlog.json+ git -c user.name="github-actions[bot]" \+ -c user.email="41898282+github-actions[bot]@users.noreply.github.com" \+ commit -q -m "backlog: $(jq -r .as_of backlog.json)"+ git push -q origin statusdiff --git a/.github/workflows/maintenance-status.yml b/.github/workflows/maintenance-status.ymlindex 33f59dbd3..44381e33b 100644--- a/.github/workflows/maintenance-status.yml+++ b/.github/workflows/maintenance-status.yml@@ -96,8 +96,8 @@ jobs:git checkout -q --orphan statusficp ../snapshot/status.json ../snapshot/STATUS.md ../snapshot/badge.json .- cp ../snapshot/index.html ../snapshot/style.css ../snapshot/app.js .- git add status.json STATUS.md badge.json index.html style.css app.js+ cp ../snapshot/*.html ../snapshot/*.css ../snapshot/*.js .+ git add status.json STATUS.md badge.json *.html *.css *.jsgit -c user.name="github-actions[bot]" \-c user.email="41898282+github-actions[bot]@users.noreply.github.com" \commit -q -m "status: $(jq -r .as_of status.json)"diff --git a/docs/development/contributing.mdx b/docs/development/contributing.mdxindex 12f55cc4b..44f0cd868 100644--- a/docs/development/contributing.mdx+++ b/docs/development/contributing.mdx@@ -104,7 +104,7 @@ Read review-bot comments and maintainer replies, evaluate concrete findings, and## Maintenance and automation-The [maintenance status page](https://github.com/PrefectHQ/fastmcp/blob/status/STATUS.md) reports automation health and the contributor queue twice a day. Check its timestamp before treating a status as current. The accompanying `status.json` uses the `fastmcp-maintenance/1` schema; `idle` means there was nothing to do, while `degraded` means a run failed.+The [public backlog dashboard](https://prefecthq.github.io/fastmcp/) charts open issues and PRs, incoming work, and closure outcomes. Backlog snapshots update every 30 minutes; older reconstructed counts and the limits of closure history are identified on the page. The [maintenance status page](https://prefecthq.github.io/fastmcp/operations.html) reports automation health and the contributor queue twice a day. Check its timestamp before treating a status as current. The accompanying `status.json` uses the `fastmcp-maintenance/1` schema; `idle` means there was nothing to do, while `degraded` means a run failed.Automation labels and deduplicates issues, enforces the contribution gate, explains CI failures, and checks new dependency releases nightly. Duplicate issues and reports still missing a reproduction after seven days without an author reply close automatically. Maintainers can request work with `/marvin`. A separate triage agent may open draft fixes for unclaimed issues; it does not assign contributors, comment, mark drafts ready, or merge.diff --git a/scripts/backlog_status.py b/scripts/backlog_status.pynew file mode 100644index 000000000..963b2dc8b--- /dev/null+++ b/scripts/backlog_status.py@@ -0,0 +1,161 @@+"""Publish public backlog history without inferring closures from count deltas.++The previous backlog.json retains observed samples imported from the existing+half-hourly collector. Older samples are explicitly reconstructed. GitHub's+current records give creation and latest closure dates, not every reopen cycle.+"""++import argparse+import json+import subprocess+from datetime import datetime, timedelta, timezone+from pathlib import Path+from zoneinfo import ZoneInfo++REPO = "PrefectHQ/fastmcp"+SCHEMA = "fastmcp-backlog/1"+CENTRAL = ZoneInfo("America/Chicago")+++def fetch_items() -> list[dict]:+ result = subprocess.run(+ [+ "gh",+ "api",+ "--paginate",+ f"repos/{REPO}/issues?state=all&per_page=100&sort=created&direction=asc",+ "--jq",+ ".[] | {number, title, state, state_reason, created_at, closed_at, draft, pull_request: (if .pull_request then {merged_at: .pull_request.merged_at} else null end)}",+ ],+ capture_output=True,+ text=True,+ check=True,+ )+ return [json.loads(line) for line in result.stdout.splitlines() if line.strip()]+++def parse_time(value: str) -> datetime:+ return datetime.fromisoformat(value.replace("Z", "+00:00"))+++def kind(item: dict) -> str:+ return "prs" if item.get("pull_request") is not None else "issues"+++def outcome(item: dict) -> str | None:+ if item["state"] != "closed":+ return None+ if kind(item) == "prs":+ return "merged" if item["pull_request"].get("merged_at") else "closed_unmerged"+ return {"completed": "completed", "not_planned": "not_planned"}.get(+ item.get("state_reason"), "other_closed"+ )+++def sample(items: list[dict], at: datetime, source: str) -> dict:+ row = {"at": at.isoformat(), "source": source}+ for category in ("issues", "prs"):+ eligible = [+ item+ for item in items+ if kind(item) == category+ and parse_time(item["created_at"]) <= at+ and (not item.get("closed_at") or parse_time(item["closed_at"]) > at)+ ]+ row[category] = {"open": len(eligible)}+ if source == "live" and category == "prs":+ row[category]["draft"] = sum(bool(item.get("draft")) for item in eligible)+ return row+++def build(items: list[dict], previous: dict, now: datetime) -> dict:+ samples = list(previous.get("samples", []))+ if not samples:+ midnight = now.replace(hour=0, minute=0, second=0, microsecond=0)+ samples = [+ sample(items, midnight - timedelta(days=d), "backfill")+ for d in range(365, 0, -1)+ ]+ samples.append(sample(items, now, "live"))+ samples = sorted(+ {row["at"]: row for row in samples}.values(),+ key=lambda row: parse_time(row["at"]),+ )+ today = now.astimezone(CENTRAL).date()+ daily = {}+ for offset in range(365, -1, -1):+ day = (today - timedelta(days=offset)).isoformat()+ daily[day] = {+ "day": day,+ "issues_opened": 0,+ "prs_opened": 0,+ "completed": 0,+ "not_planned": 0,+ "other_closed": 0,+ "merged": 0,+ "closed_unmerged": 0,+ }+ events = []+ for item in items:+ status = outcome(item)+ for field, event in (+ ("created_at", f"{kind(item)}_opened"),+ ("closed_at", status),+ ):+ if not event or not item.get(field):+ continue+ at = item[field]+ day = parse_time(at).astimezone(CENTRAL).date().isoformat()+ if day in daily:+ daily[day][event] += 1+ if day >= (today - timedelta(days=30)).isoformat():+ events.append(+ {+ "number": item["number"],+ "title": item["title"],+ "kind": kind(item),+ "event": event,+ "at": at,+ "day": day,+ }+ )+ return {+ "schema": SCHEMA,+ "repo": REPO,+ "as_of": now.isoformat(),+ "timezone": "America/Chicago",+ "samples": samples,+ "daily": list(daily.values()),+ "events": sorted(events, key=lambda event: event["at"], reverse=True),+ }+++def main() -> None:+ parser = argparse.ArgumentParser(description=__doc__)+ parser.add_argument("--previous", type=Path)+ parser.add_argument("--import-history", type=Path)+ parser.add_argument("--output", type=Path, required=True)+ args = parser.parse_args()+ previous = json.loads(args.previous.read_text()) if args.previous else {}+ if args.previous and previous.get("schema") != SCHEMA:+ raise ValueError("Unexpected backlog history schema")+ if args.import_history:+ imported = [+ json.loads(line)+ for line in args.import_history.read_text().splitlines()+ if line.strip()+ ]+ previous["samples"] = previous.get("samples", []) + [+ {key: row[key] for key in ("at", "source", "issues", "prs")}+ for row in imported+ if row["repo"] == REPO+ ]+ # Timestamp the beginning of collection so updates during pagination are+ # not represented as a snapshot from after an item was read.+ now = datetime.now(timezone.utc).replace(microsecond=0)+ doc = build(fetch_items(), previous, now)+ args.output.write_text(json.dumps(doc, separators=(",", ":")) + "\n")+++if __name__ == "__main__":+ main()diff --git a/scripts/maintenance_status.py b/scripts/maintenance_status.pyindex 64486d2b6..866c64887 100644--- a/scripts/maintenance_status.py+++ b/scripts/maintenance_status.py@@ -582,8 +582,9 @@ def main() -> None:(out / "STATUS.md").write_text(markdown(doc))(out / "badge.json").write_text(json.dumps(badge(doc)) + "\n")site = Path(__file__).resolve().parent.parent / "status-site"- for name in ("index.html", "style.css", "app.js"):- shutil.copyfile(site / name, out / name)+ for path in site.iterdir():+ if path.suffix in {".html", ".css", ".js"}:+ shutil.copyfile(path, out / path.name)print(markdown(doc))diff --git a/status-site/README.md b/status-site/README.mdindex 92aaae19d..f0d7ec480 100644--- a/status-site/README.md+++ b/status-site/README.md@@ -1,6 +1,42 @@-# Maintainer dashboard+# Public backlog dashboard-A static dashboard over the public `status` branch's `status.json`. Serve this directory with any static host, including GitHub Pages or Wisp. It needs no credentials or build step.+Published at <https://prefecthq.github.io/fastmcp/> from the `status` branch.+The landing page reads `backlog.json`; automation health remains at+`operations.html` and reads `status.json`. Both use raw GitHub data in production+so the data can refresh independently of the Pages deployment.++`backlog-status.yml` runs every 30 minutes, retaining the previous snapshot+series and refreshing creation/latest-closure outcomes from public GitHub+records. The build job has read-only access; the publisher only copies its+artifact. Both status publishers serialize writes through the same concurrency+group. `maintenance-status.yml` publishes the static site alongside its existing+maintenance snapshot twice daily, or on manual dispatch.++The original half-hourly collector's history was imported with:++```bash+python scripts/backlog_status.py --import-history history.jsonl --output backlog.json+```++Keep that generated JSON on the `status` branch, not in source control on `main`.+To rebuild, pass the published file with `--previous` so observed history is+never replaced by reconstructed counts. A missing previous history fails the+scheduled run instead of silently resetting the series.++Dates and daily buckets use America/Chicago. Observed samples are authoritative+for their collection times. Reconstructed rows cannot recover past close/reopen+cycles. Daily closures use each currently closed item's latest closure timestamp+and reason; they are not a complete event log. Openings and outcomes are counted+from individual records, never inferred from differences in open counts.++For a local preview, copy the public `backlog.json` into this folder and run+`python -m http.server 8765 --directory status-site` from the repository root.+Do not commit the copied data. Charts support touch, pointer inspection, and+arrow keys; Enter opens the selected activity day's linked items.++## Automation view++The operations page is a static dashboard over the public `status` branch's `status.json`. Serve this directory with any static host, including GitHub Pages or Wisp. It needs no credentials or build step.For local preview, build a snapshot with `uv run scripts/maintenance_status.py .local/status-preview`, then run `uv run python -m http.server 4174 --directory .local/status-preview` from the repository root. The collector copies the dashboard assets alongside the data.diff --git a/status-site/app.js b/status-site/app.jsindex 84f47af0a..a892d3bcb 100644--- a/status-site/app.js+++ b/status-site/app.js@@ -1,456 +1,547 @@const $ = (id) => document.getElementById(id);-let snapshot;-let rankingLimit = 10;-const snapshotUrl =+const DATA_URL =window.location.origin === "https://prefecthq.github.io"- ? "https://raw.githubusercontent.com/PrefectHQ/fastmcp/status/status.json"- : new URL("status.json", window.location.href);--const number = (value) => (value == null ? "—" : value.toLocaleString());-function el(tag, text, className) {- const node = document.createElement(tag);- if (text != null) node.textContent = text;- if (className) node.className = className;- return node;-}-function link(text, url) {- const node = el("a", text);- try {- const parsed = new URL(url);- if (- parsed.origin === "https://github.com" &&- parsed.pathname.startsWith("/PrefectHQ/fastmcp/")- )- node.href = parsed.href;- } catch {}- return node;+ ? "https://raw.githubusercontent.com/PrefectHQ/fastmcp/status/backlog.json"+ : new URL("backlog.json", window.location.href).href;+const TZ = "America/Chicago";+const DAY = 86400000;+const labels = {+ issues_opened: "Issues opened",+ prs_opened: "PRs opened",+ completed: "Completed",+ not_planned: "Not planned",+ other_closed: "Unspecified",+ merged: "Merged",+ closed_unmerged: "Closed unmerged",+};+const colors = {+ issues_opened: "--opened",+ prs_opened: "--opened",+ completed: "--completed",+ not_planned: "--not-planned",+ other_closed: "--other",+ merged: "--merged",+ closed_unmerged: "--closed-unmerged",+};+let data,+ days = 30,+ category = "issues",+ selectedDay;+const number = (n) => n.toLocaleString();+const dateLabel = (at, options = {}) =>+ new Date(at).toLocaleString("en-US", {+ timeZone: TZ,+ month: "short",+ day: "numeric",+ ...options,+ });+const dayLabel = (day) => dateLabel(`${day}T12:00:00Z`);+function node(tag, text, className) {+ const el = document.createElement(tag);+ if (text != null) el.textContent = text;+ if (className) el.className = className;+ return el;}-function issue(a) {- return ["degraded", "off"].includes(a.state) || a.stale;+function svg(tag, attrs, text) {+ const el = document.createElementNS("http://www.w3.org/2000/svg", tag);+ for (const [k, v] of Object.entries(attrs)) el.setAttribute(k, v);+ if (text != null) el.textContent = text;+ return el;}-function attention(title, detail, state, url) {- const row = el("div", null, "attention-row");- row.append(- link(title, url),- el("span", state, `state ${state}`),- el("p", detail),- );- $("attention").append(row);+function color(key) {+ return `var(${colors[key]})`;}-function svg(tag, attrs, text) {- const node = document.createElementNS("http://www.w3.org/2000/svg", tag);- for (const [key, value] of Object.entries(attrs))- node.setAttribute(key, value);- if (text != null) node.textContent = text;- return node;+function selectedDaily() {+ return days === "all" ? data.daily : data.daily.slice(-days);}-function chart() {- const eligible = snapshot.automations.filter((a) => a.daily?.length);- const selected = $("activity-filter").value;- const rows = eligible.filter((a) => selected === "all" || a.id === selected);- const days = new Map();- for (const a of rows)- for (const b of a.daily) {- const day = days.get(b.day) || {- day: b.day,- succeeded: 0,- failed: 0,- blocked: 0,- };- for (const key of ["succeeded", "failed", "blocked"])- day[key] += b[key] || 0;- days.set(b.day, day);- }- const buckets = [...days.values()].sort((a, b) => a.day.localeCompare(b.day));- $("chart").replaceChildren();- $("activity-totals").replaceChildren();- if (!buckets.length) {- $("chart").append(el("p", "Activity history unavailable.", "empty"));- return;- }- const series = [- ["succeeded", "passed", "succeeded"],- ["failed", "failed", "failed"],- ["blocked", "blocked", "gate rejections / errors"],- ];- for (const [key, cls, label] of series)- $("activity-totals").append(- el(- "span",- `${number(buckets.reduce((sum, b) => sum + b[key], 0))} ${label}`,- cls,- ),- );+function chartFrame(id, label, height = 250) {+ const host = $(id);+ host.replaceChildren();+ const width = Math.max(280, host.clientWidth);const graph = svg("svg", {- viewBox: "0 0 800 210",+ viewBox: `0 0 ${width} ${height}`,class: "chart",role: "img",- "aria-label":- "Daily completed automation runs; each bar lists its outcomes",+ tabindex: 0,+ "aria-label": label,});- const max = Math.max(- 1,- ...buckets.map((b) => b.succeeded + b.failed + b.blocked),+ host.append(graph);+ return {+ graph,+ width,+ height,+ left: 42,+ right: width - 12,+ top: 16,+ bottom: height - 30,+ };+}+function horizontal(graph, left, right, y, label) {+ graph.append(+ svg("line", { x1: left, x2: right, y1: y, y2: y, class: "grid" }),+ svg("text", { x: left - 8, y: y + 4, "text-anchor": "end" }, label),);- for (let i = 0; i <= 3; i++) {- const y = 175 - i * 50;- graph.append(- svg("line", { x1: 40, x2: 790, y1: y, y2: y, class: "grid" }),- svg(- "text",- { x: 32, y: y + 4, "text-anchor": "end" },- Math.round((max * i) / 3),- ),- );- }- buckets.forEach((b, i) => {- const step = 750 / buckets.length,- x = 40 + i * step,- width = Math.min(56, step * 0.6);- const label = `${b.day}: ${b.succeeded} succeeded, ${b.failed} failed, ${b.blocked} gate rejections or errors`;- const group = svg("g", { class: "bar", tabindex: 0, "aria-label": label });- group.append(svg("title", {}, label));- let y = 175;- for (const [key, cls] of series) {- const height = (b[key] / max) * 150;- y -= height;- group.append(- svg("rect", {- x: x + (step - width) / 2,- y,- width,- height,- class: cls,- }),- );- }+}+function dateTicks(graph, entries, x, bottom, width, label) {+ const count = width < 500 ? 3 : 5;+ const indices = new Set(+ Array.from({ length: count }, (_, i) =>+ Math.round((i * (entries.length - 1)) / (count - 1)),+ ),+ );+ for (const i of indices)graph.append(- group,svg("text",- { x: x + step / 2, y: 201, "text-anchor": "middle" },- b.day.slice(5),- ),- );- });- $("chart").append(graph);- const missing = snapshot.automations.filter(- (a) => a.id !== "contributor-queue" && !a.daily?.length,- );- if (selected === "all" && missing.length)- $("chart").append(- el(- "p",- `History unavailable for ${missing.map((a) => a.name).join(", ")}.`,- "caption",+ {+ x: x(entries[i], i),+ y: bottom + 23,+ "text-anchor":+ i === 0 ? "start" : i === entries.length - 1 ? "end" : "middle",+ },+ label(entries[i]),),);}-function automations() {- const open = new Set(- [...$("automations").querySelectorAll("details[open]")].map(- (n) => n.dataset.id,- ),- );- $("automations").replaceChildren();- for (const a of snapshot.automations.filter(- (a) => a.id !== "contributor-queue",- )) {- if ($("attention-only").checked && !issue(a)) continue;- const row = el("details");- row.dataset.id = a.id;- row.open = open.has(a.id);- const summary = el("summary");- const count = Object.values(a.counts || {}).reduce((sum, n) => sum + n, 0);- const state = a.stale ? "stale" : a.state;- summary.append(- el("span", a.name, "name"),- el("span", state, `state ${state}`),- el(- "span",- `${Object.keys(a.counts || {}).length ? number(count) : "—"} outcomes`,- "count",- ),+function interactions(graph, entries, nearest, show, choose) {+ let index = entries.length - 1;+ const pointAt = (event) => {+ const rect = graph.getBoundingClientRect();+ return nearest(+ ((event.clientX - rect.left) * graph.viewBox.baseVal.width) / rect.width,);- const detail = el("div", null, "detail");- detail.append(- el("p", a.what),- el("p", `${a.cadence} · last success ${a.last_ok_day || "unavailable"}`),- link("inspect runs ↗", a.evidence_url),- );- row.append(summary, detail);- $("automations").append(row);- }- if (!$("automations").childElementCount)- $("automations").append(el("p", "No automation issues reported.", "empty"));+ };+ graph.addEventListener("pointermove", (event) => {+ index = pointAt(event);+ show(index);+ });+ graph.addEventListener("click", (event) => {+ if (event.detail !== 0) index = pointAt(event);+ show(index);+ if (choose) choose(index);+ });+ graph.addEventListener("focus", () => show(index));+ graph.addEventListener("keydown", (event) => {+ if (+ !["ArrowLeft", "ArrowRight", "Home", "End", "Enter", " "].includes(+ event.key,+ )+ )+ return;+ event.preventDefault();+ if (event.key === "ArrowLeft") index = Math.max(0, index - 1);+ if (event.key === "ArrowRight")+ index = Math.min(entries.length - 1, index + 1);+ if (event.key === "Home") index = 0;+ if (event.key === "End") index = entries.length - 1;+ show(index);+ if (["Enter", " "].includes(event.key) && choose) choose(index);+ });}--function ranking() {- const data = snapshot.attention;- $("ranking").replaceChildren();- if (!data || data.schema !== "fastmcp-attention/1") {- $("ranking-coverage").textContent =- "Issue ranking unavailable. Queue age below is not a priority ranking.";- $("ranking-more").hidden = true;+function backlog() {+ const end = Date.parse(data.as_of),+ start = days === "all" ? Date.parse(data.samples[0].at) : end - days * DAY;+ let rows = data.samples.filter((row) => Date.parse(row.at) >= start);+ const before = data.samples+ .filter((row) => Date.parse(row.at) < start)+ .at(-1);+ if (before) rows = [before, ...rows];+ if (!rows.length) {+ $("backlog-chart").textContent = "No snapshots in this range.";return;}- const judged =- data.judged === data.examined- ? `judge: ${data.judge}`- : `${data.judged}/${data.examined} model-assessed; remaining issues use facts and labels only`;- $("ranking-coverage").textContent =- `${data.examined} ${data.has_more ? "newest open issues examined; older issues not included" : "open issues examined; complete at collection"}. ${judged}. Ranked ${new Date(data.as_of).toLocaleString()}. Contributor assessments excluded.`;- const kind = $("ranking-kind").value;- $("ranking-kind").replaceChildren(- Object.assign(el("option", "all kinds"), { value: "all" }),+ const { graph, left, right, top, bottom, width } = chartFrame(+ "backlog-chart",+ "Open issues and pull requests over time. Use left and right arrow keys to inspect snapshots.",+ 270,);- for (const value of [...new Set(data.items.map((i) => i.kind))].sort())- $("ranking-kind").append(Object.assign(el("option", value), { value }));- if ([...$("ranking-kind").options].some((o) => o.value === kind))- $("ranking-kind").value = kind;- const items = data.items.filter(- (i) =>- ($("ranking-kind").value === "all" ||- i.kind === $("ranking-kind").value) &&- (!$("ranking-unanswered").checked || i.maintainer_replied === false),+ const max = Math.max(+ 10,+ ...rows.flatMap((row) => [row.issues.open, row.prs.open]),);- for (const item of items.slice(0, rankingLimit)) {- const row = el("details", null, "ranked-issue");- const summary = el("summary");- const heading = el("div", null, "rank-heading");- heading.append(- el("span", `#${item.number}`, "muted"),- el("span", item.title),- );- const reasons = item.reasons- .slice(0, 3)- .map((r) => `${r.contribution > 0 ? "+" : "−"} ${r.text}`)- .join(" · ");- heading.append(- el("p", reasons || "No weighted signals available.", "caption"),- );- summary.append(- el("span", item.score.toFixed(1), "rank-score"),- heading,- el("span", "+", "muted"),- );- const detail = el("div", null, "detail");- detail.append(- el(- "p",- `${item.kind} · ${item.judged ? "model-assessed" : "facts and labels only"} · ${item.maintainer_replied ? "maintainer replied" : item.maintainer_replied === false ? "no maintainer reply found" : "reply history incomplete"} · ${item.assigned ? "assigned" : "unassigned"}`,- ),+ const ceiling = Math.ceil(max / 50) * 50;+ const x = (row) =>+ left ++ ((Math.max(start, Date.parse(row.at)) - start) / (end - start || DAY)) *+ (right - left);+ const y = (value) => bottom - (value / ceiling) * (bottom - top);+ for (let i = 0; i <= 4; i++)+ horizontal(+ graph,+ left,+ right,+ y((ceiling * i) / 4),+ Math.round((ceiling * i) / 4),);- for (const reason of item.reasons)- detail.append(- el(- "p",- `${reason.contribution > 0 ? "+" : ""}${reason.contribution.toFixed(2)} ${reason.text}`,- ),+ for (const [key, stroke] of [+ ["issues", "var(--issue)"],+ ["prs", "var(--pr)"],+ ]) {+ const historical = rows.filter((row) => row.source !== "live");+ const recorded = rows.filter((row) => row.source === "live");+ if (historical.length && recorded.length) historical.push(recorded[0]);+ for (const [segment, dashed] of [+ [historical, true],+ [recorded, false],+ ]) {+ if (!segment.length) continue;+ graph.append(+ svg("path", {+ d: segment+ .map((row, i) => `${i ? "L" : "M"}${x(row)},${y(row[key].open)}`)+ .join(" "),+ class: "series",+ stroke,+ "stroke-dasharray": dashed ? "5 5" : "none",+ }),);- detail.append(link("open issue ↗", item.url));- for (const pr of item.linked_prs)- detail.append(- link(- ` · fix #${pr} ↗`,- `https://github.com/PrefectHQ/fastmcp/pull/${pr}`,- ),+ const last = segment.at(-1);+ graph.append(+ svg("circle", {+ cx: x(last),+ cy: y(last[key].open),+ r: 3,+ fill: stroke,+ }),);- row.append(summary, detail);- $("ranking").append(row);+ }}- if (!items.length)- $("ranking").append(el("p", "No issues match these filters.", "empty"));- $("ranking-more").hidden = items.length <= rankingLimit;- $("ranking-more").textContent =- `show more (${items.length - rankingLimit} remaining)`;-}--function render() {- const doc = snapshot,- queue = doc.automations.find((a) => a.id === "contributor-queue");- const problems = doc.automations.filter(issue),- checks = doc.main?.checks || [];- const old = Date.now() - Date.parse(doc.as_of) > 86400000;- const green = checks.length && checks.every((c) => c.state === "ok");- $("health").textContent = old- ? "◌ snapshot is stale"- : green- ? "● main checks passing"- : "◌ main needs verification";- $("health").className = old || !green ? "warning" : "";- $("freshness").textContent =- `updated ${new Date(doc.as_of).toLocaleString([], { month: "short", day: "numeric", hour: "2-digit", minute: "2-digit" })}`;- $("notice").hidden = !old;- $("notice").textContent =- "Snapshot is over 24 hours old. Check GitHub for current evidence.";- $("metrics").replaceChildren();- const c = queue?.counts;- for (const [value, label, warn] of [- [doc.attention?.examined, "issues ranked", false],- [- doc.attention?.items.filter((i) => i.maintainer_replied === false).length,- "without maintainer reply",- false,- ],- [c?.waiting, "awaiting assignment", false],- [problems.length, "automation issues", problems.length > 0],+ const tickCount = width < 500 ? 3 : 5;+ const ticks = Array.from({ length: tickCount }, (_, i) => ({+ at: new Date(start + ((end - start) * i) / (tickCount - 1)).toISOString(),+ }));+ dateTicks(graph, ticks, x, bottom, width, (row) => dateLabel(row.at));+ const cursor = svg("line", {+ y1: top,+ y2: bottom,+ x1: right,+ x2: right,+ class: "cursor",+ visibility: "hidden",+ });+ graph.append(cursor);+ const show = (index) => {+ const row = rows[index];+ cursor.setAttribute("x1", x(row));+ cursor.setAttribute("x2", x(row));+ cursor.setAttribute("visibility", "visible");+ $("backlog-readout").textContent =+ `${dateLabel(row.at, { year: "numeric", hour: "numeric", minute: "2-digit" })} Central: ${number(row.issues.open)} issues · ${number(row.prs.open)} PRs${row.prs.draft != null ? ` (${row.prs.draft} draft)` : ""} · ${row.source === "live" ? "recorded" : "reconstructed"}`;+ };+ interactions(+ graph,+ rows,+ (pos) =>+ rows.reduce(+ (best, row, i) =>+ Math.abs(x(row) - pos) < Math.abs(x(rows[best]) - pos) ? i : best,+ 0,+ ),+ show,+ );+ const latest = data.samples.at(-1),+ first = rows[0];+ $("totals").replaceChildren();+ for (const [key, label, cls] of [+ ["issues", "open issues", "issue"],+ ["prs", "open PRs", "pr"],]) {- const metric = el("div", null, `metric ${warn ? "warn" : ""}`);- metric.append(el("strong", number(value)), el("span", label));- $("metrics").append(metric);- }- $("attention").replaceChildren();- if (c?.waiting)- attention(- "Contributor assignments",- `${c.waiting} open requests; ${c.waiting_over_7_days} older than a week. Review their linked issues before assigning.`,- "review",- queue.evidence_url,- );- for (const a of problems)- attention(a.name, a.what, a.stale ? "stale" : a.state, a.evidence_url);- for (const check of checks.filter((c) =>- ["failed", "unknown"].includes(c.state),- ))- attention(- check.name,- check.state === "failed"- ? "Check failed on the current main commit."- : "No conclusive result for this main commit.",- check.state,- check.url || doc.main?.url,- );- if (!checks.length)- attention(- "Main checks",- "Current commit evidence is unavailable.",- "unknown",- doc.main?.url,+ const item = node("div", null, `total ${cls}`),+ delta = latest[key].open - first[key].open;+ item.append(+ node("strong", number(latest[key].open)),+ node("span", label),+ node("small", `${delta > 0 ? "+" : ""}${number(delta)} in view`),);- if (!$("attention").childElementCount)- $("attention").append(- el("p", "No action indicated by this snapshot.", "empty"),+ $("totals").append(item);+ }+}+function recent() {+ $("recent").replaceChildren();+ for (const [row, label] of [+ [data.daily.at(-2), "Yesterday"],+ [data.daily.at(-1), "Today so far"],+ ]) {+ const box = node("article", null, "day-summary"),+ closed = row.completed + row.not_planned + row.other_closed;+ box.append(node("h3", `${label} · ${dayLabel(row.day)}`));+ for (const [text, kind] of [+ [`${row.issues_opened} issues opened · ${closed} closed`, "issues"],+ [+ `${row.prs_opened} PRs opened · ${row.merged} merged · ${row.closed_unmerged} closed unmerged`,+ "prs",+ ],+ ]) {+ const line = node("p"),+ button = node("button", text);+ button.addEventListener("click", () => {+ category = kind;+ setCategory();+ activity();+ detail(row.day, true);+ $("activity-detail").scrollIntoView({+ behavior: "smooth",+ block: "center",+ });+ });+ line.append(button);+ box.append(line);+ }+ box.append(+ node(+ "small",+ `${row.completed} completed · ${row.not_planned} not planned${row.other_closed ? ` · ${row.other_closed} unspecified` : ""}`,+ ),);- $("main-checks").replaceChildren();- if (doc.main?.sha) {- const commit = link(doc.main.sha.slice(0, 7), doc.main.url);- commit.id = "commit";- $("commit").replaceWith(commit);+ $("recent").append(box);}- for (const check of checks) {- const item = link("", check.url);- item.className = "check";+}+function activity() {+ const rows = selectedDaily(),+ opened = `${category}_opened`,+ outcomes =+ category === "issues"+ ? ["completed", "not_planned", "other_closed"]+ : ["merged", "closed_unmerged"];+ const keys = [opened, ...outcomes];+ $("activity-legend").replaceChildren();+ for (const key of keys) {+ const item = node("span"),+ chip = node("span", null, "key");+ chip.style.background = color(key);item.append(- el("span", check.name),- el(+ chip,+ node("span",- `${check.state === "ok" ? "●" : "◌"} ${check.state === "ok" ? "passing" : check.state}`,- `state ${check.state}`,+ `${labels[key]} ${number(rows.reduce((sum, row) => sum + row[key], 0))}`,),);- $("main-checks").append(item);+ $("activity-legend").append(item);}- if (!checks.length)- $("main-checks").append(el("p", "Checks unavailable", "empty"));- const selection = $("activity-filter").value;- $("activity-filter").replaceChildren(- Object.assign(el("option", "all automation"), { value: "all" }),+ const { graph, left, right, top, bottom, width } = chartFrame(+ "activity-chart",+ `Daily ${category === "issues" ? "issue" : "pull request"} openings and closure outcomes. Use arrow keys then Enter to inspect a day.`,+ 270,);- for (const a of doc.automations.filter((a) => a.daily?.length))- $("activity-filter").append(- Object.assign(el("option", a.name), { value: a.id }),+ const max = Math.max(+ 5,+ ...rows.map((row) =>+ Math.max(+ row[opened],+ outcomes.reduce((sum, key) => sum + row[key], 0),+ ),+ ),+ );+ const limit = Math.ceil(max / 5) * 5,+ middle = (top + bottom) / 2,+ scale = (bottom - top) / 2 / limit;+ for (const value of [-limit, -limit / 2, 0, limit / 2, limit])+ horizontal(+ graph,+ left,+ right,+ middle - value * scale,+ Math.round(Math.abs(value)),+ );+ const step = (right - left) / rows.length,+ barWidth = Math.max(1, Math.min(24, step * 0.68));+ const x = (_, index) => left + (index + 0.5) * step;+ rows.forEach((row, index) => {+ const group = svg("g", {}, null);+ group.append(+ svg("rect", {+ x: x(row, index) - barWidth / 2,+ y: middle - row[opened] * scale,+ width: barWidth,+ height: row[opened] * scale,+ fill: color(opened),+ }),);- if ([...$("activity-filter").options].some((o) => o.value === selection))- $("activity-filter").value = selection;- chart();- automations();- ranking();- $("queue").replaceChildren();- if (queue) {- const all = link(- `all ${number(c?.waiting)} requests ↗`,- queue.evidence_url,+ let offset = middle;+ for (const key of outcomes) {+ const height = row[key] * scale;+ group.append(+ svg("rect", {+ x: x(row, index) - barWidth / 2,+ y: offset,+ width: barWidth,+ height,+ fill: color(key),+ }),+ );+ offset += height;+ }+ graph.append(group);+ });+ dateTicks(graph, rows, x, bottom, width, (row) => dayLabel(row.day));+ const cursor = svg("rect", {+ x: left,+ y: top,+ width: Math.max(step, 2),+ height: bottom - top,+ fill: "var(--text)",+ opacity: 0.07,+ visibility: "hidden",+ });+ graph.append(cursor);+ const show = (index) => {+ const row = rows[index];+ cursor.setAttribute("x", left + index * step);+ cursor.setAttribute("visibility", "visible");+ $("activity-readout").textContent =+ `${dayLabel(row.day)}: ${keys.map((key) => `${row[key]} ${labels[key].toLowerCase()}`).join(" · ")}`;+ };+ interactions(+ graph,+ rows,+ (pos) =>+ Math.max(0, Math.min(rows.length - 1, Math.floor((pos - left) / step))),+ show,+ (index) => detail(rows[index].day, true),+ );+ detail(selectedDay || rows.at(-1).day, false);+}+function detail(day, open) {+ selectedDay = day;+ $("detail-title").textContent =+ `${dayLabel(day)} · ${category === "issues" ? "issues" : "pull requests"}`;+ if (open) $("activity-detail").open = true;+ const rows = data.events.filter(+ (item) => item.day === day && item.kind === category,+ );+ $("detail-items").replaceChildren();+ if (!rows.length) {+ $("detail-items").append(+ node(+ "p",+ day < data.daily.at(-31).day+ ? "Item details are kept for the last 30 days. Totals above include older activity."+ : "No recorded activity for this day.",+ "caption",+ ),);- all.id = "queue-link";- $("queue-link").replaceWith(all);+ return;}- for (const p of queue?.items || []) {- const row = el("div", null, "queue-row");+ for (const item of rows) {+ const row = node("div", null, "work-row"),+ link = node("a", `#${item.number}`);+ link.href = `https://github.com/PrefectHQ/fastmcp/${item.kind === "prs" ? "pull" : "issues"}/${item.number}`;row.append(- link(`#${p.number}`, p.url),- link(p.title, p.url),- el("span", `${p.age_days}d`, "age"),+ link,+ node("span", item.title),+ node("span", labels[item.event], "state"),);- row.firstChild.className = "number";- $("queue").append(row);+ $("detail-items").append(row);}- if (!$("queue").childElementCount)- $("queue").append(- el(- "p",- c?.waiting === 0- ? "No requests waiting."- : "Request details unavailable. Follow all requests for the current list.",- "empty",- ),+}+function setCategory() {+ document+ .querySelectorAll("[data-kind]")+ .forEach((button) =>+ button.setAttribute("aria-pressed", button.dataset.kind === category),);}+function render() {+ backlog();+ recent();+ activity();+ const stale = Date.now() - Date.parse(data.as_of) > 2 * 60 * 60 * 1000;+ $("freshness").textContent =+ `Updated ${dateLabel(data.as_of, { year: "numeric", hour: "numeric", minute: "2-digit" })} Central${stale ? " · update overdue" : ""}`;+ $("notice").hidden = !stale;+ $("notice").textContent =+ "The latest snapshot is over two hours old. Counts may have changed; follow GitHub for the current queue.";+}async function refresh() {$("refresh").disabled = true;try {- const response = await fetch(snapshotUrl, {- cache: "no-store",- });- if (!response.ok) throw new Error("Snapshot request failed");- const doc = await response.json();+ const response = await fetch(DATA_URL, { cache: "no-store" });+ if (!response.ok) throw new Error("Data unavailable");+ const next = await response.json();if (- doc.schema !== "fastmcp-maintenance/1" ||- !Array.isArray(doc.automations) ||- !Number.isFinite(Date.parse(doc.as_of))+ next.schema !== "fastmcp-backlog/1" ||+ !next.samples?.length ||+ !next.daily?.length ||+ !Array.isArray(next.events) ||+ !Number.isFinite(Date.parse(next.as_of)))- throw new Error("Invalid snapshot");- snapshot = doc;+ throw new Error("Invalid data");+ data = next;render();} catch {$("notice").hidden = false;- $("notice").textContent = snapshot- ? "Refresh failed. Displaying the last loaded snapshot."- : "Snapshot unavailable. Use the GitHub snapshot link below.";- $("health").textContent = "◌ freshness unverified";- $("health").className = "warning";+ $("notice").textContent = data+ ? "Refresh failed. Showing the last loaded data; check its timestamp above."+ : "Backlog data is unavailable. Refresh to try again, or open the GitHub source below.";} finally {$("refresh").disabled = false;}}+document.querySelectorAll("[data-days]").forEach((button) =>+ button.addEventListener("click", () => {+ days = button.dataset.days === "all" ? "all" : Number(button.dataset.days);+ document+ .querySelectorAll("[data-days]")+ .forEach((item) => item.setAttribute("aria-pressed", item === button));+ if (data) {+ backlog();+ activity();+ }+ }),+);+document.querySelectorAll("[data-kind]").forEach((button) =>+ button.addEventListener("click", () => {+ category = button.dataset.kind;+ setCategory();+ if (data) activity();+ }),+);try {document.documentElement.dataset.theme =- localStorage.getItem("maintenance-theme") || "dark";+ localStorage.getItem("maintenance-theme") ||+ (matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light");} catch {}$("theme").addEventListener("click", () => {const theme =- document.documentElement.dataset.theme === "light" ? "dark" : "light";+ document.documentElement.dataset.theme === "dark" ? "light" : "dark";document.documentElement.dataset.theme = theme;try {localStorage.setItem("maintenance-theme", theme);} catch {}});$("refresh").addEventListener("click", refresh);-$("activity-filter").addEventListener("change", chart);-$("attention-only").addEventListener("change", automations);-document.querySelector('footer a[href="status.json"]').href = snapshotUrl;+$("data-link").href = DATA_URL;+$("export").addEventListener("click", () => {+ if (!data) return;+ const csv =+ "timestamp,source,open_issues,open_prs,draft_prs\n" ++ data.samples+ .map((row) =>+ [+ row.at,+ row.source,+ row.issues.open,+ row.prs.open,+ row.prs.draft ?? "",+ ].join(","),+ )+ .join("\n");+ const url = URL.createObjectURL(new Blob([csv], { type: "text/csv" }));+ const a = node("a");+ a.href = url;+ a.download = "fastmcp-backlog.csv";+ a.click();+ setTimeout(() => URL.revokeObjectURL(url), 1000);+});+let resize;+new ResizeObserver(() => {+ clearTimeout(resize);+ resize = setTimeout(() => {+ if (data) {+ backlog();+ activity();+ }+ }, 100);+}).observe($("backlog-chart"));refresh();setInterval(refresh, 300000);--$("ranking-kind").addEventListener("change", () => {- rankingLimit = 10;- ranking();-});-$("ranking-unanswered").addEventListener("change", () => {- rankingLimit = 10;- ranking();-});-$("ranking-more").addEventListener("click", () => {- rankingLimit += 10;- ranking();-});diff --git a/status-site/index.html b/status-site/index.htmlindex e1f5e362f..695f1c672 100644--- a/status-site/index.html+++ b/status-site/index.html@@ -5,122 +5,112 @@<meta name="viewport" content="width=device-width, initial-scale=1" /><metaname="description"- content="FastMCP maintenance: current checks, contributor queue, and automation activity."+ content="FastMCP's public backlog: open issues and pull requests over time, incoming reports, closures and merged work."/>- <title>FastMCP / maintenance</title>+ <title>FastMCP / backlog</title><link rel="stylesheet" href="style.css" /><script src="app.js" defer></script></head><body><main><header>- <h1>- <a href="https://github.com/PrefectHQ/fastmcp">fastmcp</a- ><span> / maintenance</span>- </h1>+ <div>+ <h1>+ <a href="https://github.com/PrefectHQ/fastmcp">fastmcp</a>+ <span>/ backlog</span>+ </h1>+ <p>What’s arriving, what’s getting done, and what’s left.</p>+ </div><nav aria-label="Page controls">- <button id="refresh">refresh</button+ <button id="refresh">Refresh</button><button id="theme" aria-label="Switch color theme">◐</button></nav></header>- <div class="status-line">- <span id="health">◌ reading snapshot</span- ><span id="freshness" role="status"></span>- </div>+ <p id="freshness" class="caption" role="status">+ Reading public history…+ </p><p id="notice" class="notice" hidden></p>- <section class="metrics" aria-label="At a glance" id="metrics"></section>- <section aria-labelledby="ranking-title">+ <section aria-labelledby="backlog-heading"><div class="section-heading">- <h2 id="ranking-title">what to look at</h2>- <span class="muted">ranked issue signals</span>+ <h2 id="backlog-heading">Open issues & pull requests</h2>+ <div class="ranges" role="group" aria-label="Time range">+ <button data-days="7">7d</button+ ><button data-days="30" aria-pressed="true">30d</button+ ><button data-days="90">90d</button+ ><button data-days="365">1y</button+ ><button data-days="all">All</button>+ </div></div>- <p id="ranking-coverage" class="caption">- Ranking unavailable in this snapshot.- </p>- <div class="ranking-controls">- <select id="ranking-kind" aria-label="Filter ranked issues by kind">- <option value="all">all kinds</option></select- ><label- ><input type="checkbox" id="ranking-unanswered" /> unanswered- only</label- >+ <div id="totals" class="totals"></div>+ <div id="backlog-chart" class="chart-container"></div>+ <div id="backlog-readout" class="readout" aria-live="polite">+ Hover, tap, or use arrow keys to inspect a date.</div>- <div id="ranking"></div>- <button id="ranking-more" hidden>show more</button>+ <p class="caption">+ Solid lines are recorded snapshots; dashed lines are reconstructed+ history. Counts include draft PRs.+ <a href="#method">About the data</a>+ </p></section>- <section aria-labelledby="attention-title">+ <section aria-labelledby="recent-heading"><div class="section-heading">- <h2 id="attention-title">operational attention</h2>- <span class="muted">public evidence</span>+ <h2 id="recent-heading">Yesterday and today</h2>+ <span class="caption">America/Chicago · today is partial</span></div>- <div id="attention">Loading…</div>+ <div id="recent" class="recent"></div></section>- <section aria-labelledby="main-title">+ <section aria-labelledby="activity-heading"><div class="section-heading">- <h2 id="main-title">main</h2>- <a- id="commit"- href="https://github.com/PrefectHQ/fastmcp/commits/main"- >commits</a- >+ <h2 id="activity-heading">Incoming & closed</h2>+ <div class="ranges" role="group" aria-label="Activity type">+ <button data-kind="issues" aria-pressed="true">Issues</button+ ><button data-kind="prs">Pull requests</button>+ </div></div>- <div id="main-checks" class="checks"></div>- </section>- <section aria-labelledby="activity-title">- <div class="section-heading">- <h2 id="activity-title">automation activity</h2>- <select- id="activity-filter"- aria-label="Filter activity by automation"- >- <option value="all">all automation</option>- </select>+ <div id="activity-legend" class="legend"></div>+ <div id="activity-chart" class="chart-container"></div>+ <div id="activity-readout" class="readout" aria-live="polite">+ Select a day to see the work behind the numbers.</div>- <div id="activity-totals" class="legend"></div>- <div id="chart"></div><p class="caption">- Daily completed runs, UTC. Today is partial. Gate failures include- expected rejections and execution errors.+ New items above the baseline; closures below it. Closure dates reflect+ the latest closed state, so previous close/reopen cycles are not+ counted. Days use America/Chicago.</p>+ <details id="activity-detail">+ <summary id="detail-title">Browse recent work</summary>+ <div id="detail-items"></div>+ </details></section>- <section aria-labelledby="queue-title">- <div class="section-heading">- <h2 id="queue-title">awaiting assignment</h2>- <a id="queue-link" href="https://github.com/PrefectHQ/fastmcp/pulls"- >all requests</a- >- </div>- <p class="caption">- Oldest open requests first. Time waiting is not a judgment of the- contribution.+ <section id="method" class="method" aria-labelledby="method-heading">+ <h2 id="method-heading">About the data</h2>+ <p>+ Recorded counts began October 16, 2026, from the existing half-hourly+ backlog collector. Earlier counts are reconstructed from creation and+ latest closure dates; they cannot recover periods when an item was+ closed and later reopened.+ </p>+ <p>+ Activity comes from GitHub’s public issue and PR records, not changes+ in the total. Issue outcomes use the reason attached to the latest+ closure: completed, not planned, or unspecified. “Completed” is+ GitHub’s closure category, not a claim that a fix shipped. PRs+ distinguish merged from closed without merging. Historical draft state+ is not reconstructed.</p>- <div id="queue"></div>- </section>- <section aria-labelledby="automation-title">- <div class="section-heading">- <h2 id="automation-title">automation health</h2>- <label- ><input type="checkbox" id="attention-only" /> issues only</label- >- </div>- <div id="automations"></div>- </section>- <footer>- <div>- <a href="status.json">json</a- ><a href="https://github.com/PrefectHQ/fastmcp/blob/status/STATUS.md"- >snapshot</a- ><a href="https://github.com/PrefectHQ/fastmcp/tree/main/status-site"- >source</a- ><a- href="https://github.com/PrefectHQ/fastmcp/blob/main/docs/development/contributing.mdx"- >development guide</a- >- </div><p>- Published twice daily. This page checks for a newer snapshot every- five minutes.+ Snapshots are scheduled every 30 minutes and may be delayed by GitHub+ Actions. The page checks for fresh data every five minutes. Recent+ work details cover the last 30 days.</p>+ </section>+ <footer>+ <a id="data-link" href="backlog.json">Download data</a+ ><button id="export">Export counts CSV</button+ ><a href="operations.html">Automation health</a+ ><a href="https://github.com/PrefectHQ/fastmcp/tree/main/status-site"+ >Source</a+ ></footer></main></body>diff --git a/status-site/operations.css b/status-site/operations.cssnew file mode 100644index 000000000..d0d4c42c8--- /dev/null+++ b/status-site/operations.css@@ -0,0 +1,422 @@+:root {+ color-scheme: dark;+ --bg: #101214;+ --panel: #171a1d;+ --line: #2c3136;+ --text: #e0e4e7;+ --muted: #a1a9b0;+ --green: #86bdab;+ --amber: #d6b57b;+ --red: #e39794;+ --blue: #92b2d1;+ font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;+ font-size: 13px;+ line-height: 1.6;+ background: var(--bg);+ color: var(--text);+}+:root[data-theme="light"] {+ color-scheme: light;+ --bg: #f9faf9;+ --panel: #f0f3f1;+ --line: #d3dbd7;+ --text: #26322e;+ --muted: #5b6963;+ --green: #246b50;+ --amber: #855814;+ --red: #a53b37;+ --blue: #315f92;+}+* {+ box-sizing: border-box;+}+body {+ margin: 0;+}+main {+ max-width: 880px;+ margin: 0 auto;+ padding: 36px 28px 48px;+}+a {+ color: inherit;+ text-decoration: none;+}+a:hover {+ color: var(--green);+ text-decoration: underline;+ text-underline-offset: 4px;+}+button,+select {+ font: inherit;+ color: var(--muted);+ background: transparent;+ border: 1px solid var(--line);+ border-radius: 4px;+ padding: 3px 8px;+ cursor: pointer;+}+select {+ max-width: 200px;+ background: var(--bg);+}+button:hover,+select:hover {+ color: var(--text);+ border-color: var(--muted);+}+button:disabled {+ opacity: 0.5;+ cursor: wait;+}+:focus-visible {+ outline: 2px solid var(--green);+ outline-offset: 4px;+}+header,+nav,+.section-heading,+.status-line {+ display: flex;+ align-items: center;+ justify-content: space-between;+ gap: 14px;+}+nav {+ gap: 8px;+}+h1,+h2,+h3,+p {+ margin: 0;+}+h1 {+ font-size: 16px;+ font-weight: 600;+}+h1 span {+ font-weight: 400;+ color: var(--muted);+}+h2 {+ font-size: 13px;+ font-weight: 500;+ color: var(--muted);+}+.status-line {+ font-size: 11px;+ color: var(--muted);+ margin-top: 18px;+ flex-wrap: wrap;+}+#health {+ color: var(--green);+}+#health.warning {+ color: var(--amber);+}+section {+ margin-top: 36px;+}+.section-heading {+ margin-bottom: 14px;+}+.muted,+.caption {+ color: var(--muted);+ font-size: 11px;+}+.caption {+ margin: 10px 0;+}+.metrics {+ display: grid;+ grid-template-columns: repeat(4, 1fr);+ padding: 20px 0;+ gap: 18px;+ border-top: 1px solid var(--line);+ border-bottom: 1px solid var(--line);+ margin-top: 24px;+}+.metric strong {+ display: block;+ font-size: 25px;+ font-weight: 500;+ letter-spacing: -1px;+ font-variant-numeric: tabular-nums;+}+.metric span {+ display: block;+ color: var(--muted);+ font-size: 11px;+ margin-top: 4px;+}+.metric.warn strong {+ color: var(--amber);+}+.notice {+ border-left: 2px solid var(--amber);+ padding: 10px 14px;+ color: var(--amber);+ margin-top: 20px;+ background: var(--panel);+}+.attention-row {+ padding: 12px 0;+ display: grid;+ grid-template-columns: 1fr auto;+ gap: 5px 16px;+ border-bottom: 1px solid var(--line);+}+.attention-row p {+ color: var(--muted);+ font-size: 12px;+ grid-column: 1/-1;+}+.attention-row a {+ color: var(--text);+}+.empty {+ color: var(--muted);+ padding: 8px 0;+}+.state {+ font-size: 11px;+ white-space: nowrap;+ color: var(--muted);+}+.state.ok {+ color: var(--green);+}+.state.failed,+.state.degraded,+.state.off {+ color: var(--red);+}+.state.pending,+.state.unknown,+.state.stale {+ color: var(--amber);+}+.checks {+ display: grid;+ grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));+ gap: 1px;+ border: 1px solid var(--line);+ border-radius: 5px;+ overflow: hidden;+ background: var(--bg);+}+.check {+ border-bottom: 1px solid var(--line);+ display: flex;+ flex-direction: column;+ gap: 5px;+ padding: 12px 14px;+ background: var(--bg);+ font-size: 12px;+}+.legend {+ display: flex;+ flex-wrap: wrap;+ gap: 20px;+ font-size: 12px;+ margin-bottom: 15px;+ font-variant-numeric: tabular-nums;+}+.legend .passed {+ color: var(--green);+}+.legend .failed {+ color: var(--red);+}+.legend .blocked {+ color: var(--amber);+}+.chart {+ display: block;+ width: 100%;+ height: auto;+}+.chart text {+ fill: var(--muted);+ font:+ 11px ui-monospace,+ monospace;+}+.chart .grid {+ stroke: var(--line);+ stroke-width: 1;+}+.chart .passed {+ fill: var(--green);+}+.chart .failed {+ fill: var(--red);+}+.chart .blocked {+ fill: var(--amber);+}+.chart .bar {+ opacity: 0.8;+}+.chart .bar:hover,+.chart .bar:focus {+ opacity: 1;+}+.queue-row {+ display: grid;+ grid-template-columns: 55px 1fr 45px;+ gap: 12px;+ padding: 10px 0;+ border-bottom: 1px solid var(--line);+ align-items: baseline;+}+.queue-row .number {+ color: var(--muted);+ font-size: 11px;+}+.queue-row .age {+ text-align: right;+ font-variant-numeric: tabular-nums;+ color: var(--amber);+ font-size: 11px;+}+.queue-row a {+ overflow-wrap: anywhere;+}+details {+ border-bottom: 1px solid var(--line);+}+summary {+ padding: 11px 0;+ display: grid;+ grid-template-columns: 1fr 80px 100px;+ gap: 12px;+ align-items: baseline;+ cursor: pointer;+ list-style: none;+}+summary::-webkit-details-marker {+ display: none;+}+summary .name::before {+ content: "+";+ color: var(--muted);+ display: inline-block;+ width: 20px;+}+details[open] summary .name::before {+ content: "−";+}+summary .state {+ text-align: right;+}+summary .count {+ color: var(--muted);+ text-align: right;+ font-size: 11px;+}+.detail {+ padding: 0 0 15px 20px;+ color: var(--muted);+ font-size: 12px;+ max-width: 75ch;+}+.detail a {+ display: inline-block;+ margin-top: 8px;+ color: var(--green);+}+label {+ color: var(--muted);+ font-size: 11px;+ cursor: pointer;+}+input {+ accent-color: var(--green);+}+footer {+ margin-top: 38px;+ padding-top: 18px;+ border-top: 1px solid var(--line);+ font-size: 11px;+ color: var(--muted);+}+footer a {+ margin-right: 18px;+}+footer p {+ margin-top: 12px;+}+@media (max-width: 560px) {+ main {+ padding: 22px 18px 32px;+ }+ h1 {+ font-size: 14px;+ }+ h1 span {+ font-size: 12px;+ }+ .metrics {+ grid-template-columns: repeat(2, 1fr);+ gap: 22px;+ }+ .metric strong {+ font-size: 27px;+ }+ .checks {+ grid-template-columns: repeat(2, 1fr);+ }+ .section-heading {+ gap: 8px;+ }+ select {+ max-width: 160px;+ font-size: 11px;+ }+ summary {+ grid-template-columns: 1fr 55px 70px;+ gap: 6px;+ font-size: 12px;+ }+ .queue-row {+ grid-template-columns: 42px 1fr 30px;+ gap: 8px;+ font-size: 12px;+ }+ .muted {+ font-size: 10px;+ }+}++.ranking-controls {+ display: flex;+ gap: 18px;+ align-items: center;+ margin: 16px 0;+}+.ranked-issue summary {+ grid-template-columns: 42px 1fr 12px;+ align-items: start;+}+.rank-score {+ color: var(--green);+ font-variant-numeric: tabular-nums;+ font-size: 16px;+}+.rank-heading > .muted {+ margin-right: 10px;+}+.rank-heading .caption {+ margin: 4px 0 0;+}+.ranked-issue .detail {+ padding-left: 54px;+}+#ranking-more {+ margin-top: 16px;+}diff --git a/status-site/operations.html b/status-site/operations.htmlnew file mode 100644index 000000000..976ae1ba5--- /dev/null+++ b/status-site/operations.html@@ -0,0 +1,127 @@+<!doctype html>+<html lang="en">+ <head>+ <meta charset="utf-8" />+ <meta name="viewport" content="width=device-width, initial-scale=1" />+ <meta+ name="description"+ content="FastMCP maintenance: current checks, contributor queue, and automation activity."+ />+ <title>FastMCP / maintenance</title>+ <link rel="stylesheet" href="operations.css" />+ <script src="operations.js" defer></script>+ </head>+ <body>+ <main>+ <header>+ <h1>+ <a href="https://github.com/PrefectHQ/fastmcp">fastmcp</a+ ><span> / maintenance</span>+ </h1>+ <nav aria-label="Page controls"><a href="./">backlog charts</a>+ <button id="refresh">refresh</button+ ><button id="theme" aria-label="Switch color theme">◐</button>+ </nav>+ </header>+ <div class="status-line">+ <span id="health">◌ reading snapshot</span+ ><span id="freshness" role="status"></span>+ </div>+ <p id="notice" class="notice" hidden></p>+ <section class="metrics" aria-label="At a glance" id="metrics"></section>+ <section aria-labelledby="ranking-title">+ <div class="section-heading">+ <h2 id="ranking-title">what to look at</h2>+ <span class="muted">ranked issue signals</span>+ </div>+ <p id="ranking-coverage" class="caption">+ Ranking unavailable in this snapshot.+ </p>+ <div class="ranking-controls">+ <select id="ranking-kind" aria-label="Filter ranked issues by kind">+ <option value="all">all kinds</option></select+ ><label+ ><input type="checkbox" id="ranking-unanswered" /> unanswered+ only</label+ >+ </div>+ <div id="ranking"></div>+ <button id="ranking-more" hidden>show more</button>+ </section>+ <section aria-labelledby="attention-title">+ <div class="section-heading">+ <h2 id="attention-title">operational attention</h2>+ <span class="muted">public evidence</span>+ </div>+ <div id="attention">Loading…</div>+ </section>+ <section aria-labelledby="main-title">+ <div class="section-heading">+ <h2 id="main-title">main</h2>+ <a+ id="commit"+ href="https://github.com/PrefectHQ/fastmcp/commits/main"+ >commits</a+ >+ </div>+ <div id="main-checks" class="checks"></div>+ </section>+ <section aria-labelledby="activity-title">+ <div class="section-heading">+ <h2 id="activity-title">automation activity</h2>+ <select+ id="activity-filter"+ aria-label="Filter activity by automation"+ >+ <option value="all">all automation</option>+ </select>+ </div>+ <div id="activity-totals" class="legend"></div>+ <div id="chart"></div>+ <p class="caption">+ Daily completed runs, UTC. Today is partial. Gate failures include+ expected rejections and execution errors.+ </p>+ </section>+ <section aria-labelledby="queue-title">+ <div class="section-heading">+ <h2 id="queue-title">awaiting assignment</h2>+ <a id="queue-link" href="https://github.com/PrefectHQ/fastmcp/pulls"+ >all requests</a+ >+ </div>+ <p class="caption">+ Oldest open requests first. Time waiting is not a judgment of the+ contribution.+ </p>+ <div id="queue"></div>+ </section>+ <section aria-labelledby="automation-title">+ <div class="section-heading">+ <h2 id="automation-title">automation health</h2>+ <label+ ><input type="checkbox" id="attention-only" /> issues only</label+ >+ </div>+ <div id="automations"></div>+ </section>+ <footer>+ <div>+ <a href="status.json">json</a+ ><a href="https://github.com/PrefectHQ/fastmcp/blob/status/STATUS.md"+ >snapshot</a+ ><a href="https://github.com/PrefectHQ/fastmcp/tree/main/status-site"+ >source</a+ ><a+ href="https://github.com/PrefectHQ/fastmcp/blob/main/docs/development/contributing.mdx"+ >development guide</a+ >+ </div>+ <p>+ Published twice daily. This page checks for a newer snapshot every+ five minutes.+ </p>+ </footer>+ </main>+ </body>+</html>diff --git a/status-site/operations.js b/status-site/operations.jsnew file mode 100644index 000000000..84f47af0a--- /dev/null+++ b/status-site/operations.js@@ -0,0 +1,456 @@+const $ = (id) => document.getElementById(id);+let snapshot;+let rankingLimit = 10;+const snapshotUrl =+ window.location.origin === "https://prefecthq.github.io"+ ? "https://raw.githubusercontent.com/PrefectHQ/fastmcp/status/status.json"+ : new URL("status.json", window.location.href);++const number = (value) => (value == null ? "—" : value.toLocaleString());+function el(tag, text, className) {+ const node = document.createElement(tag);+ if (text != null) node.textContent = text;+ if (className) node.className = className;+ return node;+}+function link(text, url) {+ const node = el("a", text);+ try {+ const parsed = new URL(url);+ if (+ parsed.origin === "https://github.com" &&+ parsed.pathname.startsWith("/PrefectHQ/fastmcp/")+ )+ node.href = parsed.href;+ } catch {}+ return node;+}+function issue(a) {+ return ["degraded", "off"].includes(a.state) || a.stale;+}+function attention(title, detail, state, url) {+ const row = el("div", null, "attention-row");+ row.append(+ link(title, url),+ el("span", state, `state ${state}`),+ el("p", detail),+ );+ $("attention").append(row);+}+function svg(tag, attrs, text) {+ const node = document.createElementNS("http://www.w3.org/2000/svg", tag);+ for (const [key, value] of Object.entries(attrs))+ node.setAttribute(key, value);+ if (text != null) node.textContent = text;+ return node;+}+function chart() {+ const eligible = snapshot.automations.filter((a) => a.daily?.length);+ const selected = $("activity-filter").value;+ const rows = eligible.filter((a) => selected === "all" || a.id === selected);+ const days = new Map();+ for (const a of rows)+ for (const b of a.daily) {+ const day = days.get(b.day) || {+ day: b.day,+ succeeded: 0,+ failed: 0,+ blocked: 0,+ };+ for (const key of ["succeeded", "failed", "blocked"])+ day[key] += b[key] || 0;+ days.set(b.day, day);+ }+ const buckets = [...days.values()].sort((a, b) => a.day.localeCompare(b.day));+ $("chart").replaceChildren();+ $("activity-totals").replaceChildren();+ if (!buckets.length) {+ $("chart").append(el("p", "Activity history unavailable.", "empty"));+ return;+ }+ const series = [+ ["succeeded", "passed", "succeeded"],+ ["failed", "failed", "failed"],+ ["blocked", "blocked", "gate rejections / errors"],+ ];+ for (const [key, cls, label] of series)+ $("activity-totals").append(+ el(+ "span",+ `${number(buckets.reduce((sum, b) => sum + b[key], 0))} ${label}`,+ cls,+ ),+ );+ const graph = svg("svg", {+ viewBox: "0 0 800 210",+ class: "chart",+ role: "img",+ "aria-label":+ "Daily completed automation runs; each bar lists its outcomes",+ });+ const max = Math.max(+ 1,+ ...buckets.map((b) => b.succeeded + b.failed + b.blocked),+ );+ for (let i = 0; i <= 3; i++) {+ const y = 175 - i * 50;+ graph.append(+ svg("line", { x1: 40, x2: 790, y1: y, y2: y, class: "grid" }),+ svg(+ "text",+ { x: 32, y: y + 4, "text-anchor": "end" },+ Math.round((max * i) / 3),+ ),+ );+ }+ buckets.forEach((b, i) => {+ const step = 750 / buckets.length,+ x = 40 + i * step,+ width = Math.min(56, step * 0.6);+ const label = `${b.day}: ${b.succeeded} succeeded, ${b.failed} failed, ${b.blocked} gate rejections or errors`;+ const group = svg("g", { class: "bar", tabindex: 0, "aria-label": label });+ group.append(svg("title", {}, label));+ let y = 175;+ for (const [key, cls] of series) {+ const height = (b[key] / max) * 150;+ y -= height;+ group.append(+ svg("rect", {+ x: x + (step - width) / 2,+ y,+ width,+ height,+ class: cls,+ }),+ );+ }+ graph.append(+ group,+ svg(+ "text",+ { x: x + step / 2, y: 201, "text-anchor": "middle" },+ b.day.slice(5),+ ),+ );+ });+ $("chart").append(graph);+ const missing = snapshot.automations.filter(+ (a) => a.id !== "contributor-queue" && !a.daily?.length,+ );+ if (selected === "all" && missing.length)+ $("chart").append(+ el(+ "p",+ `History unavailable for ${missing.map((a) => a.name).join(", ")}.`,+ "caption",+ ),+ );+}+function automations() {+ const open = new Set(+ [...$("automations").querySelectorAll("details[open]")].map(+ (n) => n.dataset.id,+ ),+ );+ $("automations").replaceChildren();+ for (const a of snapshot.automations.filter(+ (a) => a.id !== "contributor-queue",+ )) {+ if ($("attention-only").checked && !issue(a)) continue;+ const row = el("details");+ row.dataset.id = a.id;+ row.open = open.has(a.id);+ const summary = el("summary");+ const count = Object.values(a.counts || {}).reduce((sum, n) => sum + n, 0);+ const state = a.stale ? "stale" : a.state;+ summary.append(+ el("span", a.name, "name"),+ el("span", state, `state ${state}`),+ el(+ "span",+ `${Object.keys(a.counts || {}).length ? number(count) : "—"} outcomes`,+ "count",+ ),+ );+ const detail = el("div", null, "detail");+ detail.append(+ el("p", a.what),+ el("p", `${a.cadence} · last success ${a.last_ok_day || "unavailable"}`),+ link("inspect runs ↗", a.evidence_url),+ );+ row.append(summary, detail);+ $("automations").append(row);+ }+ if (!$("automations").childElementCount)+ $("automations").append(el("p", "No automation issues reported.", "empty"));+}++function ranking() {+ const data = snapshot.attention;+ $("ranking").replaceChildren();+ if (!data || data.schema !== "fastmcp-attention/1") {+ $("ranking-coverage").textContent =+ "Issue ranking unavailable. Queue age below is not a priority ranking.";+ $("ranking-more").hidden = true;+ return;+ }+ const judged =+ data.judged === data.examined+ ? `judge: ${data.judge}`+ : `${data.judged}/${data.examined} model-assessed; remaining issues use facts and labels only`;+ $("ranking-coverage").textContent =+ `${data.examined} ${data.has_more ? "newest open issues examined; older issues not included" : "open issues examined; complete at collection"}. ${judged}. Ranked ${new Date(data.as_of).toLocaleString()}. Contributor assessments excluded.`;+ const kind = $("ranking-kind").value;+ $("ranking-kind").replaceChildren(+ Object.assign(el("option", "all kinds"), { value: "all" }),+ );+ for (const value of [...new Set(data.items.map((i) => i.kind))].sort())+ $("ranking-kind").append(Object.assign(el("option", value), { value }));+ if ([...$("ranking-kind").options].some((o) => o.value === kind))+ $("ranking-kind").value = kind;+ const items = data.items.filter(+ (i) =>+ ($("ranking-kind").value === "all" ||+ i.kind === $("ranking-kind").value) &&+ (!$("ranking-unanswered").checked || i.maintainer_replied === false),+ );+ for (const item of items.slice(0, rankingLimit)) {+ const row = el("details", null, "ranked-issue");+ const summary = el("summary");+ const heading = el("div", null, "rank-heading");+ heading.append(+ el("span", `#${item.number}`, "muted"),+ el("span", item.title),+ );+ const reasons = item.reasons+ .slice(0, 3)+ .map((r) => `${r.contribution > 0 ? "+" : "−"} ${r.text}`)+ .join(" · ");+ heading.append(+ el("p", reasons || "No weighted signals available.", "caption"),+ );+ summary.append(+ el("span", item.score.toFixed(1), "rank-score"),+ heading,+ el("span", "+", "muted"),+ );+ const detail = el("div", null, "detail");+ detail.append(+ el(+ "p",+ `${item.kind} · ${item.judged ? "model-assessed" : "facts and labels only"} · ${item.maintainer_replied ? "maintainer replied" : item.maintainer_replied === false ? "no maintainer reply found" : "reply history incomplete"} · ${item.assigned ? "assigned" : "unassigned"}`,+ ),+ );+ for (const reason of item.reasons)+ detail.append(+ el(+ "p",+ `${reason.contribution > 0 ? "+" : ""}${reason.contribution.toFixed(2)} ${reason.text}`,+ ),+ );+ detail.append(link("open issue ↗", item.url));+ for (const pr of item.linked_prs)+ detail.append(+ link(+ ` · fix #${pr} ↗`,+ `https://github.com/PrefectHQ/fastmcp/pull/${pr}`,+ ),+ );+ row.append(summary, detail);+ $("ranking").append(row);+ }+ if (!items.length)+ $("ranking").append(el("p", "No issues match these filters.", "empty"));+ $("ranking-more").hidden = items.length <= rankingLimit;+ $("ranking-more").textContent =+ `show more (${items.length - rankingLimit} remaining)`;+}++function render() {+ const doc = snapshot,+ queue = doc.automations.find((a) => a.id === "contributor-queue");+ const problems = doc.automations.filter(issue),+ checks = doc.main?.checks || [];+ const old = Date.now() - Date.parse(doc.as_of) > 86400000;+ const green = checks.length && checks.every((c) => c.state === "ok");+ $("health").textContent = old+ ? "◌ snapshot is stale"+ : green+ ? "● main checks passing"+ : "◌ main needs verification";+ $("health").className = old || !green ? "warning" : "";+ $("freshness").textContent =+ `updated ${new Date(doc.as_of).toLocaleString([], { month: "short", day: "numeric", hour: "2-digit", minute: "2-digit" })}`;+ $("notice").hidden = !old;+ $("notice").textContent =+ "Snapshot is over 24 hours old. Check GitHub for current evidence.";+ $("metrics").replaceChildren();+ const c = queue?.counts;+ for (const [value, label, warn] of [+ [doc.attention?.examined, "issues ranked", false],+ [+ doc.attention?.items.filter((i) => i.maintainer_replied === false).length,+ "without maintainer reply",+ false,+ ],+ [c?.waiting, "awaiting assignment", false],+ [problems.length, "automation issues", problems.length > 0],+ ]) {+ const metric = el("div", null, `metric ${warn ? "warn" : ""}`);+ metric.append(el("strong", number(value)), el("span", label));+ $("metrics").append(metric);+ }+ $("attention").replaceChildren();+ if (c?.waiting)+ attention(+ "Contributor assignments",+ `${c.waiting} open requests; ${c.waiting_over_7_days} older than a week. Review their linked issues before assigning.`,+ "review",+ queue.evidence_url,+ );+ for (const a of problems)+ attention(a.name, a.what, a.stale ? "stale" : a.state, a.evidence_url);+ for (const check of checks.filter((c) =>+ ["failed", "unknown"].includes(c.state),+ ))+ attention(+ check.name,+ check.state === "failed"+ ? "Check failed on the current main commit."+ : "No conclusive result for this main commit.",+ check.state,+ check.url || doc.main?.url,+ );+ if (!checks.length)+ attention(+ "Main checks",+ "Current commit evidence is unavailable.",+ "unknown",+ doc.main?.url,+ );+ if (!$("attention").childElementCount)+ $("attention").append(+ el("p", "No action indicated by this snapshot.", "empty"),+ );+ $("main-checks").replaceChildren();+ if (doc.main?.sha) {+ const commit = link(doc.main.sha.slice(0, 7), doc.main.url);+ commit.id = "commit";+ $("commit").replaceWith(commit);+ }+ for (const check of checks) {+ const item = link("", check.url);+ item.className = "check";+ item.append(+ el("span", check.name),+ el(+ "span",+ `${check.state === "ok" ? "●" : "◌"} ${check.state === "ok" ? "passing" : check.state}`,+ `state ${check.state}`,+ ),+ );+ $("main-checks").append(item);+ }+ if (!checks.length)+ $("main-checks").append(el("p", "Checks unavailable", "empty"));+ const selection = $("activity-filter").value;+ $("activity-filter").replaceChildren(+ Object.assign(el("option", "all automation"), { value: "all" }),+ );+ for (const a of doc.automations.filter((a) => a.daily?.length))+ $("activity-filter").append(+ Object.assign(el("option", a.name), { value: a.id }),+ );+ if ([...$("activity-filter").options].some((o) => o.value === selection))+ $("activity-filter").value = selection;+ chart();+ automations();+ ranking();+ $("queue").replaceChildren();+ if (queue) {+ const all = link(+ `all ${number(c?.waiting)} requests ↗`,+ queue.evidence_url,+ );+ all.id = "queue-link";+ $("queue-link").replaceWith(all);+ }+ for (const p of queue?.items || []) {+ const row = el("div", null, "queue-row");+ row.append(+ link(`#${p.number}`, p.url),+ link(p.title, p.url),+ el("span", `${p.age_days}d`, "age"),+ );+ row.firstChild.className = "number";+ $("queue").append(row);+ }+ if (!$("queue").childElementCount)+ $("queue").append(+ el(+ "p",+ c?.waiting === 0+ ? "No requests waiting."+ : "Request details unavailable. Follow all requests for the current list.",+ "empty",+ ),+ );+}+async function refresh() {+ $("refresh").disabled = true;+ try {+ const response = await fetch(snapshotUrl, {+ cache: "no-store",+ });+ if (!response.ok) throw new Error("Snapshot request failed");+ const doc = await response.json();+ if (+ doc.schema !== "fastmcp-maintenance/1" ||+ !Array.isArray(doc.automations) ||+ !Number.isFinite(Date.parse(doc.as_of))+ )+ throw new Error("Invalid snapshot");+ snapshot = doc;+ render();+ } catch {+ $("notice").hidden = false;+ $("notice").textContent = snapshot+ ? "Refresh failed. Displaying the last loaded snapshot."+ : "Snapshot unavailable. Use the GitHub snapshot link below.";+ $("health").textContent = "◌ freshness unverified";+ $("health").className = "warning";+ } finally {+ $("refresh").disabled = false;+ }+}+try {+ document.documentElement.dataset.theme =+ localStorage.getItem("maintenance-theme") || "dark";+} catch {}+$("theme").addEventListener("click", () => {+ const theme =+ document.documentElement.dataset.theme === "light" ? "dark" : "light";+ document.documentElement.dataset.theme = theme;+ try {+ localStorage.setItem("maintenance-theme", theme);+ } catch {}+});+$("refresh").addEventListener("click", refresh);+$("activity-filter").addEventListener("change", chart);+$("attention-only").addEventListener("change", automations);+document.querySelector('footer a[href="status.json"]').href = snapshotUrl;+refresh();+setInterval(refresh, 300000);++$("ranking-kind").addEventListener("change", () => {+ rankingLimit = 10;+ ranking();+});+$("ranking-unanswered").addEventListener("change", () => {+ rankingLimit = 10;+ ranking();+});+$("ranking-more").addEventListener("click", () => {+ rankingLimit += 10;+ ranking();+});diff --git a/status-site/style.css b/status-site/style.cssindex d0d4c42c8..d195bd196 100644--- a/status-site/style.css+++ b/status-site/style.css@@ -1,31 +1,39 @@:root {- color-scheme: dark;- --bg: #101214;- --panel: #171a1d;- --line: #2c3136;- --text: #e0e4e7;- --muted: #a1a9b0;- --green: #86bdab;- --amber: #d6b57b;- --red: #e39794;- --blue: #92b2d1;- font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;- font-size: 13px;- line-height: 1.6;+ color-scheme: light;+ --bg: #fff;+ --text: #20242a;+ --muted: #626b77;+ --line: #e1e5eb;+ --surface: #f4f6fa;+ --issue: #087d67;+ --pr: #7357cd;+ --opened: #4879bb;+ --completed: #087d67;+ --not-planned: #cc8525;+ --other: #838b97;+ --merged: #7357cd;+ --closed-unmerged: #ba657e;+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;+ font-size: 15px;+ line-height: 1.5;background: var(--bg);color: var(--text);}-:root[data-theme="light"] {- color-scheme: light;- --bg: #f9faf9;- --panel: #f0f3f1;- --line: #d3dbd7;- --text: #26322e;- --muted: #5b6963;- --green: #246b50;- --amber: #855814;- --red: #a53b37;- --blue: #315f92;+:root[data-theme="dark"] {+ color-scheme: dark;+ --bg: #171b24;+ --text: #e5eaf2;+ --muted: #a2acbd;+ --line: #343d4d;+ --surface: #232a36;+ --issue: #60cfb2;+ --pr: #b49af4;+ --opened: #82afe8;+ --completed: #60cfb2;+ --not-planned: #e7b768;+ --other: #9da9bc;+ --merged: #b49af4;+ --closed-unmerged: #ed99b2;}* {box-sizing: border-box;@@ -34,389 +42,346 @@ body {margin: 0;}main {- max-width: 880px;+ max-width: 1080px;margin: 0 auto;- padding: 36px 28px 48px;-}-a {- color: inherit;- text-decoration: none;-}-a:hover {- color: var(--green);- text-decoration: underline;- text-underline-offset: 4px;-}-button,-select {- font: inherit;- color: var(--muted);- background: transparent;- border: 1px solid var(--line);- border-radius: 4px;- padding: 3px 8px;- cursor: pointer;-}-select {- max-width: 200px;- background: var(--bg);-}-button:hover,-select:hover {- color: var(--text);- border-color: var(--muted);-}-button:disabled {- opacity: 0.5;- cursor: wait;-}-:focus-visible {- outline: 2px solid var(--green);- outline-offset: 4px;+ padding: 40px 32px 24px;}-header,-nav,-.section-heading,-.status-line {+header {display: flex;- align-items: center;justify-content: space-between;- gap: 14px;-}-nav {- gap: 8px;-}-h1,-h2,-h3,-p {- margin: 0;+ align-items: flex-start;+ gap: 16px;}h1 {- font-size: 16px;- font-weight: 600;+ margin: 0;+ font-size: 27px;+ font-weight: 650;+ letter-spacing: -0.8px;}h1 span {font-weight: 400;color: var(--muted);}-h2 {- font-size: 13px;- font-weight: 500;- color: var(--muted);-}-.status-line {- font-size: 11px;+header p {+ margin: 4px 0 14px;color: var(--muted);- margin-top: 18px;- flex-wrap: wrap;-}-#health {- color: var(--green);}-#health.warning {- color: var(--amber);+h2 {+ margin: 0;+ font-size: 19px;+ font-weight: 600;+ letter-spacing: -0.3px;}-section {- margin-top: 36px;+a {+ color: inherit;+ text-decoration-color: var(--line);+ text-underline-offset: 3px;}-.section-heading {- margin-bottom: 14px;+a:hover {+ color: var(--issue);}-.muted,-.caption {- color: var(--muted);- font-size: 11px;+h1 a {+ text-decoration: none;}-.caption {- margin: 10px 0;+button {+ font: inherit;+ color: inherit;+ cursor: pointer;+ border: 1px solid var(--line);+ border-radius: 5px;+ background: transparent;+ padding: 5px 10px;}-.metrics {- display: grid;- grid-template-columns: repeat(4, 1fr);- padding: 20px 0;- gap: 18px;- border-top: 1px solid var(--line);- border-bottom: 1px solid var(--line);- margin-top: 24px;+button:hover {+ background: var(--surface);}-.metric strong {- display: block;- font-size: 25px;- font-weight: 500;- letter-spacing: -1px;- font-variant-numeric: tabular-nums;+button:disabled {+ opacity: 0.5;+ cursor: wait;}-.metric span {- display: block;- color: var(--muted);- font-size: 11px;- margin-top: 4px;+button:focus-visible,+a:focus-visible,+summary:focus-visible,+svg:focus-visible {+ outline: 2px solid var(--opened);+ outline-offset: 3px;}-.metric.warn strong {- color: var(--amber);+nav {+ display: flex;+ gap: 6px;+ padding-top: 5px;}-.notice {- border-left: 2px solid var(--amber);- padding: 10px 14px;- color: var(--amber);- margin-top: 20px;- background: var(--panel);+section {+ margin-top: 30px;+ padding-top: 24px;+ border-top: 1px solid var(--line);}-.attention-row {- padding: 12px 0;- display: grid;- grid-template-columns: 1fr auto;- gap: 5px 16px;- border-bottom: 1px solid var(--line);+.section-heading {+ display: flex;+ gap: 14px;+ justify-content: space-between;+ align-items: center;+ flex-wrap: wrap;+ margin-bottom: 18px;}-.attention-row p {- color: var(--muted);- font-size: 12px;- grid-column: 1/-1;+.ranges {+ display: flex;+ gap: 3px;}-.attention-row a {- color: var(--text);+.ranges button {+ border-color: transparent;+ padding: 4px 9px;+ font-size: 13px;}-.empty {- color: var(--muted);- padding: 8px 0;+.ranges button[aria-pressed="true"] {+ background: var(--surface);+ border-color: var(--line);+ font-weight: 650;}-.state {- font-size: 11px;- white-space: nowrap;+.caption {color: var(--muted);+ font-size: 12px;+ line-height: 1.6;+ margin: 9px 0;}-.state.ok {- color: var(--green);-}-.state.failed,-.state.degraded,-.state.off {- color: var(--red);-}-.state.pending,-.state.unknown,-.state.stale {- color: var(--amber);+#freshness {+ margin-top: 8px;}-.checks {- display: grid;- grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));- gap: 1px;- border: 1px solid var(--line);- border-radius: 5px;- overflow: hidden;- background: var(--bg);+.notice {+ background: var(--surface);+ border-left: 3px solid var(--not-planned);+ padding: 10px 14px;+ font-size: 14px;}-.check {- border-bottom: 1px solid var(--line);+.totals {display: flex;- flex-direction: column;- gap: 5px;- padding: 12px 14px;- background: var(--bg);- font-size: 12px;+ gap: 32px;+ flex-wrap: wrap;+ margin-bottom: 8px;}-.legend {+.total {display: flex;- flex-wrap: wrap;- gap: 20px;- font-size: 12px;- margin-bottom: 15px;+ align-items: baseline;+ gap: 9px;+}+.total strong {+ font-size: 30px;+ font-weight: 600;font-variant-numeric: tabular-nums;+ letter-spacing: -1px;}-.legend .passed {- color: var(--green);+.total small {+ color: var(--muted);}-.legend .failed {- color: var(--red);+.issue {+ color: var(--issue);}-.legend .blocked {- color: var(--amber);+.pr {+ color: var(--pr);+}+.chart-container {+ width: 100%;+ min-height: 220px;+ position: relative;}.chart {- display: block;width: 100%;- height: auto;+ display: block;+ overflow: visible;+ touch-action: pan-y;}.chart text {fill: var(--muted);- font:- 11px ui-monospace,- monospace;+ font-size: 11px;+ font-family: inherit;}.chart .grid {stroke: var(--line);stroke-width: 1;}-.chart .passed {- fill: var(--green);+.chart .series {+ fill: none;+ stroke-width: 2.5;+ stroke-linejoin: round;+ stroke-linecap: round;+}+.chart .cursor {+ stroke: var(--muted);+ stroke-width: 1;+ stroke-dasharray: 3 4;}-.chart .failed {- fill: var(--red);+.chart .hit {+ fill: transparent;+ cursor: crosshair;}-.chart .blocked {- fill: var(--amber);+.readout {+ min-height: 28px;+ font-size: 13px;+ color: var(--muted);+ font-variant-numeric: tabular-nums;+ margin-top: 6px;}-.chart .bar {- opacity: 0.8;+.legend {+ display: flex;+ gap: 18px;+ flex-wrap: wrap;+ margin-bottom: 12px;+ color: var(--muted);+ font-size: 13px;}-.chart .bar:hover,-.chart .bar:focus {- opacity: 1;+.key {+ display: inline-block;+ width: 9px;+ height: 9px;+ margin-right: 6px;+ border-radius: 2px;}-.queue-row {+.recent {display: grid;- grid-template-columns: 55px 1fr 45px;- gap: 12px;- padding: 10px 0;- border-bottom: 1px solid var(--line);- align-items: baseline;+ grid-template-columns: 1fr 1fr;+ gap: 28px;}-.queue-row .number {- color: var(--muted);- font-size: 11px;+.day-summary {+ padding: 14px 18px;+ background: var(--surface);+ border-radius: 7px;}-.queue-row .age {- text-align: right;+.day-summary h3 {+ font-size: 15px;+ margin: 0 0 12px;+ font-weight: 600;+}+.day-summary p {+ margin: 7px 0;+ font-size: 14px;+}+.day-summary strong {font-variant-numeric: tabular-nums;- color: var(--amber);- font-size: 11px;+ font-weight: 650;}-.queue-row a {- overflow-wrap: anywhere;+.day-summary small {+ display: block;+ color: var(--muted);+ font-size: 12px;+ margin-top: 10px;}details {- border-bottom: 1px solid var(--line);+ border-top: 1px solid var(--line);+ margin-top: 16px;+ padding-top: 12px;}summary {- padding: 11px 0;+ cursor: pointer;+ font-size: 14px;+}+.work-row {display: grid;- grid-template-columns: 1fr 80px 100px;+ grid-template-columns: 78px 1fr auto;gap: 12px;align-items: baseline;- cursor: pointer;- list-style: none;-}-summary::-webkit-details-marker {- display: none;-}-summary .name::before {- content: "+";- color: var(--muted);- display: inline-block;- width: 20px;-}-details[open] summary .name::before {- content: "−";-}-summary .state {- text-align: right;-}-summary .count {- color: var(--muted);- text-align: right;- font-size: 11px;+ padding: 10px 0;+ border-bottom: 1px solid var(--line);+ font-size: 13px;}-.detail {- padding: 0 0 15px 20px;+.work-row .state {color: var(--muted);font-size: 12px;- max-width: 75ch;-}-.detail a {- display: inline-block;- margin-top: 8px;- color: var(--green);}-label {+.method p {+ max-width: 78ch;+ font-size: 13px;color: var(--muted);- font-size: 11px;- cursor: pointer;-}-input {- accent-color: var(--green);}footer {- margin-top: 38px;- padding-top: 18px;+ display: flex;+ gap: 18px;+ flex-wrap: wrap;+ align-items: center;border-top: 1px solid var(--line);- font-size: 11px;+ padding-top: 20px;+ margin-top: 28px;color: var(--muted);+ font-size: 12px;}-footer a {- margin-right: 18px;-}-footer p {- margin-top: 12px;+footer button {+ border: 0;+ padding: 0;+ font-size: 12px;+ text-decoration: underline;+ text-decoration-color: var(--line);+ text-underline-offset: 3px;}-@media (max-width: 560px) {+@media (max-width: 600px) {main {- padding: 22px 18px 32px;+ padding: 24px 18px;}h1 {- font-size: 14px;+ font-size: 24px;}- h1 span {+ header p {+ font-size: 13px;+ max-width: 220px;+ }+ nav button {+ padding: 4px 7px;font-size: 12px;}- .metrics {- grid-template-columns: repeat(2, 1fr);+ h2 {+ font-size: 17px;+ }+ .section-heading {+ gap: 10px;+ }+ .totals {gap: 22px;}- .metric strong {+ .total {+ gap: 7px;+ flex-wrap: wrap;+ }+ .total strong {font-size: 27px;}- .checks {- grid-template-columns: repeat(2, 1fr);+ .total small {+ flex-basis: 100%;+ margin-top: -8px;}- .section-heading {- gap: 8px;+ .recent {+ grid-template-columns: 1fr;+ gap: 12px;}- select {- max-width: 160px;- font-size: 11px;+ .day-summary {+ padding: 12px 14px;}- summary {- grid-template-columns: 1fr 55px 70px;- gap: 6px;- font-size: 12px;+ .chart-container {+ min-height: 210px;}- .queue-row {- grid-template-columns: 42px 1fr 30px;- gap: 8px;- font-size: 12px;+ .readout {+ min-height: 40px;}- .muted {- font-size: 10px;+ .legend {+ gap: 8px 14px;+ }+ .work-row {+ grid-template-columns: 55px 1fr;+ gap: 7px;+ }+ .work-row .state {+ grid-column: 2;+ margin-top: -5px;+ }+ section {+ margin-top: 24px;+ padding-top: 20px;}}--.ranking-controls {- display: flex;- gap: 18px;- align-items: center;- margin: 16px 0;-}-.ranked-issue summary {- grid-template-columns: 42px 1fr 12px;- align-items: start;-}-.rank-score {- color: var(--green);- font-variant-numeric: tabular-nums;- font-size: 16px;-}-.rank-heading > .muted {- margin-right: 10px;-}-.rank-heading .caption {- margin: 4px 0 0;-}-.ranked-issue .detail {- padding-left: 54px;-}-#ranking-more {- margin-top: 16px;+.day-summary p button {+ text-align: left;+ padding: 0;+ border: 0;+ border-radius: 0;+ font-size: 14px;+ text-decoration: underline;+ text-decoration-color: var(--line);+ text-underline-offset: 3px;}diff --git a/tests/test_backlog_status.py b/tests/test_backlog_status.pynew file mode 100644index 000000000..582d3f647--- /dev/null+++ b/tests/test_backlog_status.py@@ -0,0 +1,109 @@+"""Counts, outcomes, and imported evidence for the public backlog charts."""++import importlib.util+from datetime import datetime, timezone+from pathlib import Path++import pytest+++def backlog():+ spec = importlib.util.spec_from_file_location(+ "backlog_status", Path(__file__).parents[1] / "scripts" / "backlog_status.py"+ )+ assert spec and spec.loader+ module = importlib.util.module_from_spec(spec)+ spec.loader.exec_module(module)+ return module+++def item(+ number,+ *,+ pr=False,+ created="2026-10-19T15:00:00Z",+ closed=None,+ reason=None,+ merged=None,+ draft=False,+):+ return {+ "number": number,+ "title": f"Item {number}",+ "created_at": created,+ "state": "closed" if closed else "open",+ "closed_at": closed,+ "state_reason": reason,+ "draft": draft,+ "pull_request": {"merged_at": merged} if pr else None,+ }+++def test_closure_outcomes_and_local_midnight(backlog):+ now = datetime(2026, 10, 20, 14, tzinfo=timezone.utc)+ items = [+ item(1, closed="2026-10-20T04:59:59Z", reason="completed"),+ item(2, closed="2026-10-20T05:00:00Z", reason="not_planned"),+ item(3, closed="2026-10-20T06:00:00Z"),+ item(4, pr=True, closed="2026-10-20T07:00:00Z", merged="2026-10-20T07:00:00Z"),+ item(5, pr=True, closed="2026-10-20T08:00:00Z"),+ item(6, pr=True, draft=True),+ ]+ doc = backlog.build(items, {}, now)+ yesterday, today = doc["daily"][-2:]+ assert yesterday["completed"] == 1+ assert today["completed"] == 0+ assert today["not_planned"] == today["other_closed"] == 1+ assert today["merged"] == today["closed_unmerged"] == 1+ assert doc["samples"][-1]["issues"]["open"] == 0+ assert doc["samples"][-1]["prs"] == {"open": 1, "draft": 1}+ assert len([event for event in doc["events"] if event["number"] == 4]) == 2+++def test_preserves_observed_counts_when_reopened_history_is_incomplete(backlog):+ previous_sample = {+ "at": "2026-10-19T18:00:00Z",+ "source": "live",+ "issues": {"open": 0},+ "prs": {"open": 0, "draft": 0},+ }+ reopened = item(1)+ doc = backlog.build(+ [reopened],+ {"samples": [previous_sample]},+ datetime(2026, 10, 20, 14, tzinfo=timezone.utc),+ )+ assert doc["samples"][0] == previous_sample+ assert doc["samples"][-1]["issues"]["open"] == 1+ assert all(row["completed"] == 0 for row in doc["daily"])+ assert [event["event"] for event in doc["events"]] == ["issues_opened"]+++def test_reconstructed_counts_do_not_invent_historical_drafts(backlog):+ items = [+ item(1, pr=True, created="2026-10-18T00:00:00Z", draft=True),+ item(2, created="2026-10-20T00:00:00Z"),+ ]+ sample = backlog.sample(+ items, datetime(2026, 10, 19, tzinfo=timezone.utc), "backfill"+ )+ assert sample["issues"] == {"open": 0}+ assert sample["prs"] == {"open": 1}+++def test_explicit_missing_history_fails_without_reset(backlog, tmp_path, monkeypatch):+ output = tmp_path / "backlog.json"+ monkeypatch.setattr(+ "sys.argv",+ [+ "backlog_status.py",+ "--previous",+ str(tmp_path / "missing.json"),+ "--output",+ str(output),+ ],+ )+ with pytest.raises(FileNotFoundError):+ backlog.main()+ assert not output.exists()