Skip to content

workstreams v5 F-tasks: running means a doer is at work; a comment never reopens; Send back (engine) - #2690

Merged
santoshkumarradha merged 2 commits into
santosh/workfrom
v5/ftasks-engine
Nov 16, 2026
Merged

santoshkumarradha merged 2 commits into
santosh/workfrom
v5/ftasks-engine

Conversation

@santoshkumarradha

Copy link
Copy Markdown
Member

Fix lane F-tasks (Workstreams v5, live use), engine and org-server half. The desk half is Agent-Field/codeaf-desk#481. I reproduced each fix on origin/santosh/work b8cb272 first: Released and StartAll set TaskRunning, and Note reopened a done task.

What changed

  • L1 F5, L2 Restore one-shot linear exec harness #4, L4 B6: running means a doer is at work.
    • factory.Released no longer flips an Afi or chat task to running. On the server, a tick leaves the released task up_next and untouched, and its thread gains "Ready to start: X is done".
    • factory.StartAll and POST .../tasks/start_all name the group's ready tasks. They write nothing and publish nothing.
    • Whoever wakes the doer sets running. On a Personal workstream that is the desk's Start. On an organization nothing can wake the server's agent yet, so the desk shows no Start. The task waits in Up next, and its owner can Mark done or Stop it.
  • L4 F3: factory.Note. A comment or a post never changes a task's state.
  • L2 ci: publish cross-platform binaries on every merge #8: Send back. In ApplyPatch, state: up_next on a done task counts as Send back when someone other than the owner sets it, or when it comes with a state_reason. Anyone who edits may do it, including on a person task. The thread line and state_reason read "Sent back by : ", and the owner's next tick clears it.
  • Docs.
    • PROTOCOL.md: _task_update, _task_comment and _tasks_start_all are described as above.
    • Manual: internal/manual/chat/organization-workstream-tasks.md replaces "replying reopens it" with Send back. It also gains four sections, in the asker's words:
      • "does a comment reopen a done task?"
      • "Start — why a task … stays in Up next, Mark done"
      • "due date — pick any day"
      • "set what a task waits on — More › Waiting on"
  • SPEC. No new wire names; state_reason already exists. SPEC §2.2's "Replying on a done task reopens it" no longer holds: Send back replaces it.

Proof

  • Regression tests: each one fails on b8cb272 and passes here.
    • internal/factory: TestACommentOnADoneTaskNeverReopensIt, TestSendBackReopensADoneTaskAndSaysWhoAndWhy, TestStartAllNamesAGroupsReadyTasksAndStartsNone, and the tick test, which now expects the released task to stay up next.
    • internal/factory/serve, over the wire: TestACommentNeverReopensADoneTaskAndSendBackDoes, TestStartAllNamesTheGroupOverTheWireAndStartsNone, and the tick test, which now checks the "Ready to start" line.
  • Gate: make pr-ready BASE=origin/santosh/work.

santoshkumarradha and others added 2 commits November 16, 2026 16:14
…ver reopens; Send back

Live use (L1 F5, L2 #4 and #8, L4 B6 and F3) on b8cb272.

- factory.Released and factory.StartAll no longer flip an Afi or chat
  task to running. The org server's tick leaves a released task up next
  with "Ready to start: X is done", and start_all names the ready tasks
  and writes nothing. Whoever wakes the doer sets running; on the desk
  that is Start (Personal) and, for an organization, nothing yet, so
  the task waits in Up next and its owner can Mark done or Stop.
- factory.Note: a comment or a post never changes a task's state.
- ApplyPatch: Send back, state up_next on a done task by someone other
  than its owner or with a state_reason, is allowed to anyone who
  edits; the thread and state_reason read "Sent back by <name>: <why>".
- The manual (organization-workstream-tasks.md) and PROTOCOL.md say so.

Assisted-by: CodeAF
Co-Authored-By: CodeAF <[email protected]>
@santoshkumarradha
santoshkumarradha merged commit 6700048 into santosh/work Nov 16, 2026
1 check passed
@santoshkumarradha
santoshkumarradha deleted the v5/ftasks-engine branch November 16, 2026 21:21
santoshkumarradha added a commit that referenced this pull request Nov 16, 2026
… all starts a batch

Since #2690 Start all on the org server names the ready tasks and starts none.

Assisted-by: CodeAF
Co-Authored-By: CodeAF <[email protected]>
santoshkumarradha added a commit that referenced this pull request Nov 16, 2026
… all starts a batch

Since #2690 Start all on the org server names the ready tasks and starts none.

Assisted-by: CodeAF
Co-Authored-By: CodeAF <[email protected]>
santoshkumarradha added a commit that referenced this pull request Nov 16, 2026
… all starts a batch

Since #2690 Start all on the org server names the ready tasks and starts none.

Assisted-by: CodeAF
Co-Authored-By: CodeAF <[email protected]>
ZeroPoint95 pushed a commit that referenced this pull request Nov 24, 2026
…ver reopens; Send back (engine) (#2690)

* workstreams v5 F-tasks: running means a doer is at work; a comment never reopens; Send back

Live use (L1 F5, L2 #4 and #8, L4 B6 and F3) on b8cb272.

- factory.Released and factory.StartAll no longer flip an Afi or chat
  task to running. The org server's tick leaves a released task up next
  with "Ready to start: X is done", and start_all names the ready tasks
  and writes nothing. Whoever wakes the doer sets running; on the desk
  that is Start (Personal) and, for an organization, nothing yet, so
  the task waits in Up next and its owner can Mark done or Stop.
- factory.Note: a comment or a post never changes a task's state.
- ApplyPatch: Send back, state up_next on a done task by someone other
  than its owner or with a state_reason, is allowed to anyone who
  edits; the thread and state_reason read "Sent back by <name>: <why>".
- The manual (organization-workstream-tasks.md) and PROTOCOL.md say so.

Assisted-by: CodeAF
Co-Authored-By: CodeAF <[email protected]>

* changes: 2690 a workstream task is running only while something does it

Assisted-by: CodeAF
Co-Authored-By: CodeAF <[email protected]>

---------

Co-authored-by: CodeAF <[email protected]>
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