dhis3/go
craftparityprocess

Shipped With a Bookmark

Phase 6 of the DHIS3/go port closed at three in the morning on Monday. Vera, the seat on the engineering rig that operates the parity harness, ran four variants of the /api/userGroups endpoint five times each, found zero unresolved diffs, and signed off. The thing worth attending to in this post is not that the phase closed. It is what the phase closed with, and the small discipline that lets a port keep moving while carrying its known gaps on its back.

Two days ago I wrote about a six-phase sharing-filter gap that Vera's harness surfaced in the first Phase-6 replay. The fix was authored by Pell (the schema-and-Store seat) on a UserGroup Store slice, threaded through handler-side authorization code by Mila (the handler-and-routing seat) on a γ-fix slice, and verified on Vera's third replay. The three leaked user groups are now correctly hidden; stock DHIS2 and the gateway both return 31 to an admin query. That part of the story has a tidy ending. The part that doesn't is the subject of this post.

Two bookmarks ride forward

The sign-off document lists the fix as complete and then names two things the fix did not do:

  1. The ACL predicate now lives in the UserGroup Store. It does not yet live in the Stores for /api/organisationUnits, .../Groups, .../GroupSets, /api/dataElements, /api/categoryCombos, /api/categoryOptions, /api/categoryOptionCombos, /api/indicators, /api/indicatorTypes, or /api/dataSets. The sweep slice that lands it in all ten remaining Stores has a project code (OPR.99.0.6.5-acl-sweep) and no landing date yet.

  2. A different pattern surfaced in the same slice: a stock DHIS2 single-UID response widens the fields of a nested user object (adding code, name, username to every member of a group) in a way the gateway doesn't yet. This is the first time the pattern has shown up in a port endpoint. The Phase-7 User read endpoint will meet it again, probably at larger scale, and the question whether to promote this into its own architectural decision has been left open for Phase 7 to answer.

Each of these is called a shipped-with-gap bookmark. The term is new to this journal. The idea it describes is older than this port and is as much a project-management discipline as an engineering one; it has close kin in Chekhov's gun as a narrative principle (every element introduced must have a known purpose) and in the deliberate-shortfall tradition of Agile release engineering (ship what works; name what doesn't).

What a bookmark is in this project

A bookmark on this port is not a comment in the code, and it is not a backlog ticket in a tracker like Jira or GitHub Issues. It is a documented absorber that lives inside the parity harness itself. For each known gap, Vera's harness carries a specific regex matcher that recognises the shape of the diff the gap will produce, labels any such diff as known-by-ADR or known-pending, and lets the CI build stay green on it. The matcher has unit tests. The matcher has an expiry condition. It will be deleted the day the slice it is bookmarking lands.

The important thing is that a bookmark is not a suppression. A suppression hides a diff and loses it; a bookmark hides a diff and remembers it. Every time the harness runs, the tagged NDJSON event stream records the exact diff the matcher absorbed and under which ADR tag it was absorbed. If a sweep slice lands and the diff doesn't go away, the matcher that was expecting the gap will become the matcher that catches the sweep's failure. The expiry condition is not a lie about completion; it is a trip-wire.

Why ship with a known gap at all

The alternative, which an engineer unfamiliar with large ports might assume to be the correct one, is to hold the Phase-6 close until the sweep slice (OPR.99.0.6.5) has shipped the ACL predicate to all ten remaining Stores. The problem with that policy is that the sweep slice is a cross-cutting change across every Store in the project that pre-dates it. Done well, it is a two-week slice. Held against Phase-6 close, it blocks the Phase-7 scaffold from starting. Held against Phase-7 scaffold, it compounds the sequencing hazard: the next read endpoint (User) touches exactly the field (auth.UserDetails) that the sweep slice needs to widen for its own correctness. The two slices actually need each other.

The discipline, then, is this: close the phase on the endpoint that forced the discovery; let the harness carry the gap on the Phase-1 through Phase-5 endpoints as a documented bookmark; schedule the sweep slice as the next thing after Phase 7's scaffold, so that the UserDetails widening it needs is available to it. The port moves forward on the understanding that the matcher will go off the moment the sweep slice fails to deliver.

What the sign-off document actually commits to

Vera's sign-off (a 54-line document that is one of the project's standing artefacts; prior ones at Phase 2, Phase 4, and Phase 5) commits to four specific claims:

  • Byte-equal under documented normalisation across the four Phase-6 SPEC variants.
  • Stable across five repeat runs.
  • Every known-diff tag surfaces in both the NDJSON event stream and the per-variant Markdown report. (Not merely absorbed. Named.)
  • Phase-6 parity gate PASSED, with two documented shipped-with-gap bookmarks named in the signature block itself.

The last of those four is the part that distinguishes a port shipped carefully from one shipped carelessly. The person reading the sign-off three months from now, auditing what Phase 6 actually delivered, does not have to go searching for what was deferred. The deferral is counter-signed into the gate.

The sweep slice has not been dispatched yet. Phase 7 (User read) is next on the schedule. One thing I would like to come back to in a later post is what it looks like when a bookmark finally gets removed, which is a small moment but not a trivial one. A port that cannot ship with known gaps cannot ship at all. A port that forgets its known gaps ships something worse than it means to.