| 1 | # Review findings: plan 1 (Foundation), round 1 (Opus 5.5), at 9d63eed |
| 2 | |
| 3 | Verdict: **NOT READY** (one P1). Recorded as returned, lightly condensed for |
| 4 | the file; evidence citations are the reviewer's. |
| 5 | |
| 6 | ## P1 |
| 7 | |
| 8 | **P1-1 (Task 3, touches Tasks 1 and 9): the sign-in config omits the |
| 9 | required `Proof`/`ProofOff` choice, so the app cannot start.** At `v0.28.0`, |
| 10 | `auth/auth.go:380-382` makes `auth.New` return `ErrProofUnset` when |
| 11 | `Config.Proof` is nil and `ProofOff` is false (message at `auth/auth.go:353`). |
| 12 | The plan's `auth.Config{...}` (plan line 128) copied memoria, which pins |
| 13 | rastrillo `v0.23.0` with no `Proof` field. A real guard needs `pow.Schema` in |
| 14 | `BootSchema`, `pow.Assets()` served and challenge fields in `signin.html`; |
| 15 | JavaScript is needed unless `Difficulty: pow.NoProof`. `ProofOff` lets anyone |
| 16 | make Equipo email any address, bounded only by rate limiting. Fix: decide in |
| 17 | the plan, wire schema/assets/template, and test `auth.New` succeeds with the |
| 18 | production config. |
| 19 | |
| 20 | ## P2 |
| 21 | |
| 22 | - **P2-1 (Task 5): time reservation is unspecified and the obvious route |
| 23 | breaks the ledger.** No seconds column (`store.go:206-220`, `Usage` |
| 24 | `model.go:808`); `reserve` refuses non-single-call reservations |
| 25 | (`budget.go:104-106`); release goes through actions (`scheduler.go:359`, |
| 26 | `jobs.go:479`), recovery joins reservations to actions (`recovery.go:120`), |
| 27 | `SettleAudited` charges the reserved amount. Fix: a separate |
| 28 | `time_reservations` table keyed by attempt, settled only in `Contain`, |
| 29 | excluded from receipt and audited settlement, counted only in period |
| 30 | checks; name the tests proving the call ledger is unchanged. |
| 31 | - **P2-2 (Tasks 4, 6): the "never the default branch" check compares against |
| 32 | a job-supplied value.** `TargetBinding.DefaultRef` comes from the job spec |
| 33 | (`model.go:217-236`) and `actions.go:242` compares against it; `Project` |
| 34 | stores no default branch. Fix: `Project.DefaultBranch` entered by an owner; |
| 35 | Authority rejects a mismatched `DefaultRef` and any `Ref` equal to it. |
| 36 | - **P2-3 (Task 3): the keymail callback test cannot be written from the |
| 37 | app** (the fake needs unexported `a.guard.base`, |
| 38 | `auth/keymailfake_test.go:118`, `keymail.go:145-151`). Fix: test sign-in by |
| 39 | email link through a capturing mailer; leave keymail to the framework. |
| 40 | - **P2-4 (Task 3): depends on later tasks.** Removal-while-assigned needs |
| 41 | Task 4's owners; `TestSigninCSRF` targets Task 8 routes (a missing route |
| 42 | still refuses, so it tests nothing). Fix: move the rule and test to Task 4; |
| 43 | Task 3 tests the store. |
| 44 | - **P2-5 (Task 1): assertion does not compile.** `migrate.Result.Applied` is |
| 45 | `[]string` (`migrate/apply.go:46`); use `len(second.Applied) != 0`. |
| 46 | |
| 47 | ## P3 |
| 48 | |
| 49 | - Task 5: configured mode drops the account-level `CostMicros` limit; say so. |
| 50 | Allow lowering a budget below current usage (new work blocks) instead of |
| 51 | refusing. |
| 52 | - Task 3: `Authorize` answers false on DB error, say so; removing a member |
| 53 | should delete their sessions; `EQUIPO_OWNERS` after first boot is ignored, |
| 54 | document it; choose framework `SigninScreen`/`ui` partial or app |
| 55 | `signin.html`. |
| 56 | - Task 4: repository-unique projects block one repo hosting two apps; make |
| 57 | repository plus app unique. |
| 58 | - Tasks 1/8: the per-page speed test needs to say how it signs in. |
| 59 | - Proportion: Task 5 Step 4 and the grounding table read partly as code; |
| 60 | self-review items 2 and 5 decide nothing. |
| 61 | |
| 62 | Confirmed by the reviewer: generator flags, migration-check placement, all |
| 63 | other named APIs and signatures, prototype imports (stdlib, sqlite, x/sys), |
| 64 | 5,243 counted lines, Go 1.25.0 floor, crash-helper compatibility. No build |
| 65 | or tests were run (sandbox caches read-only). |
| 66 | |