Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f371d15c18 |
No files matched your search
@@ -0,0 +1,44 @@
|
||||
# M1: Setup Git Project - Score Report
|
||||
|
||||
**Model:** qwen3.8-27b
|
||||
**Repository scored:** `../newz` (`/home/daniel/Gitea/daniel/newz`), recreated repo
|
||||
**Origin:** `https://gitea.samson.media/daniel/newz-qwen-27b.git`
|
||||
**Rubric:** `milestone/m1-setup-git-project-scoring.md`
|
||||
|
||||
## Total Score: 7 / 9 (Overall level 1 - partial)
|
||||
|
||||
The only deduction is the repository name. The project is "newzy" and the README title says so, but the repo is `newz` locally and `newz-qwen-27b` on origin. This is the same judgment used for the qwen3.5-9b run, so the two scores are comparable. If the name is accepted as-is, the score is 9 / 9.
|
||||
|
||||
## Verification Performed
|
||||
|
||||
| Check | Result |
|
||||
|---|---|
|
||||
| `git ls-remote origin` | `main` and `develop` both point to `357a721`, matching local. |
|
||||
| `main` vs `develop` | Identical (single commit `357a721 chore: initial project setup for newzy`). |
|
||||
| Tracked files | 9 files, all committed in the initial commit. |
|
||||
| `.gitignore` | Present. Excludes `node_modules`, `.env*` (with `!.env.example` exception), logs, build output, IDE files, OS files, `data/`, and DB files. |
|
||||
| `.env.example` | Not ignored (the `!.env.example` rule takes effect). |
|
||||
| `hooks/pre-push` | Present and executable in the repo, but **inactive**: `core.hooksPath` is not set. CONTRIBUTING says to run `git config core.hooksPath hooks` per clone. |
|
||||
| Prompt parity | `milestones/m1-setup-git-project-prompt.md` is byte-identical to the copy in the benchmark repo. |
|
||||
|
||||
## Scoring by Criterion
|
||||
|
||||
| Criterion | Score | Max | Notes |
|
||||
|---|---|---|---|
|
||||
| Repository Setup | 0 | 2 | Repo is named `newz` / `newz-qwen-27b`, not `newzy`. `.gitignore` and an initial commit are present, so the only failing check is the name. |
|
||||
| Branch Strategy | 2 | 2 | `main` and `develop` both exist on local and origin, at the same commit. `docs/branching.md` documents the model, feature/bugfix/hotfix flows, and merge and rebase procedures. |
|
||||
| Documentation Files | 3 | 3 | `.gitignore`, `README.md` (52 lines, quick start and status table), `CONTRIBUTING.md` (104 lines, workflow, review, releasing), and `LICENSE` (MIT, 2026). Plus `docs/` with `branching.md` (89 lines), `commits.md` (81 lines), and `conventions.md` (57 lines). |
|
||||
| Git Best Practices | 2 | 2 | `docs/commits.md` explains Conventional Commits with an allowed-types table, six sample messages (including a breaking change), and rules of thumb. Merge and rebase workflows are in `docs/branching.md`. |
|
||||
| **Total** | **7** | **9** | |
|
||||
|
||||
## Other Observations
|
||||
|
||||
- The README quick start clones `newz-qwen-27b.git` into a directory named `newzy`. That is internally consistent, but it does not match the repo name, so new contributors will see two names.
|
||||
- The pre-push hook is versioned but does nothing until each clone runs `git config core.hooksPath hooks`. The rubric lists "pre-push hooks for code quality checks" as a git configuration requirement, so enabling it by default (for example, a setup script or `make` target) would close that gap.
|
||||
- The `hooks/pre-push` script is a no-op because there is no `package.json` yet, which matches the documented behaviour.
|
||||
- Commit identity is `Daniel Samson <daniel@samson.media>`, correctly configured.
|
||||
|
||||
## Path to a Higher Score
|
||||
|
||||
1. Rename the repository and the origin remote to `newzy`, so the directory, remote, and README agree.
|
||||
2. Document how to activate the hooks in one step, or add a setup target that runs `git config core.hooksPath hooks`.
|
||||
@@ -0,0 +1,56 @@
|
||||
# M2: Setup Backend - Score Report
|
||||
|
||||
**Model:** qwen3.8-27b
|
||||
**Repository scored:** `../newz` (`/home/daniel/Gitea/daniel/newz`), committed HEAD `9a6f75e` on `feature/setup-backend`
|
||||
**Rubric:** `milestone/m2-setup-backend-scoring.md`
|
||||
|
||||
## Total Score: 24 (21 / 25 base + 3 bonus) - Overall level 2
|
||||
|
||||
The committed backend is complete and runs. The points lost are a missing cascade configuration on the relationships and a few endpoints the M2 prompt does not require.
|
||||
|
||||
## Verification Performed
|
||||
|
||||
| Check | Result |
|
||||
|---|---|
|
||||
| `git archive HEAD backend` → clean venv from `requirements.txt` → `pytest` | **19 passed**, 1 warning, **95% coverage** (400 statements, 21 missed). |
|
||||
| `uvicorn main:app` on the committed tree | `GET /health` 200 `{"status":"ok","version":"0.1.0"}`; `GET /api/v1/health` 200; `GET /api/v1/version` 200 `{"app":"newzy","version":"0.1.0"}`; unknown route 404 with `{"detail":"Not Found","code":"not_found"}`. |
|
||||
| `docker build` of `backend/Dockerfile` | **Succeeds.** |
|
||||
| `docker run` of the built image | `/health` and `/api/v1/version` both return 200. |
|
||||
| Prompt parity | `milestones/m2-setup-backend-prompt.md` is byte-identical to the benchmark copy. |
|
||||
| Remote | `origin/main` and `origin/develop` are still at the M1 commit. **The M2 commit exists only on the local `feature/setup-backend` branch and is not pushed.** |
|
||||
|
||||
## Scoring by Criterion
|
||||
|
||||
| Criterion | Score | Max | Notes |
|
||||
|---|---|---|---|
|
||||
| Application Structure | 2 | 2 | `core/`, `api/v1/`, `db/`, `models/`, `schemas/`, `tests/` (conftest, test_health, test_version, test_models), `main.py`, `config.py`, `requirements.txt`, `Dockerfile`, `.gitignore`, `pytest.ini`, `README.md`. |
|
||||
| Database Setup | 2 | 2 | SQLAlchemy 2.0 engine from `DATABASE_URL`, parent directory auto-created, `PRAGMA foreign_keys=ON` on every SQLite connection, `./data/db` bind-mounted in compose, and `VOLUME /app/data/db` in the Dockerfile. |
|
||||
| Models Implementation | 2 | 3 | Article, Author, and Category have the specified fields, unique constraints (title, name, email, slug), foreign keys with indexes, and relationships. **No cascade delete is configured** on the relationships, so this is not level 3. |
|
||||
| Endpoints | 2 | 2 | `GET /health`, `GET /api/v1/health`, and `GET /api/v1/version` return correct JSON with 200. |
|
||||
| Documentation | 2 | 2 | `backend/README.md` (199 lines): project structure, local and Docker startup, test commands, configuration table, endpoint examples, error format, data model, Docker notes, and limitations. |
|
||||
| Test Infrastructure | 3 | 3 | `pytest.ini` (discovery, coverage, `pythonpath`), `conftest.py` with per-test temporary SQLite databases, and all three test files present. |
|
||||
| Test Coverage | 3 | 3 | All 19 tests pass. Coverage is 95%, above the 70% target. |
|
||||
| Docker Support | 2 | 2 | The image builds, starts under uvicorn on port 8000, and serves the endpoints. |
|
||||
| Code Quality | 3 | 3 | Standardized `{detail, code, errors?}` envelope for HTTP, validation (422), and unhandled (500) errors. Type hints and docstrings throughout. Clear separation of config, session, models, schemas, and routes. |
|
||||
| **Base total** | **21** | **25** | |
|
||||
|
||||
### Bonus
|
||||
|
||||
- **+1 Exception handling with status codes and schema-level validation:** awarded. Errors map to codes such as `not_found` and `validation_error`, and the schemas use `Field` constraints.
|
||||
- **+2 Unit tests for core functionality and README with startup and configuration examples:** awarded. Models and endpoints are tested, and the README has startup steps and a configuration table.
|
||||
- **+3 Docker Compose plus performance optimizations:** Compose is present, but there are no connection pooling or async query optimizations, so this is **not awarded**.
|
||||
|
||||
Bonus total: +3.
|
||||
|
||||
## Other Observations
|
||||
|
||||
- The M2 commit is on `feature/setup-backend`, which is checked out locally and has not been pushed. It is based on the M1 commit, so `develop` does not yet contain the backend.
|
||||
- The commit message says "19 tests, ~95% coverage", which matches the verified result.
|
||||
- The Article, Author and Category models have no cascade rules. Deleting an author who has articles will fail when foreign keys are enforced (the FK pragma is on), which is safe, but the behaviour is not documented.
|
||||
- The Docker healthcheck in `docker-compose.yml` uses `python -c urllib...` against `localhost:8000`. This works inside the container, which is the correct place for it.
|
||||
|
||||
## Path to a Higher Score
|
||||
|
||||
1. Add `cascade="all, delete-orphan"` (or an explicit `ondelete` policy) to the Author and Category relationships, and document the chosen behaviour in the README.
|
||||
2. Push `feature/setup-backend` and merge it into `develop` through a pull request, so the backend is on the integration branch.
|
||||
3. For the +3 bonus, add a connection-pool setting for the non-SQLite case or an async session option, if the project will need them.
|
||||
@@ -0,0 +1,73 @@
|
||||
# M3: Setup Frontend - Score Report
|
||||
|
||||
**Model:** qwen3.8-27b
|
||||
**Repository scored:** `../newz` (`/home/daniel/Gitea/daniel/newz`), committed `frontend/` on `develop` (merge `253052c`, PR #3)
|
||||
**Rubric:** `milestone/m3-setup-frontend-scoring.md`
|
||||
|
||||
## Total Score: 41 (35 base + 6 bonus) - Overall level 1 as delivered
|
||||
|
||||
**Overall level 1 as delivered.** A clean checkout of `develop` does not build: `src/pages/Home.tsx` and `src/pages/CategoriesPage.tsx` import `../data/sample`, which is not committed. The root `.gitignore` excludes `data/`, which also matches `frontend/src/data/`. The file exists in the working tree only. With that file restored, the build, lint, unit tests, E2E tests and Docker image all pass, and the overall level would be 3.
|
||||
|
||||
## Verification Performed
|
||||
|
||||
All checks ran on a clean `git archive` export of `develop`, except where noted.
|
||||
|
||||
| Check | Result |
|
||||
|---|---|
|
||||
| `npm ci` | Installs. Warnings about esbuild install scripts only. |
|
||||
| `npm run build` (clean export) | **Fails.** `TS2307: Cannot find module '../data/sample'` in `Home.tsx` and `CategoriesPage.tsx`, followed by implicit-any errors. |
|
||||
| `npm run build` (with `src/data/sample.ts` copied in) | **Passes.** `tsc` reports 0 errors; `vite build` produces `dist/`. |
|
||||
| `npm run lint` | Exit 0. |
|
||||
| `npx vitest run` | **5 files, 23 tests, all pass.** |
|
||||
| Unit coverage (`src/components`, `src/pages`, `src/api`) | Components: 100% statements, 93.9% branches, 100% lines. Pages and API client are not exercised by unit tests. |
|
||||
| `npx playwright test --project=chromium` (with sample file) | **9 passed.** Covers the shell and branding, featured article and grid, router-link navigation without a full reload, article card to placeholder, console errors, and four API-client tests. |
|
||||
| `docker build` (clean export) | **Fails** with the same missing-module error (`npm run build` exit 2). |
|
||||
| `docker build` (with sample file) and `docker run` | Builds. SPA routes `/`, `/articles`, `/categories`, `/articles/1` and unknown paths return 200 (the unknown path renders the 404 component). `/api/v1/version` returns 502 because the backend is not running in this test. |
|
||||
|
||||
## Scoring by Criterion
|
||||
|
||||
| Criterion | Score | Max | Notes |
|
||||
|---|---|---|---|
|
||||
| Project Setup | 2 | 2 | `frontend/` contains `public/`, `src/` (`assets/`, `components/`, `pages/`, `types/`, `api/`, `tests/`, `lib/`), and `playwright/`. |
|
||||
| TypeScript & Dependencies | 4 | 5 | `strict: true`. `react-router-dom ^6.20.0`, `lucide-react` and typed API client are used by components. `tsc` passes with the sample file present. Not level 5 because the build fails from a clean checkout. |
|
||||
| UI Components | 5 | 5 | `Header` uses `NavLink` with Home, FileText and Settings icons, a mobile menu with `aria-expanded` and `aria-controls`, and labelled navigation. `Layout`, `ArticleCard`, `AuthorAvatar` and `CategoryBadge` exist and are tested. |
|
||||
| React Router Configuration | 5 | 5 | `BrowserRouter` wraps the app in `App.tsx`. Routes: `/`, `/articles`, `/articles/:id`, `/categories`, and a `*` 404 route. Navigation uses `NavLink`/`Link`. The E2E test checks that navigation does not trigger a full page load. |
|
||||
| Page Components | 3 | 3 | `Home`, `ArticlePage` and `CategoriesPage` live in `pages/` and are mapped in `App.tsx`. |
|
||||
| API Integration | 2 | 2 | `api/client.ts` has a configurable base URL, a fetch wrapper that converts failures to `ApiError`, and typed endpoint functions. |
|
||||
| Unit Testing | 3 | 4 | 23 tests across Header, Layout, ArticleCard, AuthorAvatar and CategoryBadge, using React Testing Library. No unit tests for the API client's error handling (level 4 requires them). |
|
||||
| E2E Testing | 5 | 6 | 9 Playwright tests (chromium) pass, covering layout, navigation without reload, and the article card flow. No accessibility-scanner checks, so level 6 is not met. |
|
||||
| Docker Configuration | 2 | 3 | Multi-stage Dockerfile (`node:20-alpine` build, `nginx:1.27-alpine` serve). The compose file has `frontend` on port 3000:80 with `depends_on: backend: service_healthy`. But the build fails from a clean checkout, so level 3 is not met. |
|
||||
| Code Quality | 2 | 2 | ESLint runs and passes. TypeScript strict mode. Consistent React and hooks rules. |
|
||||
| Documentation | 2 | 3 | `frontend/README.md` (240 lines) covers scripts, structure, routing, API client, testing, Docker, environment variables, lucide icons and troubleshooting. No per-component prop documentation, so level 3 is not met. |
|
||||
| **Base total** | **35** | **49** | |
|
||||
|
||||
### Bonus
|
||||
|
||||
- **+1 ESLint rules configured:** awarded. `.eslintrc.cjs` enables TypeScript, React and hooks rules, and lint passes.
|
||||
- **+2 TypeScript strict mode and typed components:** awarded. `strict: true`, and components have typed props and interfaces.
|
||||
- **+3 Root compose orchestration, SPA `try_files` fallback, and E2E routing checks without reloads:** awarded. All three are present.
|
||||
|
||||
Bonus total: +6.
|
||||
|
||||
### Critical Requirements Checklist (from rubric)
|
||||
|
||||
- [x] `lucide-react` installed and used
|
||||
- [x] `react-router-dom` installed and used
|
||||
- [x] `BrowserRouter` configured in `App.tsx`
|
||||
- [x] `<Link>`/`<NavLink>` used for navigation (no plain anchors in the app)
|
||||
|
||||
## Other Issues Found
|
||||
|
||||
1. **Missing `src/data/sample.ts` in git.** The root `.gitignore` line `data/` excludes `frontend/src/data/`. Narrow the rule (for example, `/data/` anchored at the repo root), or move the sample module to `src/lib/` or `src/mocks/`, and commit it. This is the single blocker for the build and the Docker image.
|
||||
2. **API proxy only tested without a backend.** Nginx returns 502 for `/api` when the backend is down. This is correct behaviour, but the frontend renders a fallback. A full stack run has not been tested in this scoring pass.
|
||||
3. **No unit tests for `api/client.ts`.** The fetch wrapper, `ApiError` mapping, and network-error path are untested.
|
||||
4. **Pages and API client have no coverage in the unit run.** Only components are exercised.
|
||||
5. **No "Search" icon** in the Header, although the M3 acceptance criteria list `Search` among the lucide icons. The search bar is also absent.
|
||||
|
||||
## Path to a Higher Score
|
||||
|
||||
1. Commit `src/data/sample.ts` (fix the `.gitignore` rule), then confirm `npm run build` and `docker build` pass from a fresh clone. This moves the overall level to 3.
|
||||
2. Add unit tests for `api/client.ts`: success, non-2xx error envelope, and network failure.
|
||||
3. Add an accessibility check to the E2E suite (for example, `@axe-core/playwright`).
|
||||
4. Add prop documentation for the shared components (`Header`, `Layout`, `ArticleCard`, `AuthorAvatar`, `CategoryBadge`) to the README.
|
||||
5. Add the `Search` icon to the header or to the planned search bar.
|
||||
Reference in new issue
Block a user