Skip to content

Count the tasks - #1

Merged
klind merged 1 commit into
mainfrom
agentsatwork/SAMPLE-4
Oct 4, 2026
Merged

klind merged 1 commit into
mainfrom
agentsatwork/SAMPLE-4

Conversation

@klind

@klind klind commented Oct 4, 2026

Copy link
Copy Markdown
Owner

Spec SAMPLE-4.

What was asked

Add an endpoint that says how many tasks there are.

  • GET /tasks/count answers 200 with {"total": <number of tasks>, "done": <number of tasks marked done>}.
  • Add a method on TaskList that returns those two numbers, and use it from the server.
  • Add tests for the method and for the endpoint.
  • List the endpoint in the README's table.

Review

1 review round by: reviewer.

The last review found nothing.


Opened by AgentsAtWork.

SAMPLE-4 asks for an endpoint that says how many tasks there are.
TaskList.count() returns { total, done }, and the server sends it as
the body of GET /tasks/count. The route is matched before the id
parsing, which would otherwise answer 404 for the segment 'count'.

Tests cover the method and the endpoint, and the README's table and
the route list in server.ts name the new endpoint.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@klind
klind merged commit cfe83ce into main Oct 4, 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