Run artifact

workspace/targets/ReadingList/evidence/block-3.md

Evidence: Block 3 · Service (block-3)

Stories built

Acceptance tooling authorization

Stacked context

Build directory changes

Pre-build acceptance observation

intent: POST /books answers 201 and returns the title and author that were supplied, with an id. return code: 1 stderr: Traceback (most recent call last): File "addbook-create.py", line 10, in <module> assert response.status_code == 201 ^^^^^^^^^^^^^^^^^^^^^^^^^^^ AssertionError

intent: A submitted book is read back from the store with the supplied title and author. return code: 1 stderr: Traceback (most recent call last): File "addbook-persisted.py", line 9, in <module> assert response.status_code == 201 ^^^^^^^^^^^^^^^^^^^^^^^^^^^ AssertionError

intent: Two books added in sequence receive ascending ids, preserving insertion order. return code: 1 stderr: Traceback (most recent call last): File "addbook-ascending-ids.py", line 9, in <module> assert response.status_code == 201 ^^^^^^^^^^^^^^^^^^^^^^^^^^^ AssertionError

intent: GET /books returns the books added during the check in the order they were added. return code: 1 stderr: Traceback (most recent call last): File "listbooks-order.py", line 10, in <module> assert response.status_code == 201 ^^^^^^^^^^^^^^^^^^^^^^^^^^^ AssertionError

intent: Each listed book carries the supplied title and author and its id. return code: 1 stderr: Traceback (most recent call last): File "listbooks-fields.py", line 10, in <module> assert response.status_code == 201 ^^^^^^^^^^^^^^^^^^^^^^^^^^^ AssertionError

intent: GET /books is reachable and returns a JSON array even when no check data exists. return code: 1 stderr: Traceback (most recent call last): File "listbooks-reachable.py", line 4, in <module> assert response.status_code == 200 ^^^^^^^^^^^^^^^^^^^^^^^^^^^ AssertionError

intent: Removing an added book answers 204 and the book is absent from the next list read. return code: 1 stderr: Traceback (most recent call last): File "remove-book-deletes.py", line 8, in <module> assert created.status_code == 201 ^^^^^^^^^^^^^^^^^^^^^^^^^^ AssertionError

intent: Removing an id that does not exist answers 404, and removing the same id twice answers 404 the second time. return code: 1 stderr: Traceback (most recent call last): File "remove-book-unknown-id.py", line 7, in <module> assert created.status_code == 201 ^^^^^^^^^^^^^^^^^^^^^^^^^^ AssertionError

intent: Removing the middle book leaves the other books in the order they were added. return code: 1 stderr: Traceback (most recent call last): File "remove-book-preserves-order.py", line 10, in <module> assert resp.status_code == 201 ^^^^^^^^^^^^^^^^^^^^^^^ AssertionError

intent: POST /books with an empty title answers 400 and stores nothing. return code: 1 stderr: Traceback (most recent call last): File "reject-empty-title.py", line 8, in <module> assert response.status_code == 400 ^^^^^^^^^^^^^^^^^^^^^^^^^^^ AssertionError

intent: POST /books with an empty author answers 400 and stores nothing. return code: 1 stderr: Traceback (most recent call last): File "reject-empty-author.py", line 8, in <module> assert response.status_code == 400 ^^^^^^^^^^^^^^^^^^^^^^^^^^^ AssertionError

intent: POST /books with both fields empty answers 400 and stores nothing. return code: 1 stderr: Traceback (most recent call last): File "reject-both-empty.py", line 8, in <module> assert response.status_code == 400 ^^^^^^^^^^^^^^^^^^^^^^^^^^^ AssertionError

intent: Whitespace-only and missing fields are rejected with 400 and nothing is stored. return code: 1 stderr: Traceback (most recent call last): File "reject-whitespace-and-missing.py", line 15, in <module> assert response.status_code == 400 ^^^^^^^^^^^^^^^^^^^^^^^^^^^ AssertionError

intent: validate_book_input raises ValueError for an empty title or author. return code: 1 stderr: Traceback (most recent call last): File "reject-validator.py", line 1, in <module> from app_server.services.books import validate_book_input
ModuleNotFoundError: No module named 'app_server.services'

intent: A submission with both fields present is still accepted with 201 after validation is in place. return code: 1 stderr: Traceback (most recent call last): File "reject-valid-still-accepted.py", line 9, in <module> assert response.status_code == 201 ^^^^^^^^^^^^^^^^^^^^^^^^^^^ AssertionError

Post-build programmatic acceptance

intent: POST /books answers 201 and returns the title and author that were supplied, with an id. target interpreter: /mnt/c/Users/barlo/projects/drydock/uat/ReadingList/runs/20261023.174350/build/ReadingList/.venv/bin/python provisioning: not required return code: 0

intent: A submitted book is read back from the store with the supplied title and author. target interpreter: /mnt/c/Users/barlo/projects/drydock/uat/ReadingList/runs/20261023.174350/build/ReadingList/.venv/bin/python provisioning: not required return code: 0

