Repository navigation
fix(check-pending-questions): include body snippet in Discord DM notification - #1861
Conversation
…onichi#1861) Covers the snippet extraction in get_waiting_questions() and the arrow rendering in notify_discord_dm() introduced in PR sonichi#1861: - ## section with body → snippet is first non-empty, non-~~ line - Strikethrough opener → skipped, next real line wins - Empty body → snippet is "" (not missing) - Bullet-format entries → no snippet (one-liners have no body) - DM output with snippet → "↳ …" line present under title - DM output without snippet → no "↳" line Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KXQJogmVSdYrKtYX1LwzwT
|
Codex triage findings (detail for the REQUEST_CHANGES review that follows): Bug in the fix: check-pending-questions.py:115 can render metadata ('Status: unanswered') as the DM snippet when a section lists status before the action line - the DM still lacks the actual question. Add a behavioral test case with a Status-first section. Also +108 lines of custom test harness is heavy for this narrow behavior.
|
liususan091219
left a comment
There was a problem hiding this comment.
Codex triage - see my comment above. - Maddy
john-the-dev
left a comment
There was a problem hiding this comment.
Clean improvement. Snippet extraction logic is correct — strikethrough skip + 120-char truncation + graceful empty-body handling. Tests cover all the edge cases I'd want. The ↳ display in Discord DMs will make pending-question notifications actually actionable.
|
Automated mergeability review (2026-07-09) Signal: NOT MERGEABLE Current blocker(s):
This is a conservative backlog triage signal. After the blockers are cleared, please rerun checks and request a focused review. |
liususan091219
left a comment
There was a problem hiding this comment.
Triage change-request (owner-approved batch, 2026-07-12 sweep). Conditions found on the current diff:
- incomplete fix — Skip status metadata; current snippet can DM "Status: unanswered" as context.
Justification: kb triage standards (source-grep test standard, voice/vision live-test policy, necessity/coverage checks) — see sonichi/sutando-pr-triage kb/.
Address the asks and push; re-request review to clear this. If a finding is wrong, reply with the counter-evidence and it will be withdrawn.
cr-reason: incomplete_fix
liususan091219
left a comment
There was a problem hiding this comment.
Triage change-request (owner-approved batch, 2026-07-12 sweep). Conditions found on the current diff:
- incomplete fix — Skip status metadata; current snippet can DM "Status: unanswered" as context.
Justification: kb triage standards (source-grep test standard, voice/vision live-test policy, necessity/coverage checks) — see sonichi/sutando-pr-triage kb/.
Address the asks and push; re-request review to clear this. If a finding is wrong, reply with the counter-evidence and it will be withdrawn.
cr-reason: incomplete_fix
|
Daily reminder — this PR has an open change-request from 2026-07-03 (9d) with no commits since. Push fixes or reply to the review to reset the clock; ~2 weeks of silence routes to final-notice and then close-as-abandoned per the triage policy.
|
|
Daily reminder — this PR has an open change-request from 2026-07-03 (11d) with no commits since. Push fixes or reply to the review to reset the clock; ~2 weeks of silence routes to final-notice and then close-as-abandoned per the triage policy.
|
|
Daily reminder — this PR has an open change-request from 2026-07-03 (12d) with no commits since. Push fixes or reply to the review to reset the clock; ~2 weeks of silence routes to final-notice and then close-as-abandoned per the triage policy.
|
…fication Pending-question DMs showed "⚠️ N pending question(s) waiting: • title" with no context about what to do. Users receiving the notification had no actionable path — they didn't know what the question was asking or how to answer it ("what do I do with this?" UX complaint, feedback ca011cdc). Add a one-line snippet to each ## section entry: the first non-empty, non-strikethrough line of the question body. Displayed as "↳ ..." under the title in the Discord DM. Bullet-format entries (one-liners) carry no body and are unaffected — snippet is optional, guarded by q.get("snippet"). Before:⚠️ 1 pending question waiting: • [2026-06-30] sync-workspace needs vault remote URL Reply here or edit pending-questions.md on Bassils-MacBook-Pro… After:⚠️ 1 pending question waiting: • [2026-06-30] sync-workspace needs vault remote URL ↳ To enable cross-machine workspace sync (memory, notes, state/cores)… Reply here or edit pending-questions.md on Bassils-MacBook-Pro… Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KXQJogmVSdYrKtYX1LwzwT
…onichi#1861) Covers the snippet extraction in get_waiting_questions() and the arrow rendering in notify_discord_dm() introduced in PR sonichi#1861: - ## section with body → snippet is first non-empty, non-~~ line - Strikethrough opener → skipped, next real line wins - Empty body → snippet is "" (not missing) - Bullet-format entries → no snippet (one-liners have no body) - DM output with snippet → "↳ …" line present under title - DM output without snippet → no "↳" line Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KXQJogmVSdYrKtYX1LwzwT
…DM snippet Reviewer finding (liususan091219, 2026-07-12 triage): a section whose **Status:** line comes before its narrative text would DM the status marker itself as the "action hint" — telling the user nothing they don't already know from the ping. Skip status-metadata lines the same way strikethrough lines are already skipped. Also rebased onto current main (cherry-picked the original two commits fresh — was 100+ commits behind).
98a5d65 to
fd00ab2
Compare
|
@liususan091219 — good catch, fixed. Snippet extraction now also skips lines that are just `Status:` metadata (same treatment as the existing strikethrough skip), so a section that writes its Status line before the narrative text no longer DMs "Status: unanswered" as the action hint. Added a regression test (`check-pending-questions-snippet.test.py`, cases "status line skipped" / "status line never appears as the snippet"). Also rebased onto current `main` (was ~100+ commits behind) via a clean cherry-pick of the original two commits. Re-requesting review. |
Coverage Gate✅ Diff coverage PASSES the 95% bar. Whole-tree (informational): 49%. Diff CoverageDiff: origin/main...HEAD, staged and unstaged changes
Summary
|
|
Maintainer-run live test — PASS — and clearing the live-test-requested label. Ran this PR's Context for the label (applied 2026-07-14 15:42 in a batch that regrettably shipped without explanations): DM-notification formatting is user-visible runtime behavior, so the policy asks for a real delivery run rather than unit tests alone. That evidence now exists (above), and the CR's code ask is addressed on head — removing |
|
Before/after — real Terminal screen capture (pixels untouched; hostname/path redaction done via the visible BEFORE (main): the DM lists only the question title — no body snippet. Together with the live end-to-end delivery run earlier (real DM through the bridge), this completes the evidence: snippet feature works, Status-leak fix works, delivery path works. |
|
And the user-facing surface itself — the DM as actually rendered in the Discord client (this PR's code, delivered through the real proactive bridge; fixture question, screenshot cropped to the message): Title line + the |
|
LGTM. I ran Qingyun's Personal Codex Agent |
liususan091219
left a comment
There was a problem hiding this comment.
APPROVE - claim verified live against the full evidence standard: terminal before/after (main: title-only DM vs head: body snippet with Status metadata skipped), real end-to-end delivery through the proactive bridge on the real pending-questions file, and the rendered Discord client surface. The 7/12 incomplete_fix CR is addressed on head (17:04 commit) and verified in the same runs. Edge cases covered by the PR's unit tests.
|
@cla-assistant check |
#1861 asserted bullets carry no snippet because at the time they were one-liners whose label was the content. The format now carries the ask after the label, so that assertion pinned a stale fact rather than a design decision. A label-only bullet still yields no snippet.
#3444) * fix(questions): a bullet question delivers its ask, not just its label The proactive DM renders `snippet`; the bullet parser hardcoded it to the empty string, so a question carrying options, a recommendation and a default reached the owner as a bracketed slug and a date. The body was parsed correctly all along -- nothing rendered it. * test(questions): the bullet no-snippet premise no longer holds #1861 asserted bullets carry no snippet because at the time they were one-liners whose label was the content. The format now carries the ask after the label, so that assertion pinned a stale fact rather than a design decision. A label-only bullet still yields no snippet. --------- Co-authored-by: Yixuan Zhai <yxz.ucd@gmail.com>


Summary
Pending-question DMs showed only the question title with no actionable context. Bassil's reaction after the notification fired: "this is annoying to user they will say what do I do with this" — the user receives a ping but has no path to action.
get_waiting_questions(): extract the first non-empty, non-strikethrough body line as asnippetfield on each##section entry. Bullet-format entries (one-liners with no body) are unaffected —snippetis""and theq.get("snippet")guard in the DM renderer skips them.notify_discord_dm(): render↳ <snippet>indented under each question title when a snippet is present.Before:
After:
Relates to feedback report ca011cdc filed via
/api/feedback.Test plan
## [test] some question\nAction: run X to fix thisentry topending-questions.md, runpython3 src/check-pending-questions.py --force, confirm theproactive-pending-q-*.txtinresults/contains the↳ Action: run X to fix thisline- **[label, ts]** ...) still render without a↳line (no body to extract)python3 tests/check-pending-questions.test.py🤖 Generated with Claude Code
https://claude.ai/code/session_01KXQJogmVSdYrKtYX1LwzwT