Skip to content

Commit 0becaa8

Browse files
committed
docs: record the development pipeline order and the branch model
The milestone order is deliberate and not the obvious one, so the reasoning belongs in the documentation rather than only in the milestone titles: Testing -> Persistence -> Agent harness -> Implementation completion Testing comes first so every later phase merges through the gate, rather than the largest and riskiest change being the one thing the gate never protected. Persistence precedes the agent harness because an agent that plans, critiques and repairs is expensive to re-run without durable memory. Integration of the mvp-testing line comes last so it lands on top of those foundations. Also records the branch model now that only master and mvp-testing remain, and updates requirement 21 to describe authentication as it actually is: the authorization matrix asserts endpoint protection structurally, and the two defects it found (sixteen unauthenticated endpoints, and logout not revoking refresh tokens) are noted along with the rotation work still outstanding.
1 parent 7cdbf23 commit 0becaa8

3 files changed

Lines changed: 64 additions & 2 deletions

File tree

AGENTS.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,25 @@ scripts/, tests/ Evaluation tooling and cross-service test assets
3535

3636
## 3. Workflow
3737

38+
### 3.0 Branch model
39+
40+
Two long-lived branches, and nothing else:
41+
42+
| Branch | Role |
43+
|---|---|
44+
| `master` | Default branch. Protected. Only ever updated through a merged pull request. |
45+
| `mvp-testing` | The active development line, where the MVP is built and tested. |
46+
47+
`master` receives reviewed, gated work. `mvp-testing` periodically receives `master` — that
48+
direction only — so it is tested with the current gate and fixes in place. Work travels back toward
49+
`master` in reviewable slices, not as one large merge.
50+
51+
CI runs on both. Feature branches are short-lived: created from the branch they target, merged, and
52+
deleted immediately. A branch that outlives its pull request is drift waiting to happen.
53+
54+
> The former `mvp` branch was deleted: it contained no commits that `mvp-testing` did not already
55+
> have, so keeping it only invited work to land on a stale line.
56+
3857
### 3.1 Pick up work
3958

4059
Work starts from a GitHub issue. Assign it to yourself and move it to **In Progress** on the

docs/overview.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,37 @@ architectural work and is the highest-priority refactor in the roadmap.
160160

161161
---
162162

163-
## 5. Documentation map
163+
## 5. Development pipeline
164+
165+
Work proceeds in a deliberate order, tracked as milestones on GitHub. The order matters and is not
166+
the obvious one:
167+
168+
```
169+
1. Testing → 2. Persistence → 3. Agent harness → 4. Implementation completion
170+
(M2) (M3) (M4) (M5)
171+
```
172+
173+
**Testing comes first.** The quality gate is established before any substantial code lands, so every
174+
later phase merges through it. The alternative — integrating a large body of work and then building
175+
the gate — means the largest, riskiest change is the one thing the gate never protected. This
176+
project has already seen what an unenforced gate costs: CI was configured for branches that were not
177+
the default branch, so nothing ran on `master` for weeks and nobody noticed.
178+
179+
**Persistence comes before the agent harness.** An agent that plans, generates, critiques and
180+
repairs is expensive to run. Without durable memory, every repetition pays that cost again. Building
181+
the harness first would mean building it against a memory model that is about to change.
182+
183+
**Implementation completion comes last.** The `mvp-testing` branch carries a large body of working,
184+
tested code — quiz unification, the course builder, structured generation, the inference ladder.
185+
Integrating it is sequenced last so it lands on top of the gate, the persistence layer and the agent
186+
foundations, rather than underneath them.
187+
188+
Milestones M6–M9 (topic base, retrieval consolidation, assessment and exam prep, platform health)
189+
follow, and are not strictly ordered relative to each other.
190+
191+
---
192+
193+
## 6. Documentation map
164194

165195
| Document | Contents |
166196
|---|---|

docs/specifications.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,20 @@ The system must authenticate users and protect its endpoints.
262262

263263
**Implementation.** JWT-based authentication with refresh, a token blacklist for revocation,
264264
account lockout after repeated failures, `admin`/`student` roles, rate limiting, security headers
265-
and audit middleware. Development accounts are seeded automatically.
265+
and audit middleware. Development accounts are seeded automatically, and seeding refuses to run
266+
when `ENVIRONMENT=production`.
267+
268+
Endpoint protection is asserted structurally rather than by convention:
269+
`tests/integration/test_authorization_matrix.py` derives the endpoint list from the live OpenAPI
270+
schema, so an endpoint added without authentication fails the build. Endpoints that are deliberately
271+
public are listed explicitly in `PUBLIC_ENDPOINTS`, which makes publishing one a visible decision.
272+
273+
Two defects in this area were found and fixed by that suite: sixteen endpoints across the courses
274+
and documents APIs declared no authentication at all, and logout blacklisted a refresh token whose
275+
`jti` the refresh endpoint never checked — so a revoked token kept minting access tokens until it
276+
expired on its own.
277+
278+
**Not yet implemented.** Refresh token rotation with reuse detection.
266279

267280
---
268281

0 commit comments

Comments
 (0)