Repository navigation
docs: tighten whatsapp comments - #37330
Conversation
Merge two comments that each said the same thing twice (session store lock-down in client, operator authority in transport) and shorten the redaction-notice note. Comments only; no code change.
UX Review (Opus 5.5) — ⏭️ skippedRevision |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS This PR changes comments only. Nothing new is added, so nothing has to justify its existence. Notes
What this change shipsInventory (3 items) — 2 justifiedIntent: make the WhatsApp channel comments say each rule and its reason once, in fewer words. This is a FIX (docs).
[FIRST-PRINCIPLES-REVIEWED] 594c2e0 Description read[DESCRIPTION-READ] 011cab312c308f55f786cdf505a87e6552c4bbbb3ea214c5324b806c079165f8 That sha256 names the PR description this verdict read. Recompute it with |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Comment-only change with no code impact. Each fact that was removed is still stated in the merged comment or in step 3b. [DESIGN-REVIEWED] 594c2e0 Description read[DESCRIPTION-READ] 5e9b9d98eb4de54778d54a6e492c2661e7ddda1ec5fde28b1c09d4f6f9a998ff That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Approved. This head changes only comments in whatsapp/client.py, transport.py and turn_renderer.py. The review found the parsed AST of all three files identical at the merge-base and at this head, so behaviour cannot change. The review also checked each new comment against the code. _restrict_session_store still raises on failure and is awaited through asyncio.to_thread before pairing. The "see 3b" pointer leads to the full from_me reasoning. The redaction notice send is wrapped in try/except. The source-reading test in test_whatsapp_client.py still finds its line.
Done well: each rationale you removed still exists one hop away, and the from_me rule now has one source instead of two copies that could drift.
Optional:
client.py:286: the merged comment no longer says why a blocking call on the loop hurts (the single loop also carries every channel and the heartbeat). A short phrase such as "Off the shared loop" would bring that back.
Problem / Motivation
Goal: Make the
whatsappcomments short, plain and true, so a reader (person or AI agent) gets each rule and its reason in fewer words.Two comments in
src/kiro_crew/whatsapp/say the same thing twice: the session-store lock-down note inclient.pyrepeats its own first paragraph, and the operator-authority note intransport.pyrestates step 3b a few lines above it. This PR merges those and shortens one more note. It changes no code.Why it matters
Agents editing the WhatsApp channel read these comments to learn why a directory must be locked before pairing and when the operator counts as addressing the agent. Saying each fact once is easier to read and to keep true.
Not a goal
renderer.pyandtransport_dispatch.pyare skipped (open PRs fix: send markdown italic and bold italic to WhatsApp in its own dialect #37288, perf(embeddings): release the model sooner on small machines #37128 and feat(redaction): scrub every persisted conversation row #36640 edit them).What changed (motivation → approach → change)
Comments only, in three files:
client.py,transport.py,turn_renderer.py(14 lines added, 25 removed).client.pysession-store lock-downtransport.pyoperator authority before the group gateturn_renderer.pyredaction noticeExamples:
client.py, session storeBefore:
After:
transport.py, operator authorityBefore:
After (step 3b, ten lines above, already gives the reason):
turn_renderer.py, redaction noticeBefore:
After:
Backwards compatibility
Compatible: comments only; the AST of every changed file is unchanged.
Removes nothing: no code, test, docstring or check is removed.
Tests
Proof: not provable -- comment-only change; the AST check below shows no code moved.
goal_scan.py astcheckagainst the merge-base: 3 files checked, 0 code-changed, 0 docstring-only.runtime_doc_check.py: 3 files, flagged 0.check_comment_history.pyandcheck_brand_name.pypass on the added lines; flake8 and black are clean; no added line is over 100 columns.Manual verification
N/A — comment-only change.
Related Issues
N/A — part of the src comment cleanup.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Contributed under the project's Apache-2.0 license.