Skip to content

MET-MIG-V1.9-RECON-01: reconcile unreleased Metrics migration suffix to v1.9.0 (#868) - #871

Merged
ja573 merged 3 commits into
feature/metricsfrom
feature/metrics--v1.9-migration-reconcile
Aug 31, 2026
Merged

MET-MIG-V1.9-RECON-01: reconcile unreleased Metrics migration suffix to v1.9.0 (#868)#871
ja573 merged 3 commits into
feature/metricsfrom
feature/metrics--v1.9-migration-reconcile

Conversation

@ja573

@ja573 ja573 commented Aug 31, 2026

Copy link
Copy Markdown
Member

MET-MIG-V1.9-RECON-01 — reconcile unreleased Metrics migration suffix to v1.9.0

Bounded programme-integration task for issue #868 (Thoth Metrics / #766).

Authorization

What this changes

Thoth v1.8.0 is published, and make migration derives the suffix from the workspace version by incrementing the minor, so the next migration suffix is v1.9.0. The three unreleased Metrics migration directories on feature/metrics still carried the _v1.8.0 suffix the published release now owns.

thoth-api/migrations/20260826_v1.8.0 -> 20260826_v1.9.0
thoth-api/migrations/20260827_v1.8.0 -> 20260827_v1.9.0
thoth-api/migrations/20260828_v1.8.0 -> 20260828_v1.9.0

Plus the current forward-looking migration-path references only: the MET-WP1-01/02/03 CHANGELOG entries and the three Metrics test doc comments, one bounded ### Changed CHANGELOG entry, and one implementation report.

This is release-number coordination only. No SQL, schema semantics, schema.rs contract, Rust domain type, GraphQL/API surface, authorization, data, dependency, Cargo/workspace version, Makefile or deployment state changes.

Ledger neutrality

Diesel derives the migration version from the text before the first underscore, so _v1.8.0/_v1.9.0 is the directory release/display name, not the ledger version. Versions remain exactly 20260826, 20260827, 20260828.

Proven on a single disposable PostgreSQL 17.10 database:

  1. applied the full chain from the pre-rename source at the authorized base (binary SHA-256 c7ef82b4…, embeds _v1.8.0 names) — exit 0, 12 ledger rows;
  2. kept that same database;
  3. renamed, touched thoth-api/src/db.rs to force embed_migrations! re-expansion, rebuilt (binary SHA-256 3ce9a7b6…, embeds only _v1.9.0 names, zero _v1.8.0 strings) — no stale binary reused;
  4. re-ran the harness against the same database — exit 0, and the ledger (version + run_on) is byte-identical: 2d71805bbbaa17fe467964e9aedebc63d61280545ceefae797ba6e2e54368ae8 before and after.

20260826, 20260827 and 20260828 were neither reported pending nor replayed because the directory suffix changed. __diesel_schema_migrations was never edited by hand, and no staging/production or other persistent shared database was touched.

Full chain apply → revert → reapply succeeds from both sources, with an identical canonical schema hash 6d8e63e2b1ea4a815dc2ffde62cb402cc0338b5a8e5afd5f77588ce3d19f36d2.

Blob proof

All six SQL files are byte-identical to the authorized pre-rename anchors; Git records every move as R100 and the diff contains zero SQL content lines.

Migration up.sql down.sql
20260826 c8efef3c9c944c950fca546ab13459025d3f1943 2f8fa64811f0c406e0f530dc7186372b910d80c5
20260827 ca60e1cf78ea8e8c09eba5f12ec9e58ec9d37aec 8c90d7b781377c440df4042152d0a7a93a015b12
20260828 61d1dbfdffa3c8b67156eadce445f06a689c2cb7 0e7a0f6d220080f59547842c3e859056f68f9f10

Modes preserved (100644); the executable MET_WP1_0*_MIGRATION_VERSION constants stay date-only and unchanged; the historical MET-WP1-01/02/03 implementation reports and prior issue/PR/review evidence deliberately keep their _v1.8.0 wording as point-in-time provenance.

Validation

Command Result
cargo fmt --all -- --check exit 0
cargo check --workspace exit 0
cargo clippy --all --all-targets --all-features -- -D warnings exit 0 (local Clippy 0.1.97)
cargo test --workspace exit 01557 passed, 0 failed, 8 ignored
cargo test -p thoth-api --features backend exit 0
git diff --check exit 0

Targeted MET-WP1-01/02/03 revert/reapply tests and the BE-04 historical-name invariant test all pass.

Implementation report

docs/engineering/ai-delivery/implementation-reports/MET-MIG-V1.9-RECON-01-implementation-report.md

Gate

MET-MIG-V1.9-RECON-01 IMPLEMENTATION COMPLETE AT EXACT TASK HEAD - PR CI / FRESH INDEPENDENT EXACT-HEAD SOURCE REVIEW REQUIRED

Do not merge without fresh independent exact-head source review and separate explicit CTO merge authorization bound to the reviewed head. The implementing agent did not and may not approve its own work.

Refs #766
Refs #868

ja573 added 2 commits August 31, 2026 09:24
…to v1.9.0

Thoth v1.8.0 has been published, and the repository's `make migration` target
derives the migration suffix from the workspace version by incrementing the
minor, so the next migration suffix is now v1.9.0. The three unreleased Metrics
migration directories on `feature/metrics` were created while the workspace
baseline was 1.7.0 and therefore still carry the `_v1.8.0` release suffix that
the published release now owns.

Rename the three directories to their correct release/display suffix:

    thoth-api/migrations/20260826_v1.8.0 -> 20260826_v1.9.0
    thoth-api/migrations/20260827_v1.8.0 -> 20260827_v1.9.0
    thoth-api/migrations/20260828_v1.8.0 -> 20260828_v1.9.0

All six up.sql/down.sql blobs are preserved byte-for-byte with their file modes;
Git records every move as a 100%-similarity rename and the diff contains no SQL
content change.

Diesel derives a migration version from the text before the first underscore, so
the versions remain exactly 20260826, 20260827 and 20260828 and the suffix-only
rename is ledger-neutral: an already-applied migration is neither replayed nor
reported pending because its directory display name changed. This was proven on
a single disposable PostgreSQL database by applying the chain from the
pre-rename source, rebuilding the embedded migration source after the rename and
re-running the harness, leaving the `__diesel_schema_migrations` rows and their
run_on timestamps byte-identical. Full chain apply/revert/reapply also succeeds
from both sources with an identical resulting schema.

Update only the current forward-looking migration-path references: the
MET-WP1-01, MET-WP1-02 and MET-WP1-03 CHANGELOG entries and the three Metrics
test doc comments. The executable MET_WP1_0*_MIGRATION_VERSION constants stay
date-only and unchanged.

Release-number coordination only: no migration SQL, schema semantics,
thoth-api/src/schema.rs contract, Rust domain type, GraphQL/API surface,
authorization, data, dependency, Cargo/workspace version, Makefile or deployment
state changes. The historical MET-WP1-01/02/03 implementation reports and prior
issue, PR and review evidence keep their original `_v1.8.0` wording as
point-in-time provenance and are deliberately not rewritten.

Refs #766
Refs #868
Record the durable implementation evidence for the v1.9.0 migration
release/display suffix reconciliation: exact authorized base and preflight
results, the complete changed-path inventory and write-budget compliance, the
before/after SQL blob proof against the authorized anchors, the disposable
PostgreSQL full chain apply/revert/reapply, the same-database ledger-neutrality
proof with a rebuilt embedded migration source, the repository validation
commands and their exact results, external/runtime/data/auth/security effects,
limitations and the remaining gates.

The report is evidence only. It is not self-approval, and the implementing agent
does not review, approve or merge its own work.

Refs #766
Refs #868
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

Complete section 11 of the implementation report with the observed automatic
workflow evidence for PR #871 at head 6691190:

  build-test-and-check  33372926680  success
  run-migrations        33372926670  success
  check-changelog       33372926615  success
  publish-to-dockerhub  33372926642  success

All ten PR checks pass. The run-migrations workflow independently reproduced the
apply/revert/reapply chain on a disposable postgres:17 service, and the CI lint
job supplies the authoritative Clippy result for this head, resolving the local
toolchain skew recorded as a limitation.

Also record the explicitly authorized automatic staging-image publication,
ghcr.io/thoth-pub/thoth:staging-pr-871 at digest
sha256:c7b80a18ca5196f5b55bdfd6f9067fc2e24ca0f7bbd4720e9e5efe43bb68b6c8, noting
that its image.revision label is the ephemeral pull_request merge ref rather
than the task head.

No workflow was manually dispatched, rerun or cancelled. Evidence only; this
records no approval.

Refs #766
Refs #868
@ja573
ja573 merged commit 30185af into feature/metrics Aug 31, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant