ADR 0096: The hyper_sssp API review and freeze (0.4)#
Status: Accepted under delegation (2026-11-11; GOVERNANCE.md, “Delegation of technical ADRs”) for the review, its documentation amendments and the freeze mechanism. The names and the semantics it freezes are the author’s, decided by the author on 2026-10-28 (GOVERNANCE.md, approvals log, the rows of 2026-10-28): HD8 (the budget options and
budget_action), HD11 (the distance semantics and the weight limit), HD12 (the new public names), HD13 (the engines), HD14 (no openmp backend), HD7 / AD20 (thefallback_useddeterminism sentence) and HD17 (frozen at the end of M11b;stablefrom 0.4.0 only on the author’s confirmation). Pending the author: the stability confirmation at the 0.4.0 release (HD17, GOVERNANCE.md, Open decisions, M11 (HD)) and the acknowledgement of the public names that HD12’s list does not spell out (section “The new public names” below). It changes no rule the author approved: the stability policy of PLAN 5.9, the gates and their protocol, the parity rules and the frozen headers (core/*,graph/*,hypergraph/*,update.hpp) are untouched.Decided: the author acknowledged on 2026-11-11 (GOVERNANCE.md, approvals log, the row “M11’s public names beyond HD12’s list”) the public names that HD12’s list does not spell out (section “The new public names”, the items marked (ack)), and confirmed on 2026-11-18 (the row “AD15 and HD17: the stability of 0.4’s surfaces”; carried out in R040, ADR 0110 part A) that hyper_sssp (
<dyng/hyper_sssp.hpp>,dyng.hyper_ssspanddyng hyper_sssp) and theslack_csrstorage with the incidence edits and HD10’s format extensions (.dgt+i/-i, the.dgbflagincidence_edits) arestablefrom 0.4.0; the reservations above are closed.Date: 2026-11-11
Deciders: the AI assistant, on the author’s behalf (M11b, step public-python-cli-docs-freeze); the names, semantics and maturity: S M Shovan (2026-10-28, HD7, HD8, HD11-HD14, HD17); the names beyond HD12’s list and the stability at 0.4.0: S M Shovan (2026-11-11, 2026-11-18)
Builds on: ADR 0023 (the method, the snapshot), ADR 0035 (the freeze enforced against the base branch; the maturity decides the freeze), ADR 0047 (the freeze’s Doxygen rules), ADR 0060 (the precedent: triad_count’s review and freeze), ADRs 0090-0092 and 0095 (hyper_sssp’s API, its port, its budget, its engines), ADR 0097 (the Python module and the command line).
Context#
hyper_sssp arrived in M11a as a draft (ADR 0090), its header tracked by the API baseline; M11b
added the shared sssp engine (engine::operators, ADR 0095), dyng.hyper_sssp and dyng hyper_sssp (ADR 0097). HD17 freezes the C++ header, the Python module and the command line at
the end of M11b and makes them stable at 0.4.0 only on the author’s confirmation. From the freeze
a change of them is a SemVer matter, so the API is reviewed first, as ADRs 0023, 0035, 0047 and
0060 reviewed the earlier APIs: against the checklist docs/developer/api_review_checklist.md
(naming and the verb vocabulary, the uniform contract of ADR 0006, Doxygen, exception guarantees
and dyng::error, host-compilability, ownership and ABI, the bindings), against its siblings
sssp (the same fixed-point update on a graph) and triad_count (the other hypergraph result),
and against the sketch docs/design/sketches/hyper_sssp.md.
Reviewed: every public entity of cpp/include/dyng/hyper_sssp.hpp (budget_action,
fallback_reason, the two to_string(), options, stats, result, compute(), update(),
and the detail contract the baseline lists: hyper_sssp_supported_v,
update_traits<hyper_sssp::result>, the two DYNG_HYPER_SSSP_* messages); M11a’s container
additions against what hyper_sssp ended up needing; the Python module and the command line (ADR
0097); docs/algorithms/hyper_sssp.md. Out of scope, as tracked: <dyng/testing/ hyper_sssp_reference.hpp> (PLAN 5.9: io, generators and testing are frozen as a whole later).
Findings and what was done#
# |
Area |
Finding |
Resolution |
|---|---|---|---|
1 |
Naming |
ADR 0004’s rules hold (clang-tidy’s naming rules pass): |
none needed |
2 |
The verb vocabulary |
|
none needed |
3 |
The uniform contract (against |
The same skeleton: an aggregate |
none needed (the sketch’s two departures are ADR 0090’s and HD8’s) |
4 |
|
Every field states its level; the inherited fields are explained in the class comment, |
Reworded: each names both engines’ limits |
5 |
Thread safety |
The result’s comment said its accessors may run concurrently with each other. |
Documented: those two may not overlap another call on the result or a change of its hypergraph (the other accessors may run concurrently); the Python binding holds the result’s lock exclusively and the hypergraph’s shared during them (ADR 0097). No library change (a lock in the result would change libdyng’s objects, whose gates step 4 reads; the documented rule is the C++ library’s general one, ADR 0023 note 5) |
6 |
Doxygen |
|
Reworded the three; |
7 |
Exceptions leaving the library |
|
none needed |
8 |
Exception guarantees |
|
none needed |
9 |
Host-compilability |
|
none needed |
10 |
Ownership and ABI |
|
none needed |
11 |
Limits |
weights in [1, 2^28] (MOSP_ESCHER’s), int32 vertex ids and parents, the |
Accepted: a later release may relax a limit (an api-change with a CHANGELOG entry), never tighten it |
12 |
Composition |
|
none needed |
13 |
M11a’s container additions against what hyper_sssp needed |
hyper_sssp reads |
none needed |
14 |
The sketch’s open questions |
(1) per-vertex distances as an array: yes, |
The sketch is marked frozen with both answers |
15 |
After 0.4 |
an OpenMP backend (HD14: later) adds a backend, not an API; escher-storage incidence edits and the composition with triad_count change requirements (documented behaviour; an api-change entry); the shared static solve inside the as-is engine (a roadmap follow-up of ADR 0095) is internal. |
No API change needed |
Decision#
The hyper_sssp API is frozen as reviewed, with the documentation amendments of findings 4, 5 and 6: every declaration of
<dyng/hyper_sssp.hpp>(its baseline section, thedetailcontract included), the Python names ofdyng.hyper_sssp(anddyng.update()over adyng.Hypergraphwith its results), and the flags, output files and exit statuses ofdyng hyper_sssp(ADR 0097). No signature changed in the review, so the freeze needs no migration note.Maturity. The manifest says
maturity = "stable"(with itsoriginof MOSP_ESCHER@4b86159 unchanged; the scaffold’s line and its planned entry removed), soci/api_snapshot.pylistsdyng/hyper_sssp.hppas frozen (ADR 0035 decision 2) andscripts/regen.pywritesstableinto the algorithm tables and the registry, as ADR 0060 did for triad_count. By HD17 this is stable from 0.4.0 only on the author’s confirmation at the release (GOVERNANCE.md, Open decisions, M11 (HD)); without it the release saysexperimentalagain (the manifest’s one field) while the header stays frozen.slack_csrstorage and the incidence edits join the stable hypergraph surface on the same confirmation (they are documented behaviour of the frozen hypergraph headers, ADR 0085). The registry’s maturity is a constant of libdyng’sregistry.cpp: its object differs from the step-2 library by that byte, which M11b’s final identity proof (criterion 10) accounts for.The baselines.
cpp/tests/api/api_snapshot/public_api.txtlists[dyng/hyper_sssp.hpp] frozen(ci/docs.sh --update-api); from the merge of M11b a removed or changed declaration of it failsci/docs.sh(against the baseline) andci/api_check.sh(against the base branch) without theapi-changelabel and a CHANGELOG entry. The Python half:ci/api_check.shruns griffe against the base branch, sodyng.hyper_ssspis checked from the commit that merges it intomain; the tests below pin the rule now.Both checks fail on a deliberate change (shown on 2026-11-11 in a throwaway clone of this branch at
1987c2b, the freeze commit, reverted and deleted; script and log$DYNG_SCRATCH/runs/m11b-step3/freeze-demo.{sh,log}), and the tests keep it:ci/tests/test_api_snapshot.py::test_the_hyper_sssp_header_is_frozen_and_a_change_is_breaking: the section is frozen with its detail contract, the oracle tracked; a changed default ofoptions::work_budget, a removedstats::relaxations, an int64hyperedge_parents()and a removed enumeratorinvalidation_depthare breaking changes of[dyng/hyper_sssp.hpp];ci/tests/test_api_check.py: a renamed parameter ofdyng.hyper_sssp.update, a changed default ofOptions.work_budgetand a removedResult.vertex_distancesare breaking changes for griffe.
Consequences#
From the merge of M11b,
<dyng/hyper_sssp.hpp>,dyng.hyper_ssspanddyng hyper_ssspchange only as api-changes (additive, or with a migration note), and are SemVer-stable from 0.4.0 once the author confirms (HD17).The thread-safety rule of finding 5 is the documented contract; a lock inside the result (which would let the two accessors run concurrently) is a possible later change that removes a restriction, never one that adds one.