This commit is contained in:
DealSage template sync
2026-09-26 05:57:32 +00:00
parent 36aeaf65c3
commit f176fca2bd
15 changed files with 472 additions and 46 deletions
+13
View File
@@ -7,6 +7,8 @@ like the real functions would:
promote -> promoted per STUB_POLICY (auto|manual)
fail -> ok
POST /record-app-check -> {"id": "..."}
POST /record-app-build start -> {"buildId": "bld-1"}; finish -> echo;
steps -> {"buildId": ..., "steps": <count>}
PUT /__upload/<app>/<v>/<path> -> 204
"""
import json, os, sys
@@ -52,6 +54,17 @@ class H(BaseHTTPRequestHandler):
if self.path.endswith("/record-app-check"):
seq["n"] += 1
return self._json(200, {"id": f"chk-{seq['n']}"})
if self.path.endswith("/record-app-build"):
if body.get("action") == "start":
return self._json(200, {"buildId": "bld-1"})
if body.get("action") == "finish":
return self._json(200, {"buildId": body.get("buildId"), "outcome": body.get("outcome")})
if body.get("action") == "steps":
steps = body.get("steps")
if not isinstance(steps, list) or not steps:
return self._json(400, {"error": "steps must be a non-empty array"})
return self._json(200, {"buildId": body.get("buildId"), "steps": len(steps)})
return self._json(400, {"error": "bad action"})
self._json(404, {"error": "no route"})
def do_PUT(self):