(wip) docs(optimizer): CLAUDE.md + architecture doc with diagrams#605
Draft
mkuchenbecker wants to merge 2 commits into
Draft
(wip) docs(optimizer): CLAUDE.md + architecture doc with diagrams#605mkuchenbecker wants to merge 2 commits into
mkuchenbecker wants to merge 2 commits into
Conversation
services/optimizer/ARCHITECTURE.md — externally-facing description of
the optimizer subsystem: what it is, components, one cycle end-to-end,
operation states, REST endpoints, how to enable on a table, how to add
a new operation type.
services/optimizer/diagrams/ — diagram sources + rendered PNGs:
components.puml + .png — analyzer / scheduler / optimizer service /
optimizer DB; boundaries to tables service,
jobs service, and the Spark job
sequence.puml + .png — five phases: stats commit, analyzer cycle,
scheduler cycle, job submission, callback +
history append
state.puml + .png — PENDING → SCHEDULING → SCHEDULED → history;
CANCELED exit from PENDING
render.sh — PlantUML rendering instructions + one-shot
regeneration script
Distilled to the data-flow principles; retry, dedup specifics, and
internal implementation details are out of scope.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.
Summary
Two files for the optimizer subsystem, both self-contained under
services/optimizer/:services/optimizer/CLAUDE.md— internal conventions for contributors / future Claude sessions working inservices/optimizer/orapps/optimizer/. Covers the library/deployable split, package convention, the concurrent-instance contract ontable_operations, the pagination caveat, property naming, REST error contract, theOptional<T>repository pattern, and the H2-vs-MySQL gotchas. ~260 lines.services/optimizer/ARCHITECTURE.md— externally-facing architecture overview: what it is, components, one cycle end-to-end, operation states, REST endpoints, opt-in, and adding a new operation type. ~80 lines. Backed by three PlantUML diagrams.Diagrams
services/optimizer/diagrams/:components.puml+.pngsequence.puml+.pngstate.puml+.pngPENDING → SCHEDULING → SCHEDULED → history;CANCELEDexit fromPENDINGGitHub renders the committed PNGs inline in the markdown. PlantUML sources stay in the same directory;
diagrams/render.shcarries the regeneration instructions (install PlantUML; run./render.sh).What's distilled out
Per direction, the diagrams describe data flow at the principle level — not retry, dedup, claim-then-verify, or other internal implementation details. The internal contract details (concurrent-instance dedup, pagination caveat, etc.) live in
CLAUDE.mdfor contributors, not in the architecture doc for external readers.Verification
./services/optimizer/diagrams/render.shreproduces the committed PNGs from source.🤖 Generated with Claude Code