Skip to main content

Learn kapi › Start here: your writing

Check content like tests

A gate that runs offline, and a decision that changes what it finds.

kapi check runs the project's configured checks the way a test suite runs: it exits 3 on a finding that fails and reports the rest. This lab runs the gate on Northsea, corrects the source where the wording was wrong, records one decision the graph had never been told, and watches the next run enforce it.

  1. Run the gatekapi checkRun the configured checks the way you run tests. One finding fails: a forbidden word on the landing page. Four report: a retired word the documentation still carries, which the terms mark deprecated rather than forbidden. Exit code 3 is the gate: at least one finding fails.
  2. The shape CI readskapi check --json --jq '.findings[] | {rule, fails, file: .location.file, suggestion}'The same run in machine shape. Each finding carries its rule, whether it fails, the file and block it sits at, and the replacement, which is what a pull-request check and an assistant both read.
  3. Correct the sourceksed -i 's/our seamless integration/our unified integration/' landing/index.htmlThree findings are wording the source got wrong, so correct the source. ksed edits the text inside the format: the HTML around the sentence is untouched.
  4. The documentationksed -i 's/Release a mooring earlier/Release a berth earlier/' docs/berths.mdThe same edit in a Markdown list item.
  5. The interface stringsksed -i 's/by ship name/by vessel name/' app/strings.en.jsonAnd in the catalog, where the placeholder text of a search field said ship.
  6. A decision rather than an editkapi apply decisions.jsonlThe reviewer also notices a word the graph has never been told about: the testimonial says dock, and Northsea says berth. That is a decision, so it is written as one operation and applied. Forbidden rather than deprecated: dock is a word Northsea does not use, so it should stop a build.
  7. The next run enforces itkapi checkRun the check again and it finds what the previous run passed. One operation reached the record and the gate.
  8. Fix the last oneksed -i 's/could not dock when the pilot called/could not reach its berth when the pilot called/' landing/index.htmlThe testimonial keeps its meaning and takes the house word.
  9. Convergekapi upThree source files changed, so kapi up extracts them again and the occurrence graph follows.
  10. Where the project standskapi statusOne line for the source axis. A monolingual project has no per-language standing to report.
  11. The gate passeskapi checkTwo findings remain and report: the changelog keeps the retired name, because a past entry says what was announced in the words it was announced in. A retirement never fails a build.
  12. The pre-release barkapi check --shipkapi check --ship runs the same gates plus the coverage gates the recipe declares. This is the bar a release tag waits for; an ordinary build never fails on it.