Skip to content

Agentic refresh: the GPU price index re-researches itself weekly, gated by code - #32

Closed
aurph wants to merge 2 commits into
mainfrom
feat/agentic-refresh
Closed

aurph wants to merge 2 commits into
mainfrom
feat/agentic-refresh

Conversation

@aurph

@aurph aurph commented Sep 8, 2026

Copy link
Copy Markdown
Owner

The answer to "what can an agent product do that this repo can't": nothing — because now the repo has its own. Weekly, GitHub Actions runs Claude Code headless against a versioned research prompt (ops/prompts/gpu-price-refresh.md) that re-researches all 10 tracked accelerators across their cited provider price lists, two-pass (research, then adversarial self-check), allowed to edit exactly one file.

The point is the gate, not the agent. server/gpu-price-validation.ts is a pure, unit-tested contract the run must satisfy before its output may even become a PR:

  • fixed model set (adding/removing accelerators stays human work)
  • every price inside its own observed low..high band, all positive
  • ≥2 https sources per model
  • estimated flags never silently shrink
  • history anchors append-only — the past is immutable
  • no price move over 60% — blocked for human review, never averaged away

The workflow also rejects any run touching other files, runs the full test suite, and only ever opens a PR — it has no path to main (an improvement over the original June n8n design, which committed straight to main; that flow never got a host anyway since Jetson n8n was never set up).

Verified both ways in this build: the shipped dataset validates against itself, and a simulated hallucinated refresh (3x price, rewritten history anchor, single non-https source) was rejected with all five violations named and exit 1.

Activation (one secret)

Run claude setup-token locally and add the output as repo secret CLAUDE_CODE_OAUTH_TOKEN (rides your Claude subscription — no API bill), or set ANTHROPIC_API_KEY for metered billing. Until one exists, the Monday run fails with a message saying exactly that. workflow_dispatch enabled for a manual first run.

Pattern, not one-off

The prompt + gate + PR-only pipeline is the template: deals and clusters refreshes are each "a prompt file and a validator" away, reusing this workflow's shape.

492/492 tests (8 new gate tests), tsc clean, build green. Carries the #30 lockfile fix. Independent of #25-#31 — merge in any order.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FY4ziPhfu8VBPFVy5cDMNy

Two advisories published upstream since the last merge (browserslist
unbounded memory growth, HIGH; postcss-selector-parser AST recursion,
low) trip CI's npm-audit gate on every new push, blocking the whole
open PR train. npm audit fix; 0 vulnerabilities after; tests/tsc/build
green. Lockfile-only.
The June n8n refresh flow never got a host (Jetson n8n never happened).
This gives it one that already exists: a weekly GitHub Actions run of
Claude Code headless against a versioned research prompt
(ops/prompts/gpu-price-refresh.md - two-pass: research each accelerator
across the cited provider price lists, then adversarially re-check your
own changes), allowed to edit exactly one file.

The point is the gate, not the agent. server/gpu-price-validation.ts is
a pure, unit-tested contract the run must pass before its output may
even become a PR: fixed model set, every price inside its own observed
low..high band, >=2 https sources per model, estimated flags never
shrink, history anchors append-only (the past is immutable), and no
move over 60% (blocked for human review, never averaged away). The
workflow additionally rejects any run that touches other files, runs
the full test suite, and only ever opens a PR - it has no path to main.
Improvement over the old n8n design, which committed straight to main.

Verified both ways: the shipped dataset validates against itself, and a
simulated hallucinated refresh (3x price, rewritten anchor, single http
source) is rejected with all five violations named, exit 1.

Activation: one repo secret - CLAUDE_CODE_OAUTH_TOKEN (from `claude
setup-token`, rides the Claude subscription) or ANTHROPIC_API_KEY.
Until set, the run fails with a message saying exactly that.

492 tests (8 new), tsc, build green.
@aurph

aurph commented Sep 8, 2026

Copy link
Copy Markdown
Owner Author

Closing per Jack's call — not the direction he wants (and it needs a token). The validator + prompt work stays on the branch if ever wanted.

@aurph aurph closed this Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant