Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]
### Added
- [805](https://github.com/thoth-pub/thoth/pull/805) - `BE-02`: implement the approved bounded **distribution platform model** as an inactive additive foundation. Adds the closed 17-value `DistributionPlatform` inventory from `ADR-0004` (no `OTHER`, no fallback, no `Default`, no shared enum or conversion with Thoth Metrics), code-owned compile-time-exhaustive platform descriptors, the PostgreSQL `distribution_platform` enum and the additive `publisher_distribution_platform` relation (composite primary key `(publisher_id, platform)`, `ON DELETE CASCADE` foreign key to `publisher`, named `enabled == (disabled_at IS NULL)` check constraint, partial enabled index and `set_updated_at` trigger), with `thoth-api/src/schema.rs` updated manually and atomically in the same PR under `ADR-0003` Architecture A. Implements the six-transition assignment activation lifecycle (retained disabled rows, application-generated activation UUIDs, one transaction timestamp per transition, same-state no-ops that move no timestamp) and atomic OAPEN/DOAB linked normalization that repairs one-sided, split-activation and split-timestamp pairs rather than treating them as idempotent; `OCLC_KB` and `EX_LIBRIS_KB` stay independently assignable, and `JISC_NBK` is included but inactive and non-assignable, failing closed before any write through the new stable `ThothError::DistributionPlatformNotAssignable` variant. Adds exactly four public additive GraphQL read surfaces — `distributionPlatformOptions`, `publishersByDistributionPlatform`, `publisherCountByDistributionPlatform` and `Publisher.distributionPlatforms` — with two new object types and three new enums, and **no** new mutation, input, scalar or interface; activation IDs, disabled history, adapter/feed identity, package/capability state and protected configuration are not exposed. `Publisher.distributionPlatforms` is the **first production consumer of the `ADR-0007` request-local non-cached DataLoader foundation**: a typed loader added to the existing `RequestLoaders` bundle, keyed on `publisher_id`, built through `configured_loader` with explicit `200`/`10`, loader-first at resolver entry, `try_load` only, total fail-closed batches, and one set-based `eq_any` statement per dispatch chunk executed entirely inside `tokio::task::spawn_blocking`. **Inactive foundation only: no distribution is activated, no distribution job or dissemination exists, the migration creates zero assignment rows, no production migration, deployment, backfill or assignment is performed, mutation-guard mode is unchanged, and no `BE-03`, `BE-04`, `MIG-01`, OAI, Metrics or PR [799](https://github.com/thoth-pub/thoth/pull/799) work is included.**
- [788](https://github.com/thoth-pub/thoth/pull/788) - `BE-02-SPEC`: reconcile the bounded BE-02 distribution-platform model specification against repository-authoritative `ADR-0007` and the merged request-scoped non-cached DataLoader foundation; replace the obsolete N+1 architecture escalation with the first-production-consumer loader-first contract (request-local non-cached loader, explicit `200`/`10`, `try_load`, total fail-closed batches, set-based Diesel inside `spawn_blocking`, and real-SQL `250 -> [200, 50] -> 2 statements` evidence), while preserving the approved 17-value distribution-platform inventory, assignment lifecycle, linked OAPEN/DOAB normalization, migration, public GraphQL API and rollback decisions. Documentation/control only - no runtime, Cargo, GraphQL implementation, schema implementation, migration implementation, workflow or infrastructure change; no implementation branch; no deployment or production action; no BE-03, BE-04, MIG-01, dissemination, Metrics, mutation-guard or PR #799 action. BE-02 implementation remains **NOT AUTHORIZED** pending fresh independent exact-head specification review, CTO specification approval, merge/repository authority and then separate fresh-base implementation authorization.
- [802](https://github.com/thoth-pub/thoth/pull/802) - `THOTH-GQL-DATALOADER-01`: implement the `ADR-0007` B0 request-scoped GraphQL **DataLoader foundation** and retire the superseded `ADR-0006` A2 batching machinery. Adds the pinned `dataloader 0.18.0` dependency (default features off, Tokio runtime support on) and a direct `tokio` (`rt`) dependency to `thoth-api`; a request-local, **non-cached** loader bundle (`RequestLoaders`) owned directly by the real GraphQL `Context` and dropped with it, with explicit `200` max-batch-size / `10` yield-count construction, `try_load`-only load API, total fail-closed batch functions, set-based Diesel (`eq_any`) behind a `tokio::task::spawn_blocking` boundary with no connection across `.await`, and a safe cloneable non-serde batch-error projection preserving each field family's current GraphQL error convention. Migrates the general GraphQL unit-test execution path from `juniper::execute_sync` to async Juniper through one bounded central bridge with explicit nested-runtime misuse failure. Removes the unused `ADR-0006` A2 infrastructure (`GraphqlBatchStore`/batching store, look-ahead prefetch, response-scope shim, A2 fixtures and A2-specific tests) and decouples loader availability from mutation-guard mode (`MutationGuardMode::store_available()` removed; `Context` construction no longer takes a guard mode), rehosting the guard/query-path/baseline/directive/duplicate-mutation regression evidence onto A2-independent fixtures. **Adopts no production GraphQL child field; changes no public SDL; performs no database or data migration; changes no guard mode (production remains `OFF`); activates no `OBSERVE`/`ENFORCE`; implements no `BE-02` or Thoth Metrics adoption; deploys nothing.** The pinned-Juniper duplicate top-level mutation execution finding remains a live, separately controlled concern and is **not** fixed by this change
- [801](https://github.com/thoth-pub/thoth/pull/801) - `THOTH-GQL-DATALOADER-SPEC-01`: propose the `THOTH-GQL-DATALOADER-01` implementation specification for the `ADR-0007` B0 request-scoped GraphQL **DataLoader foundation** and `ADR-0006` A2 retirement (`docs/engineering/ai-delivery/tasks/THOTH-GQL-DATALOADER-01.md`). **Specification and control record only — no runtime, Cargo, GraphQL, schema, migration, workflow or infrastructure change, no implementation, and no implementation branch created.** The proposed specification carries the approved `ADR-0007` architecture into a bounded implementable task: request-local non-cached `dataloader 0.18.x` loaders owned by the real GraphQL `Context`, async Juniper as the supported test/resolver execution model with one bounded central test bridge replacing `execute_sync`, explicit `200`/`10` batching configuration, `try_load`-only load API with total fail-closed batch functions, set-based Diesel behind a `tokio::task::spawn_blocking` boundary with no connection across `.await`, a safe non-panicking shareable batch-error representation (the spike's serde round-trip clone is prohibited as production plumbing), retirement of the unused A2 `GraphqlBatchStore`/prefetch/scope infrastructure, decoupling of batching availability from mutation-guard mode, and rehosting of the guard/duplicate-mutation regression evidence onto A2-independent fixtures. The foundation adopts **no** production GraphQL field and must keep production SDL byte-identical. Status is `APPROVED`: after independent exact-head review (`CHANGES REQUIRED`), bounded remediation of the three review findings (`query_path` preservation split, `mutation_guard.rs` boundary/`store_available()` removal, explicit observability/operations disposition) and fresh review of the corrected content, the CTO granted **specification approval only** on 2026-08-11 at exact PR head `bb4f57e0d446270b4c404879ef61b5e229e90bbf`; `THOTH-GQL-DATALOADER-01` implementation remains **NOT AUTHORIZED** — implementation authorization is a distinct later CTO decision after the approved specification is repository-authoritative on `develop`; `BE-02` and Thoth Metrics adoption, `OBSERVE`/`ENFORCE` activation, and PR [799](https://github.com/thoth-pub/thoth/pull/799)/`OPS-03` all remain outside scope and unauthorized.
Expand Down
Loading
Loading