Commit Graph
2 Commits
Author SHA1 Message Date
CatoandClaude 7dd29e12df fix(one-off): a fresh session stays one-off: nothing of the shared session goes in, nothing of it comes back (#1665)
Found by a review of the merged fresh-session change (2026-11-12):

- A retry (automatic after a refusal, or from Watch) re-sent a one-off as an
  ordinary message, into the shared session. It is retried as a one-off.
- /api/control closed the project's newest run from the SHARED session's
  handoff without checking whether it was a lane run, so a one-off could be
  closed with the shared session's summary, announced to its caller, and
  left running. A lane run closes only from its own session file.
- A one-off's prompt carried the project's escalation note ("diagnose the
  last failure") and, on the local runtime, the shared session's last
  handoff and an instruction to update the shared session file.
- A one-off's close advanced or cleared the project's escalation ladder.
- On the local runtime the shared tab's prompt and handshake files were
  written for a one-off, even when the request was then refused.
- OrangeCat's separateSession asked for a lane, which quietly queued in the
  shared session when no lane was free. It is a fresh session now: a
  session of its own, or a refusal with the reason.

scripts/test/one-off-stays.ts.


Claude-Session: https://claude.ai/code/session_019MDtmtHxn2FxY2x8pJ83Xj

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-12 10:37:12 +01:00
CatoandClaude 663661c565 fix(inject): a read-only probe ends Done on the builder it asked for, and a refusal by choice is not a failure (#1667)
* fix(inject): a read-only probe ends Done on the builder it asked for, and a refusal by choice is not a failure

Found by a review of the probe path end to end (2026-11-12):

- Every run's status went through the feedback-fix mapper, which calls a
  run that finished well with no pull request "Needs you, nothing shipped".
  A git status probe ended there. Only a feedback fix owes a change; any
  other run that finished well with nothing pushed is Done, cause
  finished_no_change (canonicalStatus expectsChange, from run-track-load).
- Neither POST /api/inject nor MCP loki_dispatch could ask for the cloud
  builder: zod drops unknown keys, so builderChannel vanished without a word.
  Both take it now (builderChannel / builder).
- A fresh session refused for lack of a free lane was closed as a failing
  run and advanced the escalation ladder; four of them paged the owner with
  no agent ever run. That refusal no longer counts.

scripts/test/probe-path.ts.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmtHxn2FxY2x8pJ83Xj

* test: two text pins follow the new shape of the inject route and the refusal close

busy-placement read the inject route's call on one line; refused-dispatch-
closes-run read closeRunUndelivered with a one-key options object. Both still
assert the same thing: the route passes session on, and a refused dispatch
closes its run quietly before the failure is reported.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmtHxn2FxY2x8pJ83Xj

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-12 10:05:53 +01:00