docs: apply fleet-template (16-artifact scaffold)

Adds missing standard artifacts:
- README.md (if missing)
- AGENTS.md (AI agent contract)
- PLAN.md (current sprint)
- STATUS.md (where we are)
- DEVELOPMENT.md (dev workflow)
- DEPLOYMENT.md (deploy procedure)
- TESTING.md (test strategy)
- DECISIONS.md (ADR index + templates)
- .github/CODEOWNERS
- .github/workflows/ci.yml

Preserves all existing artifacts.

Refs: RugMunchMedia/fleet-template
This commit is contained in:
Crypto Rug Munch 2026-07-02 02:07:13 +07:00
commit 47ba268131
310 changed files with 38429 additions and 0 deletions

53
tests/test_pipeline.py Normal file
View file

@ -0,0 +1,53 @@
"""Tests for pipeline hook system."""
from pipeline import HOOK_POINTS, Pipeline
def test_pipeline_init() -> None:
p = Pipeline()
assert len(p.list_hooks()) == len(HOOK_POINTS)
def test_pipeline_register() -> None:
p = Pipeline()
def my_hook(**kwargs: object) -> dict[str, object]:
return {"custom": "value"}
p.register("before_scrape", my_hook)
hooks = p.list_hooks()
assert "my_hook" in list(hooks["before_scrape"])
def test_pipeline_clear() -> None:
p = Pipeline()
def my_hook(**kwargs: object) -> dict[str, object]:
return {}
p.register("before_scrape", my_hook)
p.clear("before_scrape")
assert len(p.list_hooks()["before_scrape"]) == 0
def test_pipeline_clear_all() -> None:
p = Pipeline()
def my_hook(**kwargs: object) -> dict[str, object]:
return {}
p.register("before_scrape", my_hook)
p.clear()
for point in HOOK_POINTS:
assert len(p.list_hooks()[point]) == 0
def test_pipeline_invalid_hook_point() -> None:
p = Pipeline()
import pytest
def my_hook(**kwargs: object) -> dict[str, object]:
return {}
with pytest.raises(ValueError, match="Unknown hook point"):
p.register("invalid_point", my_hook)