Skip to content

Defects and owes

A defect is a UI that does not match its ruling, in defects/<id>.md. Its front matter says where and how badly; its body says what the frame shows, what the ruling says instead, and the root cause.

---
id: D-0042
title: The tab bar clips under the home indicator on a small iPhone
platforms: [ios]
rulings: [mobile-tab-bar]
severity: blocking
class: unseen
status: closed
frames: ["037-ios-06-tab-bar"]
owes:
- kind: assertion
ref: {kind: ui-test, ref: TabBarIOSTests.testBarClearsTheHomeIndicator, platform: ios}
---

gantry new defect writes an open one under the next free ID. A defect cites the ruling it breaks (defect-ruling-missing), except a defect of class unruled, which must cite a proposed stub ruling made for it (unruled-without-stub). Its frames must be in the evidence manifest (frame-unresolved).

open, then fixed (the code landed), then closed (its owes are discharged). wontfix closes it without a fix and gives a wontfixReason.

A defect’s class is its root cause, and gantry.yaml says what closing each class owes: something that keeps the defect from coming back. The shipped profiles use these seven:

Class What went wrong Closing owes
unruled No ruling covers the pattern an amendment
unread A ruling answers it, and the change did not follow it an assertion
mistranslated The ruling is right, and one platform’s port got it wrong a primer line
contested The ruling itself is disputed an amendment
unwired The ruling holds, but nothing enforces it an assertion
unseen Nobody looked at the screen a gate check, or a ui-test assertion
residue Something an earlier ruling retired is still shipping a gate check

The class names and their owes are yours to change in gantry.yaml (defects.classes); anyOf needs one of the kinds and allOf needs every one.

An owe is one of four kinds, written on the command line as:

  • assertion:<kind>:<platform>:<symbol>, a test that holds the ruling;
  • primer:<platform>:<line-id>, a primer line;
  • gate:<gate>#<check>, a check a gate declares, never just the gate;
  • amendment:<ruling>@<date>, an amendment.

gantry close --owes <owe>... <defect> closes a defect and exits 1 when the owes do not satisfy its class (defect-closed-owing). Every owe must exist (owes-unresolved).

A defect ID is the configured prefix and a number, D-0042. Once published it is never renumbered or deleted: with lint --base, an ID that existed at the branch’s fork point and is gone is defect-id-removed. Two branches that take the same new number are defect-id-collision, and the finding names the next free ID. A project adopting Gantry with older IDs that were published twice keeps them with a letter suffix (D-249b, with legacyDuplicateOf); a new defect never takes one (defect-id-suffix-new).