|
|
leave the rest
The operator asked: "when I don't do anything, an agent can do it for me and I can just follow up
or steer it." This is that agent, deterministic (no LLM): same input, same decision, and every
reason is a grep or a commit hash that can be checked.
spaces/newos4/scripts/newos4-feedback-autoreview.py — rules, first match wins:
R1 duplicate same fingerprint already decided -> resolve
R2 already-fixed identifiers absent from modules/**/*.js AND
`git log -S<token>` proves a commit removed them -> resolve
R3 noise fetch/abort/probe patterns -> reject
R4 still-present auto report + stack + identifiers still in code -> approve (max 2/day)
R5 plan / R6 user report -> never decided
Writes to the same append-only decisions.jsonl with actor=auto-reviewer, note + evidence; the
applier's last-wins rule means any operator click overrides an agent decision. Kill switch:
data/feedback/autonomy.json {"mode":"off"} (safe default, aggressive = cap 5).
Cron job e31ac58a559e, 07:40 and 19:40, no_agent, silent unless it decided something.
Fixture proof (6 cases, /tmp corpus, git repo with a real removal commit):
RPT-A duplicate -> resolve (duplicate of already-decided RPT-B)
RPT-C already-fixed -> resolve (goneFromCode removed from modules/ in fc4eaf3)
RPT-D noise -> reject
RPT-E still-present -> approve
RPT-F user report -> SKIP
RPT-G never existed -> SKIP <- caught the first draft, which called it "already fixed"
Live dry-run on the real corpus: "nothing provable (0 left for the operator, mode=safe)" and
`git log -S emptyTrash -- spaces/newos4/modules` resolves to 563a9be, i.e. the report I wrongly
approved by hand tonight would have been auto-resolved correctly.
Dashboard: agent-decided cards carry a 🤖 badge + the reason + "Any button below overrides it",
and the tab shows "🤖 feedback agent: N decided on its own in its last run (safe mode, M left for
you)".
|