sidequestor 0.2.9.dev0__py3-none-any.whl → 0.2.9.dev1__py3-none-any.whl
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.
- sidequestor/__init__.py +1 -1
- sidequestor/runtime/yaas-triage/checkers/slack_thread.py +30 -2
- {sidequestor-0.2.9.dev0.dist-info → sidequestor-0.2.9.dev1.dist-info}/METADATA +6 -1
- {sidequestor-0.2.9.dev0.dist-info → sidequestor-0.2.9.dev1.dist-info}/RECORD +8 -8
- {sidequestor-0.2.9.dev0.dist-info → sidequestor-0.2.9.dev1.dist-info}/WHEEL +0 -0
- {sidequestor-0.2.9.dev0.dist-info → sidequestor-0.2.9.dev1.dist-info}/entry_points.txt +0 -0
- {sidequestor-0.2.9.dev0.dist-info → sidequestor-0.2.9.dev1.dist-info}/licenses/LICENSE +0 -0
- {sidequestor-0.2.9.dev0.dist-info → sidequestor-0.2.9.dev1.dist-info}/top_level.txt +0 -0
sidequestor/__init__.py
CHANGED
|
@@ -44,6 +44,33 @@ import result
|
|
|
44
44
|
from slack_utils import PAGE_LIMIT, drain, _parse_thread_page, thread_page_has_ts
|
|
45
45
|
|
|
46
46
|
|
|
47
|
+
def command_failure_reason(completed):
|
|
48
|
+
"""Preserve both output streams within result.reason's 300-character limit.
|
|
49
|
+
|
|
50
|
+
stderr takes priority. Keep diagnostic tails so traceback headers cannot hide
|
|
51
|
+
the final exception. The command's exit code does not identify its root cause.
|
|
52
|
+
"""
|
|
53
|
+
prefix = f"slack_read_thread command failed (exit {completed.returncode})"
|
|
54
|
+
streams = [(name, " | ".join((value or "").strip().splitlines()))
|
|
55
|
+
for name, value in (("stderr", completed.stderr), ("stdout", completed.stdout))
|
|
56
|
+
if (value or "").strip()]
|
|
57
|
+
if not streams:
|
|
58
|
+
return prefix + "; no stdout or stderr"
|
|
59
|
+
remaining = 300 - len(prefix)
|
|
60
|
+
parts = []
|
|
61
|
+
for index, (name, text) in enumerate(streams):
|
|
62
|
+
label = f"; {name}: "
|
|
63
|
+
# Reserve one third for stdout when stderr is also available.
|
|
64
|
+
allowance = (remaining * 2 // 3) if index == 0 and len(streams) == 2 else remaining
|
|
65
|
+
limit = max(0, allowance - len(label))
|
|
66
|
+
if len(text) > limit:
|
|
67
|
+
text = "..." + text[-max(0, limit - 3):] if limit > 3 else text[:limit]
|
|
68
|
+
part = label + text
|
|
69
|
+
parts.append(part)
|
|
70
|
+
remaining -= len(part)
|
|
71
|
+
return prefix + "".join(parts)
|
|
72
|
+
|
|
73
|
+
|
|
47
74
|
def main():
|
|
48
75
|
entry = json.loads(sys.argv[1])
|
|
49
76
|
channel_id = entry["channel_id"]
|
|
@@ -76,6 +103,7 @@ def main():
|
|
|
76
103
|
capture_output=True, text=True, timeout=30,
|
|
77
104
|
)
|
|
78
105
|
body = (r.stdout or "").strip()
|
|
106
|
+
failure = command_failure_reason(r) if r.returncode != 0 or not body else None
|
|
79
107
|
# client.py gives every surface ONE exit taxonomy:
|
|
80
108
|
# 0 ok 1 auth 2 error 3 bad args 4 transient
|
|
81
109
|
# Acting on it is the entire point of unifying them. Before this, a rate limit
|
|
@@ -92,9 +120,9 @@ def main():
|
|
|
92
120
|
# backoff landed) dispatched a paid worker. ~1,380 lifetime occurrences of
|
|
93
121
|
# exactly that were visible in triage.log.
|
|
94
122
|
if "ratelimited" in body.lower():
|
|
95
|
-
return "", None, "TRANSIENT: slack ratelimited; watermark held"
|
|
123
|
+
return "", None, "TRANSIENT: slack ratelimited; watermark held" + ("; " + failure if failure else "")
|
|
96
124
|
if r.returncode != 0 or not body:
|
|
97
|
-
return "", None,
|
|
125
|
+
return "", None, failure
|
|
98
126
|
try:
|
|
99
127
|
d = json.loads(body)
|
|
100
128
|
except Exception:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sidequestor
|
|
3
|
-
Version: 0.2.9.
|
|
3
|
+
Version: 0.2.9.dev1
|
|
4
4
|
Summary: Sidequestor workspace and triage command shell
|
|
5
5
|
License-Expression: Apache-2.0
|
|
6
6
|
Requires-Python: >=3.11
|
|
@@ -851,6 +851,11 @@ Saved `state/triage/slack-read-cooldown.json` deadlines from 0.2.8 are ignored b
|
|
|
851
851
|
both the read client and dashboard; deleting that file is unnecessary. The shared
|
|
852
852
|
`Retry-After` pause introduced in 0.2.8 is disabled in this prerelease.
|
|
853
853
|
|
|
854
|
+
From `0.2.9.dev1`, failed Slack thread reads report the command's exit status and
|
|
855
|
+
bounded stderr/stdout diagnostics. Stderr takes priority and long diagnostic tails
|
|
856
|
+
retain the final exception. An exit-code-2 failure alone is not evidence that Slack
|
|
857
|
+
caused it; inspect the underlying diagnostic before attributing the failure.
|
|
858
|
+
|
|
854
859
|
### Quest visualization
|
|
855
860
|
|
|
856
861
|
Open a quest and choose **Visualise quest** for a read-only animated replay. The
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
sidequestor/__init__.py,sha256=
|
|
1
|
+
sidequestor/__init__.py,sha256=yIsO8fLCEnbreOqt7IJZhYrxYRFKafp1K88zF63YTC0,99
|
|
2
2
|
sidequestor/__main__.py,sha256=k1ocEWawweo1qCJWNFAAvyxz3tcY13dzvCenHszij30,48
|
|
3
3
|
sidequestor/build_info.py,sha256=w3Artg2jh22zYIJS_A0TT12NeJPNyVmVVgCXBqCqtd4,1801
|
|
4
4
|
sidequestor/cli.py,sha256=FXc5rSn_YK4YAMQlFDYPbcjZEZTB6clBHumIIXliZHc,40717
|
|
@@ -83,7 +83,7 @@ sidequestor/runtime/yaas-triage/checkers/slack_dm.watch.json,sha256=E5QolUIuTnOM
|
|
|
83
83
|
sidequestor/runtime/yaas-triage/checkers/slack_mention.lag,sha256=Q5NEe9PB1V6n-XQX7LGzamkcyqyq8uvSHFmlrPgl-3s,3
|
|
84
84
|
sidequestor/runtime/yaas-triage/checkers/slack_mention.py,sha256=gblNmscjHYsfdcFfgpTtz-wfCACchaDcsoYw4hrjvg4,2790
|
|
85
85
|
sidequestor/runtime/yaas-triage/checkers/slack_mention.watch.json,sha256=S77aSCFHF74G65o1jY7LW6z7y-IR_amUwzG4EK5D-Js,415
|
|
86
|
-
sidequestor/runtime/yaas-triage/checkers/slack_thread.py,sha256=
|
|
86
|
+
sidequestor/runtime/yaas-triage/checkers/slack_thread.py,sha256=1tpUvkiX36DItxv_O_QIT_9WmMLQFkbDkAI7l00XmvE,8586
|
|
87
87
|
sidequestor/runtime/yaas-triage/checkers/slack_thread.watch.json,sha256=k6gFjwGRGZAVj-pYzbRGBhWvV74_VQWeTCOkq_8jDyI,478
|
|
88
88
|
sidequestor/runtime/yaas-triage/checkers/slack_utils.py,sha256=-UECrTZ14muOG_dCuBNbonXcuujqPiG2DH0AVz08CQo,29919
|
|
89
89
|
sidequestor/runtime/yaas-triage/checkers/telegram.py,sha256=qYNNh1qWGW84tBZyNQt3YKOgFkBj0lHgAtSBOBVNf5E,5981
|
|
@@ -191,12 +191,12 @@ sidequestor/runtime/yaas-triage/surfaces/timeline_io.py,sha256=usCDpVm1fCWYchImL
|
|
|
191
191
|
sidequestor/runtime/yaas-triage/surfaces/x-call.py,sha256=ZYAnu9Jhg6G329xl2hG7Cn-M8tN2jQx5cog_FXYWVs8,3841
|
|
192
192
|
sidequestor/runtime/yaas-triage/surfaces/x-send.py,sha256=qSFT0h1Ls_CqDOoBuj0ofeJR_O3TQeUPVYTNEwk3ZJM,14786
|
|
193
193
|
sidequestor/runtime/yaas-triage/surfaces/x_credentials.py,sha256=lBITJRXOGJ4Q_NDXclPS6PUtnZWOdvTzkokBrRdkqAw,12104
|
|
194
|
-
sidequestor-0.2.9.
|
|
194
|
+
sidequestor-0.2.9.dev1.dist-info/licenses/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
|
|
195
195
|
yaas_triage/__init__.py,sha256=ho-HB_1RFd8ZOXtfjQUl_S1w7KcbqUkMXU3H23CitBs,129
|
|
196
196
|
yaas_triage/__main__.py,sha256=MAv3EkK5QCQZFgaoWHwIXrk0ayIBsDJrSSGS5DSOuLs,132
|
|
197
197
|
yaas_triage/cli.py,sha256=k1GHIbBdGqjKSFcq4HUdg9TYWnoPMmwrHYiIlzfZH-0,121
|
|
198
|
-
sidequestor-0.2.9.
|
|
199
|
-
sidequestor-0.2.9.
|
|
200
|
-
sidequestor-0.2.9.
|
|
201
|
-
sidequestor-0.2.9.
|
|
202
|
-
sidequestor-0.2.9.
|
|
198
|
+
sidequestor-0.2.9.dev1.dist-info/METADATA,sha256=6eWROyfRL4VKxgKz6Xdy7iyve_FY83tiW5JLqD6716c,61785
|
|
199
|
+
sidequestor-0.2.9.dev1.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
|
|
200
|
+
sidequestor-0.2.9.dev1.dist-info/entry_points.txt,sha256=HWIU3i0qFhwgqcOQ37bUBw9hUNrYxRD6fj34TJc_vhU,107
|
|
201
|
+
sidequestor-0.2.9.dev1.dist-info/top_level.txt,sha256=hNvnBBjE85hK_57UXDuFwLZoqzQKSABeDopr9jUgMNA,24
|
|
202
|
+
sidequestor-0.2.9.dev1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|