Skip to content

fix(supervisor): keep the loop's inner-loop states out of the person's decisions - #1828

Merged
teemow merged 3 commits into
mainfrom
fix/1795-inner-loop-routing
Nov 1, 2026
Merged

teemow merged 3 commits into
mainfrom
fix/1795-inner-loop-routing

Conversation

@teemow

@teemow teemow commented Oct 31, 2026

Copy link
Copy Markdown
Member

Fixes #1795

The supervisor loop filed two of its own inner-loop states as decisions for the guide's person. This PR routes them inside the loop, and drops the guide skill's assumption that a push notification reaches the person's phone.

Used-up review rounds no longer reach the person

  • When no change-request round is left (supervisor.reviewRounds) and the worker parks again on the head the last review asked changes on, the loop now wakes the worker with a rework message (supervisor.rework). It is told once for each such park, with a key per park. Once the worker pushes a green new head, it gets the merge go as before. No "Merge … or have it reworked?" note is filed any more.
  • If an escalation an earlier loop filed was never answered, it no longer holds or untracks its pull request: the rounds go on. An answered one still counts. A release is the merge go for its head, and any other answer goes to the worker word for word, as before.
  • An approved head followed by more commits still gets a new review, and that path never escalates. There is a regression test for the full approve → new head → changes requested → re-park sequence.

A mid-task agents.problem is a finding, not a decision

  • An unpaired, unforwarded agents.problem is no longer sent to classify, which used to produce "Decide what … does next about its problem (unclassified)?".
  • If it names an issue URL, it is already filed and nothing more happens.
  • If it names none, it goes to the guide's queue to file in its owning repository (supervisor.file, "no decision"). The agent keeps its task, and the classifier never sees it.
  • agents.report without a done, and a park on nothing, are still classified as before.

Guide skill

  • Removed "goes to the person's phone with PushNotification".
  • New rule: each GUIDE DECISION/GUIDE WAITING, and each decision guide next serves, is asked in the question dialog of the conversation the person reads. It is asked one at a time, without waiting for the person to ask. A note that is work (a problem to file) is carried out, not put to the person.
  • A plugin test makes sure no shipped skill mentions a phone or PushNotification, and that the guide skill contains the new rule.

Tests

  • go test ./internal/superloop ./plugin ./cmd: ok
  • golangci-lint run ./internal/superloop/... ./cmd/... ./plugin/...: 0 issues

Written by an agent (a desk worker session).

🤖 Generated with Claude Code

https://claude.ai/code/session_01MK2zsbH97romAFxJkeYUXg

teemow and others added 2 commits November 1, 2026 00:21
…s decisions

Findings that stand with no change-request round left go back to the
worker to rework (supervisor.rework, once per park on the unchanged head)
instead of a "Merge … or have it reworked?" note for guide.person; its
fixed green head gets the merge go. An escalation an earlier loop filed
that nobody answered no longer holds its pull request; answered ones
still count.

An agents.problem logged mid-task is a finding, never a decision: one
naming its issue's URL is filed, one naming none goes to the guide's
queue to file (supervisor.file, no decision); the classifier never sees
it.

The guide skill asks each waiting decision in the question dialog of the
conversation the person reads, one at a time without being asked, and no
longer assumes PushNotification reaches a phone.

Closes #1795

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MK2zsbH97romAFxJkeYUXg
@teemow
teemow requested a review from a team as a code owner October 31, 2026 23:41

@teemow teemow left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: changes requested
Head reviewed: 714510ea98108dc2f701a749feb599636f8ba4ef

CI evidence: gh pr checks 1828 --repo giantswarm/beekeeper --watch --fail-fast exited 0 with every reported check passing. The commit check-runs and combined status APIs confirm these results belong to the exact reviewed head. Platform tests and vet passed: https://github.com/giantswarm/beekeeper/actions/runs/41253564194 . Pre-commit passed: https://github.com/giantswarm/beekeeper/actions/runs/41253564224 . GitHub also reports successful CircleCI statuses, including go-build (https://circleci.com/gh/giantswarm/beekeeper/20943) and test-envtest (https://circleci.com/gh/giantswarm/beekeeper/20947). No CircleCI login or token was used. No local builds, tests, or lint runs were repeated.

The rework transition, continued tracking of unanswered legacy escalations, and guide-dialog instructions address the main cases in #1795. One blocking routing gap remains:

  • [P2] cmd/supervisorloop.go:1203-1208: do not require an existing issue/PR to route an unfiled mid-task finding. agentRef only succeeds for a roster agent with a parked reference, serve record, or issue/PR URL in its task; the fallback likewise only accepts an issue/PR reference. A running agent with a general task can legitimately report, for example, “build slot queue gave up, owning repository giantswarm/beekeeper”, without an existing issue URL. This now produces KindFile, but toFile returns “problem names no issue or pull request” before creating a note. The pass only prints SUPERVISOR FILE FAILED; the finding never reaches the guide or supervisor and retries cannot resolve the missing reference. This leaves precisely the capacity/defect findings the issue asks to route stranded. Provide a durable filing/handoff route based on the owning repository (or another explicit fallback that does not require an already-existing issue/PR), and cover a mid-task problem from an agent whose task and serve record contain no issue/PR reference. This finding follows directly from the planner and early-return path; no local check was necessary.

