Repository navigation
docs(book): a Conformity Checks chapter teaches the reference language step by step - #431
Merged
Merged
Conversation
…e step by step A new Guide chapter in Part V, after the Deployment Guide, starts from the smallest reference file (minimal.yaml), explains why conformity matters next to health, security and performance checks, then builds a reference for the payments workload level by level: constraints and sizing, placement across zones and nodes, Kafka settings, listeners, topics and monitoring, waivers against severity warn, and the check in a pipeline (fmt --check, lint, check --output-junit, -o json). It ends with the language at a glance and its limits. Every check result in the chapter was captured on panda: the check's own code (ConformityCheck, as ConformityLiveTest runs it) read krafter, and the real CLI rendered the reports. Lint output is the real CLI's. The final reference ships as cli/examples/conformity/payments-krafter.yaml, so the schema, lint, fmt and strict-reader example tests hold it. Wiring: _quarto.yml order, the Part V page, the Deployment Guide's handoff, the book README, a Concept Registry row and the payments-krafter.yaml name, Glossary entries for Conformity Check, KafkaReference and Waiver, and the conformity exit codes under Exit Code. Three reference fixes: the CLI Reference's family table gets a Conformity row and no longer counts the examples, and the read scope lists POST /api/conformity/check.
Four figures, each for something the text explains less well alone: where drift comes from (design, values, running cluster, and the changes that skip the design), how a rule gets its status (read, hold, severity, then waivers), what the placement rules count on panda (one node per zone, one broker and one controller per node, drawn from krafter's real pods), and a waiver's lifecycle as a state diagram, which replaces the situation table. The prose now says what each rule protects against: the cost of drift (two brokers on one node refuse acks=all writes when it fails), a reference against a values file (requirements with bounds, like a test suite), why a constraint's form is the requirement, a placement table column on the failure each rule guards against, the acks=all, RF, min.insync.replicas and unclean-election chain, why waivers carry an end date, and when to run a check (pull request, deploy, schedule). A Try it callout follows the first reference. Checked: style ratchet, every Mermaid diagram parses, a full render with all fragment links landing, and each figure viewed in the rendered page at the text column's width.
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.
A new Guide chapter, Conformity Checks (
docs/book/conformity.md), in Part V after the Deployment Guide. It follows the book's running example: the architecture the payments workload needs fromkrafter.How it reads, easiest first
minimal.yaml(3 rules), linted and checked.cluster check,detect,security auditand scenario gates. A Mermaid figure shows how a check runs, then statuses, the overall result and exit codes.kafka.sourcecr vs brokers, and per-topic rules.severity: warn, the waiver lifecycle, and the completepayments-krafter.yaml.fmt --check,lint,check --output-junit, and-o jsonwith jq.Captured, not invented. Every check result was captured on
panda. A throwaway harness, not committed, ranConformityCheckagainstkrafterthe wayConformityLiveTestdoes, and the real CLI rendered each report through a local stub. Lint and fmt output come from the real CLI. The lab has no Kates API deployed, so a livekates conformity checkwasn't possible. The two real gapspandashowed became the chapter's teaching cases: broker anti-affinity ispreferred, and Kafka Exporter is off on Kind.The final reference is a tested example.
cli/examples/conformity/payments-krafter.yamlis picked up by the schema, lint, fmt and strict-reader example tests, so it can't drift.Wiring
_quarto.ymlorder, the Part V page bullets and counts, and the Deployment Guide's handoff.payments-krafter.yamlname in the Names table.Reference fixes found while researching
readscope row left outPOST /api/conformity/check.Checked locally
scripts/check-book-style.sh: style and ratchet OK, and the new page is at 0 on every count.book_metrics.py: 0 of 152 sentences are over 40 words.prepare-book-render.sh+quarto render --to htmlin a scratch copy: 40 chapters.check-book-fragments.py: all 7,736 fragment links land.check-mermaid.sh: 157 diagrams parse.TestConformityExamplesMatchTheirSchema,TestExamplesAreFormatted,TestExamplesCompileClean,TestFormatIsIdempotentAndKeepsTheMeaning) and JavaKafkaReferenceExamplesTest(5/5) pass.Not checked: lychee (not installed locally; CI runs it), the PDF render, and the page's look in a browser.
Commands documented are in
cli/cmd/conformity.goandcli/cmd/conformity_lint.go. The endpoint iskates/src/main/java/com/bmscomp/kates/api/ConformityResource.java.