@misterhuydo/sentinel 1.4.82 → 1.4.83

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  {
2
- "message": "Auto-checkpoint at 2026-03-27T02:10:14.448Z",
3
- "checkpoint_at": "2026-03-27T02:10:14.449Z",
2
+ "message": "Auto-checkpoint at 2026-03-27T02:18:31.246Z",
3
+ "checkpoint_at": "2026-03-27T02:18:31.247Z",
4
4
  "active_files": [],
5
5
  "notes": [],
6
6
  "mtime_snapshot": {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@misterhuydo/sentinel",
3
- "version": "1.4.82",
3
+ "version": "1.4.83",
4
4
  "description": "Sentinel — Autonomous DevOps Agent installer and manager",
5
5
  "bin": {
6
6
  "sentinel": "./bin/sentinel.js"
@@ -73,7 +73,7 @@ def check_health(repo: RepoConfig, timeout: int = 10) -> HealthResult:
73
73
  data = r.json()
74
74
  except Exception:
75
75
  return HealthResult(status="healthy", http_code=200)
76
- if str(data.get("Status", "")).lower() == "true":
76
+ if str(data.get("Status", "")).lower() in ("true", "ok", "up"):
77
77
  return HealthResult(status="healthy", http_code=200, raw=data)
78
78
  return HealthResult(
79
79
  status="failing",
@@ -182,15 +182,20 @@ def evaluate_repos(repos: dict, log_sources: dict, workspace_dir: str, store=Non
182
182
  result["startup_failure_line"] = line
183
183
 
184
184
  if found:
185
- # Startup crash overrides any maintenance state app needs a fix
186
- result["action"] = "fix"
185
+ # Startup crash only act once; store state so we don't re-alert every cycle
186
+ already_known = state and state.get("status") == "startup_failure"
187
+ if not already_known:
188
+ result["action"] = "fix"
189
+ if store:
190
+ store.set_health_state(repo.repo_name, "startup_failure")
191
+ logger.warning(
192
+ "health_checker: %s stopped + startup error → fix needed: %s",
193
+ repo.repo_name, line[:120],
194
+ )
195
+ else:
196
+ result["action"] = "none"
197
+ logger.debug("health_checker: %s startup failure already known — silent", repo.repo_name)
187
198
  result["message"] = f"{health.message} — startup failure found in logs"
188
- if store and state:
189
- store.clear_health_state(repo.repo_name)
190
- logger.warning(
191
- "health_checker: %s stopped + startup error → fix needed: %s",
192
- repo.repo_name, line[:120],
193
- )
194
199
  results.append(result)
195
200
  continue
196
201