Skip to content

fix(beats-voice): agent_id semantics + deterministic test + doc thread cleanup - #1406

Merged
POWERFULMOVES merged 1 commit into
mainfrom
fix/beats-voice-agent-id-and-doc-threads
Apr 28, 2026
Merged

POWERFULMOVES merged 1 commit into
mainfrom
fix/beats-voice-agent-id-and-doc-threads

Conversation

@POWERFULMOVES

@POWERFULMOVES POWERFULMOVES commented Apr 28, 2026

Copy link
Copy Markdown
Owner

Summary

Resolves all remaining open review threads from PRs #1381 and #1402.

beats_to_voice.py — P2 agent_id fix

_listen_loop was using data.get("user_id") as the agent_id for CGP packet attribution. Per the NATS subject catalog (.claude/context/nats-subjects.md), user_id in voice.agent.response.v1 is the request originator (end-user), not the processing agent. Corrupted CGP agent attribution in live mode. Now uses the configured agent_id parameter unconditionally.

test_beats_to_voice_nats.py — race fix + assertion alignment

  • Replaced asyncio.sleep(0.05) with asyncio.Event.wait(timeout=2.0) — eliminates timing-dependent CI failures on loaded runners
  • Updated assertion: agent_id is now "4090-claude" (configured) rather than "z890-claude" (which was incorrectly sourced from user_id)

AGNOTE4482.md — MD058 markdownlint fix

Added blank lines before/after Key Findings table (blanks-around-tables rule).

PR_TRIAGE_2026-04-23.md — portable cross-reference

Replaced ~/.claude/projects/.../memory/feedback_rebase_before_merge.md with inline guidance — not accessible to other reviewers/operators.

Test plan

  • pytest pmoves/tools/test_beats_to_voice_nats.py -v5 passed

Village Rule

One scope: open thread resolution only. No new features.

🤖 Generated with Claude Code

Summary by CodeRabbit

Release Notes

  • Bug Fixes

    • Fixed NATS message handler to consistently use the configured agent ID instead of deriving from incoming message data, ensuring proper logging and pipeline invocation.
  • Tests

    • Updated tests to verify agent ID handling in the message pipeline with improved synchronization mechanisms.
  • Documentation

    • Updated PR triage guidelines to clarify rebase procedures for agent-authored documentation.

…d cleanup

Resolves remaining open review threads from PR #1381 and #1402:

beats_to_voice.py:
- Use configured agent_id instead of data["user_id"] in listen handler.
  Per NATS catalog, user_id in voice.agent.response.v1 is the request
  originator (end-user), not the processing agent. Mixing the two
  corrupted CGP agent attribution in live mode.

test_beats_to_voice_nats.py:
- Replace asyncio.sleep(0.05) with asyncio.Event.wait() for deterministic
  handler capture — eliminates timing-dependent CI failures.
- Update assertion: agent_id is now "4090-claude" (configured), not
  "z890-claude" (originator from user_id).

AGNOTE4482.md:
- Add blank lines around Key Findings table (MD058 markdownlint fix).

PR_TRIAGE_2026-04-23.md:
- Replace machine-local ~/.claude/... path with inline portable guidance.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Apr 28, 2026

Copy link
Copy Markdown
Contributor

Caution

Review failed

Pull request was closed or merged during review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: fccfa206-bd61-4505-bcec-28af9af6920c

📥 Commits

Reviewing files that changed from the base of the PR and between 0473705 and 11be768.

📒 Files selected for processing (4)
  • pmoves/docs/AGENTS/AGNOTE4482.md
  • pmoves/docs/AGENTS/PR_TRIAGE_2026-04-23.md
  • pmoves/tools/beats_to_voice.py
  • pmoves/tools/test_beats_to_voice_nats.py

📝 Walkthrough

Walkthrough

This PR makes three distinct updates: a formatting correction to an agent note, a documentation update to PR triage guidelines replacing an external reference with inline guidance, and a behavioral change to the NATS trigger handler to consistently use the configured agent_id instead of potentially deriving it from the incoming message.

Changes

