From 45b541992c93c52521ba04e3b8d533efc6efbff3 Mon Sep 17 00:00:00 2001 From: Erik Hjelm Fjeldheim Date: Mon, 7 Sep 2026 17:30:35 -0600 Subject: [PATCH] docs: refresh roadmap status and infrastructure documentation - ROADMAP: status to 8/9 (M1 done, runner live, CI/CD verified, M2/M3 state), M2/M3 due dates adjusted to Wed 10/9 and Fri 12/9 - AGENTS.md: msw test infrastructure, format gate, self-hosted runner + auto-deploy warning for agents and contributors - README: CI/CD section (self-hosted runner, auto-deploy to /project1), testing section now describes the msw infrastructure --- AGENTS.md | 16 +++++++++++++--- README.md | 17 ++++++++++------- ROADMAP.md | 26 +++++++++++++++----------- 3 files changed, 38 insertions(+), 21 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 5d43ac1..9f4d5e0 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -26,8 +26,9 @@ time with navigation, filtering, sorting, and favorites. | `npm run format` | Prettier, write | | `npm run format:check` | Prettier, CI check | -Run `npm run lint && npm test && npm run build` before opening a PR. All three must -pass with no errors or warnings. +Run `npm run format:check && npm run lint && npm test && npm run build` before +opening a PR. All must pass with no errors or warnings — CI enforces the same +gates. ## Architecture conventions @@ -36,7 +37,8 @@ src/ api/ fetch functions for OpenLibrary (no React code here) hooks/ custom hooks (useBooks, useFavorites, usePreferences) components/ one component per file, plain function components - test/ Vitest setup (jsdom + jest-dom) + test/ Vitest setup: jsdom + jest-dom, msw server and OpenLibrary + handlers (src/test/handlers.ts), QueryClient test providers ``` - Components are props-driven; keep derived logic in hooks, not JSX. @@ -48,6 +50,14 @@ src/ - Plain CSS files (one per component when needed), imported by the component. No CSS frameworks, no inline style objects for static styling. +## Infrastructure + +- CI runs on our self-hosted runner on the group VM (see `docs/ci-runner.md`); + there are no shared runners on git.ntnu.no. +- Pushes to `main` deploy the build automatically to the Apache server — the live + prototype at http://it2810-19.idi.ntnu.no/project1 always reflects `main`. + Never merge a red or warning-filled build. + ## Code style - Functional React components with explicit prop types; no `any`. diff --git a/README.md b/README.md index 3b8c8fb..c51713b 100644 --- a/README.md +++ b/README.md @@ -78,16 +78,19 @@ and priority. The schedule and current status live in [ROADMAP.md](ROADMAP.md). Issues where substantial code was AI-generated carry the `ai-assisted` label; AI usage is documented in the README as required by the course. -## CI +## CI/CD -Every pull request runs a GitHub Actions workflow that checks formatting (Prettier), -linting (ESLint), tests (Vitest), and the production build. Everything must pass -with zero errors and warnings before merge. +CI runs on our self-hosted runner on the group VM (see `docs/ci-runner.md`; the +NTNU GitHub Enterprise installation has no shared runners). Every pull request +runs formatting (Prettier), linting (ESLint), tests (Vitest), and the production +build — everything must pass with zero errors and warnings before merge. +Pushes to `main` additionally deploy the build to the Apache server on the VM, so +the prototype at http://it2810-19.idi.ntnu.no/project1 always reflects `main`. ## Testing - Snapshot tests of rendered components - Component tests covering props, state, and user interaction -- Tests never touch the network: msw is installed and will intercept all - OpenLibrary requests once the mock handlers land with the data-layer tests - (#12, milestone M2) and the full suite in M4 +- Tests never touch the network: msw intercepts every OpenLibrary request + (handlers in `src/test/handlers.ts`), and any unhandled request fails tests + loudly diff --git a/ROADMAP.md b/ROADMAP.md index 3e49dcc..56bd7de 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -9,20 +9,24 @@ In progress → In review → Done); issues also carry `status:*` labels. | Milestone | Due | Scope | | -------------------------- | -------- | ------------------------------------------------------------------------- | -| M1 — Setup | Thu 3/9 | Template, tooling, CI, types + API client (#1–#4) | -| M2 — Core app | Tue 8/9 | BookCard, useBooks, navigation, jump list | -| M3 — Persistence & choices | Fri 11/9 | Subject filter, sorting (sessionStorage), favorites (localStorage) | +| M1 — Setup | done | Template, tooling, CI, types + API client (#1–#4) | +| M2 — Core app | Wed 10/9 | BookCard, useBooks, navigation, jump list | +| M3 — Persistence & choices | Fri 12/9 | Subject filter, sorting (sessionStorage), favorites (localStorage) | | M4 — Quality | Tue 15/9 | Responsive CSS, accessibility, Vitest suite, manual browser/device checks | | M5 — Delivery | Thu 17/9 | Apache deployment, README, delivery artifacts (#5) | -## Status (updated 5/9) - -- PR #3 — **merged** (template, CI/CD pipeline, docs); issues #1/#2 closed -- This PR — closes #4 (types + API client, verified with 8 unit tests); unblocks M2 -- #11–#14 — M2 issues assigned and Ready: robertky #11 BookCard, erikhfj #12 - useBooks + App wiring, evenkkl #13 NavigationControls, rachelks #14 BookJumpList -- #6 — VM prepped (Apache, rsync, sudoers, runner v2.337.0); registration waits - on repository admin from staff; guide: [docs/ci-runner.md](docs/ci-runner.md) +## Status (updated 8/9) + +- M1 — **done**: PR #3 (template + CI/CD + docs) and PR #15 (#4 types + API client) + merged; #1, #2, #4, #6 closed +- Infrastructure — **live**: self-hosted runner on it2810-19 (systemd service, + survives reboots); CI/CD verified end-to-end — pushes to `main` pass quality + gates and deploy to Apache automatically +- M2 — in review: PR #17 (useBooks + App integration) and PR #18 (BookJumpList), + both CI-green; #13 NavigationControls in progress (evenkkl); #12 stays open + until navigation and jump list are wired into the app +- M3 — issues #19–#22 created and Ready (assignments on the board); testing is an + acceptance criterion in each - #5 — delivery artifacts (timeliste, VM, FeedbackFruits) — open ## Workflow