@misterhuydo/sentinel 1.5.62 → 1.5.63
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-
|
|
1
|
+
2026-04-22T05:30:19.725Z
|
package/.cairn/session.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"message": "Auto-checkpoint at 2026-04-
|
|
3
|
-
"checkpoint_at": "2026-04-
|
|
2
|
+
"message": "Auto-checkpoint at 2026-04-21T11:31:04.976Z",
|
|
3
|
+
"checkpoint_at": "2026-04-21T11:31:04.977Z",
|
|
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 +1 @@
|
|
|
1
|
-
__version__ = "1.5.
|
|
1
|
+
__version__ = "1.5.63"
|
|
@@ -131,7 +131,8 @@ def scan_issues(project_dir: Path) -> list[IssueEvent]:
|
|
|
131
131
|
|
|
132
132
|
# Parse metadata headers in any order (TARGET_REPO, SUBMITTED_BY, SUBMITTED_AT, etc.)
|
|
133
133
|
import re as _re
|
|
134
|
-
_META = ("TARGET_REPO:", "SUBMITTED_BY:", "SUBMITTED_AT:", "SUPPORT_URL:",
|
|
134
|
+
_META = ("TARGET_REPO:", "SUBMITTED_BY:", "SUBMITTED_AT:", "SUPPORT_URL:",
|
|
135
|
+
"ORIGIN_CHANNEL:", "SOURCE:", "SLACK_TS:")
|
|
135
136
|
submitter_user_id = ""
|
|
136
137
|
origin_channel = ""
|
|
137
138
|
for i, line in enumerate(lines):
|
package/python/sentinel/main.py
CHANGED
|
@@ -283,7 +283,7 @@ async def _handle_error(event: ErrorEvent, cfg_loader: ConfigLoader, store: Stat
|
|
|
283
283
|
_progress(f":warning: Needs human input — {marker}")
|
|
284
284
|
notify_fix_blocked(sentinel, event.source, event.message,
|
|
285
285
|
reason=marker, repo_name=repo.repo_name,
|
|
286
|
-
submitter_user_id="")
|
|
286
|
+
submitter_user_id="", body=getattr(event, "body", ""))
|
|
287
287
|
else:
|
|
288
288
|
_progress(f":x: Cannot generate fix — Claude returned {status.upper()}")
|
|
289
289
|
send_failure_notification(sentinel, {
|
|
@@ -475,7 +475,8 @@ async def _handle_issue(event: IssueEvent, cfg_loader: ConfigLoader, store: Stat
|
|
|
475
475
|
_progress(f":x: Could not generate a safe fix — {reason_text[:120]}")
|
|
476
476
|
notify_fix_blocked(sentinel, event.source, event.message,
|
|
477
477
|
reason=reason_text, repo_name=repo.repo_name,
|
|
478
|
-
submitter_user_id=submitter_uid
|
|
478
|
+
submitter_user_id=submitter_uid,
|
|
479
|
+
body=getattr(event, "body", ""))
|
|
479
480
|
mark_done(event.issue_file)
|
|
480
481
|
return {"submitter": submitter_uid, "repo_name": repo.repo_name,
|
|
481
482
|
"status": "blocked", "summary": reason_text[:120], "pr_url": ""}
|
|
@@ -490,7 +491,8 @@ async def _handle_issue(event: IssueEvent, cfg_loader: ConfigLoader, store: Stat
|
|
|
490
491
|
notify_fix_blocked(sentinel, event.source, event.message,
|
|
491
492
|
reason="Patch was generated but commit/tests failed",
|
|
492
493
|
repo_name=repo.repo_name,
|
|
493
|
-
submitter_user_id=submitter_uid
|
|
494
|
+
submitter_user_id=submitter_uid,
|
|
495
|
+
body=getattr(event, "body", ""))
|
|
494
496
|
mark_done(event.issue_file)
|
|
495
497
|
return {"submitter": submitter_uid, "repo_name": repo.repo_name,
|
|
496
498
|
"status": "blocked", "summary": "Commit/tests failed", "pr_url": ""}
|
|
@@ -587,7 +589,7 @@ async def _handle_issue(event: IssueEvent, cfg_loader: ConfigLoader, store: Stat
|
|
|
587
589
|
notify_fix_blocked(sentinel, event.source, event.message,
|
|
588
590
|
reason="Patch was generated but commit/tests failed after tool install",
|
|
589
591
|
repo_name=repo.repo_name, submitter_user_id=submitter_uid,
|
|
590
|
-
origin_channel=_origin_channel)
|
|
592
|
+
origin_channel=_origin_channel, body=getattr(event, "body", ""))
|
|
591
593
|
mark_done(event.issue_file)
|
|
592
594
|
return {"submitter": submitter_uid, "repo_name": repo.repo_name,
|
|
593
595
|
"status": "blocked", "summary": "Commit/tests failed after tool install", "pr_url": ""}
|
|
@@ -289,6 +289,7 @@ def notify_fix_blocked(
|
|
|
289
289
|
repo_name: str = "",
|
|
290
290
|
submitter_user_id: str = "",
|
|
291
291
|
origin_channel: str = "",
|
|
292
|
+
body: str = "",
|
|
292
293
|
) -> None:
|
|
293
294
|
"""
|
|
294
295
|
Notify that a fix needs human intervention.
|
|
@@ -297,13 +298,19 @@ def notify_fix_blocked(
|
|
|
297
298
|
falls back to cfg.slack_channel. Always emails admins.
|
|
298
299
|
"""
|
|
299
300
|
short_reason = (reason or "Claude could not determine a safe fix.")[:600]
|
|
300
|
-
repo_line = f"
|
|
301
|
+
repo_line = f"*Repo:* {repo_name}\n" if repo_name else ""
|
|
302
|
+
|
|
303
|
+
# Show the original report body in a code block so it's readable;
|
|
304
|
+
# fall back to the one-liner message if body isn't available.
|
|
305
|
+
report_content = (body or message).strip()
|
|
306
|
+
report_block = f"```\n{report_content[:1200]}\n```" if report_content else ""
|
|
301
307
|
|
|
302
308
|
slack_text = (
|
|
303
309
|
f":hand: *Fix blocked — human intervention needed*\n"
|
|
304
|
-
f"
|
|
305
|
-
f"*
|
|
306
|
-
f"*
|
|
310
|
+
f"{repo_line}"
|
|
311
|
+
f"*What Claude found:* {short_reason}\n\n"
|
|
312
|
+
f"*Original report:*\n{report_block}\n\n"
|
|
313
|
+
f"_Reply `ignore` to dismiss, or assign someone to investigate._"
|
|
307
314
|
)
|
|
308
315
|
|
|
309
316
|
target_channel = origin_channel or cfg.slack_channel
|