MCPcopy Create free account
hub / github.com/CommonstackAI/UncommonRoute / _feedback_buffer_summary

Function _feedback_buffer_summary

uncommon_route/support.py:48–62  ·  view source on GitHub ↗
(root: Path)

Source from the content-addressed store, hash-verified

46
47
48def _feedback_buffer_summary(root: Path) -> dict[str, Any]:
49 path = root / "feedback_buffer.json"
50 if not path.exists():
51 return {"pending_count": 0, "request_ids": []}
52 try:
53 raw = json.loads(path.read_text())
54 except Exception as exc:
55 return {"pending_count": 0, "request_ids": [], "load_error": str(exc)}
56 if not isinstance(raw, dict):
57 return {"pending_count": 0, "request_ids": [], "load_error": "unexpected format"}
58 request_ids = sorted(str(key) for key in raw.keys())
59 return {
60 "pending_count": len(request_ids),
61 "request_ids": request_ids[:100],
62 }
63
64
65def _tail_text(path: Path, limit: int = 200) -> str:

Callers 1

build_support_bundleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected