chore(release): harden nick contract for v0.1.2

This commit is contained in:
2026-08-15 23:46:57 +09:00
parent e6a90800ec
commit c292df0a4b
8 changed files with 97 additions and 22 deletions
+4 -4
View File
@@ -65,11 +65,11 @@ def test_checkout_identity_is_exact():
def test_project_version_must_match_release_tag(tmp_path):
project = tmp_path / "pyproject.toml"
project.write_text('[project]\nversion = "0.1.1"\n')
assert image_release.project_release_version(project) == "v0.1.1"
assert image_release.validate_release_event("push", "refs/tags/v0.1.1", COMMIT, "v0.1.1") == "v0.1.1"
project.write_text('[project]\nversion = "0.1.2"\n')
assert image_release.project_release_version(project) == "v0.1.2"
assert image_release.validate_release_event("push", "refs/tags/v0.1.2", COMMIT, "v0.1.2") == "v0.1.2"
with pytest.raises(ValueError, match="project version"):
image_release.validate_release_event("push", "refs/tags/v0.1.2", COMMIT, "v0.1.1")
image_release.validate_release_event("push", "refs/tags/v0.1.3", COMMIT, "v0.1.2")
def test_installed_smoke_has_import_cli_exact_inventory_and_cleanup():
inventory = tuple(
+7 -4
View File
@@ -47,10 +47,10 @@ def test_workflow_actions_are_commit_pinned_and_verify_version_is_project_derive
assert len(revision) == 40 and all(char in "0123456789abcdef" for char in revision)
verify = VERIFY.read_text()
assert "tomllib" in verify and 'RELEASE_VERSION=${RELEASE_VERSION}' in verify
assert 'RELEASE_VERSION=v0.1.1' not in verify
assert 'RELEASE_VERSION=v0.1.2' not in verify
def test_release_version_and_migration_contract_are_v011_head_0029():
def test_release_version_and_migration_contract_are_v012_head_0029():
project = (REPO / "pyproject.toml").read_text()
config = (REPO / "app/core/config.py").read_text()
migrations = sorted(
@@ -58,8 +58,8 @@ def test_release_version_and_migration_contract_are_v011_head_0029():
for path in (REPO / "app/db/alembic/versions").glob("*.py")
if path.name != "__init__.py"
)
assert 'version = "0.1.1"' in project
assert 'app_version: str = "0.1.1"' in config
assert 'version = "0.1.2"' in project
assert 'app_version: str = "0.1.2"' in config
assert len(migrations) == 29
assert migrations[-1].startswith("20260814_0029")
@@ -85,6 +85,9 @@ def test_operations_separate_publication_deployment_migration_and_db_rollback():
"Image rollback is **not** database rollback",
"read-only root filesystem",
"10001:10001",
"PortfolioHub v0.1.2 container contract",
"v0.1.2 introduces no schema migration",
"trex-web v0.2.2 requires this backend contract",
):
assert value in text
for forbidden in (