Skip to content

fix(ci): make the monthly digest Slack build render (jq parens + PR-index cap)#26

Merged
damianrosellen1 merged 1 commit into
mainfrom
fix/monthly-digest-slack-build
Jul 1, 2026
Merged

fix(ci): make the monthly digest Slack build render (jq parens + PR-index cap)#26
damianrosellen1 merged 1 commit into
mainfrom
fix/monthly-digest-slack-build

Conversation

@damianrosellen1

Copy link
Copy Markdown
Contributor

Follow-up to #25. That fix let the digest find PRs (skip != true), which routed the run into the rich-digest else branch of Build Slack digest for the first time ever — and exposed two latent defects that only fire on the happy path.

1. jq compile error (the run crashed)

{blocks: [ ... ] + (if ...) + [ ... ]}

jq parses blocks: [...] as the complete object value, then hits the trailing +syntax error, unexpected '+'. Fix: wrap the whole array expression in parentheses — {blocks: ([...] + (if ...) + [...])}.

2. Slack 3000-char section limit

The PR index concatenated every PR into one section — ~9,000 chars for June's 59 PRs. Slack rejects any section over 3,000. Now it lists the latest 10 (by PR number, newest first) with a · latest 10 of 59 note; full history lives in the repo.

Verification

Extracted the exact jq program from the workflow and ran it against real June data for next-sanity-starter:

  • 8 valid Block Kit blocks, all under 3,000 chars (PR index down to ~1,600).
  • Renders header · stats · overview · highlights · contributors · dependencies · PR index (latest 10 of 59).

No skip-branch change; the "No PRs" path is untouched.

🤖 Generated with Claude Code

The rich-digest branch (skip != true) never ran until #25 started
returning PRs. Two defects surfaced on the first real run:

- jq compile error: `{blocks: [...] + (if ...) + [...]}` parses `blocks: [...]`
  as the whole value and chokes on the trailing `+`. Wrap the array
  expression in parentheses: `{blocks: ([...] + ...)}`.
- Slack rejects a section over 3000 chars; the full PR index was ~9000
  chars for 59 PRs. List only the latest 10 (by number, newest first) and
  note the total — deeper history belongs in the repo.

Verified by extracting the jq program from the workflow and running it
against real June data: 8 valid blocks, PR index ~1.6k chars.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant