@akshatmittal/invoker 0.4.0 → 0.4.1

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/README.md CHANGED
@@ -248,9 +248,11 @@ A shared footer
248
248
  contains the elapsed span from the first Case start to the final Case completion,
249
249
  a localized timestamp, and the optional run link. Final failures, successful
250
250
  retry details, skipped Case reasons, and unhandled run errors are posted in the
251
- same thread. Delivery failures are isolated to the affected reply. Ambiguous
252
- transport failures are not retried; an explicit Slack rate-limit rejection is
253
- reattempted only after its required delay.
251
+ same thread. The thread is limited to ten replies per run across all detail
252
+ types. When details are omitted, the final reply directs readers to the run
253
+ logs. Delivery failures are isolated to the affected reply. Ambiguous transport
254
+ failures are not retried; an explicit Slack rate-limit rejection is reattempted
255
+ only after its required delay.
254
256
 
255
257
  ```ts
256
258
  import { slackReporter } from "@akshatmittal/invoker/slack";
package/dist/slack.mjs CHANGED
@@ -415,6 +415,7 @@ function truncate(value, limit) {
415
415
  }
416
416
  //#endregion
417
417
  //#region src/slack/reporter.ts
418
+ const THREAD_REPLY_LIMIT = 10;
418
419
  function slackReporter(options) {
419
420
  const client = new WebClient(options.token, {
420
421
  rejectRateLimitedCalls: true,
@@ -447,12 +448,13 @@ function slackReporter(options) {
447
448
  console.warn("[invoker] Could not post the Slack report.");
448
449
  return;
449
450
  }
450
- const replies = [
451
+ const details = [
451
452
  ...reports.flatMap(failureMessages),
452
453
  ...reports.flatMap(retryMessages),
453
454
  ...reports.flatMap(skipMessages),
454
455
  ...unhandledErrorMessages(unhandledErrors)
455
456
  ];
457
+ const replies = details.length > THREAD_REPLY_LIMIT ? [...details.slice(0, 9), { text: "Too many report details to display. See the run logs for more information." }] : details;
456
458
  if (replies.length > 0 && !parentTimestamp) {
457
459
  console.warn("[invoker] Slack did not return a timestamp for the report thread.");
458
460
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akshatmittal/invoker",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "Typed matrix-driven regression workflows for Vitest.",
5
5
  "keywords": [
6
6
  "matrix",