Cohort / File(s) Summary
Documentation Formatting
pmoves/docs/AGENTS/AGNOTE4482.md
Adds blank line before Key Findings table header for improved readability.
PR Triage Documentation
pmoves/docs/AGENTS/PR_TRIAGE_2026-04-23.md
Replaces external file reference with inline rationale: always rebase agent-authored doc PRs to HEAD before merging when on stale shared branches.
NATS Handler Agent ID Logic
pmoves/tools/beats_to_voice.py
Updates NATS trigger message handler to always use the local agent_id configuration instead of potentially overriding with data.user_id from the incoming message.
Handler Test & Synchronization
pmoves/tools/test_beats_to_voice_nats.py
Updates test assertions to verify configured agent_id is used; replaces sleep-based timing with asyncio.Event for reliable callback registration synchronization (bounded by 2s timeout).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Poem

🐰 A handler now steadfast, no wandering astray,
One agent, one ID, the configured way.
Events sync true, no more sleepy delays,
Docs tidy and clear through formatting's maze.
This rabbit hops cheering—the code's now so right! 🐇✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 40.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the three main changes: agent_id semantics fix in beats_to_voice, deterministic test improvements, and documentation cleanup across multiple files.
Description check ✅ Passed The description includes a clear summary with multiple bullet points explaining each change, test commands with results, and reviewer notes. All required sections are present and substantially completed.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/beats-voice-agent-id-and-doc-threads

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@POWERFULMOVES
POWERFULMOVES merged commit a280759 into main Apr 28, 2026
13 of 14 checks passed
@POWERFULMOVES
POWERFULMOVES deleted the fix/beats-voice-agent-id-and-doc-threads branch April 28, 2026 09:36
POWERFULMOVES added a commit that referenced this pull request May 2, 2026
…date

Appends session ACK block to AGNOTE4482.md covering 2026-04-27→05-02:
- PRs #1402 (NATS push model), #1404 (geometry bus), #1405 (cred redact),
  #1406 (agent_id fix), #1407 (§9 SPARK rescue) — all merged
- GitHub issues #1410 (W6-P1/z890), #1411 (W6-P2/5090), #1412 (W6-P5/opus)
  created with full TAC-grounded handoff + signoff checklist references

Updates ROADMAP Active Claim Register: W6-P3 NATS row added (SHIPPED),
W6-P1/P2/P5 rows updated with issue numbers and ANNOUNCED status.

Village Rule: one scope, one commit, one PR.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
POWERFULMOVES added a commit that referenced this pull request May 7, 2026
…date (#1417)

* docs(agnote): W6 convergence wave ACK + TAC lane announce register update

Appends session ACK block to AGNOTE4482.md covering 2026-04-27→05-02:
- PRs #1402 (NATS push model), #1404 (geometry bus), #1405 (cred redact),
  #1406 (agent_id fix), #1407 (§9 SPARK rescue) — all merged
- GitHub issues #1410 (W6-P1/z890), #1411 (W6-P2/5090), #1412 (W6-P5/opus)
  created with full TAC-grounded handoff + signoff checklist references

Updates ROADMAP Active Claim Register: W6-P3 NATS row added (SHIPPED),
W6-P1/P2/P5 rows updated with issue numbers and ANNOUNCED status.

Village Rule: one scope, one commit, one PR.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* docs(vision): Cinco de Mayo launch vision + KiloCode W6-P2 handoff brief

Extends AGNOTE4482 launch vision with:
- CLI-as-score / CGP-as-mood / proof-of-resonance architectural framing
- Character persona system (Dr. Bean, Mr. Clean, PowerPuff Girls)
  as FlOO$ W6-P5 suit archetypes powered by MiniMax
- Three-Body split: 4090-claude analysis → KiloCode GLM implementation
- Node deployment plan: Jetson edge + 5090 MiniMax+KiloCode runtime

Adds .kilo/command/w6-bpm-nats.md — executable KiloCode brief for
bpm_encoder NATS publish (W6-P2): exact file, line refs, code blocks,
test file template, verify commands. GLM-5.1 blueprint-first pickup.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <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