Skip to content

feat(daemon): dispatch only Todo and stop declined issues before the claim (AGT-4784) - #846

Merged
unohee merged 1 commit into
mainfrom
fix/agt-4784-readiness-gate
Oct 21, 2026
Merged

unohee merged 1 commit into
mainfrom
fix/agt-4784-readiness-gate

Conversation

@unohee

@unohee unohee commented Oct 21, 2026

Copy link
Copy Markdown
Collaborator

Summary

On 2026-10-20 the daemon opened sessions on 52 cgf-portal issues in one night: 9 out-of-scope-labelled Backlog issues, 4 whose own title said a decision was pending, a production deploy, a local-cleanup chore. Every rule that would have stopped them already existed; none ran in front of the claim, and the default turned the Backlog rule off.

  • autonomous.includeBacklog now defaults to false (schema, DecisionEngine, runner). Moving an issue to Todo is the ready signal. This reverses AGT-4257's default.
  • readinessGate.ts (evaluateReadiness, partitionByReadiness): tracker state, then a person's exclusion label, then a grooming verdict. Reuses isActionableLinearState and humanOwnedReason. An explicit dispatch passes all of it.
  • Heartbeat: the gate runs before filterAlreadyProcessed, so a Backlog issue never reaches idle fill (which would lift a park on it).
  • Claim time: detectSafeCandidateIds reads the pre-admission draft's scope verdict before the claim. The draft is already computed and cached there, so a held issue costs no model call later. One comment, with the same stable marker the worker-start gate uses.
  • Drafter: new decision_pending verdict kind.

Needs the operator

  • vela (and any deployment that relied on free slots chewing the Backlog) must set includeBacklog: true, or it will idle after the next deploy.
  • cgf-portal config twin (not applied here): add 추가 유지보수 to autonomous.skip.labels and 결정, 설계 결정, 배포, 운영 to skip.titleTags. The defaults hold only swarm:skip and three tags.

Verification

  • Local npm run ci passes. Full test:coverage: 7846 passed, 2 failed in src/verify/runner.test.ts (headStatus: 'infra', verify sandbox). They pass alone (51/51) and touch nothing in this diff; I did not relax any timeout. CI decides.
  • Mutations: bypassing the claim-time gate, dropping the heartbeat partition, and restoring either default to true each fail a new test.
  • Factory harness C3: 2/2 pass; without the module the 21-issue replay fails.
  • The AGT-4682 heartbeat test used Backlog as its default fixture state and asserted the old behaviour; it now uses Todo and has a new Backlog opt-in assertion.

Not covered

  • The verdict exists only for a project with a standing goal.
  • An answer given only as a comment does not change the draft (fingerprint = title + description); edit the description to release a held issue.
  • In Progress and In Review keep resuming as before.
  • backlogGrooming, if enabled, still promotes Backlog to Todo by itself.
  • decision_pending is prompt-only and not live-fired against a model.

…claim (AGT-4784)

includeBacklog now defaults to false: moving an issue to Todo is the ready
signal. A readiness gate (state, exclusion label, grooming verdict) runs ahead
of idle fill, and the draft's scope verdict is read before the claim instead of
after a worker has started. The drafter gains a decision_pending verdict.
@unohee
unohee merged commit ac68390 into main Oct 21, 2026
7 checks passed
@unohee
unohee deleted the fix/agt-4784-readiness-gate branch October 21, 2026 17:54
unohee added a commit that referenced this pull request Oct 22, 2026
Fingerprint now ignores the appended comment history so an unchanged issue
stays held, and a declined draft is kept on the task so the pre-claim hold can
see it. Fences reach ollama-cloud direct, tester, documenter, auditor,
skill-documenter and openswarm work. Provider switches and fanout candidates
obey the delegated-adapter policy. exec answer rejects --text without
--correlation, redeploys to the run's project, and releases a hold when the
deploy is refused. The disk gate also measures the state DB volume.
unohee added a commit that referenced this pull request Oct 22, 2026
Fingerprint now ignores the appended comment history so an unchanged issue
stays held, and a declined draft is kept on the task so the pre-claim hold can
see it. Fences reach ollama-cloud direct, tester, documenter, auditor,
skill-documenter and openswarm work. Provider switches and fanout candidates
obey the delegated-adapter policy. exec answer rejects --text without
--correlation, redeploys to the run's project, and releases a hold when the
deploy is refused. The disk gate also measures the state DB volume.
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