From 8cf23297629014aad698f676a5bfa2365e14884d Mon Sep 17 00:00:00 2001 From: Thomas Karner Date: Mon, 21 Sep 2026 12:31:41 +0200 Subject: [PATCH] Move reviews to docs/reviews// so branches stop colliding The review documents are branch-scoped snapshots pinned to a commit, not living documentation of the directory they sit in. Kept at a fixed path, every reviewed branch writes the same two filenames with different content. Merging the two feature branches produced exactly that: CONFLICT (add/add): server/REVIEW.AI.md CONFLICT (add/add): server/REVIEW.md Neither blob is an ancestor of the other, so git cannot resolve it, and it would recur on every future review. The same fixed path also caused the review OF the UI branch to live under server/, which reads as server documentation and is how it got cherry-picked onto the wrong branch once already. One directory per reviewed scope fixes both. The filenames stay REVIEW.md and REVIEW.AI.md, so existing references in the code still resolve. A merge probe against feature/UI_Basic_implementation is now clean. docs/reviews/README.md records the convention, how to read a snapshot whose commit is behind the tip, and why not to copy a review between branches. feature/UI_Basic_implementation still holds its review at server/REVIEW*.md. That no longer conflicts, but it is still the misleading path and wants the same move. Co-Authored-By: Claude Opus 5 (1M context) --- docs/reviews/README.md | 47 +++++++++++++++++++ .../server-basic-implementation}/REVIEW.AI.md | 0 .../server-basic-implementation}/REVIEW.md | 0 server/src/poorbird/api/deps.py | 5 +- 4 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 docs/reviews/README.md rename {server => docs/reviews/server-basic-implementation}/REVIEW.AI.md (100%) rename {server => docs/reviews/server-basic-implementation}/REVIEW.md (100%) diff --git a/docs/reviews/README.md b/docs/reviews/README.md new file mode 100644 index 0000000..e183ed2 --- /dev/null +++ b/docs/reviews/README.md @@ -0,0 +1,47 @@ +# Code reviews + +One directory per reviewed scope: + +``` +docs/reviews//REVIEW.md human-readable review +docs/reviews//REVIEW.AI.md long-form context, written for an AI to + read before working on that scope +``` + +`` is the branch the review was made against, with slashes flattened — +`feature/Server_Basic_implementation` becomes `server-basic-implementation`. + +## Why the directory, and not `server/REVIEW.md` + +These documents are **branch-scoped snapshots**, pinned to a commit that is +named in their header. They are not living documentation of the directory they +sit in. + +Kept at a fixed path like `server/REVIEW.md`, every reviewed branch writes the +same two filenames with different content, and every merge is an unresolvable +`add/add` conflict. That happened: the review of the UI branch lived at +`server/REVIEW.md` — a path that describes neither its subject nor its scope — +and merging the two feature branches conflicted on both files. + +A directory per scope means two reviews never collide, both survive into +`develop`, and the path says what was reviewed without opening the file. + +## Reading one + +Check the header first. Every review states its branch and commit: + +``` +**Branch:** feature/Server_Basic_implementation (Commit: 142b476) +``` + +If that commit is behind the branch tip, the review is a snapshot of an older +state — treat its "what's missing" sections as of that date, not as current. +Verify a claim against the code before acting on it. Several findings in the +existing reviews are accurate; several reference implementations in them are +not, and the ones that were wrong are noted in the code that replaced them. + +## Adding one + +Create `docs/reviews//` and write both files. Do not copy a review from +one branch to another: a review describes the branch it was made against, and +a branch without one simply has not been reviewed yet. diff --git a/server/REVIEW.AI.md b/docs/reviews/server-basic-implementation/REVIEW.AI.md similarity index 100% rename from server/REVIEW.AI.md rename to docs/reviews/server-basic-implementation/REVIEW.AI.md diff --git a/server/REVIEW.md b/docs/reviews/server-basic-implementation/REVIEW.md similarity index 100% rename from server/REVIEW.md rename to docs/reviews/server-basic-implementation/REVIEW.md diff --git a/server/src/poorbird/api/deps.py b/server/src/poorbird/api/deps.py index bcb69d4..9533162 100644 --- a/server/src/poorbird/api/deps.py +++ b/server/src/poorbird/api/deps.py @@ -4,8 +4,9 @@ Device auth is two-step (firmware/API.md). ``POST /enroll`` is guarded by a shared bootstrap secret in ``X-Enroll-Secret``; everything else carries ``Authorization: Bearer ``. Only hashes are stored. -Two details here are easy to get wrong, and REVIEW.AI.md's reference code got -both wrong, so they are spelled out: +Two details here are easy to get wrong, and the reference code in +``docs/reviews/server-basic-implementation/REVIEW.AI.md`` got both wrong, so +they are spelled out: 1. The plaintext token is returned to the device exactly once, at enrollment, and only its hash is persisted. Returning the stored hash would give the