diff --git a/bridge.py b/bridge.py index a4c6b6e..7e1116b 100644 --- a/bridge.py +++ b/bridge.py @@ -253,7 +253,7 @@ class RemoteTransport(BridgeTransport): async def health_check(self) -> bool: """Check if Gateway is reachable.""" - result = await self._arequest("GET", "/../health") + result = await self._arequest("GET", "/health") return result is not None and result.get("status") == "ok" # ─── Async methods (used by Collector) ─── diff --git a/collector.py b/collector.py index 4e72a1e..f0fc6c3 100644 --- a/collector.py +++ b/collector.py @@ -113,8 +113,12 @@ class CollectorBridge: continue # No change is_new = rid not in self._forwarded_pending - if is_new and rid in self._startup_pending: - continue # Skip pre-existing files from before startup + if rid in self._startup_pending: + # Startup files: only forward status CHANGES (not re-forward as new pending) + status = data.get("status", "pending") + if status == "pending": + continue # Still pending from before startup — skip + # Status changed (auto_resolved/expired) — forward the update # Forward to Gateway (new or updated) await self.remote.awrite_json("pending", fname, data) @@ -146,6 +150,8 @@ class CollectorBridge: try: # Check each forwarded pending for a response for rid in list(self._forwarded_pending): + if rid in self._startup_pending: + continue # Don't poll responses for pre-startup files data = await self.remote.aread_json("response", f"{rid}.json") if data is None or data.get("waiting"): continue