#505 docs: contract has no CHANGELOG.md for tracking version history FIXED - #549
Merged
Conversation
docs: contract has no CHANGELOG.md for tracking version history FIXED
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The repository had no structured version history. A
CHANGELOG.mddid exist at theroot, but it was a by-product of the docs-consolidation work (#504) and did not
follow the Keep a Changelog format the issue
asks for: releases were identified by bare dates instead of Semantic Versions, there
were no link-reference definitions, breaking changes were never flagged, the file was
disconnected from the crate version, and nothing told contributors to update it — so
recently merged work (#503, #508, #514, proposal payload-hash verification) had
already drifted out of it.
This PR rewrites
CHANGELOG.mdto strict Keep a Changelog 1.1.0 + SemVer, backfillsthe full project history into six versioned releases (
0.1.0→0.6.0), flags everyon-chain breaking change with operator guidance, and — most importantly — makes the
format machine-enforced with a new dependency-free validator wired into CI, plus a
written contributor policy so the file cannot rot again.
No Rust source file is touched by this PR.
Type of Change
Changes Made
Documentation
CHANGELOG.md(rewritten, +191/-56)entry" preamble.
## [Unreleased]section, then six release sections:0.6.0(2026-08-01),0.5.0(2026-07-01),0.4.0(2026-06-01),0.3.0(2026-04-01),0.2.0(2026-02-01),0.1.0(2025-09-25).Added,Changed,Deprecated,Removed,Fixed,Security.offset→start_indexpagination rename (start_id parameter means different things across pagination functions, even within the same file #351), the unifiedClaimStatusreturn type (ContractClaimStatus and ClaimStatus are two parallel enums for the same three states #357), and the 22 new
ContractErrorvariants (codes 61-82).(
[Unreleased],[0.6.0]…[0.1.0]).Unreleased.docs/CONTRIBUTING.md(+73) — new## 6. Changelog Entries: the"every user-visible change needs an
Unreleasedentry" policy, a worked example,the BREAKING convention, local validation commands, the list of enforced rules, and
a 4-step release-cutting runbook. Also adds a PR-checklist item and a
## Changelogblock to the PR description template.
README.md(+2/-2) — changelog links now state the format and that it isCI-validated.
Tooling
scripts/validate_changelog.py(new) — standard-library-only validator. Failsthe build when the changelog:
# Changelogtitle and format references;## [Unreleased], or places it below a release;## [X.Y.Z] - YYYY-MM-DD(invalid SemVer ornon-ISO-8601 date);
dongle-contractversion indongle-smartcontract/Cargo.toml.scripts/test_validate_changelog.py(new) — 15 self-tests (14 positive/negativefixtures plus the live repository file). No pytest or third-party dependency needed.
.github/workflows/ci.yml(+10) — newvalidate-changelogjob running bothscripts on every push and PR. Placed alongside
validate-manifestso it fails fastbefore any Rust toolchain is provisioned; it does not gate
build, so a docs-formatfailure never blocks artifact production. Adds ~10s to CI wall time.
Version alignment
dongle-smartcontract/Cargo.toml:version = "0.1.0"→"0.6.0", matching thenewest changelog release (the validator now keeps these two in lockstep).
Cargo.lockanddongle-smartcontract/Cargo.lock:dongle-contractversion synced.Verified with
cargo metadata --locked— no lock drift, CI will not report"lock file needs to be updated".
.gitignore(+4): ignore__pycache__/,*.py[cod],.pytest_cache/generated bythe new Python scripts, consistent with the artifact hygiene established in refactor: remove test output text files committed to dongle-smartcontract directory #503.
Acceptance Criteria
CHANGELOG.mdexists at the repository root and follows Keep a Changelog 1.1.0.Addedwith issue/PR references.Test Coverage
All checks run locally on Rust
1.85.0(the version pinned in CI):python3 scripts/validate_changelog.pypython3 scripts/test_validate_changelog.pypython3 scripts/validate_deployments.py(pre-existing gate)cargo metadata --lockedcargo test -p dongle-contractcargo build -p dongle-contract --target wasm32-unknown-unknown --releasedongle-contract v0.6.0, 432,543-byte wasmTotal: 538 checks, 0 failures.
Negative-path evidence — the new validator run against the pre-fix
CHANGELOG.mdfrom
mainreports 8 violations (six date-as-version headings, "no releasedversions found", missing
[Unreleased]link definition); against the file in this PRit reports 0.
Known pre-existing failure (not introduced here)
cargo fmt --all -- --checkfails onchangelog_registry.rs,lib.rs,utils.rs,types.rs,events.rs,fee_manager.rsandverification_registry/storage.rs.This is an existing condition on
main: this PR modifies zero.rsfiles(
git diff --name-only | grep '\.rs$'returns nothing). Happy to fix it in a separateformatting-only PR if maintainers prefer.
Files Changed
Created (2)
scripts/validate_changelog.pyscripts/test_validate_changelog.pyModified (8)
CHANGELOG.mddocs/CONTRIBUTING.mdREADME.md.github/workflows/ci.ymldongle-smartcontract/Cargo.tomlCargo.lockdongle-smartcontract/Cargo.lock.gitignoreDiffstat:
8 files changed, 229 insertions(+), 56 deletions(-)plus the two new scripts.Reviewer Notes
0.6.0↔ 2026-08-01, etc.) preserves the previousdate-based sections one-for-one; only the labels became SemVer. Please confirm the
0.6.0starting point is the intended current version — if maintainers prefer1.0.0or a0.xpre-release scheme, only the headings, the link block andCargo.tomlneed updating, and the validator will confirm the result.vX.Y.Ztags that should becreated at release time (
git tag v0.6.0). The links resolve as soon as the tagsexist and do not affect validation.
validate_changelog.py::validate; every other rule is independent.Changelog
CHANGELOG.mdunder## [Unreleased](category: Added / Changed)Related Issues
Closes #505