Skip to content
This repository was archived by the owner on Jul 16, 2026. It is now read-only.

Phase 5.19: notify on no-Status-field pending questions (sync OSS sutando) - #87

Merged
jgluck96 merged 1 commit into
dev-clientfrom
josh/phase-5.19-pending-questions-no-status-field
Jun 2, 2026
Merged

jgluck96 merged 1 commit into
dev-clientfrom
josh/phase-5.19-pending-questions-no-status-field

Conversation

@jgluck96

@jgluck96 jgluck96 commented Jun 2, 2026

Copy link
Copy Markdown

Summary

pending-questions.md mixes two formats in active use:

  • Structured: ## Title\n- **Status:** unanswered — written by voice / chat surfaces programmatically.
  • Free-form prose: ## Title\n<plain prose> — typed directly by the user, deleted (not marked) when resolved.

Before this PR, get_waiting_questions() required an explicit **Status:** field. Free-form prose sections were silently dropped from the waiting list — a question typed by the user into the markdown file would never trigger a macOS notification, a Discord DM ping, or a voice result. Effectively, anyone using the documented prose convention was invisible to the notifier.

OSS sutando fixed this by treating a missing Status field as default-unanswered (consistent with the documented "sections are deleted when resolved, not marked done" convention), while still skipping sections whose Status is explicitly resolved / done / answered. This PR ports that change. The function body in src/check-pending-questions.py is now byte-identical to OSS modulo a provenance docstring note.

Why this fits the "minimal divergence" rule

  • Single-function, additive behavior change: only get_waiting_questions() changes. No other call sites or files touched.
  • Net code converges: the body becomes identical to OSS, reducing divergence on this file to zero (in terms of behavior).
  • No new helpers introduced: same dependency footprint.
  • No path resolution divergence introduced: stando's personal_path(name, WORKSPACE) signature is preserved.

Test plan

  • Free-form prose section → reported as waiting (regression target)
  • Explicit Status: unanswered → reported
  • Explicit Status: Waiting → reported
  • Explicit Status: resolved / done / answered (5 case variants) → skipped
  • Empty title (##\n...) → skipped defensively
  • Mixed real-world file (Q1 prose + Q2 resolved + Q3 unanswered + free-form heading) → 3/4 reported
  • Empty file → empty list, no crash
  • 61/61 Python tests pass (60 prior + 1 new file)
  • TS typecheck clean

Phase context

Continues the OSS → private sync per "minimal divergence" rule:

Phase Subject PR
5.15 dashboard outbox reader #83
5.16 discord-bridge outbox writes #84
5.17 telegram-bridge outbox writes #85
5.18 dm-result outbox writes #86
5.19 pending-questions no-Status-field fix (this)

Phase 5.18 closed the outbox pipeline. This phase moves to the next behavioral-bug-fix candidate identified by the function-diff audit: a single high-confidence port (function body becomes byte-identical to OSS) that closes a class of silent-drop bugs in the notifier.

Made with Cursor

…ando)

`pending-questions.md` mixes two formats:
  - structured: `## Title` + `- **Status:** unanswered`
  - free-form prose: `## Title` + plain prose body (deleted when resolved,
    not marked done)

Before this PR, `get_waiting_questions()` required an explicit Status
field, so the free-form prose style was silently dropped — a question
typed directly by the user would never trigger a notification, a Discord
DM ping, or a voice result. Effectively, anyone using the documented
prose convention was invisible to the notifier.

OSS sutando fixed this by treating a missing Status field as default-
unanswered (matching the documented "sections are deleted when resolved"
behavior), while still skipping sections whose Status is explicitly
"resolved" / "done" / "answered". This PR ports that change verbatim —
the function body is now byte-identical to OSS.

Tests cover:
  1. free-form prose → reported as waiting (regression target)
  2. explicit `Status: unanswered` → reported
  3. explicit `Status: Waiting` → reported
  4. explicit `Status: resolved/done/answered` → skipped (5 variants)
  5. empty title → skipped (defensive)
  6. mixed file (real-world layout) → only unanswered sections reported
  7. empty file → empty list, no crash

Verification: 61/61 Python tests pass (60 prior + 1 new), TS typecheck clean.
Co-authored-by: Cursor <cursoragent@cursor.com>
@jgluck96
jgluck96 merged commit 5adc2a4 into dev-client Jun 2, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant