Repository navigation
docs(backend): the design doc still described the Python server it outlived - #588
Merged
Merged
Conversation
…tlived A review of the previous docs pass found the file I should have started with. backend-design.md opens by calling itself a design for "a FastAPI backend" and its implementation note points at server/README.md, src/er/service.py, src/er/lake/env.py and server/src/erserver/k8s.py. All four are gone -- `git ls-files server` returns nothing. That note is the first thing a reader sees, so it was the most load-bearing stale text in docs/. Corrected, each against the code: - The header. Phases 1-3 are still delivered, but in `er-server`: a Postgres SKIP-LOCKED queue, a claim-run-mark dispatcher, four server-enforced roles, config publish tiers, cron schedules, the snapshot-pinned read path, signed webhooks -- across 88 /v1 routes. The k8s Job launcher is `er-k8s`. - §2's asset table. Eight dead `src/er/*.py` paths replaced by the Rust crates that own the work, with the exit-code taxonomy spelled as the `ExitCode` variants that still encode 0/1/2/3/10. - §2's "Missing" list was four-sixths wrong: HTTP API, job system, scheduler and read layer all shipped. Struck through, with what remains -- the Salesforce connector and any writeback -- stated plainly. - §3 claimed "there's no edit API" for match config. There is: config/versions and .../publish, with a gate that advises rather than refuses. - §15's roadmap gains a Status column. Phases 1-3 done except the one thing phase 3 shares with phase 4, the Salesforce connector; 4 and 5 open and now tracked as board cards. - connectors.md cited `server/src/erserver/api.py` and `webhooks.py` for the two seams it is about. Both replaced by their Rust handlers, and the imports route corrected -- it is dataset-scoped now, not org-scoped. What is deliberately NOT fixed, and said so in the file: the inline citations in §5, §8, §9, §12 and the whole appendix table. Translating those means guessing which Rust module inherited each responsibility, and a confidently wrong path is worse than an obviously dated one. The header now tells the reader to treat them as what the design was built against and to find the current owner in the generated crate map. Tracked as its own card. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
athvin
added a commit
that referenced
this pull request
Nov 5, 2026
) Closes the residual I deferred in #588 and filed as #589. Every Python path in backend-design.md is now either paired with its current owner or framed as history; none of them is presented as a location. The appendix gains an `Owner now` column. Six seams were a lookup. Two were not, and those are the reason this was worth doing properly rather than find-and-replace: - The CLI orchestration sequence was to be extracted as `er/service.py`. It became `er-dag`'s compiled DAG instead -- a task is a stage, a DAG is a job kind, and cycles or arity errors fail at `cargo build`. Calling that a service facade would misdescribe it. - The per-tenant advisory writer lock became a declared PARTIAL UNIQUE INDEX, `jobs_one_active_per_dataset` on `dataset_id WHERE state IN ('dispatching','running','canceling')` in entities/job/entity.yaml. Postgres enforces it, nothing holds a connection, and it is per-DATASET now because the lake is the thing being written and each dataset is its own lake. That second one also corrects two places where *I* wrote "advisory lock" in #588 before knowing better: §2's tenancy-seam row and the "two constraints" paragraph. The crash-safety argument in §5 still holds but by a different route -- a dead pod's job is reaped to a terminal state, which lifts the constraint, rather than a dropped connection releasing a lock. §12's workstream gains a note that all six items landed and several landed differently: item 1 as the DAG, item 2 as four ER_LAKE_* variables read by er-env, item 4 as the read routes, the score-only extension as `.../match-preview`. The plan text is kept for its reasoning. The "Residual" paragraph added in #588 is removed, because it is no longer true. Verified: every substitution asserted to match exactly once before applying; appendix table 11 rows with zero pipe-count mismatches; all relative links resolve; 12 remaining `src/er/` mentions each checked to sit inside an explicit historical frame. Closes #589 Co-authored-by: bmoore813 <[email protected]> Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Found by reviewing the previous docs pass. I fixed the two trackers and missed the
design doc, which was the worst offender —
backend-design.mdopens by callingitself a design for "a FastAPI backend", and its implementation note cites four paths
that no longer exist. That note is the first thing a reader sees.
The dead paths
git ls-files serverreturns nothing, andsrc/has no tracked files either.Verified gone:
server/README.md,src/er/service.py,src/er/lake/env.py,server/src/erserver/k8s.py, plus the eightsrc/er/*.pypaths in §2's asset table.Corrected, each against the code
er-server: SKIP-LOCKED queue, claim-run-mark dispatcher, 4 roles, publish tiers, schedules, signed webhooks, 88/v1routes; launcher iser-k8ssrc/er/*.pyExitCodevariants that still encode 0/1/2/3/10.../config/versions+.../publish, with a gate that advises rather than refusesStatuscolumn; 1–3 done except the Salesforce connector, 4–5 open and now board cardsconnectors.mdserver/src/erserver/api.py,webhooks.pyWhat I deliberately did not fix
Every remaining
src/er/*.pypath inbackend-design.mdis left in place, and theheader now says so: the inline citations in §5, §8, §9, §12 and the whole appendix
table. Translating them means guessing which Rust module inherited each
responsibility — the relation registry, the ducklake session/snapshot machinery, the
config schema — and a confidently wrong path is worse than an obviously dated one.
The header directs the reader to the generated crate map for current owners. Tracked
as its own card.
This is the same discipline that caught my own errors earlier: I had already shipped
two claims sourced from a sloppy grep rather than from the code.
Verification
make skills-checkgreen;make checkrun locally (docs changes don't skip theRust gate —
entitiesverifiesdocs/erd.md).than regexing the file. 4 of 4 in
connectors.md, 5 of 5 roadmap rows.Related
Same review also corrected four board artifacts: #550 claimed no runner
ServiceAccount existed when
er-runnerander-dev-runner-poddo (the per-tenant gapstands, the evidence line was false and understated what is built — the exact bias
this work exists to correct); and #511/#514/#517/#520/#523/#525/#540 gained the
connectors.mddesign references and overlap notes I described in chat but neverwrote into the issues.
🤖 Generated with Claude Code