Skip to content

Rename a task - #5

Merged
klind merged 2 commits into
mainfrom
agentsatwork/SAMPLE-9
Oct 17, 2026
Merged

klind merged 2 commits into
mainfrom
agentsatwork/SAMPLE-9

Conversation

@klind

@klind klind commented Oct 12, 2026

Copy link
Copy Markdown
Owner

Spec SAMPLE-9.

What was asked

Let a client change the title of a task.

  • PATCH /tasks/:id with a JSON body { "title": "<new title>" } changes the task's title and answers 200 with the task.
  • An unknown id answers 404, as the other task endpoints do.
  • A missing, empty, or non-text title answers 400 and changes nothing, by the same rule as adding a task.
  • The task's id and whether it is done stay as they are.
  • Add a method on TaskList that renames a task, and use it from the server.
  • Add tests for the method and for the endpoint.
  • List the endpoint in the README's table.

Review

2 review rounds by: reviewer.

Declined by the engineer, for a reason the reviewer accepted:

  • Medium CHANGELOG.md:8: The new changelog line does not end with the pull request's number, so the CI changelog step will fail on the pull request. (reviewer-1-1). The engineer: The finding is right that the line needs ' (#N)', but it cannot be done at this point: the pull request does not exist yet. Branch agentsatwork/SAMPLE-9 has no remote counterpart (only SAMPLE-4 and SAMPLE-7 are on origin), nothing in .agent/ or the environment carries a number, and I am not allowed to call the code host to look one up. The finding itself says the fix applies 'once the pull request exists'. Guessing the next number is unsafe: other branches (SAMPLE-3 to SAMPLE-8) may open pull requests first, and a wrong number fails the same CI step while leaving a false reference in CHANGELOG.md. No code was changed and nothing was committed; build and all 16 tests pass. To settle this, the pipeline needs to supply the pull request number (or run this fix step after opening the pull request), and then the line '- PATCH /tasks/:id changes a task's title, body {"title": "..."}.' in CHANGELOG.md gets ' (#N)' appended.

The last review left nothing open.


Opened by AgentsAtWork.

klind and others added 2 commits October 12, 2026 21:34
PATCH /tasks/:id with a body {"title": "..."} renames a task and answers
200 with it. An unknown id answers 404, and a missing, empty, or non-text
title answers 400 and leaves the task as it was.

TaskList.rename does the work. The title rule moves out of add into one
function that both add and rename call, so a rename is checked and trimmed
exactly as a new task is. The id and done stay untouched.

The changelog line has no pull request number yet, because the number is
not known before the pull request is opened.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The build check's "Changelog entry" step failed: CHANGELOG.md had no new
line ending with (#5). The line for PATCH /tasks/:id was written before
the pull request existed, so it had no number. It now ends with (#5).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@klind
klind merged commit 2099cc8 into main Oct 17, 2026
1 check passed
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