Skip to content

ADR-02 - Supersede distribution platform inventory for Figshare/Cambridge retirement #842

Description

@ja573

ADR-02 - Supersede distribution platform inventory for Figshare/Cambridge retirement

Status

SPECIFICATION / ARCHITECTURE DECISION CANDIDATE - AWAITING INDEPENDENT REVIEW AND CTO APPROVAL

Implementation: NOT AUTHORIZED

Current gate: HOLD - independent specification/decision review -> explicit CTO approval of the exact ADR decision -> fresh exact-base documentation implementation authorization -> exact-head source review -> separate merge authorization -> merge to develop.

This task exists because independent review of BE-05 / #840 returned CHANGES REQUIRED in comment 5441494405. The review correctly established that retiring Figshare and Cambridge University Library materially changes the approved, repository-authoritative ADR-0004 decision and therefore cannot be implemented by editing ADR-0004 in place.

No source/file write, branch, commit, push, PR, CI dispatch, provider/runtime/data access, merge, release, deployment or production activation is authorized by this issue creation.

1. Task identity

  • Programme: Publisher Services and Distribution Configuration
  • Parent programme issue: thoth-pub/thoth#765
  • Task ID: ADR-02
  • Repository: thoth-pub/thoth
  • Programme stage: architecture amendment / destination retirement prerequisite
  • Workflow: STANDARD
  • Risk: HIGH
  • Specification baseline: develop @ a6c8cb2016179db635c4bc86ef366aae190829c2
  • Base branch: develop
  • PR target: develop
  • Proposed task branch after separate implementation authorization: feature/publisher-services/adr-02
  • Required repository decision ID: ADR-0010
  • Proposed ADR path: docs/engineering/decisions/ADR-0010-distribution-platform-retirement.md
  • Exact authorized implementation base: NONE - must be freshly established after decision approval
  • Runtime/schema/data/auth/provider effect at this task: NONE
  • Blocked consumer: BE-05 / BE-05 - Deprecate Figshare and Cambridge University Library distribution destinations #840
  • Downstream consumers after BE-05: thoth-pub/thoth-dissemination#101 (DIS-03) and thoth-pub/thoth-app#157 (APP-04)

Live preflight at issue creation:

  • develop = a6c8cb2016179db635c4bc86ef366aae190829c2;
  • repository decision files stop at ADR-0009; ADR-0010 is unused;
  • no feature/publisher-services/adr-02 ref exists.

These are specification facts only and must be reverified before any branch creation.

2. Authority and reason for a superseding ADR

Repository doctrine in docs/engineering/decisions/README.md states that after approval, material architectural changes require a new ADR that supersedes the old one; only factual clarifications that do not alter the decision may edit an approved ADR in place.

ADR-0004 - Distribution platform inventory is APPROVED AND REPOSITORY-AUTHORITATIVE. Its normative inventory currently records CAMBRIDGE_UNIVERSITY_LIBRARY and FIGSHARE as assignable AutomaticPush destinations, and its rollout section explicitly says a later approved inventory change supersedes ADR-0004 rather than editing history.

The CTO product decision of 2026-08-27 retires both services while retaining their stable historical identities. That changes assignment availability for two existing values and introduces assignment-option visibility as a distinct descriptor concern. It is therefore a material decision and requires a superseding ADR.

The independent BE-05 review record 5441494405 is authoritative review evidence for the defect in the previous specification, but it does not approve this new ADR task or decision.

3. Objective

Record a new repository-wide current decision, ADR-0010, that supersedes ADR-0004 for the DistributionPlatform inventory and descriptor policy while preserving historical enum identities and all unaffected architecture.

The decision must make Figshare and Cambridge University Library retired, non-assignable and hidden from assignment options; preserve JISC_NBK as inactive/non-assignable but visible; retain all 17 stable enum/database identities; preserve historical assignment/location/audit/job evidence; and define the architecture contract that BE-05 may implement only after ADR-0010 is approved and merged into develop.

ADR-02 is documentation/architecture work only. It does not itself change runtime platform behavior.

4. Exact proposed ADR-0010 decision

Independent review and CTO approval of this issue must evaluate the following exact decision. The implementation agent must not invent or widen architecture beyond it.

4.1 Stable inventory

DistributionPlatform remains a closed, exhaustive inventory of exactly the same 17 stable identities, in the same canonical order and with the same serialized/database labels.

No value is deleted, renamed, renumbered, reused or replaced by OTHER/fallback behavior.

4.2 Destination retirement

The current policy becomes:

Platform Mechanism readiness Assignment availability Assignment-option visibility
CAMBRIDGE_UNIVERSITY_LIBRARY Inactive NonAssignable Hidden
FIGSHARE Inactive NonAssignable Hidden
JISC_NBK Inactive NonAssignable Visible
all other current destinations unchanged from ADR-0004 unchanged from ADR-0004 Visible

Assignment-option visibility is a code-owned domain policy distinct from mechanism readiness and assignment availability. Hidden does not mean deleted or unknown.

