-
Notifications
You must be signed in to change notification settings - Fork 0
fix(land): stop blaming a branch for a borrowed base, and give the lease a refusable schema, a writer and a stand-down #934
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
12d96ef
8f1850d
1da23d4
2e6dafe
75679fa
e54b87f
fffd723
c461c90
660b98d
b17ba03
83a9367
dc59cbc
52fadd4
fc24de5
d71f48e
c38c7cc
dceb9f8
95f80c8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| # Decision records: git is the amendment history | ||
|
|
||
| Read when: recording an architectural decision, or about to add a `status:`, | ||
| `superseded-by:`, `-v2`, `-amended` or "see the current version" pointer to any | ||
| document in this repository. | ||
|
|
||
| ## The rule | ||
|
|
||
| **A reader must see only the current correct state of the world.** | ||
|
|
||
| - **One file per decision, always rewritten in place.** Never a chain. | ||
| - **`git log` / `git blame` is the amendment history**, reachable only by | ||
| explicitly spelunking. History exists, costs nothing to keep, and is invisible | ||
| until asked for. Git already does versioned-document-with-history better than | ||
| any convention layered on top. | ||
| - **No `status: superseded` field**, because a live file is the only kind there | ||
| is. A decision that no longer holds is a file that no longer says it. | ||
| - **A gate, or it is not a process**: no decision record may carry a supersession | ||
| marker, a version suffix in its filename, or a pointer to another record "for | ||
| the current version." | ||
|
|
||
| ## Why, measured | ||
|
|
||
| Superseded documents, `-amended` suffixes and a folder of near-duplicates make a | ||
| doc tree **actively worse than no doc tree**: a reader cannot tell which file is | ||
| live, and an agent will confidently quote the dead one. In one 2026-09-10 session | ||
| this shape cost two wrong conclusions before the pattern was named — see | ||
| `mem:evidence-hierarchy`. | ||
|
|
||
| ## Home | ||
|
|
||
| `.serena/memories/decision/<slug>`, beside the operational memories. | ||
|
|
||
| Chosen because it needs **no change to non-negotiable rule 7** (`no-docs-tree` | ||
| fails a tracked `docs/` path and sends research to the tracker), and because that | ||
| directory is already checked in, already read on demand, and already the surface | ||
| a future session loads. Routing is `mem:core`'s existing table — the mechanism in | ||
| use, not a second one invented alongside it. | ||
|
|
||
| Writes go through Serena's memory tools; `protected-mutation` denies every other | ||
| route, and `rename_memory` is the only one that rewrites `mem:` referrers. |
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| # What counts as evidence, and what is only a claim | ||
|
|
||
| Read when: about to act on anything a doc comment, a `CLOUD-*` row, a PR body, a | ||
| previous session's handoff, `AGENTS.md` or another memory asserts — and ALWAYS | ||
| before citing one as the reason for a design decision. Also read it before | ||
| writing a claim into any of those surfaces yourself. | ||
|
|
||
| ## The ranking | ||
|
|
||
| 1. **Code and tests as they execute right now**, and **the output of a command | ||
| you ran and read yourself.** | ||
| 2. **Everything else is a CLAIM**: doc comments, the board, PR bodies, commit | ||
| messages, `AGENTS.md`, these memories. Comments are written by the same agents | ||
| who write the board, reviewed no harder, and go stale the same way. | ||
| 3. **Even (1) goes stale.** A command's output describes the moment it ran, and | ||
| the remote is shared and mutable. | ||
|
|
||
| **The operational rule: if a claim is load-bearing, re-derive it from something | ||
| executable. If nothing executable exists, THAT ABSENCE IS THE FINDING.** A | ||
| constraint worth designing around is worth a test. | ||
|
|
||
| `rules/scanning.md` row five is the same rule one level down: to know what a gate | ||
| DECIDES, run it and read the exit code. Reading source to predict a verdict "is | ||
| worse than guessing, because it looks like rigour." | ||
|
|
||
| ## The board's measured error rate | ||
|
|
||
| **5 of 13** speculation/lease rows audited against the tree on 2026-09-10 were | ||
| STALE or REFUTED — ~38%. Rows are written by agents, many running a stale binary | ||
| that only ever saw a half-implementation. | ||
|
|
||
| **A cheap discriminator, worth keeping:** a row or comment that cites a **retired | ||
| artefact** — a shell variable (`spec_undo`, `spec_base`, `LAND_LOCK_HOLDER_PID`), | ||
| a line number in `mise-tasks/land.sh` or `land-lock.sh` — was wrong **4 times in | ||
| 5**. A row citing live Rust paths was usually at least partly live. It is triage, | ||
| not a substitute for reading the tree. | ||
|
|
||
| ## Worked examples, so the shape is recognisable | ||
|
|
||
| - **A doc comment that is the foundation of a design and has no test.** | ||
| `lease.rs:1310-1315` asserts the agent proxy 403s a push outside `refs/heads`, | ||
| and concludes the landing lock must therefore be a branch. No test anywhere | ||
| asserts it; `git ls-remote origin` shows `refs/notes` DOES exist on the remote; | ||
| and `mem:github-access` measures the real mechanism — proxied, `git` | ||
| authenticates with the INJECTED token, which 403s writes it is not scoped for. | ||
| Same symptom, different cause. **CLOUD-416 records that this misdiagnosis cost | ||
| the lease being implemented four times.** | ||
| - **A Done row whose landing claim is false.** CLOUD-1399 (Done) says commit | ||
| `46530200` landed the `egress-is-unproxied` `[[startup]]` row. | ||
| `git log -S'egress-is-unproxied' --all -- batten.toml` is EMPTY and `46530200` | ||
| is not a valid object. The detector (`doctor egress`) landed; the repair never | ||
| did. | ||
| - **A false premise propagating from a PR body into pushed history and then into | ||
| a plan.** PR #934's body and commit `3a18fb5`'s message both state "the holder | ||
| lands by rebase, minting new ones for the same patches." **False** — landing is | ||
| fast-forward and PRESERVES the sha (`mem:decision/landing-architecture`). A | ||
| later session quoted it approvingly and built a fencing argument on it. | ||
| - **Two Urgent rows refuted by inspection.** CLOUD-240 reasons over | ||
| `mise-tasks/land.sh:162`, a deleted file; CLOUD-1423 says `batten land` has zero | ||
| callers, but `land lap` is `mise.toml:3494`. | ||
|
|
||
| ## When you find one | ||
|
|
||
| A row the tree refutes goes **back to Backlog with a comment saying what the tree | ||
| says instead** — never a note edited into its body, which leaves the false claim | ||
| in place above the correction. Then it is not worked until re-filed against | ||
| reality. `mem:workflow/board-states`: a state is a claim about the tree, and the | ||
| tree wins. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,6 +16,15 @@ listed at the bottom with their bypasses so a refusal can be told from a defect. | |
| fetch → rebase → `verify` → `verified` → push → `ci-wait` ∥ `main-watch` → | ||
| `/fast-forward` → read the answer → lap. | ||
|
|
||
| **What the lap is FOR, before any of its mechanics: landing is fast-forward and | ||
| PRESERVES the sha**, so the runs that went green on the pushed head _are_ the | ||
| runs on trunk and CI never runs twice. The lock is therefore the **linearization** | ||
| mechanism — it exists to keep CI saturated with only green matrices on the | ||
| critical path — and **speculation is pipelining**, not opportunism. The holder | ||
| does NOT land by rebase; PR #934's body and commit `3a18fb5`'s message both claim | ||
| it does and both are wrong. Full architecture, metrics and the consensus | ||
| reasoning: `mem:decision/landing-architecture`. | ||
|
|
||
| A refusal is **the design working**, not a failure. Each lap rebases onto a | ||
| little more landed work, so conflicts arrive one small resolvable increment at a | ||
| time; batching laps removes no refusal and only makes each one bigger. An agent | ||
|
|
@@ -52,10 +61,20 @@ with the branch gone (`git ls-remote` confirms). There is nothing to repair here | |
| operation, no service, no API. Four things the design was pressure-tested into, | ||
| each of which cost an incident: | ||
|
|
||
| - **It is a BRANCH.** The agent proxy 403s a push outside `refs/heads`, and | ||
| GitHub does not enforce the fast-forward rule off `refs/heads` either — a | ||
| parentless orphan `PATCH` with `force:false` was _accepted_ on a custom | ||
| namespace. The atomicity the design rests on exists only on `refs/heads`. | ||
| - **It is a BRANCH — and this premise is UNTESTED and probably a misdiagnosis.** | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win Rename the heading to state that the lease namespace is unresolved.
🤖 Prompt for AI Agents |
||
| The claim was: the agent proxy 403s a push outside `refs/heads`, and GitHub does | ||
| not enforce the fast-forward rule off `refs/heads` either. **No test anywhere | ||
| asserts either half**; the code only _defaults_ unqualified names to | ||
| `refs/heads/` (`lease.rs:2845`), which is a naming convenience. `git ls-remote | ||
| origin` shows `refs/notes` DOES exist on this remote. And `mem:github-access` | ||
| measures the real mechanism: **proxied, `git` authenticates with the INJECTED | ||
| token, which 403s any write it is not scoped for** — same symptom, different | ||
| cause, and the same root cause as CLOUD-1569. CLOUD-416 (Urgent, never started) | ||
| records that this misdiagnosis cost **the lease being implemented four times**, | ||
| and CLOUD-416 itself repeats the wrong cause, so its write probe must run | ||
| fenced and PAT-authenticated or it will re-measure the credential bug and bake | ||
| it in as an environment fact. Treat the namespace question as open; see | ||
| `mem:decision/landing-architecture`. | ||
| - **Renewal is `--force-with-lease=<ref>:<observed>`**, a true CAS. `PATCH` with | ||
| `force:false` does not give one. Create stays a plain push, so acquire is an | ||
| atomic test-and-set. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Route all claim-bearing sources through
mem:evidence-hierarchy.AGENTS.mdsays memories are not auto-loaded and agents must start atmem:core. AddAGENTS.mdand another memory to this trigger so readers do not act on those claims without loading the evidence rule.🤖 Prompt for AI Agents