Replace shipped pipeline examples with research and task starters

This commit is contained in:
2026-11-12 02:17:09 +00:00
parent 2330f50268
commit 340c07e5a3
28 changed files with 306 additions and 402 deletions
+8 -8
View File
@@ -87,13 +87,13 @@ def main():
try:
pong = rpc("ping")
assert pong["build"] == version, "Client/server build mismatch"
examples = {"Example 1: one stage", "Example 2: two stages", "Example 3: feedback loop", "Example 4: human decision"}
examples = {"Research and report", "Implement, review and land"}
seeded = {item["name"] for item in rpc("list")["pipelines"]}
assert seeded == examples, f"Fresh database must hold only the examples: {seeded}"
assert not rpc("runs").get("runs"), "Fresh database must have no runs"
templates = rpc("templates")["templates"]
keys = {template["key"] for template in templates}
assert keys == {"one-stage", "two-stages", "feedback-loop", "human-decision"}, keys
assert keys == {"research", "task"}, keys
# Exercise every example using only draft and validation
# commands: never run a model or launch an editor.
drafts = {}
@@ -105,29 +105,29 @@ def main():
assert "provider=smoke-provider" in source, key
assert "model=smoke-model" in source, key
assert "harness=opencode" in source, key
draft = drafts["one-stage"]
draft = drafts["research"]
assert len(rpc("list")["pipelines"]) == len(examples), "Draft creation must not publish"
rpc("submit", draft["path"], "--yes")
published = rpc("show", "Starter one-stage")
published = rpc("show", "Starter research")
assert published["version"] == 1
archive = root / "definitions.zip"
rpc("export", "Starter one-stage", "--output", str(archive))
rpc("export", "Starter research", "--output", str(archive))
result = rpc("import", str(archive), "--all", "--yes")
assert not result["imported"], "Identical import must not republish"
assert rpc("show", "Starter one-stage")["version"] == 1
assert rpc("show", "Starter research")["version"] == 1
assert Path(draft["path"]).is_file(), "Published draft must remain"
finally:
stop(process)
process = start(log)
try:
assert rpc("show", "Starter one-stage")["source"] == published["source"], "Definition lost on restart"
assert rpc("show", "Starter research")["source"] == published["source"], "Definition lost on restart"
after = rpc("list")["pipelines"]
assert len(after) == len(examples) + 1 and all(item["version"] == 1 for item in after), "Restart re-seeded examples"
assert rpc("ping")["build"] == version
assert not rpc("runs").get("runs"), "Smoke check must not execute a workflow"
finally:
stop(process)
print("PASS developer lifecycle fixture: isolated source binaries/skill, offline version, DB seeded with only the four examples, four catalog templates drafted and validated with configured defaults, explicit scratch publication, ZIP identical import, restart persistence. Not an installation option; no inference or notifications.")
print("PASS developer lifecycle fixture: isolated source binaries/skill, offline version, DB seeded with only the two examples, both catalog templates drafted and validated with configured defaults, explicit scratch publication, ZIP identical import, restart persistence. Not an installation option; no inference or notifications.")
if __name__ == "__main__":
+1 -1
View File
@@ -12,7 +12,7 @@ class PackageTests(unittest.TestCase):
with tarfile.open(archive) as tar:
names = tar.getnames()
self.assertTrue(any(name.endswith("install.sh") for name in names))
self.assertTrue(any(name.endswith("examples/one-stage.md") for name in names))
self.assertTrue(any(name.endswith("examples/research.md") for name in names))
self.assertFalse(any("/secrets/" in name or name.endswith(".db") or "/.env" in name or "/__pycache__/" in name for name in names))
self.assertTrue(archive.with_suffix(archive.suffix + ".sha256").exists())