Skip to content

2f09ad4a - Loosen error-fix ownership to device-level, add a one-shot decide dispatcher - #54

Closed
Danswar wants to merge 3 commits into
developfrom
2f09ad4a-906b-4efe-b4d3-ea5d1ddd0b10-error-decide-dispatcher
Closed

2f09ad4a - Loosen error-fix ownership to device-level, add a one-shot decide dispatcher#54
Danswar wants to merge 3 commits into
developfrom
2f09ad4a-906b-4efe-b4d3-ea5d1ddd0b10-error-decide-dispatcher

Conversation

@Danswar

@Danswar Danswar commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

EN:
Loosens error-fix conclusion/implement-task ownership from session-exact to device-level, adds agent watch error-decide (a one-at-a-time dispatcher that starts a fresh, one-shot session per unresolved error, instead of relying on a single persistent session), and requires a brief field on error.fix conclusions.

DE:
Lockert die Besitz-Prüfung für error-fix-Konklusionen/Implement-Tasks von session-exakt auf Device-Ebene, fügt agent watch error-decide hinzu (ein Ein-nach-dem-anderen-Dispatcher, der pro offenem Fehler eine frische Einmal-Session startet, statt auf eine dauerhafte Session zu setzen), und macht ein brief-Feld auf error.fix-Konklusionen verpflichtend.

Details

Why

The existing error-fix skill's single-persistent-session model has no mechanism to auto-continue between queued items — each session does one thing, then sits idle until manually re-knocked. Rather than build that "keep it going" nudge, this drops the persistent session entirely: a fresh, uniquely-named session is started per error, does its one job (investigate, conclude), and stops.

What changed

  • src/agent_cli/error_fix_act.py, src/agent_cli/errors.py: _error_seen, _lookup_implement_task, incident_closed, validate_conclusion all dropped their session_id parameter/filter, keeping only device-level (_origin_device_id) ownership checks. Necessary because a fresh one-shot session writes the conclusion under its own session id, different from the error.seen row's session id (the fixed scanning session named in error-fix.json).
  • src/agent_cli/error_decide_act.py (new) + main.py: agent watch error-decide drains unconcluded error.seen rows oldest-first (by payload.first_seen), one at a time — starts a fresh runner session (skills error-fix, spine, review-loop, pr-review), knocks it directly (not via knock.deliver, which would target the wrong session), retries the knock's Enter keypress with an is_busy() confirmation (a freshly-started session isn't always ready for input immediately — found and fixed via a real end-to-end run, not just unit tests), polls for its conclusion with a timeout, stops the pane. Not wired into agent daemon in this revision.
  • validate_conclusion now requires a brief field on error.fix (short text: what's broken, likely cause, where to look), matching the existing reason requirement on error.skip.
  • DESIGN.md §21 and the error-fix skill's SKILL.md updated to match.

Verification

Full local suite: 700 passed, 1 pre-existing unrelated skip (missing optional agent_core package). Ran the actual dispatcher twice against a real, isolated Postgres store and a real grok session (not the repo's own store) — confirmed a real error.seen row gets picked up, investigated, and concluded with a real error.skip, and the session is cleanly stopped afterward.

… decide dispatcher

error.seen conclusions and their implement tasks required the exact same
session that saw an error to write the conclusion. Loosen that to
device-level ownership, since a fresh one-shot session now writes the
conclusion under its own session id, not the scanning session's.

Add `agent watch error-decide`: for each unconcluded error.seen row, start
a fresh grok session, knock it, wait for its conclusion, stop it, then
move to the next row. No persistent session is kept alive between items.

Require a `brief` field on error.fix conclusions, matching the existing
reason requirement on error.skip.
Update the error-fix skill doc to the same device-level ownership
language as DESIGN.md, list agent watch error-decide alongside its
siblings, reject a non-runner session id collision, and widen the
decide dispatcher's exclusive lock to cover the whole scan instead of
just the backlog read -- the narrower scope was based on a lock-key
collision that never actually existed, and let two overlapping scans
double-dispatch the same row.
@Danswar

Danswar commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator Author

EN:
Superseded by #55 — this branch's commits didn't follow CONTRIBUTING.md's commit-message rules (session-id prefix, missing periods) and couldn't be fixed without a force-push outside the allowed case, so the same change was rebuilt on a fresh branch with clean commits instead.

DE:
Ersetzt durch #55 — die Commits dieses Branches folgten nicht den Commit-Message-Regeln aus CONTRIBUTING.md (Session-ID-Präfix, fehlende Punkte) und liessen sich nicht ohne einen nicht erlaubten Force-Push korrigieren, daher wurde dieselbe Änderung auf einem neuen Branch mit sauberen Commits neu aufgebaut.

@Danswar Danswar closed this Sep 2, 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