Known consumers¶
This register records which published read surfaces each downstream repository depends on. A contract change to a surface is not complete until every listed consumer of that surface has a green Contract conformance suite (ADR-0019). It makes the "read contracts are released with their consumers" change posture checkable rather than aspirational.
The register is kept by hand. Update it when a consumer starts or stops using
a surface. Each dependency is a table row whose first cell is the surface name
in backticks; repository names and prose stay out of the tables.
tests/test_schema_reference_contract.py fails when a surface named here is
not granted to authenticated, so the register cannot claim a dependency the
database does not publish.
How consumers authenticate¶
A consumer reads the Read contracts with a Data hub session from the Edge
Function hub-session (ADR-0032). It sends the Tenant store access token of the
user it acts for, and gets {access_token, expires_at} for a Seat holder,
401 for an invalid or anonymous token, or 403 no_seat. It sets the access
token as its Data hub session and exchanges again before expires_at. There is
no refresh token and no anonymous session.
sales.sourceagent¶
Repository seed1207/sales.sourceagent — the sales application.
| Surface | Depended on for |
|---|---|
search_companies |
Company search and filtering in the prospecting UI; source Danish main_industry_text for company grids, lead lists, and pipeline cards (#857; consumer #244). |
company_search_filter_contract |
Live filter key, shape, enum, reference, and facet conformance. |
company_facet_counts |
Exact filter bucket counts and target-group total under the search data version. |
company_form_vocabulary |
Named company-form selections and explicit missing names (#765; consumer #157/#190). |
person_read_contract |
Live person vocabulary for consumer #116/#161; used by the request validator. |
accepted_prospect_evidence_contract |
Live card states, Hybrid filter rules and ranking versions for consumer #163. |
search_people |
Personer list (#768; consumer #161), authenticated producer conformance in test_person_read_contract.py. |
person_profile |
Person deep links (#768; consumer #116/#161), identity, role history and contact privacy conformance. |
hybrid_similar_companies |
Authenticated Hybrid queue mapping and policy filter conformance. |
accepted_prospect_evidence |
Accepted cards (#769; consumer #163), authenticated direct-lookup conformance in test_accepted_prospect_contract.py. |
Company detail and graph neighbours are consumed by the same application. Record further dependencies as their conformance suites land (spec #626).
For producer #860 and consumer
#236,
the cvrs set key selects 1–5,000 eight-digit JSON integer CVRs through ordinary
search and exact facet counts. Other filters combine with AND. The consumer
registry must serialize CVRs as numbers, not strings. This contract addition
does not ship the Saved view UI.
For #861, ownership_pct and voting_pct remain source fractions in [0,1].
The sales display fix in
#247
correctly multiplies by 100 for percentage display. No stored unit or public
field name changes, so there is no data conversion or consumer unit cutover.
For #857, the company-list contract returns the source industry label on every
search path and on active_companies, with null for a missing source label.
Consumer #244 must use that value instead of a static DB07 lookup for DB25 codes.
Producer coverage is
test_company_search_contract.py::test_company_list_surfaces_return_source_industry_text.
For #859, search_companies provides server-side descending numeric orders
over every match. A consumer can use gross_profit, revenue, result, or
employees with a bound cursor instead of sorting a capped local result set.
tests/test_company_search_numeric_sorting.py covers the producer contract.
For #707, current website reads exclude unverified historical directory observations. The same selection governs search, detail, filters, and facets; raw observations and retained page artifacts remain internal audit evidence.
Validation for #857/#859/#707: all 23 tests in six sales conformance files passed
at consumer revision df1a7b81468318c4cdccd3a00b2fb8c8c53f8b1a, against a separate
disposable PostgreSQL database rebuilt from the full producer migration chain.
The new reads and their vocabulary operations are producer contracts for the named pending consumer
features, not a claim that their UI has shipped. Their conformance tests use
SET LOCAL ROLE authenticated against the full migration chain and prohibit
base-table access. Consumer UI delivery remains in #116, #161, and #163.
Validation for #768/#769/#678: the existing sales conformance suite passed
all six tests at consumer revision da184468838fb39cd9f96ed16492213dbb48b31f,
using a separate disposable UTF-8 database rebuilt from this producer's full
migration chain. The new authenticated producer suites cover 34 person/card
cases, including published vocabularies, source states, withdrawal, private
access, and publication visibility before/after commit. The sales suite does
not yet contain handlers for the pending person/card UI features.
For #783, the sales application's six conformance files pass all 22 tests
against the full producer migration chain, including authenticated Hybrid and
accepted-card reads. The producer's test_hybrid_exclusions_contract.py adds
matching, missing evidence, combined policies, multi-page continuation,
changed-filter rejection and restricted-profile cases under authenticated.
agent.sourceagent¶
The Agent Chat consumer's tools/platform.py _share also multiplies source
ownership and voting fractions by 100 for display (#861). Keep this conversion
at the display boundary: the producer continues to return 1.0 for 100%.
No stored values or consumer scaling rules change.