Repository navigation
fix(review): remediate session 20260928-201857 findings and harden review feedback loop (#718) - #719
Merged
dan-petty merged 4 commits intoSep 29, 2026
Conversation
…view feedback loop (#718) - Increase review retries to 6 and configure exponential backoff (2.0s to 60.0s) for HTTP 4xx/5xx errors - Suppress Python 3.12+ SyntaxWarning for invalid escape sequences across AST parse sites and sandbox - Harden subsystems against path traversal, socket leaks, and insecure temp files - Expand anti-hallucination catalog and update review prompts to use raw string criteria - Export review feedback dataset and record calibration in docs/SELF_IMPROVEMENT.md
dan-petty
enabled auto-merge (squash)
September 29, 2026 12:15
dan-petty
disabled auto-merge
September 29, 2026 12:16
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
dan-petty
deleted the
feat/718-remediate-review-findings-feedback-loop
branch
September 29, 2026 12:59
19 tasks
3 tasks
dan-petty
added a commit
that referenced
this pull request
Oct 1, 2026
* fix(review): remediate session 20260928-160843 findings and harden feedback loop (#682) (#683) * chore(release): bootstrap v0.2.24 milestone and synchronize roadmap deliverables (#299) (#712) * fix(ai): treat 4xx/5xx as http errors, add incremental backoff retries, and suppress invalid regex escape warnings (#713) * feat(github): correct secondary-limit backoff and retry-after handling in run_gh (#705) (#714) * feat(github): fail-closed pr check verdicts from one bucket classifier (part 1) (#707) (#715) - Add CheckBucket enum, PRCheckItem, CheckVerdictSummary, classify_check_item, and fetch_pr_check_verdicts in github/check_verdict.py - Wire check verdict classifier into devops pr checks, devops pr ready, and check-readiness - Enforce fail-closed exit codes: exit 0 on pass/skipping, exit 8 on pending, exit 1 on fail/cancel/unread - Invert exit-0 test on failed check runs and add unstable check-readiness fail-closed test - Add comprehensive unit tests in tests/test_pr_check_verdict.py * feat(github): move pr wait and monitor onto bucket classifier seam (part 2) (#707) (#716) - Move PRCheckRun, pr wait, and pr monitor onto check_verdict seam with CheckBucket - Query /check-runs via paginated and slurped REST requests to prevent multi-page decode errors - Consolidate all conclusion sets into canonical BUCKET_CLASSIFIER_MAP - Delete duplicate _parse_check_runs, _parse_check_run_node, and duplicate _fetch_commit_check_runs - Remove CONST_GH_FAILING_CHECK_CONCLUSIONS and dead _check_run_badge - Add parity test against gh pr checks --json bucket and multi-page total_count test * feat(github): reviewer-aware reply detection for thread resolution and oldest-first pr updates (#717) Enforce reviewer-aware reply detection so that reviewer follow-ups are not counted as valid replies, require non-opener replies before thread resolution unless --without-reply is passed, and process batch PR updates oldest-first (FIFO). Closes #706. * fix(review): record active personas accurately in review session findings and candidates (#720) (#721) - Track active evaluated personas on ReviewPipelineOrchestrator.personas - Accept optional personas in generate_consolidated_report with fallback to self.personas - Pass active_p from _run_orchestrator_review to generate_consolidated_report - Serialize active personas into both findings.json and candidates.json * feat(devcontainer): configure extensions, integrate structural invariants, and migrate profiles to daemonsets (#722) (#723) * feat(devcontainer): configure extensions and integrate structural invariants sentinel (#722) - Add and configure DavidAnson.vscode-markdownlint, rust-lang.rust-analyzer, firefox-devtools.vscode-firefox-debug, ms-windows-ai-studio.windows-ai-studio, kilocode.Kilo-Code, and saoudrizwan.claude-dev - Configure ollama.endpoint and ollama.model in devcontainer.json and vscode settings - Remove Continue.dev remnants, rules, and configuration stubs - Integrate AST structural invariants pre-commit sentinel from scripts into src/devops_cli/security/structural_invariants.py - Delete scripts directory to satisfy zero stray scripts mandate - Enforce no stray scripts or scripts directory in tests/test_architectural_invariants.py - Ignore .kilo, .grimp_cache, and .import_linter_cache in .gitignore * feat(k8s): enable auto tool choice and hermes tool call parser on vllm profiles (#722) * feat(k8s): migrate vllm and ollama profiles to daemonsets with dynamic hardware scheduling (#722) * docs(agent): document daemonset migration and dynamic scheduling in task 722 * fix(review): remediate review findings and harden self-improvement verification loop (#722) * fix(devcontainer): clean up port forwards superseded by cloudflare k8s ingress (#722) * fix(k8s): remediate deploy-stack manifest paths, helm pending recovery, and dcgm privileges (#722) * fix(review): remediate session 20260928-201857 findings and harden review feedback loop (#718) (#719) * fix(review): remediate session 20260928-201857 findings and harden review feedback loop (#718) - Increase review retries to 6 and configure exponential backoff (2.0s to 60.0s) for HTTP 4xx/5xx errors - Suppress Python 3.12+ SyntaxWarning for invalid escape sequences across AST parse sites and sandbox - Harden subsystems against path traversal, socket leaks, and insecure temp files - Expand anti-hallucination catalog and update review prompts to use raw string criteria - Export review feedback dataset and record calibration in docs/SELF_IMPROVEMENT.md * fix(k8s): prevent security stream stderr leakage Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix(k8s): allow cloudflared egress to traefik without ports restriction (#725) The cluster's kube-router NetworkPolicy engine fails to enforce egress rules that combine a peer selector (to:) with a ports: restriction in the same rule, silently rejecting matching traffic. This caused cloudflared to receive 'connection refused' errors when forwarding tunnel traffic to Traefik, even though the Traefik pod, Service, and Endpoints were all healthy. Remove the ports: [80, 443] restriction from the Traefik egress rule, relying solely on the to: peer selector (namespace + pod label) to scope the rule. Ingress rules and ports-only egress rules (DNS, HTTPS, tunnel) are unaffected since they don't combine peer selectors with ports. Also fixes the root cause of a second bug: the root kustomization was missing 'cloudflared' from its resources list, so image/manifest updates under k8s/cloudflared/ were silently never applied by 'devops k8s deploy-stack'. Verified live against the cluster: after applying the fix and restarting the cloudflared deployment, connection-refused errors stopped appearing in logs, egress to Traefik succeeded, and ingress to cloudflared metrics (port 2000) was unaffected. Adds regression tests asserting cloudflared is wired into the root kustomization and that the Traefik egress rule has no ports restriction. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * chore(ai): remove unused lightllm inference backend (#727) Removes the ghcr.io/modeltc/lightllm GPU inference backend, which was unused. ghcr.io/berriai/litellm (LiteLLM, powering llm-gateway) is unrelated and retained. - Delete k8s/llm/lightllm/ manifests (deployment, service, networkpolicy) - Strip lightllm references from gateway/portkey/networkpolicy manifests and NO_PROXY egress lists - Remove lightllm_url and related config/constants/settings - Remove lightllm branches from ai/gateway.py, ai/pydantic_ai_bridge.py, commands/ai_gateway.py, ai/mcp/server.py - Rename tests/test_ai_gateway_portkey_lightllm.py to tests/test_ai_gateway_portkey.py and update assertions - Regenerate docs (CLI reference, MCP tools, configuration) - Fix stale gpu-feature-discovery test assertion (v0.16.2 -> v0.20.1) to match the already-bumped manifest, unblocking CI Closes #726 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * chore(k8s): update jaeger, ollama, and valkey versions (#731) * chore(k8s): update jaeger to v2.21.0 Migrate the Jaeger all-in-one deployment from jaegertracing/all-in-one:1.62.0 to jaegertracing/jaeger:2.21.0 (Jaeger v2). Drop the now-unused v1 environment variables (COLLECTOR_OTLP_ENABLED, SPAN_STORAGE_TYPE, MEMORY_MAX_TRACES), which v2's binary config format replaces; the default all-in-one config already enables OTLP receivers and in-memory storage out of the box. Closes #728 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * chore(k8s): update ollama to v0.34.4 Bump the ollama/ollama container image from 0.32.14 to 0.34.4 across all 8 GPU-tiered ollama DaemonSet profiles (16Gi through 128Gi). Closes #729 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * chore(k8s): update valkey to 9.1.2 Bump the valkey/valkey container image from 8.0-alpine to 9.1.2-alpine in the LLM stack's valkey deployment and standalone run manifest, and align the ArgoCD Redis-compatible cache override to the same tag. Update the paired test assertions to match. Closes #730 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * chore(k8s): update litellm to v1.103.0 (#733) Bump the LiteLLM proxy image (ghcr.io/berriai/litellm) that powers llm-gateway from v1.102.1 to v1.103.0. Update the paired test assertion to match. Closes #732 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * feat(k8s): modernize monitoring stack, llm profiles, traefik routing, and remove squid proxy (#734) - Migrate Kubernetes monitoring from legacy Prometheus to Grafana k8s-monitoring Helm chart (v4.5.2) with Alloy telemetry collectors and 30-day retention for Loki. - Add comprehensive Traefik Ingress routes and NetworkPolicy rules for all monitoring and telemetry services across the cluster. - Remove Squid proxy, SSL-bumping configs, and proxy dependencies. - Remove vLLM deployment profiles in favor of multi-node Ollama and update LiteLLM Gateway routing configurations. - Fix Qdrant and OpenAI embeddings dimension lookup and cluster service aliases. * fix(review): remediate review findings 20260930-053418 and harden review feedback loop (#735) (#736) * fix(k8s): restore kubernetes cpu metrics and align monitoring dashboards to homelab-k3s (#737) (#738) * fix(review): remediate review findings 20260930-053418 and harden review feedback loop (#735) * fix(k8s): restore kubernetes cpu metrics and align monitoring dashboards to homelab-k3s (#737) - Include machine_cpu_cores and essential KSM/node-exporter metrics in k8s-monitoring Alloy values - Disable redundant direct scrape jobs in Prometheus server values to prevent label stripping - Align cluster naming from devops-cluster to homelab-k3s across values, Prometheus relabeling, and dashboards - Partition Kubernetes views dashboards into ConfigMaps adhering to 256KB annotation limits - Support Grafana template variables in PromQL range and subquery duration selectors - Reconcile LiteLLM gateway routing model list and GPU matrix definitions * chore(docs): record roadmap planning glossary and github-source adr (#746) (#747) * chore(docs): record roadmap planning glossary and github-source adr (#746) Add CONTEXT.md, the glossary for release planning and the roadmap jobs, and ADR 0001, which makes GitHub issues, milestones and the project board the roadmap's source of truth with docs/ROADMAP.md generated from them. Schedule the roadmap jobs in docs/ROADMAP.md: #739-#742 in v0.2.25, #743 and #744 in a new v0.2.26 section, #745 as a backlog matrix row. Revise the #697 and #704 entries to match, and remove the #696 and #699 entries they supersede. Closes #746 * chore(docs): land roadmap planning records in v0.2.24 and retire #418 (#746) Move the #746 roadmap entry and task file to v0.2.24, where this PR merges before #740 starts enforcing the admission rule it records. Remove the #418 roadmap entry, its matrix row and its unstarted task file: `devops gh pm inflight` was never built, and the stall rule in #740 replaces it. * fix(ci): keep the quality gate within its five-minute budget (#748) (#751) Three secops tests never enabled dry-run mode, so they ran trivy, kube-linter and pluto over the whole workspace until their 120s and 60s timeouts. The network guard blocked connections but not DNS, so blocked retries and the reference extractor still resolved names on every worker. Enable dry-run in those tests, fail external lookups in the guard, and let the 15 tests that validate egress declare a public_dns fixture instead of depending on real DNS. The main cause was the checkout itself: on a 9p share of a Windows folder a stat takes about 400us against 0.8us on ext4, and the test step ran in 518s there against 158s on an ext4 clone. devops ci now warns when its root is on such a share, and lists pytest's slowest tests when the test step runs past the budget. Closes #748 * chore(docs): record roadmap service decisions and the machine-account and polling adrs (#756) (#757) Resolve the glossary's open boundaries between the roadmap jobs: an item is an issue on the roadmap delivered by exactly one pull request, Blocked (waiting outside the roadmap) is distinct from a Dependency, only in-progress items stall, closing the release PR un-cuts the release, reprioritization starts each release and closure owns the cut. Add Value, Effort and Service. Add ADR 0002 (the jobs act as a machine account with a classic token, because GitHub Apps and fine-grained tokens can't reach a user-owned board) and ADR 0003 (polling is how the roadmap sees changes; webhooks only cut latency). Revise the #739, #740, #742 and #743 roadmap entries to match, move #741 to v0.2.26 as the service deployment beside #752 and #753, and add #754 and #755 as backlog rows. Closes #756 * fix(test): tests never write to the project config, data or tracked files (#749) (#758) * fix(test): tests never write to the project config, data or tracked files (#749) * fix(test): snapshot initial index.lock state to prevent hook race * fix(test): remove ambient git index.lock check from tripwire * fix(sandbox): emit full-length prefix and parse ipv6 endpoints in network policy (#701) (#759) * fix(security): unify cloud metadata predicate and harden path validation (#701) (#760) * feat(security): add hypothesis property tests for sandbox policy boundaries (#701) (#761) * fix(security): default dependency severity to unchecked and avoid caching failed lookups (#708) (#762) * feat(security): report scanner outcome status and enforce gating checks (#708) (#763) * feat(security): report scanner outcome status and enforce gating checks (#708) * test(security): patch scan.run_semgrep_scan with clean ScanOutcome (#708) - Patch devops_cli.commands.scan.run_semgrep_scan instead of security module - Return clean ScanOutcome(status='ran', findings=[], reason='') - Consolidate linear assertions to structural tuple equality checks * feat(k8s): auto-mint and synchronize argocd.token and grafana.token in deploy-stack (#764, #765) (#766) * feat(k8s): auto-mint and synchronize argocd.token and grafana.token in deploy-stack (#764, #765) - Mint and synchronize API tokens during stack deployment and secret synchronization - Add on-demand token generation and fallback in ArgoCD and Grafana CLI commands - Handle null items array in ArgoCD applications response when zero apps exist (#765) - Upgrade oauthlib, pyjwt, urllib3, and virtualenv to resolve dependency security advisories - Add unit tests with structural tuple equality assertions across credential and argo commands * fix(k8s): address copilot review on token minting, tls, keyring storage, and reuse (#764) * chore(docs): plan the architecture review's deepening candidates and defects (#782) (#783) File the 2026-10-01 architecture review as roadmap items #767-#781 and place them by the release rules: - v0.2.24: #781, a critical fix. 5d34541 (#763) made gitleaks scan only the first file of a list target, so reviews check one file for secrets. - v0.2.25: the roadmap store (#768), which the roadmap jobs build on. - v0.2.26: one GitHub session per identity (#767), needed before the service acts as the machine account. - Backlog: the review rulebook, session store and workspace, the nesting metric and doc set test seams, the PR checks read, the process runner, constants locality and four smaller defects. The gate's test stage is within budget on ext4 (1m 42s), so the test-speed items aren't P0. Add the Code review glossary terms (Finding, Verdict, Review session, Known false positive), roadmap entries and matrix rows for the new items, and #768 and #767 to the dependencies of the items that build on them. Closes #782 * fix(security): gitleaks scans every file of a list target (#781) (#784) Gitleaks takes one source per run, and GitleaksScanner.build_command always passed only target_path[0], so a list target scanned only its first file when the binary was installed. 5d34541 (#763) did the same to the built-in patterns by handing the scanner target[0]. The review pipeline passes every reviewed file, so a review scanned only its first file for secrets. GitleaksScanner.scan now runs once per file of a list target and merges the outcomes, keeping every finding and the worst status any file had. run_gitleaks_scan passes the list whole and drops test files first when ignore_tests is set. Closes #781 * feat(security): sarif runs reflect what each scanner did (#708) (#785) Part 3 of #708. A SARIF run read as a clean scan by the tool it names, so writing one for a scanner that never ran would close that tool's open alerts once uploaded to code scanning. - Only a scanner whose outcome is `ran` gets a run, zero results included, with invocations[].executionSuccessful and its start and end times. BaseSecurityScanner.scan now records that window on the ScanOutcome. - Every other outcome (unavailable, failed, not applicable, dry-run, built-in patterns) becomes a toolExecutionNotifications entry on devops-cli's own invocation, whose executionSuccessful is false when any scanner failed. Built-in pattern findings go in devops-cli's run, so they never carry the real tool's driver name. - Non-gating findings (Dive) are emitted at note level with problem.severity: recommendation and no security-severity. - Tests validate emitted documents against the vendored OASIS SARIF 2.1.0 schema through jsonschema.validators.validator_for; jsonschema joins the dev group. Closes #708 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * fix(ai): keep a reply's structured output when its prose contains brackets (#802) repair_json_string parsed the whole reply first and took any non-empty list it returned. json-repair reads bracketed prose, such as a markdown link or items[0], as list items beside the answer, so a review persona's reply parsed to None and lost every finding, and a structured agent reply failed its schema. A lone fenced block holding an object or a list of objects is now the answer, decoded from its opening fence so that a fence inside one of its strings cannot cut it short. Otherwise json-repair's list of prose values yields its one object or list of objects. Fences open at a line start and close on a line of their own. Closes #786 Claude-Session: https://claude.ai/code/session_01NYKowRr4bsfF3nYbC9gsj6 Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * feat(github): board-owned project status and truthful reconciliation (#703) (#799) Reconcile recomputed Status, Priority, Category, Value and Effort on every pass and overwrote whatever differed, so hand corrections on the board reverted. Status matched labels by substring with a Ready fallback, Category/Value/Effort came from type-label and title-keyword guesses, results were bare counts, and a failed fetch read as empty. - plan_item_changes plans each item's changes with the source that decided them. The board owns Status: it is set only when unset (from an exact status label, otherwise Backlog) or when the item's state forces Done, In Review or In Progress. Priority only fills an unset field from its label. Category, Value and Effort are never inferred. - reconcile_project_custom_fields returns the changes (planned in a dry run, applied otherwise), and `devops gh project reconcile` prints them. Reconcile and `project workflows list` refuse to guess board #2. - Failed reads of the board, issues and pull requests raise GitHubOperationError. get_repository_issues' REST fallback paginates, and roadmap sync, milestone reconciliation and release epics read every issue instead of treating a failed read as no issues. - The issues fetch drops pull requests, so each is reconciled once. - sync-roadmap reports the share of items that fell back to scope/cli. - The project sync help, MCP descriptions, tasks README, knowledge base and workflow expectations (Backlog, not Todo) match the behaviour. A dry run against board #2 plans 480 changes on 337 of 472 items, each filling an unset field or forcing a closed item to Done. Closes #703 * feat(telemetry): harness, constellation and telemetry profile report only what ran (#710) (#801) * feat(ai): the agent harness reports only what ran (#710) Part 1 of #710. `ai harness status` rendered AgentHarness.create_default(): claude/claude-3-7-sonnet with every slot attached, not the configured model. `harness run` and `offload` call no model, yet run templated Tier 1 "Decomposed" and Tier 3 "Verified ... against architectural invariants" text naming one, and estimated tokens as len(text) // 4. - AgentHarness.from_config builds the harness from the configured AI provider and model, with every slot marked configured (a new SlotState) instead of an unchecked attached; status shows them. - execute_tiered runs the sub-agent's local searches and reports the search it ran, the files and matches and a summary, naming no model. TieredExecutionResult's decision_plan and verification_report become search and summary. - The token estimates (ModelSlot.estimate_tokens, tokens_used) and `harness run`'s --frontier-model/--local-model options are removed. - ai_harness_status no longer claims to report sandbox state. Part of #710 * feat(telemetry): constellation and telemetry profile report only what ran (#710) Parts 2 and 3 of #710, completing it with the harness change. Constellation: register_task had no caller outside tests, and is_quiesced()/get_active_route() had no reader, so quiesce, failover and resume reported counts of tasks nothing registered. Task registration, SuspendedTask, AgentTaskType and the per-task fields and counts are deleted. quiesce sets a flag with a reason, failover records a fallback route in it (ai gateway failover reroutes requests), resume clears it, and `ai constellation` shows it and says no running task reads it. --drain-timeout and failover's --force acted on tasks and are removed. Telemetry profile: `profile <command>` made up a trace id the child never received, read only the in-process buffer, and otherwise drew sample.* spans naming qwen2.5-coder. It now runs the command inside a telemetry.profile span, with the caller's full environment, so run_subprocess hands the child that trace; flushes queued exports (OTelTelemetryClient.flush); and reads the trace back from Jaeger, polling until it stops growing within 10 seconds. It exits 2 without a command or --trace-id, and 1 when export is off or no spans reach Jaeger. The sample fallback and the unread --last are deleted, and the MCP tool passes the command positionally. Closes #710 * feat(telemetry): disable third-party telemetry and phone-home across k8s and devcontainer (#803) (#804) * feat(telemetry): disable third-party telemetry and phone-home across k8s and devcontainer (#803) * docs(instructions): require third-party telemetry opt-outs and confirmation for functional web integrations (#803) * fix(test): the workspace tripwire passes from a linked worktree (#824) (#826) The #749 tripwire reported a change whenever <root>/.git/index was missing. A linked worktree's .git is a file, so every file devops ci regenerates while pytest runs read as modified by tests and the gate failed from any worktree. git diff now finds the index itself, and a git error still counts as a change. * fix(k8s): deploy-stack installs the prometheus operator crds its servicemonitors need (#819) (#827) * fix(test): the workspace tripwire passes from a linked worktree (#824) The #749 tripwire reported a change whenever <root>/.git/index was missing. A linked worktree's .git is a file, so every file devops ci regenerates while pytest runs read as modified by tests and the gate failed from any worktree. git diff now finds the index itself, and a git error still counts as a change. * fix(k8s): deploy-stack installs the prometheus operator crds its servicemonitors need (#819) The infra stack installs prometheus-community/prometheus-operator-crds first, because k8s-monitoring 4.x and dcgm-exporter render ServiceMonitors but ship no CRD for them. teardown-stack never uninstalls that release, and its CRDs carry helm.sh/resource-policy: keep. Conflict adoption handles cluster-scoped resources such as leftover CRDs: it matches Helm's empty namespace, omits -n, and annotates the release's namespace, which Helm checks. Helm names one conflict per attempt, so the retry budget covers all ten CRDs and a retry that fails unchanged ends it. * feat(cli): dashboard keeps its place across refreshes and details the highlighted finding (#684) (#830) Every table row has a stable key from a pure identity function per table, and redraw_table keeps the highlighted row and both scroll offsets through a refresh. A vanished record leaves the cursor at its index, repeated records stay separate rows, and a different review session returns to the top. The AI Review findings sub-tab gains a scrollable detail pane, toggled with i, that renders the highlighted finding's full record as plain text with model-written markup and control characters shown literally. Each finding opens at the top, and the provider lists every finding of a session instead of the first 50. * feat(grafana): devops-cli dashboards chart the metrics the cli sends and the sidecar provisions them (#692) (#831) The devops-cli and AI spend dashboards query only series devops-cli sends, through rate() or increase(): command latency at p50, p95 and p99, error share by command with zero for a command without errors, findings by severity and reviews by target type. Every increase() panel says its value is approximate, and grouped queries no longer add an unlabelled vector(0) series. A configMapGenerator in k8s/monitoring/dashboards provisions six dashboards through the Grafana sidecar in place of the hand-copied ConfigMaps, each under the 262,144-byte annotation limit, and dashboards sync skips dashboards Grafana reports as provisioned. Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * feat(k8s): stack dashboards query only the series their exporters serve (#693) (#833) * feat(grafana): devops-cli dashboards chart the metrics the cli sends and the sidecar provisions them (#692) The devops-cli and AI spend dashboards query only series devops-cli sends, through rate() or increase(): command latency at p50, p95 and p99, error share by command with zero for a command without errors, findings by severity and reviews by target type. Every increase() panel says its value is approximate, and grouped queries no longer add an unlabelled vector(0) series. A configMapGenerator in k8s/monitoring/dashboards provisions six dashboards through the Grafana sidecar in place of the hand-copied ConfigMaps, each under the 262,144-byte annotation limit, and dashboards sync skips dashboards Grafana reports as provisioned. * feat(k8s): stack dashboards query only the series their exporters serve (#693) llm-stack.json charts the LiteLLM gateway and DCGM GPUs, otel-collector.json the collector's own telemetry, now scraped through pod annotations, and the new prometheus-server.json the server itself. Every selector, label and grouping is checked against captured exporter output, no query falls back to a constant, and each limit line stays on its axis. vLLM panels and the unverified Qdrant row are removed. Stacked on #692: prometheus-server.json joins its sync-only set and the README's dashboards section. --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * fix(cli): the finding detail pane scrolls to the top before the next refresh (#834) (#835) Opening another finding at the top called scroll_home(animate=False), which Textual 8 defers until after the next screen refresh. A slower machine could still show the old offset when the pane was read, so test_another_finding_is_detailed_from_the_top failed intermittently on GitHub's runner. The pane now scrolls with immediate=True, and a test reads scroll_y straight after the highlight handler. * fix(k8s): integrate monitoring telemetry and fix dashboard metrics (#825) (#828) * fix(k8s): integrate monitoring telemetry and fix dashboard metrics (#825) * test(k8s): update servicemonitor precedence assertion for otel and qdrant (#825) * fix(k8s): drop the collector and qdrant servicemonitors that overlap #693 and #823 (#825) The Prometheus server already scrapes the OpenTelemetry collector through its pod annotations (#693), so an Alloy ServiceMonitor would scrape it twice and double every collector series. Qdrant runs with an API key and no dashboard reads it since #693; its authenticated scrape is #823. A test now checks the collector is scraped once, and #819's ServiceMonitor ordering test is back to the two infra releases that render one. The kube-state-metrics labels and endpoints collector, the cAdvisor and KSM allowlists, and the CoreDNS egress port stay: the Prometheus server's kubernetes-service-endpoints job scrapes CoreDNS through the kube-dns Service's annotations. --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * feat(k8s): truthful pod status, filters, container-aware logs and pod inspector in the dashboard (#686) (#865) * feat(k8s): truthful pod status, filters, container-aware logs and pod inspector in the dashboard The dashboard, `devops dashboard --summary`, `devops k8s pods` and `devops k8s pods --watch` read STATUS and READY from one port of kubectl's printPod, so a crashlooping pod no longer reads as Running and a pod creating its container reads 0/1. The Kubernetes tab gets its own panel: a banner naming the context, Ready nodes and unhealthy pods, a namespace selector and `/` text filter that survive refreshes, focus that follows the tab, logs of the default container with `c` to cycle containers and one stream at a time, and `e` to inspect a pod's containers and recent events. The Minikube probe is gone. Closes #686 * fix(k8s): resolve the #686 review: on-screen cursor, closed log streams, kubeconfig errors A highlighted pod that was on screen stays on screen when a namespace choice or pods listed above it move its row out of the old window; a cursor the operator scrolled away from keeps its offset, as #684 requires. Replacing or stopping a log stream closes it: read_pod_logs(follow=True) returns a PodLogStream whose close shuts the socket for reading, ending a read blocked on a quiet container, and pod_log_source returns a closable PodLogSource. The dashboard uses a pod's service account only inside a pod with no kubeconfig context to name, so a context missing from the kubeconfig is reported as missing rather than as the in-cluster loader's error, and the banner names the context the client loads. A record without a pod name is neither tailed nor inspected. The namespace selector is tested from the keyboard, the inspector test uses the timeout constant, and the last termination fallback uses CONST_K8S_CONTAINER_TERMINATED. Refs #686 * docs(k8s): record #686 in the changelog and roadmap * fix(test): the network guard refuses loopback connects to services the test did not start (#837) (#866) * fix(test): the network guard refuses loopback connects to services the test did not start (#837) The session guard passed every loopback connect through, so on a workstation holding kubectl port-forwards the suite reached the cluster's OTLP collector, Valkey and Ollama, while CI only ran the refused branches. - The guard records the ports the test process listens on; a loopback connect to any other port raises ConnectionRefusedError(ECONNREFUSED) and connect_ex returns ECONNREFUSED. Non-loopback connects still raise RuntimeError. - The guard stays installed after the session, so exports queued by the last test or flushed by atexit are refused too. - EmbeddingsEngine no longer skips its Valkey probe under pytest; DEVOPS_CLI_TEST_LIVE_VALKEY is gone and its tests use fakes or the refused port. - test_popeye_dry_run enables dry-run mode instead of running the real popeye against localhost:8080. Closes #837 * fix(test): the network guard owns a loopback port only while its listener is open (#837) Review fixes for the loopback guard. - The guard records the sockets the test listens on, held weakly, instead of a growing set of port numbers. Once a test closes its server the port refuses again, so whatever binds it next, another xdist worker or a port-forward, is not reached. - test_init_valkey_runs_without_l2_when_valkey_refuses points the configured Valkey at a service listening through the C socket type and asserts that the client saw ConnectionRefusedError and the service saw no connection; it fails against the pass-through guard and against a guard that raises RuntimeError. - The task file records the gate's wall-clock time, the probe re-run with the final guard, that the namespace gate runs were offline, and marks the teardown and popeye changes as beyond the issue. * docs(test): record #837 in the changelog and roadmap * fix(mcp): mcp tools and resources call commands and options that exist (#836) (#867) * fix(mcp): tools and resources call commands and options that exist Twelve MCP entry points called commands or options the CLI does not have. Point each at the real command, drop the options nothing implements, and delete ai_architecture. devops docs check now resolves every `uv run devops` argv in the MCP server against the real command tree, without running it. Closes #836 * fix(docs): the mcp argv check resolves without running option callbacks Resolving `--help`, `--version` or a completion option ran its callback: it printed, wrote a shell profile or exited. A bare group printed its help. The resolver now checks the option parser's output first and stops without a finding when a node is given an action option or no arguments. A known option missing its value no longer blames an earlier literal. The collector keeps every append and extend, with placeholders for runtime values, and reports `src/` paths. The spawn-guarded tests build the command trees before the guard, so they pass when run on their own. The task file now names the commits that added the workspace and argo resources. Refs #836 * docs(mcp): record #836 in the changelog and roadmap * fix(analyze): the symbol delta reads the base revision again (#787) (#893) Since f93231b (#738) the base-revision read in commands/analyze.py passed `git show -- <rev>:<path>`, which git takes as a pathspec, so the base file was always empty: every head symbol counted as added, symbols_removed stayed empty and review's cites-a-removed-symbol check never fired. The read drops the `--`, and a test against a real repository under tmp_path removes a symbol and finds it in symbols_removed. Enhanced branch analyses cached since f93231b must be regenerated with devops analyze branch --update-all. Closes #787 * fix(ai): web_fetch vets every redirect hop before it is sent (#860) (#902) fetch_web_page validated only the first URL and the final response, so a redirect chain could reach a link-local or private address. It now goes through the HTTP broker, whose request hook vets every hop before it is sent: http or https only, inside the domain lists with case and trailing dots ignored, and a public address whatever DEVOPS_CLI_AI_ALLOW_PRIVATE_NETWORK says. Both broker clients follow at most 10 redirects. Each fetch uses its own client, so no cookies carry over, and a request's egress policy runs before the broker's own SSRF check and can only narrow it. PR2-PR4 of the hardening entry are #894, #895 and #896; the NAT64 gap is #897 and the DNS-rebinding window #898. Closes #860 * fix(mcp): tools refuse coerced arguments before they run (#862) (#903) FastMCP coerced tool arguments, so review_pr with {"number": true, "post": true} built devops review pr 1 --post and would have posted on PR #1; strings and floats for integers were coerced the same way, and rejected inputs were logged with their values. A middleware now validates every call against the tool's published schema, listed or withheld, before its handler runs, with integers refusing booleans and integral floats, and PR and issue numbers use a strict alias as defence in depth. A refusal names each parameter once with its expected type and the allowed parameters and never echoes a value, and a logging filter keeps rejected inputs out of FastMCP's warnings. jsonschema becomes a runtime dependency. FastMCP's own DEBUG call log is #899. Closes #862 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * docs(changelog): curate release notes for v0.2.24 (#904) Moves the early [0.2.24] section from #683 into the release notes, so release prepare renames [Unreleased] instead of rebuilding only that section (#863). Rewords the #682 bullet that claimed a -- separator #787 removed, drops the stale vLLM sentence from the LightLLM removal, and adds the #734 and #738 monitoring, Ollama, Squid, vLLM and kube-prometheus-stack entries with their cluster cleanup. * fix(telemetry): the collector remote-writes devops-cli metrics to the path alloy serves (#829) (#910) fdd4d0f (#734) pointed the collector's prometheusremotewrite exporter at Alloy's prometheus.receive_http but kept the Prometheus server's /api/v1/write path. Alloy serves only POST /api/v1/metrics/write and answered every write with 404, which the exporter treats as permanent, so every devops-cli metric was dropped. The endpoint now uses the receiver's path, and a values test holds it to the receiver's host, port and path. Closes #829 * docs(changelog): v0.2.24 notes claim only the retention Prometheus enforces (#911) Loki's compactor retention has been off since v0.2.15, so it keeps logs indefinitely and the notes' 30-day claim for Loki was false. #550 holds the verified compactor fix. Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * fix(k8s): deploy-stack applies the monitoring services alloy, grafana and port-forward use (#912) (#914) fdd4d0f (#734) pointed Alloy's Prometheus destination, Grafana's Prometheus datasource and devops k8s port-forward at Services that only k8s/monitoring/service-aliases.yaml defines, and deploy-stack applies only the root kustomization, which never listed it. A cluster built by deploy-stack alone stored no metrics. The root kustomization now applies the aliases, and a test holds every monitoring Service the stack addresses to what kubectl apply -k k8s/ applies. Closes #912 --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Remediates findings and systemic defects identified during review session
20260928-201857, increases review retries and exponential backoff for transient HTTP 4xx/5xx gateway errors (including Cloudflare 524 timeouts), suppresses Python 3.12+ invalid escape sequenceSyntaxWarningwarnings across AST parsing call sites and sandbox criteria execution, hardens subsystems against path traversal and socket leaks, updates review and persona prompts, exports review feedback dataset, and records calibration in self-improvement documentation.Closes #718.
Key Changes
DEFAULT_REVIEW_RETRY_ATTEMPTS = 6,DEFAULT_REVIEW_RETRY_MIN_BACKOFF = 2.0,DEFAULT_REVIEW_RETRY_MAX_BACKOFF = 60.0indefaults.py.ReviewPipelineOrchestratorand widened_execute_page_review_with_backoffto intercept all transient HTTP errors._clean_http_error_bodyinai/client/base.pyto strip HTML markup into clean error summaries.SyntaxWarning: "\w"):("PYTHONWARNINGS", "ignore::SyntaxWarning")to sandbox environment inconstants.py.ast.parsecall sites across the source tree withwarnings.catch_warnings()filtering outSyntaxWarning.review.md,review_output_instruction.md,verify_finding_system.md) instructing models to format regex verification criteria with raw strings (r'...') or escaped backslashes (\\\\).commands/mcp.py&commands/repos.py: Replaced dynamic reflection and lazy__getattr__mappings with direct static imports; added path traversal validation inclone_org.k8s/service.py: Replaced static temporary file inswitch_contextwith securetempfile.NamedTemporaryFile(0o600) and safe cleanup.k8s/informer.py: Handled dictionary objects seamlessly in_extract_event_metadata.argo/rollouts.py: Handled Prometheus URL validation inside exception handlers.argo/gitops.py: Resolved manifests cleanly with traversal validation in_parse_drift_event.watchers/live_resource.py: Protected against division-by-zero and CPU pegging in refresh calculations.http/broker.py&http/pool.py: Guaranteed client reference clearance onclose()/aclose().telemetry/memory_profiler.py: Wrapped broker cleanup intry...finallyand validated module/function identifiers.ai/review/exporter.py: Added root equality and relative containment checks.HALLUCINATION-GRAPHQL-JSON-DUMPS,HALLUCINATION-EXAMPLE-COM-WEBHOOK,HALLUCINATION-PROMETHEUS-TELEMETRY-METRIC._verify_secret_scanning_ground_truthto ignore dictionary/attribute lookups.20260928-201857Calibration Record todocs/SELF_IMPROVEMENT.md.uv run devops review export-feedback.Verification
uv run devops ci: 100% pass across all 10 quality gates (all 6,230+ unit/integration tests, coverage >= 90.0%, mypy strict, ruff check/format, bandit, audit, docs, actionlint, uv_check).