CI Pipeline / best-practices (push) Successful in 6s
Auto-label / priority-gate (pull_request) Skipped
CI Pipeline / canary (push) Successful in 34s
Auto-label / auto-label (pull_request) Successful in 3s
CI Pipeline / lint (push) Successful in 39s
CI Pipeline / documentation (push) Successful in 2s
CI Pipeline / gitea-offline (push) Successful in 15s
CI Pipeline / unit-tests (push) Failing after 54s
CI Pipeline / type-check (push) Successful in 29s
CI Pipeline / best-practices (pull_request) Successful in 3s
CI Pipeline / documentation (pull_request) Successful in 3s
CI Pipeline / gitea-offline (pull_request) Successful in 14s
CI Pipeline / lint (pull_request) Successful in 35s
CI Pipeline / required-checks (push) Successful in 1s
Spec gate (headless) / spec-gate (pull_request) Successful in 7s
CI Pipeline / type-check (pull_request) Successful in 27s
CI Pipeline / unit-tests (pull_request) Failing after 48s
CI Pipeline / canary (pull_request) Successful in 27s
CI Pipeline / required-checks (pull_request) Successful in 1s
RP10 proven (PR #279 merged, v0.56.0) — retirement per doctrine: REPLACEMENT PROVEN FIRST, RETIREMENT SECOND. Step 1 — consolidate: merged rp2-canonical-stage-model into master (zero conflicts). Master now carries the canonical stage model (ISSUE→INWARD→OUTWARD→APPLICABILITY→conditional INNOVATION→ADVERSARIAL (disposition)→SYNTHESIS→QUALIFY) plus the #161 harness. Step 2 — retire (each classified before removal): - scripts/research_backend.py: run_full_research() self-walking loop + --watch poll supervisor (SUPERSEDED, §26.6/26.7) - scripts/run_research_stage.py + scripts/run_agent_stage.py (+ its test): legacy single-stage runners (SUPERSEDED; no live imports — research_artifact references build_receipt in a docstring only) - .gitea/workflows/research-{dispatcher,stage-headless,backlog-sweep}.yml: legacy trigger paths (SUPERSEDED; trigger label stripped RP0) - prompts/research-stages/{define,outward_discovery,outward_reading}.md: split-stage templates (concepts survive as outward.md subsections) - repo-level research-pending trigger label deleted from Gitea (no issue carried it) KEPT (canonical reuse / compatibility): - research_artifact.py, research_event_relay.py, research_router.py, research_inward_context.py, research_prompt_compiler.py, research_define.py (ISSUE-gate compiler), research_task_tree.py + research_stage_executor.py (canonical authorities) - RETIRED_STAGES guard: retired names remain ONLY as the block that prevents them executing (they cannot authorize a live stage — regression-tested) - All historical evidence (research/issue-*, closed issues) preserved Docs updated: classification manifest (RETIRED entries), pipeline registry (retired-workflows section), lint-baseline shrunk 82→80 S110 / 356→352 BLE001 (deleted files carried lint debt). Regression: 1129 passed (was 1069 pre-merge — canonical pipeline tests joined), 0 henxel failures.
80 lines
2.8 KiB
Python
80 lines
2.8 KiB
Python
"""Red-first tests for scripts/semver_bump.py — discharge of the auto-version
|
|
outage (#190 made the workflow YAML unparseable; no bump ran since 2026-09-06).
|
|
|
|
Also freezes the #192 designed anomaly: version-behind-tag must be LOUD,
|
|
never a silent skip (the workflow's old `exit 0` on LATEST != RELEASE_VERSION
|
|
silently skipped every bump while tags ran ahead of master during testing).
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
import importlib.util
|
|
from pathlib import Path
|
|
|
|
import pytest
|
|
|
|
ROOT = Path(__file__).resolve().parent.parent
|
|
SPEC = importlib.util.spec_from_file_location("semver_bump", ROOT / "scripts" / "semver_bump.py")
|
|
sb = importlib.util.module_from_spec(SPEC)
|
|
SPEC.loader.exec_module(sb)
|
|
|
|
|
|
def test_fix_bumps_patch():
|
|
assert sb.next_version("0.54.0", "fix(pipeline): merge-robot auth") == "0.54.1"
|
|
|
|
|
|
def test_feat_bumps_minor():
|
|
assert sb.next_version("0.54.0", "feat(pipeline): research stage") == "0.55.0"
|
|
|
|
|
|
def test_breaking_bumps_minor_at_0x():
|
|
assert sb.next_version("0.54.0", "feat(pipeline)!: redesign gates") == "0.55.0"
|
|
|
|
|
|
def test_breaking_bumps_major_at_1x():
|
|
assert sb.next_version("1.2.3", "feat!: redesign gates") == "2.0.0"
|
|
|
|
|
|
def test_breaking_change_keyword():
|
|
assert sb.next_version("0.54.0", "chore: stuff\n\nBREAKING CHANGE: api") == "0.55.0"
|
|
|
|
|
|
def test_chore_bumps_patch():
|
|
assert sb.next_version("0.54.0", "chore(release): auto-bump") == "0.54.1"
|
|
|
|
|
|
def test_scoped_feat_with_parenthetical():
|
|
assert sb.next_version("0.54.0", "feat(memory): hippocampal index") == "0.55.0"
|
|
|
|
|
|
def test_version_behind_tag_is_anomaly_not_skip():
|
|
"""#192: master version behind latest tag = loud anomaly. The workflow
|
|
must pass the version through to the bump logic (bump from CURRENT master
|
|
version), never silently exit because tags diverged."""
|
|
# 0.49.0 on master, tags at 0.54.0: bump STILL computes from 0.49.0 ->
|
|
# the anomaly is surfaced by the loud log line + the bump PR itself.
|
|
assert sb.next_version("0.49.0", "fix: thing") == "0.49.1"
|
|
|
|
|
|
@pytest.mark.parametrize(
|
|
"workflow",
|
|
[
|
|
".gitea/workflows/auto-version.yml",
|
|
".gitea/workflows/merge-robot.yml",
|
|
".gitea/workflows/ci.yml",
|
|
".gitea/workflows/pipeline-gate.yml",
|
|
".gitea/workflows/spec-gate-headless.yml",
|
|
],
|
|
)
|
|
def test_all_workflows_are_valid_yaml(workflow):
|
|
"""The missing gate that let #190 rot silently: every workflow file on
|
|
master MUST parse. This test IS the lint gate."""
|
|
import yaml
|
|
|
|
src = (ROOT / workflow).read_text()
|
|
# Gitea parses with its own loader; 'on' must survive — use BaseLoader-free
|
|
# safe_load and accept the YAML-1.1 on→bool quirk (Gitea normalizes too).
|
|
data = yaml.safe_load(src)
|
|
assert isinstance(data, dict), f"{workflow} must parse to a mapping"
|
|
assert any(k in data for k in ("on", True)), f"{workflow} missing trigger block"
|