2f09ad4a - Loosen error-fix ownership to device-level, add a one-shot decide dispatcher - #54
Closed
Danswar wants to merge 3 commits into
Closed
Conversation
… 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.
Collaborator
Author
|
EN: DE: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 abrieffield onerror.fixconclusions.DE:
Lockert die Besitz-Prüfung für error-fix-Konklusionen/Implement-Tasks von session-exakt auf Device-Ebene, fügt
agent watch error-decidehinzu (ein Ein-nach-dem-anderen-Dispatcher, der pro offenem Fehler eine frische Einmal-Session startet, statt auf eine dauerhafte Session zu setzen), und macht einbrief-Feld auferror.fix-Konklusionen verpflichtend.Details
Why
The existing
error-fixskill'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_conclusionall dropped theirsession_idparameter/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 theerror.seenrow's session id (the fixed scanning session named inerror-fix.json).src/agent_cli/error_decide_act.py(new) +main.py:agent watch error-decidedrains unconcludederror.seenrows oldest-first (bypayload.first_seen), one at a time — starts a fresh runner session (skillserror-fix,spine,review-loop,pr-review), knocks it directly (not viaknock.deliver, which would target the wrong session), retries the knock's Enter keypress with anis_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 intoagent daemonin this revision.validate_conclusionnow requires abrieffield onerror.fix(short text: what's broken, likely cause, where to look), matching the existingreasonrequirement onerror.skip.DESIGN.md§21 and theerror-fixskill'sSKILL.mdupdated to match.Verification
Full local suite: 700 passed, 1 pre-existing unrelated skip (missing optional
agent_corepackage). Ran the actual dispatcher twice against a real, isolated Postgres store and a real grok session (not the repo's own store) — confirmed a realerror.seenrow gets picked up, investigated, and concluded with a realerror.skip, and the session is cleanly stopped afterward.