Skip to content

v0.12.0 β€” πŸ”Ž City Pulse Review Pipeline

Choose a tag to compare

@jctots jctots released this 07 Jul 11:40

πŸ”Ž v0.12.0 β€” City Pulse Review Pipeline

An admin-triggered AI agent that audits City Pulse's own operation β€” cost, translation, severity weights, status/trend usefulness, prompt quality, and cross-version comparison β€” and proposes concrete methodology improvements. Deterministic work is a script; judgment is the AI.

🏷️ Versioning

  • 🧬 Stamp every pulse run with pulse_config_version β€” a hash of the prompt, weight table, and window/strategy config β€” so future reviews can attribute output changes to a specific methodology snapshot

βš™οΈ Deterministic reducer

  • πŸ“‰ review/reduce.py turns days of cost_debug/translate_debug/pulse_debug logs plus radar.db into a compact digest β€” no LLM, no network
  • πŸ“Š Per-version metrics: status flap rate, trend-override rate, cost per pulse, coverage, and override rate (when human corrections exist)
  • 🧾 Cost reconciliation against api_usage, pulse coverage gap detection, and event-log anomaly surfacing
  • πŸ”’ subscribers table never queried β€” GDPR redaction by construction, not discipline

πŸ€– Gemini reviewer

  • πŸ“ review/reviewer.py reasons over the digest only, producing a human-readable report plus machine-readable changes.json
  • πŸ’Ύ Reports and proposed edits written to the data volume (data/review_debug/), never the repo β€” reviewer never edits the running system

πŸ–₯️ Admin dashboard

  • βœ‚οΈ Retire the standalone weight-review button β€” folded into the unified review
  • πŸŽ›οΈ New "Run review" control: days/drivers/samples knobs, high/low-detail presets, cost preview gating the run, and a past-reports list

πŸ”€ CI draft PR

  • πŸ”‘ New X-Admin-Token header auth path (alongside session login) so CI can fetch a report's changes.json without a browser session β€” prod server still never holds a GitHub token
  • 🌿 .github/workflows/review-pr.yml: manual workflow_dispatch job that applies unified-diff-shaped changes via git apply, writes anything else to PROPOSED_CHANGES.md for manual review, and opens a draft PR β€” never auto-merges

πŸ“š Docs

  • πŸ“– docs/review.md β€” full pipeline design, linked from analysis.md