Retained adapter/profile names for retired destinations are historical/domain provenance only and do not assert a currently executable service.

4.3 GraphQL assignment-option projection

The stable GraphQL DistributionPlatform enum continues to expose all 17 identities.

The assignment-option projection is intentionally smaller:

  • exactly 15 visible distributionPlatformOptions rows;
  • omit only CAMBRIDGE_UNIVERSITY_LIBRARY and FIGSHARE;
  • retain JISC_NBK with assignable=false;
  • preserve canonical relative order;
  • executable field/type/enum/nullability shape remains unchanged.

The GraphQL query-field description must truthfully describe a visible assignment-option projection rather than claim to return the complete stable inventory.

4.4 Historical state and reconciliation

Retirement does not delete or rewrite historical platform-assignment rows, service-configuration history, location records, durable-job records or audit evidence.

Retired identities remain parseable and usable for historical reads, reverse lookup and controlled disable/reconciliation paths.

A publisher that still holds a retired enabled assignment must be reconciled before backend activation of the new non-assignable policy. Frontends must not hide unresolved enabled canonical state with a local platform-name denylist.

4.5 Migration/backfill consequence

The closed MIG-01 administrative facade is an additional in-repository consumer of DistributionPlatform::is_assignable(). After the retirement policy is implemented, a historical/future MIG-01 dry-run manifest that requests either retired destination may fail closed as MigrationBackfillManifestInvalid at whole-manifest planning granularity.

This does not reopen or invalidate completed MIG-01 production evidence. MIG-01 is closed, and its 2026-08-25 production reconciliation remains historical authoritative evidence for the state it verified. Re-running a historical manifest after the policy change is not guaranteed to reproduce the earlier facade result and is not an authorized continuation of the closed production operation. Any future need to replay/revalidate such a manifest is fresh controlled work with a fresh specification/evidence gate.

ADR-02 does not change migration_backfill.rs.

4.6 Automatic job creation

This decision does not authorize THOTH_DISTRIBUTION_JOB_CREATION to move from OFF. General durable-job creation remains separately gated by the Publisher Services worker/readiness programme.

4.7 Downstream ordering

The architecture dependency order is:

ADR-0010 approved + merged -> BE-05 source implementation/review/merge -> DIS-03 pins exact merged BE-05 contract -> DIS-03 source review/merge -> separately authorized dissemination runtime retirement -> production assignment/job audit and reconciliation -> backend production activation -> APP-04 integration verification.

No downstream repository may guess the unmerged ADR/BE-05 contract.

5. Supersession semantics

After ADR-0010 is explicitly CTO-approved, faithfully recorded, independently source-reviewed and merged into develop:

  • ADR-0010 becomes the current repository-authoritative DistributionPlatform inventory/descriptor decision;
  • ADR-0004 becomes SUPERSEDED by ADR-0010;
  • ADR-0004 remains immutable historical evidence apart from the minimum status/superseded-by metadata needed to point to ADR-0010; its original decision tables, evidence and approval history must not be rewritten;
  • decision-register.md must identify ADR-0010 as current and ADR-0004 as superseded;
  • docs/publisher-services/platform-inventory.md becomes the current inventory surface under ADR-0010 and must no longer present the superseded assignability state as current.

ADR-0010 must explicitly carry forward all ADR-0004 decisions/invariants not changed by section 4 above, including the closed 17-value inventory, no fallback, linked OAPEN/DOAB behavior, shared OCLC/Ex Libris feed distinction, conservative update/withdrawal policy, destination-vs-adapter distinction, and historical evidence boundaries. The new ADR must be sufficient as the current normative decision without requiring an implementer to guess which superseded ADR-0004 rules survived.

6. Scope

After independent specification/decision review, explicit CTO approval and a later fresh exact-base implementation authorization, ADR-02 may only:

  1. create ADR-0010 with the exact approved decision above and the required retained ADR-0004 invariants;
  2. minimally update ADR-0004 status/superseded-by metadata without rewriting its historical decision content;
  3. update decision-register.md so ADR-0004 is superseded and ADR-0010 is the current approved decision;
  4. update the current Publisher Services platform inventory to the 17-stable / 15-visible-option retirement semantics;
  5. add a bounded changelog entry;
  6. record implementation evidence in GitHub issue/PR records. No repository implementation-report file is required for ADR-02 unless a later reviewed specification amendment explicitly adds one.

7. Exact candidate write budget

Existing files permitted:

  • docs/engineering/decisions/ADR-0004-distribution-platform-inventory.md - status/superseded-by metadata only; no historical decision rewrite
  • docs/engineering/decisions/decision-register.md
  • docs/publisher-services/platform-inventory.md
  • CHANGELOG.md

New files permitted:

  • docs/engineering/decisions/ADR-0010-distribution-platform-retirement.md

Deletion/move/rename: NONE

No Rust, SQL, migration, GraphQL, generated client, workflow, auth, provider or downstream-repository file is in scope.

If another path is required to make the decision repository-authoritative, return HOLD and amend the specification before editing it.

8. Non-goals

