v0.12.0 β π City Pulse Review Pipeline
π 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.pyturns days ofcost_debug/translate_debug/pulse_debuglogs plusradar.dbinto 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 - π
subscriberstable never queried β GDPR redaction by construction, not discipline
π€ Gemini reviewer
- π
review/reviewer.pyreasons over the digest only, producing a human-readable report plus machine-readablechanges.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-Tokenheader auth path (alongside session login) so CI can fetch a report'schanges.jsonwithout a browser session β prod server still never holds a GitHub token - πΏ
.github/workflows/review-pr.yml: manualworkflow_dispatchjob that applies unified-diff-shaped changes viagit apply, writes anything else toPROPOSED_CHANGES.mdfor manual review, and opens a draft PR β never auto-merges
π Docs
- π
docs/review.mdβ full pipeline design, linked fromanalysis.md