Written by an agent (independent desk review, round 1).

… issue or pull request

Review finding: toFile refused a problem whose agent's park, serve record
and task name no issue or pull request, so the finding never reached the
guide's queue. The note now links none in that case (note add needs no
--ref for it).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MK2zsbH97romAFxJkeYUXg
@teemow
teemow merged commit d654908 into main Nov 1, 2026
14 checks passed
@teemow
teemow deleted the fix/1795-inner-loop-routing branch November 1, 2026 00:13
teemow added a commit that referenced this pull request Nov 1, 2026
* origin/main:
  fix(supervisor): keep the loop's inner-loop states out of the person's decisions (#1828)
teemow added a commit that referenced this pull request Nov 1, 2026
…-list

* origin/main:
  fix(supervisor): keep the loop's inner-loop states out of the person's decisions (#1828)
teemow added a commit that referenced this pull request Nov 1, 2026
* origin/main:
  fix(supervisor): keep the loop's inner-loop states out of the person's decisions (#1828)
teemow added a commit that referenced this pull request Nov 1, 2026
* origin/main:
  fix(supervisor): keep the loop's inner-loop states out of the person's decisions (#1828)

Signed-off-by: Timo Derstappen <teemow@gmail.com>
teemow added a commit that referenced this pull request Nov 1, 2026
* origin/main:
  fix(capacity): treat an unopened five-hour window as unused (#1808)
  fix(supervisor): keep the loop's inner-loop states out of the person's decisions (#1828)

# Conflicts:
#	README.md
teemow added a commit that referenced this pull request Nov 1, 2026
* origin/main:
  fix(supervisor): keep the loop's inner-loop states out of the person's decisions (#1828)
teemow added a commit that referenced this pull request Nov 1, 2026
* origin/main:
  fix(agents): stop a parked background session once its turn ends (#1825)
  fix(capacity): treat an unopened five-hour window as unused (#1808)
  fix(supervisor): keep the loop's inner-loop states out of the person's decisions (#1828)
  feat(run): add opt-in worktree builder Jobs (#1811)
  fix(agents): tolerate host releases within the execution protocol (#1807)
  feat(supervisor): review only where the desk's team ownership allows it (#1798)
  fix(agents): qualify a bare omp model id from capacity pick as provider/id (#1793)
  fix(watch): --once fires no timer (#1797)
  fix(supervisor): the loop's default classify rule files no decision for what is none (#1794)
  fix(supervisor): review every new head after an approval; act on escalation answers (#1787)
  docs(sessions): describe all supported harnesses (#1792)
  fix(guard): explain when body files must be written (#1791)

# Conflicts:
#	cmd/supervisorloop.go
#	cmd/supervisorloop_test.go
teemow added a commit that referenced this pull request Nov 1, 2026
…iews

* origin/main:
  fix(agents): stop a parked background session once its turn ends (#1825)
  fix(capacity): treat an unopened five-hour window as unused (#1808)
  fix(supervisor): keep the loop's inner-loop states out of the person's decisions (#1828)

# Conflicts:
#	internal/superloop/superloop.go
teemow added a commit that referenced this pull request Nov 1, 2026
* origin/main:
  fix(agents): stop a parked background session once its turn ends (#1825)
  fix(capacity): treat an unopened five-hour window as unused (#1808)
  fix(supervisor): keep the loop's inner-loop states out of the person's decisions (#1828)
  feat(run): add opt-in worktree builder Jobs (#1811)

# Conflicts:
#	cmd/supervisorloop_test.go
teemow added a commit that referenced this pull request Nov 1, 2026
* origin/main:
  fix(note): recover notes after a failed initial status write (#1836)
  fix(supervisor): refill worker capacity on every loop pass (#1826)
  feat(board): tidy closed items to Done and archive them after a grace (#1790)
  chore(deps): update gsoci.azurecr.io/giantswarm/architect docker tag to v8.6.31 (#1815)
  fix(agents): stop a parked background session once its turn ends (#1825)
  fix(capacity): treat an unopened five-hour window as unused (#1808)
  fix(supervisor): keep the loop's inner-loop states out of the person's decisions (#1828)
  feat(run): add opt-in worktree builder Jobs (#1811)

# Conflicts:
#	CHANGELOG.md
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.

guide and supervisor loop: the person gets inner-loop notes, no dialog, and a phone push they never see

1 participant