Repository navigation
docs: production operations — observability, state backend selection, troubleshooting runbook - #1579
Conversation
🛫 PR Readiness Check
PR Scope: 🔧 Infrastructure
|
| Status | Check | Details |
|---|---|---|
| ✅ | Single commit | 1 commit — clean history |
| ✅ | Not in draft | Ready for review |
| ✅ | Branch up to date | Up to date with dev |
| ❌ | Copilot review | No Copilot review yet — it may still be processing |
| ✅ | Changeset present | No source files changed — changeset not required |
| ✅ | Scope clean | No .squad/ or docs/proposals/ files |
| ✅ | No merge conflicts | No merge conflicts |
| ✅ | Copilot threads resolved | 0 active Copilot thread(s) resolved (4 outdated skipped) |
| ✅ | CI passing | All checks passing |
Files Changed (3 files, +15 −31)
| File | +/− |
|---|---|
docs/src/content/docs/reference/state-backend-selection.md |
+3 −12 |
docs/src/content/docs/scenarios/production-observability.md |
+5 −4 |
docs/src/content/docs/scenarios/production-troubleshooting.md |
+7 −15 |
Total: +15 −31
This check runs automatically on every push. Fix any ❌ items and push again.
See CONTRIBUTING.md and PR Requirements for details.
🟢 Impact Analysis — PR #1579Risk tier: 🟢 LOW 📊 Summary
🎯 Risk Factors
📦 Modules Affecteddocs (3 files)
This report is generated automatically for every PR. See #733 for details. |
bradygaster
left a comment
There was a problem hiding this comment.
Security Review — RETRO
Verdict: APPROVE TO MERGE
Working as RETRO (Security) — read-only blocking review per #1568/PR scope.
bradygaster
left a comment
There was a problem hiding this comment.
Findings
1. [low] kubectl token-check pipes base64 --decode immediately to wc -c — token value never surfaced to stdout. Safe. (production-troubleshooting.md L214)
2. [low] PII redaction advisory — doc correctly discloses Squad does not redact; filter-at-Collector is the right operator guidance. No false claim of redaction.
3. [info] OTel Collector ConfigMap connection string — uses ${APPLICATIONINSIGHTS_CONNECTION_STRING} template variable + immediate instruction to use Kubernetes Secret + secretKeyRef. Correct pattern.
4. [info] OTLP endpoint example — eastus.otlp.monitor.azure.com presented as region example with
Positive Findings
| Criterion | Result |
|---|---|
| No real secrets committed | ✅ |
| PII: no false redaction claim, honest disclosure | ✅ |
| Multi-writer data-loss warning — all 3 built-in backends covered | ✅ |
| Backup/restore for local+PVC and two-layer documented | ✅ |
| kubectl commands avoid raw token exposure | ✅ |
| No fabricated health behavior — #1577 limitation disclosed | ✅ |
| Azure Monitor/Grafana links are first-party only | ✅ |
| RWX Azure Files write-contention caveat present | ✅ |
| No new npm deps; cspell wordlist only | ✅ |
| CI: security/policy/lint/docs-quality all pass | ✅ |
Summary
No blocking security issues. Credential handling delegates to Kubernetes Secrets correctly. Multi-writer data loss risk is prominently warned across all three built-in backends. No fabricated capabilities, no PII in committed files, no tokens in source. APPROVE TO MERGE.
RETRO — Security · Squad
There was a problem hiding this comment.
Pull request overview
Adds production-operations documentation for running Squad in containers/Kubernetes, covering (1) production observability/OTLP export patterns, (2) how to choose a state backend by deployment shape, and (3) a Kubernetes-oriented troubleshooting runbook, with cross-links from existing docs.
Changes:
- Added new scenarios pages for Production Observability and Production Troubleshooting Runbook.
- Added a new reference page for State Backend Selection, and linked it from the existing state-backends feature doc.
- Updated spelling configuration (
cspell.json) and added several.squad/log/decision artifacts.
Show a summary per file
| File | Description |
|---|---|
| docs/src/content/docs/scenarios/production-troubleshooting.md | New operator runbook for container/Kubernetes failure modes (startup, auth, OTEL export, state, KEDA, image pulls, OOM). |
| docs/src/content/docs/scenarios/production-observability.md | New guidance for routing Squad telemetry to Collector/backends in production, with troubleshooting and alerting ideas. |
| docs/src/content/docs/scenarios/aspire-dashboard.md | Adds a footer section that routes readers from local Aspire to the new production pages. |
| docs/src/content/docs/reference/state-backend-selection.md | New decision matrix and warnings for choosing/backing up state backends in containerized deployments. |
| docs/src/content/docs/features/state-backends.md | Links to the new state-backend selection reference for container/Kubernetes guidance. |
| cspell.json | Reformats and expands dictionary words list (adds kusto/otelcol/nslookup, etc.). |
| .squad/orchestration-log/2026-07-24T09-20-10.011-00-00-Surgeon.md | Adds orchestration-log artifact for PR sequencing session. |
| .squad/orchestration-log/2026-07-24T09-20-10.011-00-00-RETRO.md | Adds orchestration-log artifact for security audit session. |
| .squad/orchestration-log/2026-07-24T09-20-10.011-00-00-Flight.md | Adds orchestration-log artifact for mission/disposition session. |
| .squad/orchestration-log/2026-07-24T09-20-10.011-00-00-FIDO.md | Adds orchestration-log artifact for QA/CI audit session. |
| .squad/log/2026-07-24T09-20-10-pr-merge-strategy.md | Adds a session log summarizing the locked PR strategy. |
| .squad/decisions.md | Appends multiple decisions, but currently introduces duplicated decision entries later in the file. |
Review details
Suppressed comments (1)
docs/src/content/docs/scenarios/production-observability.md:71
- The “Direct export (no Collector)” example relies on
OTEL_EXPORTER_OTLP_HEADERSand implies env-based auth/header support. Squad currently configures the OTLP gRPC exporters directly and does not readOTEL_EXPORTER_OTLP_HEADERS, so readers may follow these steps and still see unauthenticated/failed exports. This section should either be marked unsupported or rewritten to steer operators to the Collector-based approach for Azure Monitor auth.
### Direct export (no Collector)
Set `OTEL_EXPORTER_OTLP_ENDPOINT` to the Azure Monitor OTLP endpoint for your Application Insights resource:
```bash
- Files reviewed: 12/12 changed files
- Comments generated: 4
- Review effort level: Lite
| ## Verified Squad telemetry environment variables | ||
|
|
||
| Squad reads the following standard OpenTelemetry SDK environment variables. These are the **only** OTEL variables Squad currently consumes — do not invent others. | ||
|
|
||
| | Variable | Default | Effect | | ||
| |---|---|---| | ||
| | `OTEL_EXPORTER_OTLP_ENDPOINT` | *(unset — telemetry disabled)* | OTLP/gRPC or OTLP/HTTP endpoint. When set, Squad emits spans for issue dispatch, agent lifecycle, and tool calls. | | ||
| | `OTEL_SERVICE_NAME` | `squad-agent` | Service name attached to every span and metric. | | ||
| | `OTEL_RESOURCE_ATTRIBUTES` | *(none)* | Comma-separated `key=value` pairs appended to every span (e.g., `deployment.environment=production,cluster=aks-eastus`). | | ||
|
|
||
| Full environment variable reference: [Container Image — Env Var Contract](/squad/docs/reference/container-image/#optional--observability). | ||
|
|
||
| > **Protocol note:** Squad uses OTLP over gRPC (port `4317`) by default. If your collector or backend requires OTLP/HTTP, set the endpoint to the HTTP receiver port (`4318`) and ensure the SDK selects the HTTP exporter. Confirm with your collector's documentation — the correct port depends on which receiver you have enabled. |
| ### 2026-03-26: CI deletion guard and source tree canary | ||
| **By:** Booster (CI/CD) | ||
| **What:** Added two safety checks to squad-ci.yml: (1) source tree canary verifying critical files exist, (2) large deletion guard failing PRs that delete >50 files without 'large-deletion-approved' label. Branch protection on dev requested (may need manual setup). | ||
| **Why:** Incident #631 — @copilot deleted 361 files on dev with no CI gate catching it. | ||
|
|
| | Deployment shape | Recommended backend | Notes | | ||
| |---|---|---| | ||
| | **Local developer machine** (single user, local clone) | `local` (default) | Files in `.squad/`. Simple, no Git overhead. Acceptable branch-switch risk on dev machines. | | ||
| | **Single pod — stateless replica** (container, no PVC) | `local` + PVC mount | Mount a Kubernetes PersistentVolumeClaim (or Azure Files share) at `/app/.squad/` so state survives pod restarts. Without a volume, state is lost on every restart. | |
| # Confirm the token env var is set | ||
| kubectl exec -n squad <pod> -- env | grep GITHUB_TOKEN | ||
|
|
||
| # Validate token scopes (replace <token> with actual value from secret) | ||
| gh api user --hostname github.com # or use curl with Authorization header |
FIDO Quality Review — PR #1579 Production Operations DocsReviewing as: FIDO, Quality Owner CI status
Acceptance criteria (#1568)
Verified claims ✅
🚫 BLOCKER 1 —
|
…ound, add cross-link GNC revision of PR #1579 (original author Telemetry, locked out): 1. Remove fabricated squad.issue.dispatch.errors from alerting table — replaced with squad.agent.errors (counter, defined in source) and squad.sessions.errors (counter, defined in source). 2. Remove fabricated squad.agent.interrupted span from graceful-shutdown section — replaced with squad.coordinator.shutdown (span, defined in source) and squad.agent.errors (counter). Note added that Squad does not emit an interrupted-specific span. 3. Remove invalid rootDir config workaround from state-backend-selection.md and production-troubleshooting.md. Per issue #1555 source analysis: FSStorageProvider is constructed with zero arguments regardless of user config — there is no configuration-level workaround. Docs now state this accurately and advise single-replica / avoid affected path. 4. Add production-observability → production-troubleshooting cross-link in the Related header row. Source evidence: - squad.agent.errors: packages/squad-sdk/src (meter.createCounter) - squad.sessions.errors: packages/squad-sdk/src (meter.createCounter) - squad.coordinator.shutdown: packages/squad-sdk/src (tracer.startSpan) - squad.agent.duration: packages/squad-sdk/src (meter.createHistogram) - squad.issue.dispatch.errors: NOT FOUND in any source file - squad.agent.interrupted: NOT FOUND in any source file - #1555 body: "there is no configuration-level workaround" Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
🔴 Surgeon — Merge Blocked: Merge Conflict PR #1578 was merged into
The branch Action required: Please rebase/update this branch to resolve conflicts, then re-request merge. |
…ound, add cross-link GNC revision of PR #1579 (original author Telemetry, locked out): 1. Remove fabricated squad.issue.dispatch.errors from alerting table — replaced with squad.agent.errors (counter, defined in source) and squad.sessions.errors (counter, defined in source). 2. Remove fabricated squad.agent.interrupted span from graceful-shutdown section — replaced with squad.coordinator.shutdown (span, defined in source) and squad.agent.errors (counter). Note added that Squad does not emit an interrupted-specific span. 3. Remove invalid rootDir config workaround from state-backend-selection.md and production-troubleshooting.md. Per issue #1555 source analysis: FSStorageProvider is constructed with zero arguments regardless of user config — there is no configuration-level workaround. Docs now state this accurately and advise single-replica / avoid affected path. 4. Add production-observability → production-troubleshooting cross-link in the Related header row. Source evidence: - squad.agent.errors: packages/squad-sdk/src (meter.createCounter) - squad.sessions.errors: packages/squad-sdk/src (meter.createCounter) - squad.coordinator.shutdown: packages/squad-sdk/src (tracer.startSpan) - squad.agent.duration: packages/squad-sdk/src (meter.createHistogram) - squad.issue.dispatch.errors: NOT FOUND in any source file - squad.agent.interrupted: NOT FOUND in any source file - #1555 body: "there is no configuration-level workaround" Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
091463c to
555250e
Compare
Summary
Implements #1568 — three new production operations docs pages built on the canonical
reference/container-image.mdfrom #1575.Working as Telemetry (Aspire & Observability).
Pages Delivered
A —
scenarios/production-observability.mdsquad aspirevs. production cluster telemetry — explicitly documented: the Aspire Dashboard does not run in Kubernetes; do not point OTLP at localhost in containersOTEL_*variables (OTEL_EXPORTER_OTLP_ENDPOINT,OTEL_SERVICE_NAME,OTEL_RESOURCE_ATTRIBUTES) — no fabricated env varssquad.agent.durationhistogram; caveat on metric name stabilitysquad.agent.duration(histogram),squad.agent.errors(counter),squad.sessions.errors(counter). Fabricatedsquad.issue.dispatch.errorsremoved.squad.coordinator.shutdownspan andsquad.agent.errorscounter. Fabricatedsquad.agent.interruptedspan removed.B —
reference/state-backend-selection.mdrootDirconfig workaround removed. Issue FSStorageProvider constructed without rootDir in resolveSquadState() — state writes land in repo root instead of .squad/ #1555 source states: "there is no configuration-level workaround — this must be fixed in the SDK itself." Section now accurately states this and advises single-replica / avoid affected path.C —
scenarios/production-troubleshooting.mdkubectl describe scaledobject, external scaler health, trigger verification, token checkValidation
markdownlint-cli2: 0 errors (174 files)cspell: 0 issues (173 files)npm run test: Pre-existing baseline failures only — no regressions from this PR:docs-build.test.tsguide count (11 vs 10): Pre-existing from docs: Squad.Agents.AI + Microsoft Agent Framework integration guide #1574 (agent-framework-integration.md). Dev baseline expects 10 guides; 11 exist. This PR does not modify that test or add guides — baseline mismatch left for planned nav integration PR.cli-packaging-smoke.test.ts: npm install blocked by corporate network — pre-existing.Limitations / Open Items
squad.agent.durationmetric name marked as potentially unstable until OTEL instrumentation stabilizesCloses #1568