Repository navigation
PRD stories US-01 to US-11, US-13, US-14: raw SQL, CRUD, attempts, review queue, Bruno, README - #28
Merged
Merged
Conversation
…-02, US-03)
- GET /health; the API refuses to start without DATABASE_URL
- schema.sql with NOT NULL, CHECK, UNIQUE (title, platform) and
ON DELETE CASCADE, run on startup
- repository.py: the only place with SQL, always parameterized (psycopg);
replaces the SQLAlchemy ORM, as the PRD requires
- services.py domain errors + errors.py handlers: every error is
{error, message} (+ fields on 422) with the right status
- tests run on a separate test database; CI gets a PostgreSQL service
- placeholder routes / and /about and the old review list are removed
Part of #13, #14, #15
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- POST /problems: title/topic trimmed, topic lowercased, 409 when the
title already exists on the same platform
- GET /problems with optional topic, difficulty and platform filters
- GET, PATCH (only the fields sent, at least one) and DELETE (204,
attempts deleted by cascade) on /problems/{problem_id}
- Bruno Problems folder with response tests; Create problem saves
problem_id for the next requests
Part of #16, #17, #18, #19, #20
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- POST /problems/{problem_id}/attempts: minutes 1-600, confidence 1-5,
solved strictly true/false, notes optional (default "", max 500),
created_at is today's date; 404 if the problem doesn't exist
- GET /problems/{problem_id}/attempts: newest first, [] without attempts
- Bruno Attempts folder with response tests
Part of #21, #22
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- one request per error code (404, 405, 409, 422) with response tests - folders ordered Health, Problems, Attempts, Errors (folder.bru seq), so the Runner creates the problem before the requests that use it Part of #25 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- review.py: pure functions; urgency = +50 if not solved, +10 per confidence point below 5, +1 per day since the attempt (max 30) - repository.latest_attempts: newest attempt per problem (DISTINCT ON); problems without attempts are left out - GET /review?limit=5 (1-50): highest score first, ties by smaller id - Bruno Insights folder (/review and /review?limit=2), Errors moved last - README: endpoint, formula, example, and why sorted over heapq (O(n log n) vs O(n log k)) Part of #23 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Kauakb
added a commit
that referenced
this pull request
Oct 31, 2026
…3 to US-15) (#31) Release of the Interview Preparation Tracker v1.0 (PRD) from `develop` to `main`. ## What's in it Everything from #28: - **US-01** `GET /health`; the API refuses to start without `DATABASE_URL` - **US-02** PostgreSQL with hand-written SQL (`schema.sql`, `repository.py`); tests on a separate database - **US-03** standard error JSON (`NOT_FOUND`, `METHOD_NOT_ALLOWED`, `CONFLICT`, `VALIDATION_ERROR`, `INTERNAL_ERROR`) - **US-04 to US-08** problems CRUD with filters, 404 and 409 - **US-09, US-10** attempts and history - **US-11** review queue `GET /review?limit=5` with the PRD formula - **US-13** complete Bruno collection (15 requests, all passing in the Runner) - **US-14** README - **US-15** CI: ruff, pytest (with a PostgreSQL service) and pip-audit ## Checks - 56 pytest tests, ruff and pip-audit pass. CI was green on #28. - Bruno Runner: 15/15 passed. ## Not included - **US-12** statistics by topic (#24), a "Could" story. Not built. - **US-14** stays open until the README is checked in a fresh clone (T-14.2) and the demo is ready (T-14.3). Closes #13 Closes #14 Closes #15 Closes #16 Closes #17 Closes #18 Closes #19 Closes #20 Closes #21 Closes #22 Closes #23 Closes #25 Closes #27 Part of #26
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements the PRD's Must stories (US-01 to US-10, US-13, US-14) and the Should story US-11 (review queue). Only US-12 (stats, Could) is not included.
Review it commit by commit
0374f2c/health+DATABASE_URL, US-02 raw SQL (schema.sql,repository.py, test database), US-03 standard errors22e2c4c0e904c5319a90e2af80b5df8f658GET /reviewwith the PRD formula, Bruno Insights folder, README section (formula,sortedvsheapq)Big changes
repository.py, always with parameters.main.py) → service (services.py) → repository (repository.py).topic,UNIQUE (title, platform),created_atas a date,ON DELETE CASCADE.TEST_DATABASE_URL). CI gets apostgres:18service./and/aboutand the old review list are removed.Checks
ruff check,ruff format --check,pytest(56 tests) andpip-auditpass locally.Part of #13, #14, #15, #16, #17, #18, #19, #20, #21, #22, #23, #25, #26, #27. The issues close with the
develop→mainPR.🤖 Generated with Claude Code