Self-improving AI Employees for everyone
Python ai-agentsai-employeeai-employeesassistantautonomous-agentsco-employeescompanygrok-botinstinctloop-agentsmuseown-your-datapersonalself-hosted
test(release): fail a version that has no recorded replay histories
trohitg72d460a91621
diff --git a/cli/tests/test_release_pipeline_config.py b/cli/tests/test_release_pipeline_config.pyindex 560403cf..97d66283 100644--- a/cli/tests/test_release_pipeline_config.py+++ b/cli/tests/test_release_pipeline_config.py@@ -444,6 +444,24 @@ def test_backend_tests_run_on_every_os_with_the_pinned_temporal_cli(predeploy_ymassert names.index("Pinned Temporal CLI") < names.index("pytest")+def test_the_current_version_has_its_replay_histories(root: Path, root_pkg: dict):+ """RFC-0005 Phase 1: every release records the Temporal histories that the+ next release's replay gate replays (RFC-0004 AG6). The recorder+ (``server/tests/temporal/record_fixtures.py``) runs when a release is cut,+ and its set goes into the ``chore(release)`` commit+ (``docs-internal/ci_cd.md`` -> Cutting a release). A version without+ ``fixtures/<version>/`` fails here.+ """+ version = root_pkg["version"]+ fixtures = root / "server" / "tests" / "temporal" / "fixtures" / version+ manifest = fixtures / "manifest.json"+ assert manifest.is_file(), (+ f"No replay histories for {version}: run tests.temporal.record_fixtures (see ci_cd.md, Cutting a release) "+ f"and commit {fixtures.relative_to(root).as_posix()}/ with the version bump"+ )+ assert json.loads(manifest.read_text(encoding="utf-8"))["release"] == version++# ---------------------------------------------------------------------------# Release publication — package.json, release.yml, preinstall.js# ---------------------------------------------------------------------------diff --git a/docs-internal/ci_cd.md b/docs-internal/ci_cd.mdindex 1bcd0bda..a4b42783 100644--- a/docs-internal/ci_cd.md+++ b/docs-internal/ci_cd.md@@ -171,6 +171,16 @@ had lapsed or one registry failed.build when it differs from the tag, while the registry jobs re-run`version sync` from the tag themselves. `cli/tests/test_version.py`fails when the checked-in files disagree.++ The same commit carries the release's replay histories (RFC-0005 Phase 1),+ which the next release's replay gate replays. After `version sync`, from+ `server/`, with the pinned CLI (installed by `ensure_temporal_binaries`+ into a throwaway `DATA_DIR`, never an installed one):+ `TEMPORAL_TEST_CLI=<pinned temporal binary> uv run python -m tests.temporal.record_fixtures --source-commit HEAD`.+ It records the code at the commit the bump sits on into+ `server/tests/temporal/fixtures/X.Y.Z/` and refuses to overwrite an+ existing set. `test_the_current_version_has_its_replay_histories` in+ `cli/tests/test_release_pipeline_config.py` fails a version without one.3. **Tag.** `git tag -a vX.Y.Z -F notes.md` on that commit, the notes in theshape of the previous tags (`git tag -l --format='%(contents)' v0.1.0`).4. **Push** the branch, then the tag. The tag starts `release.yml` (predeploy