Skip to content

Instantly share code, notes, and snippets.

@grahama1970
grahama1970 / copilot_judge_context.patch
Created October 19, 2025 14:50
Copilot unblock patch
diff --git a/devops_agent/metrics.py b/devops_agent/metrics.py
index 992882f8..5be5cbb7 100644
--- a/devops_agent/metrics.py
+++ b/devops_agent/metrics.py
@@ -23,6 +23,15 @@ def inc_counter(name: str, labels: dict | None = None, amount: float = 1.0) -> N
_flush_unlocked(path)
+def write_metric(name: str, labels: dict | None = None, amount: float = 1.0) -> None:
+ """
@grahama1970
grahama1970 / scheduler_review.md
Created September 30, 2025 12:30
Scheduler Integration Review 2025-09-30

Scheduler Integration Review (Single File)

  • Date: 2025-09-30

Context

Adds a config.toml-driven scheduler crate and feature-gated MCP server bootstrap. Default-off at build and runtime; starts only when [scheduler] is enabled in ~/.codex/config.toml.

Files to Analyze

  • codex-rs/scheduler/Cargo.toml
  • codex-rs/scheduler/src/lib.rs
  • codex-rs/scheduler/src/config.rs
@grahama1970
grahama1970 / review_curated.md
Created September 28, 2025 19:02
Curated Code Review (Pre-hooks) 2025-09-28

Code Review Bundle (Curated, Single File)

  • Date: 2025-09-28
  • Scope: Generic pre‑hooks (core config + exec wiring)

Review Focus

  • Config correctness: TOML → runtime mapping for [pre_hooks] and steps (cmd/env/cwd/timeout).
  • Exec integration: CLI flag → override translation; hooks run before agent submission; error semantics.
  • Runner safety: timeouts, required vs non‑fatal, env/cwd application.
  • Demos: Makefile/wrapper targets for local validation.
@grahama1970
grahama1970 / review_bundle.md
Created September 28, 2025 18:47
Codex Review Bundle (Prompt-Driven) 2025-09-28

Codex Review Bundle (Single File)

  • Repo root: /home/graham/workspace/experiments/codex
  • Date: 2025-09-28

Executive Verdict

Readiness: ✅ Generic pre-hooks are correctly implemented, opt-in, sandbox-respecting, and validated with demos and tests.

Top 5 risks (with anchors):

@grahama1970
grahama1970 / codex_review_bundle.md
Created September 28, 2025 18:24
Codex Review Bundle (Single) 2025-09-28

Codex Review Bundle (Single File)

  • Repo root: /home/graham/workspace/experiments/codex
  • Date: 2025-09-28

Executive Verdict

Readiness: ✅ Generic pre‑hooks are correctly wired and tested.

Findings by Focus Area

@grahama1970
grahama1970 / litellm_review_bundle.md
Last active September 28, 2025 17:07
LiteLLM readiness smoke review bundle (single file) - 2025-09-28

LiteLLM Readiness Smoke Review — 2025-09-28

Overall Assessment

  • Strict readiness command: . .venv/bin/activate && READINESS_LIVE=1 STRICT_READY=1 READINESS_EXPECT=all_smokes_core python scripts/mvp_check.py (red).
  • Core deterministic tests pass; failure confined to all_smokes_core smoke suite.
  • ND-real coverage remains absent unless ND_REAL=1, so deploy readiness currently lacks variance checks.

Failures & Evidence

  • tests/smoke_optional/test_agent_proxy_validation_errors.py::test_agent_proxy_headers_precedence expects merged headers {'x-env': 'B', 'x-req': 'C'} but records {}.
  • tests/smoke_optional/test_agent_proxy_headers_and_errors.py runs earlier in the suite and replaces HttpToolsInvoker; it appears the override persists into the failing test.
  • Running the failing test in isolation inside .venv passes, supporting the shared-state hypothesis.
@grahama1970
grahama1970 / review_bundle__agent_proxy.py
Last active September 28, 2025 17:01
LiteLLM readiness smoke review bundle with code - 2025-09-28
# Source: litellm/experimental_mcp_client/mini_agent/agent_proxy.py (lines 160-239)
if bool(inv.get("ok")):
return inv
return None
except Exception:
return None
# Compute escalation metadata eagerly
escalated = bool(req.escalate_on_budget_exceeded and req.escalate_model)
used_model = req.escalate_model if escalated else req.model
@grahama1970
grahama1970 / review_bundle_prompt_response.md
Created September 28, 2025 16:55
LiteLLM readiness smoke review - 2025-09-28

Review Bundle Findings — LiteLLM Readiness Smokes

1. Regression Snapshot

  • Command: . .venv/bin/activate && READINESS_LIVE=1 STRICT_READY=1 READINESS_EXPECT=all_smokes_core python scripts/mvp_check.py
  • Failure: tests/smoke_optional/test_agent_proxy_validation_errors.py::test_agent_proxy_headers_precedence
  • Root symptom: headers recorded by the tool invoker are {} instead of request overrides ("X-Env": "B", "X-Req": "C").

2. Primary Root Cause

  • tests/smoke_optional/test_agent_proxy_headers_and_errors.py replaces litellm/experimental_mcp_client/mini_agent/agent_proxy.HttpToolsInvoker with _FakeInvoker and never restores it. Because pytest runs smoke_optional tests in a single process, the override survives into the next test and prevents the header precedence contract from being exercised with the real invoker.
  • Evidence:
@grahama1970
grahama1970 / codex_review_bundle.md
Created September 28, 2025 16:50
Codex Review Bundle (Single) 2025-09-28

Codex Review Bundle (Single File)

  • Repo root: /home/graham/workspace/experiments/codex
  • Date: 2025-09-28

Executive Verdict

Readiness: ✅ Top risks are low and localized to config and CLI glue.

Findings by Focus Area

@grahama1970
grahama1970 / REVIEW_BUNDLE_PROMPT.md
Created September 28, 2025 16:35
LiteLLM Smokes Review Bundle Prompt

External Review Prompt (Canonical v3)

Goal: Deliver a blunt, evidence‑backed production‑readiness assessment and a minimal patch set (unified diffs) with tests and doc updates. No broad refactors. Ship safety first.

Reviewer persona & tone

  • Principal SRE/DevOps + AppSec mindset; fluent with Linux userland (systemd, Docker/OCI, rsync/tar), CI, and Python/Node toolchains.
  • Be terse, specific, and fail‑closed. Unverified claims must be called out and marked 🔴 or 🟡.

Project context (declare at top of your report)

  • Project: