← back to Chief Of Operations
classify sandbox health checks clearly
c9fe16d2e541ac240959d96232c23ee5390a9782 · 2026-09-17 08:33:37 -0700 · Steve Abrams
Files touched
Diff
commit c9fe16d2e541ac240959d96232c23ee5390a9782
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Thu Sep 17 08:33:37 2026 -0700
classify sandbox health checks clearly
---
chief_ops.py | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/chief_ops.py b/chief_ops.py
index 972ad34..63c5929 100755
--- a/chief_ops.py
+++ b/chief_ops.py
@@ -32,7 +32,13 @@ def http_health(port, path='/health'):
with urllib.request.urlopen(f'http://127.0.0.1:{port}{path}', timeout=2) as r:
return {'ok': r.status == 200, 'body': json.loads(r.read().decode() or '{}')}
except Exception as e:
- return {'ok': False, 'error': str(e)}
+ msg = str(e)
+ # Workspace sandboxes deny localhost sockets with EPERM. Keep that
+ # distinct from a real connection refusal so the report says
+ # "unverified" instead of falsely declaring an outage.
+ if 'Operation not permitted' in msg:
+ return {'ok': None, 'status': 'unverified-in-sandbox', 'error': msg}
+ return {'ok': False, 'error': msg}
def router_evidence():
@@ -69,7 +75,8 @@ def check():
'legacy_conflicts_archived': {'ok': all(x in archived for x in ('arrange','tile-blue-right','tile-green-left')), 'items': archived},
'screenshots': {'ok': all(x['ok'] for x in screenshots), 'items': screenshots},
}
- checks['overall']={'ok': all(v.get('ok',False) for k,v in checks.items() if k not in ('terminal_status',) or v), 'checked_at':time.strftime('%Y-%m-%dT%H:%M:%SZ',time.gmtime())}
+ hard=[v.get('ok') for v in checks.values()]
+ checks['overall']={'ok': all(x is not False for x in hard), 'unverified': sum(x is None for x in hard), 'checked_at':time.strftime('%Y-%m-%dT%H:%M:%SZ',time.gmtime())}
return checks
← 9faff89 add chief of operations oversight harness
·
back to Chief Of Operations
·
treat frontmost layout exemption as healthy e47b4c0 →