intent: Two books added in sequence receive ascending ids, preserving insertion order. target interpreter: /mnt/c/Users/barlo/projects/drydock/uat/ReadingList/runs/20261023.174350/build/ReadingList/.venv/bin/python provisioning: not required return code: 0

intent: GET /books returns the books added during the check in the order they were added. target interpreter: /mnt/c/Users/barlo/projects/drydock/uat/ReadingList/runs/20261023.174350/build/ReadingList/.venv/bin/python provisioning: not required return code: 0

intent: Each listed book carries the supplied title and author and its id. target interpreter: /mnt/c/Users/barlo/projects/drydock/uat/ReadingList/runs/20261023.174350/build/ReadingList/.venv/bin/python provisioning: not required return code: 0

intent: GET /books is reachable and returns a JSON array even when no check data exists. target interpreter: /mnt/c/Users/barlo/projects/drydock/uat/ReadingList/runs/20261023.174350/build/ReadingList/.venv/bin/python provisioning: not required return code: 0

intent: Removing an added book answers 204 and the book is absent from the next list read. target interpreter: /mnt/c/Users/barlo/projects/drydock/uat/ReadingList/runs/20261023.174350/build/ReadingList/.venv/bin/python provisioning: not required return code: 0

intent: Removing an id that does not exist answers 404, and removing the same id twice answers 404 the second time. target interpreter: /mnt/c/Users/barlo/projects/drydock/uat/ReadingList/runs/20261023.174350/build/ReadingList/.venv/bin/python provisioning: not required return code: 0

intent: Removing the middle book leaves the other books in the order they were added. target interpreter: /mnt/c/Users/barlo/projects/drydock/uat/ReadingList/runs/20261023.174350/build/ReadingList/.venv/bin/python provisioning: not required return code: 0

intent: POST /books with an empty title answers 400 and stores nothing. target interpreter: /mnt/c/Users/barlo/projects/drydock/uat/ReadingList/runs/20261023.174350/build/ReadingList/.venv/bin/python provisioning: not required return code: 0

intent: POST /books with an empty author answers 400 and stores nothing. target interpreter: /mnt/c/Users/barlo/projects/drydock/uat/ReadingList/runs/20261023.174350/build/ReadingList/.venv/bin/python provisioning: not required return code: 0

intent: POST /books with both fields empty answers 400 and stores nothing. target interpreter: /mnt/c/Users/barlo/projects/drydock/uat/ReadingList/runs/20261023.174350/build/ReadingList/.venv/bin/python provisioning: not required return code: 0

intent: Whitespace-only and missing fields are rejected with 400 and nothing is stored. target interpreter: /mnt/c/Users/barlo/projects/drydock/uat/ReadingList/runs/20261023.174350/build/ReadingList/.venv/bin/python provisioning: not required return code: 0

intent: validate_book_input raises ValueError for an empty title or author. target interpreter: /mnt/c/Users/barlo/projects/drydock/uat/ReadingList/runs/20261023.174350/build/ReadingList/.venv/bin/python provisioning: not required return code: 0

intent: A submission with both fields present is still accepted with 201 after validation is in place. target interpreter: /mnt/c/Users/barlo/projects/drydock/uat/ReadingList/runs/20261023.174350/build/ReadingList/.venv/bin/python provisioning: not required return code: 0

Build summary

Block 3 is the four book stories: the service layer, the /books routes, and their tests. bin/test.sh belongs to a later story, so I'll leave it alone. Before writing anything, I'll confirm the existing suite runs in this environment.Baseline is 25 passing. No new dependencies are needed, so I'll write the service layer first.I split the Flask import across two lines in the routes file. I'll merge it, then wire the blueprint into the factory.The app-shell test asserts that only /health is registered, which this block changes by design. I'll update it to the expected route set, then add an isolated-store fixture to conftest so the HTTP tests can cover an empty list and reopening the store.The fixtures are in place. I'll add a fresh_db handle fixture, then write the service-level and HTTP-level tests. Each test reads state back through the public interface.I wrote the first list-order test sloppily (a confusing title set and a [-3:] slice). The store is fresh, so the assertion can be exact. I'll fix that and drop an unused fixture parameter.All test modules are written. Now I'll run the full suite.All 75 pass. Next I'll run the declared acceptance criteria from the four feature specs. I'm extracting them to a scratch directory outside the build tree and running each against the project.My extraction kept the Intent:/Requires:/Suite: header lines, which are not Python. I'll strip those and re-run.-I also ignores PYTHONPATH, so the import failed. I'll keep -I and put the project root on sys.path from a small driver instead.All 15 declared criteria pass. Last step is confirming that only the intended files changed and that nothing under sources/ was touched.RESULT: SUCCESS

FILES CHANGED:

SUMMARY: Block 3 implements the four book stories on top of the block 1–2 foundation.

Results:

Choices I made that you may want to change:

BLOCKERS:

<blueprint-decisions> [{"spec":"FEATURE-RejectEmptyFields.md","severity":"Low","subject":"Validation error message format","decision":"Missing, non-string, or whitespace-only fields produce 'title must be non-empty text' (or 'title and author must be non-empty text' when both fail). This names the field and is human-readable, as the spec requires. Acceptable, or should the wording change on replan?"}] </blueprint-decisions>