feat: Versionskandidat statt Bump-pro-Release - VERSION traegt -beta.N, version release fixiert (4.4.0, #42)
CI / verify (push) Successful in 47s
Release / release (push) Successful in 35s

Files changed:
- .gitea/workflows/release.yml
- AGENTS.md
- CHANGES.md
- DEVELOPMENT.md
- README.md
- VERSION
- docs/version-model.md
- instructions/dev/version-parts.md
- tools/CONTRACT.md
- tools/chemenu/commands/dist_cmd.py
- tools/chemenu/commands/docs_verify.py
- tools/chemenu/commands/doctor.py
- tools/chemenu/commands/migrate_cmd.py
- tools/chemenu/commands/version_cmd.py
- tools/chemenu/kb_state.py
- tools/chemenu/tests/test_dist_cmd.py
- tools/chemenu/tests/test_docs_verify.py
- tools/chemenu/tests/test_doctor.py
- tools/chemenu/tests/test_migrate_cmd.py
- tools/chemenu/tests/test_version_cmd.py
- tools/chemenu/version.py
This commit is contained in:
torben committed 2026-09-03 22:19:41 +02:00
1 parent b1883befc7
commit d29d400dd3
21 files changed
+1063 -119

No files matched your search

+27
View File
@@ -162,6 +162,33 @@ def test_an_unreadable_kb_state_fails(instance):
assert _status(doctor.run_doctor(), "kb-version") == "FAIL"
def test_a_running_candidate_is_named_as_such(instance):
(config.ROOT / "VERSION").write_text("0.2.0-beta.1\n", encoding="utf-8")
detail = next(c.detail for c in doctor.run_doctor() if c.name == "stack-version")
assert "0.2.0-beta.1" in detail
assert "candidate" in detail
def test_kb_version_chain_still_reaches_a_target_matching_a_running_candidate(instance):
"""Regression for finding #3: comparing the chain against the raw
candidate would sort `2.0.0` (the migration's target) *before*
`2.0.0-beta.1` (what is installed), dropping it out of the owed range."""
(config.ROOT / "VERSION").write_text("2.0.0-beta.1\n", encoding="utf-8")
(config.ROOT / ".wikitool-kb.json").write_text(
'{"schema": 1, "kb_version": "1.0.0", "applied": []}', encoding="utf-8"
)
migrations = config.INSTRUCTIONS_DIR / "migrations"
migrations.mkdir(parents=True, exist_ok=True)
(migrations / "2.0.0-retype.md").write_text(
"---\ntype: types/instruction.md\nname: 2.0.0-retype\n"
"description: Retype.\nmanual: true\nmigrates_to: 2.0.0\n---\n",
encoding="utf-8",
)
checks = doctor.run_doctor()
assert _status(checks, "kb-version") == "WARN"
assert "outstanding" in next(c.detail for c in checks if c.name == "kb-version")
def test_no_collections_at_all_fails_structure(instance):
"""Removing one collection is a legitimate state - collections are
discovered by COLLECTION.md presence, not a fixed list (kb/CONTRACT.md).