chore: freeze EventEnvelope v0 byte contract

This commit is contained in:
sovereign
2025-12-18 00:14:03 +00:00
parent d361122ec0
commit 1830e0f673
9 changed files with 282 additions and 40 deletions

View File

@@ -113,7 +113,7 @@ def post_event(kind: str, node_id: str, body: dict) -> Optional[dict]:
"kind": kind,
"node_id": node_id,
"author": AUTHOR,
"body": body,
"payload": body,
}
try:
resp = requests.post(
@@ -122,7 +122,7 @@ def post_event(kind: str, node_id: str, body: dict) -> Optional[dict]:
headers={"Content-Type": "application/json"},
timeout=10,
)
if resp.status_code == 200:
if resp.status_code in (200, 201):
result = resp.json()
log.info(f"Posted {kind} event: {result.get('id', 'unknown')}")
return result