Skip to content

fix: backfill schema-publication ledger entries to unblock dev->main - #555

Merged
Brad-Edwards merged 2 commits into
devfrom
fix-schema-ledger-backfill
Jun 15, 2026
Merged

fix: backfill schema-publication ledger entries to unblock dev->main#555
Brad-Edwards merged 2 commits into
devfrom
fix-schema-ledger-backfill

Conversation

@Brad-Edwards

Copy link
Copy Markdown
Collaborator

Summary

Unblocks the dev → main integration PR #545, whose verify job fails at the
contracts / schema publication manifest gate.

Root cause

The last_change change-ledger requirement in tools/check_schema_publication.py
(_check_change_ledger, ADR-009 §7) was introduced on dev (commit 5e77a5d)
and does not exist on main. The gate requires a contract-facing last_change
entry for any published schema whose content differs from the comparison base.

Per-PR CI compares schemas against dev, so the participant backend-facing
contract family (ADR-060, issue #76) and the DSL-132/DSL-141 datastore additions
— which all landed before the gate — never required a ledger entry. PR #545
(dev → main) is the first time the schema delta is evaluated against main,
where all 11 read as changed and the gate fails with "changed without a
contract-facing change description".

This is pre-gate schema-evolution debt surfaced at the integration boundary, not
a regression in any single feature PR.

Change

Backfill a last_change entry (a contract-facing summary + the schema's current
canonical content_hash) for the 11 affected published schemas in
contracts/schema-publication-manifest.json:

  • backend-manifest-v2, backend-profile-v1 (API-407 manifest/profile extension)
  • sdl-authoring-input-v1 (DSL-132/DSL-141 datastore-node surface)
  • the participant family: participant-{context,history,status}-view-v1,
    participant-{lifecycle-event,observation-envelope,outcome-report,shared-state-record}-v1,
    participant-behavior-history-event-stream-v1

No schema content changes — only ledger metadata. Each last_change.content_hash
equals the entry's existing content_hash (already validated against the schema file).

Verification

  • python tools/check_schema_publication.py --base-rev origin/main → exit 0 (reproduces and clears Dev #545's failing check)
  • tools/check_repo_policy.py --base-rev origin/dev → pass
  • tools/check_generated_schemas.py → pass; JSON valid

Once this merges to dev, re-run #545's checks and the schema-publication gate passes; after main carries these schemas the gate will not re-fire for them.

…amily

The last_change change-ledger requirement in check_schema_publication.py
(ADR-009 section 7, _check_change_ledger) was introduced on dev after the
participant backend-facing contract family (ADR-060, issue #76) and the
DSL-132/DSL-141 datastore additions had already landed. Per-PR CI compares
schemas against dev, so those schema changes never required a ledger entry;
the dev->main PR (#545) is the first evaluation against main, where all 11
schemas read as changed and the gate fails.

Backfill a contract-facing last_change entry (summary + current content_hash)
for each of the 11 affected published schemas so the dev->main schema
publication gate passes. No schema content changes.
@Brad-Edwards
Brad-Edwards merged commit 27c2fb0 into dev Jun 15, 2026
3 checks passed
@Brad-Edwards
Brad-Edwards deleted the fix-schema-ledger-backfill branch June 15, 2026 05:11
@sonarqubecloud

Copy link
Copy Markdown

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