ADR-02 must not:

  • implement BE-05 runtime behavior;
  • modify DistributionPlatform Rust code or tests;
  • modify GraphQL source or generated schema/client artifacts;
  • modify migration_backfill.rs or reopen MIG-01;
  • modify thoth-dissemination or thoth-app;
  • delete historical rows/evidence;
  • inspect or mutate production/provider/runtime state;
  • enable distribution-job creation;
  • create/dispatch operational workflows;
  • merge, release, deploy or activate production behavior as a side effect of ADR recording.

9. Acceptance evidence for ADR implementation

The later ADR-02 source PR must prove:

  • ADR-0010 exists at the exact approved path and contains the exact approved retirement decision;
  • ADR-0010 restates/carries forward every still-current ADR-0004 invariant needed for a standalone current decision;
  • ADR-0004 historical content is unchanged except minimum supersession metadata;
  • decision-register.md marks ADR-0004 superseded and ADR-0010 current without stale conflicting authority text;
  • platform-inventory.md contains exactly 17 stable identities, CUL/Figshare retired/nonassignable/hidden, JISC inactive/nonassignable/visible, and the 15-option projection rule;
  • no runtime/source/schema/migration/API/workflow behavior changes in the PR;
  • no historical task/review/implementation evidence is rewritten as though this decision existed earlier;
  • relative links resolve;
  • git diff --check passes;
  • normal repository CI for the exact PR head is reviewed before merge.

10. CI and automatic external side effects

Current Thoth PR workflows can automatically run build/test/classification checks and may publish a staging-pr-* GHCR image on a PR, including when the classifier path fails rather than only when it explicitly selects Docker work.

Therefore any later authorization to open/update the ADR-02 PR must unconditionally acknowledge the possibility of automatic staging-image publication. That side effect is not authorized by this specification candidate.

Manual CI dispatch remains unauthorized.

11. Rollout and rollback

ADR rollout is repository authority only:

  1. exact ADR decision receives independent review;
  2. CTO explicitly approves the exact decision;
  3. a separate implementation authorization binds a fresh develop SHA and exact write budget;
  4. the decision is recorded on one bounded task branch/PR;
  5. the exact source head receives independent review;
  6. HIGH-risk merge requires explicit CTO merge authorization;
  7. merge to develop makes ADR-0010 repository-authoritative;
  8. only then may BE-05 receive implementation authorization relying on it.

No runtime behavior changes merely because ADR-0010 merges.

Rollback of the architecture decision requires a later approved superseding ADR. Do not restore ADR-0004 as current by silently editing status/index files or rewriting historical evidence.

12. HOLD / STOP

HOLD if:

  • this exact issue/decision is not independently reviewed and CTO-approved;
  • ADR-0010 becomes occupied by another decision before implementation;
  • develop moves after an implementation base is authorized;
  • the proposed task branch appears/overlaps before authorization;
  • another source path becomes necessary;
  • the decision would require an executable GraphQL, migration, auth, job, provider or downstream-source change in ADR-02 itself;
  • authoritative repository doctrine conflicts with this supersession route.

STOP if implementation begins:

  • rewriting ADR-0004 historical decision content;
  • changing Rust/GraphQL/schema/migrations/workflows;
  • accessing production/provider state;
  • enabling job creation;
  • merging/releasing/deploying/activating without the separate applicable gate.

13. Candidate action-authorization matrix

This matrix is specification content only. It is not active authorization.

Action Candidate authorization after later exact-base implementation approval
repository/GitHub read YES
edit existing files in exact write budget YES
create only ADR-0010 file YES
delete/move/rename NO
create task branch from exact authorized base YES
local documentation/static validation YES
commit YES
push YES
open/update draft PR YES only if authorization explicitly accepts automatic PR CI/GHCR side effect
issue/comment evidence mutation YES
manual CI dispatch/rerun NO
provider/runtime/database read or write NO
migration execution NO
merge NO
release/deploy/production activation NO

14. Current authorization

Authorized by the control-plane step that created this issue:

  • live repository/GitHub read inspection;
  • creation of this repository-local ADR task/specification;
  • bounded issue/comment coordination needed to record the resulting dependency.

Not authorized:

  • repository source/file mutation;
  • branch creation;
  • commit/push;
  • PR creation/mutation;
  • automatic staging-image publication caused by a new PR;
  • CI dispatch/rerun;
  • provider/runtime/production/database access;
  • migration execution;
  • merge/release/deployment/activation.

15. Required independent review

Use a fresh non-preparing reviewer; because this is HIGH risk and controls cross-repository behavior, prefer a different model/model family.

The reviewer must inspect the exact issue decision against live:

Decision: APPROVED, CHANGES REQUIRED or BLOCKED.

An APPROVED review is architecture/specification review evidence only. It does not authorize source implementation, PR activity, merge or runtime action.

16. Next action

Obtain an independent specification/architecture review of this exact issue. If approved, obtain explicit CTO approval of the exact ADR-0010 decision. Only after that may a fresh exact-base documentation implementation authorization be considered.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions