@misterhuydo/sentinel 1.6.12 → 1.6.13

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.
package/.cairn/.hint-lock CHANGED
@@ -1 +1 @@
1
- 2026-04-27T13:09:20.340Z
1
+ 2026-04-27T17:46:15.506Z
@@ -1,6 +1,6 @@
1
1
  {
2
- "message": "Auto-checkpoint at 2026-04-27T13:29:19.813Z",
3
- "checkpoint_at": "2026-04-27T13:29:19.814Z",
2
+ "message": "Auto-checkpoint at 2026-04-27T17:47:43.806Z",
3
+ "checkpoint_at": "2026-04-27T17:47:43.808Z",
4
4
  "active_files": [
5
5
  "J:\\Projects\\Sentinel\\cli\\bin\\sentinel.js",
6
6
  "J:\\Projects\\Sentinel\\cli\\lib\\test.js"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@misterhuydo/sentinel",
3
- "version": "1.6.12",
3
+ "version": "1.6.13",
4
4
  "description": "Sentinel — Autonomous DevOps Agent installer and manager",
5
5
  "bin": {
6
6
  "sentinel": "./bin/sentinel.js"
@@ -1 +1 @@
1
- __version__ = "1.6.12"
1
+ __version__ = "1.6.13"
@@ -477,7 +477,7 @@ def apply_and_commit(
477
477
  logger.error("git pull failed for %s:\n%s", repo.repo_name, r.stderr)
478
478
  return "failed", ""
479
479
 
480
- r = _git(["apply", "--check", "--recount", "--ignore-whitespace", str(patch_path)], cwd=local_path, env=env)
480
+ r = _git(["apply", "--check", "--recount", "--ignore-whitespace", "-C1", str(patch_path)], cwd=local_path, env=env)
481
481
  if r.returncode != 0:
482
482
  try:
483
483
  original = patch_path.read_text(encoding="utf-8", errors="replace")
@@ -487,12 +487,12 @@ def apply_and_commit(
487
487
  repaired = None
488
488
  if repaired and repaired != original:
489
489
  patch_path.write_text(repaired, encoding="utf-8")
490
- r = _git(["apply", "--check", "--recount", "--ignore-whitespace", str(patch_path)], cwd=local_path, env=env)
490
+ r = _git(["apply", "--check", "--recount", "--ignore-whitespace", "-C1", str(patch_path)], cwd=local_path, env=env)
491
491
  if r.returncode != 0:
492
492
  logger.error("Patch dry-run failed for %s:\n%s", event.fingerprint, r.stderr)
493
493
  return "failed", ""
494
494
 
495
- r = _git(["apply", "--recount", "--ignore-whitespace", str(patch_path)], cwd=local_path, env=env)
495
+ r = _git(["apply", "--recount", "--ignore-whitespace", "-C1", str(patch_path)], cwd=local_path, env=env)
496
496
  if r.returncode != 0:
497
497
  logger.error("git apply failed for %s:\n%s", event.fingerprint, r.stderr)
498
498
  return "failed", ""
@@ -601,7 +601,7 @@ def apply_and_commit_multi(
601
601
  dry_run_failures.append(f"{name}: git pull failed: {r.stderr.strip()[:200]}")
602
602
  continue
603
603
  # Dry-run
604
- r = _git(["apply", "--check", "--recount", "--ignore-whitespace", str(sub_path)],
604
+ r = _git(["apply", "--check", "--recount", "--ignore-whitespace", "-C1", str(sub_path)],
605
605
  cwd=repo.local_path, env=env)
606
606
  if r.returncode != 0:
607
607
  # Try repairing the patch by splicing in any intermediate file lines
@@ -616,7 +616,7 @@ def apply_and_commit_multi(
616
616
  if repaired and repaired != original:
617
617
  sub_path.write_text(repaired, encoding="utf-8")
618
618
  r = _git(
619
- ["apply", "--check", "--recount", "--ignore-whitespace", str(sub_path)],
619
+ ["apply", "--check", "--recount", "--ignore-whitespace", "-C1", str(sub_path)],
620
620
  cwd=repo.local_path, env=env,
621
621
  )
622
622
  if r.returncode == 0:
@@ -653,7 +653,7 @@ def apply_and_commit_multi(
653
653
  "reason": "", "sub_patch_path": sub_path,
654
654
  }
655
655
 
656
- r = _git(["apply", "--recount", "--ignore-whitespace", str(sub_path)],
656
+ r = _git(["apply", "--recount", "--ignore-whitespace", "-C1", str(sub_path)],
657
657
  cwd=repo.local_path, env=env)
658
658
  if r.returncode != 0:
659
659
  entry["reason"] = f"apply failed: {r.stderr.strip()[:200]}"
@@ -563,7 +563,11 @@ async def _handle_issue(event: IssueEvent, cfg_loader: ConfigLoader, store: Stat
563
563
  return
564
564
 
565
565
  if store.fix_attempted_recently(event.fingerprint, hours=24):
566
- logger.debug("Issue already processed recently: %s", event.source)
566
+ logger.info(
567
+ "Issue %s skipped — fingerprint %s attempted in last 24h "
568
+ "(use Boss `retry_issue` to clear the prior row and re-attempt)",
569
+ event.source, event.fingerprint,
570
+ )
567
571
  mark_done(event.issue_file)
568
572
  return
569
573
 
@@ -2632,6 +2632,27 @@ async def _run_tool(name: str, inputs: dict, cfg_loader, store, slack_client=Non
2632
2632
  except Exception as _e:
2633
2633
  logger.debug("retry_issue: state_store guard failed (non-fatal): %s", _e)
2634
2634
 
2635
+ # Clear the 24h dedupe so _handle_issue actually re-runs the fix.
2636
+ # fix_attempted_recently() ignores status='skipped', so flipping any
2637
+ # recent 'failed' row for this fingerprint is enough.
2638
+ try:
2639
+ with store._conn() as _c:
2640
+ _n = _c.execute(
2641
+ "UPDATE fixes SET status='skipped' "
2642
+ "WHERE fingerprint=? AND status='failed' "
2643
+ "AND timestamp >= datetime('now', '-24 hours')",
2644
+ (_fp,),
2645
+ ).rowcount
2646
+ _c.commit()
2647
+ if _n:
2648
+ logger.info(
2649
+ "Boss retry_issue: cleared %d prior failed row(s) for fingerprint %s "
2650
+ "so the retry won't be deduped",
2651
+ _n, _fp,
2652
+ )
2653
+ except Exception as _e:
2654
+ logger.debug("retry_issue: clearing prior failed rows failed (non-fatal): %s", _e)
2655
+
2635
2656
  # Re-submit as a fresh issue file
2636
2657
  issues_dir = project_dir / "issues"
2637
2658
  issues_dir.mkdir(exist_ok=True)