Skip to content

docs(a2a): spell out dual-shape token parsing + INFO logging#412

Merged
mabry1985 merged 2 commits intomainfrom
docs/push-config-token-shapes
Apr 18, 2026
Merged

docs(a2a): spell out dual-shape token parsing + INFO logging#412
mabry1985 merged 2 commits intomainfrom
docs/push-config-token-shapes

Conversation

@mabry1985
Copy link
Copy Markdown

@mabry1985 mabry1985 commented Apr 17, 2026

Summary

Pairs with quinn#64 (accept both PushNotificationConfig token shapes) and quinn#62 (install `logging.basicConfig` at server boot). Both were worth a full day of polling-fallback silence on Quinn; capturing the lessons on the gold-standard agent-building guide so the next agent author doesn't repeat them.

Changes

  • Push notifications section grows a dedicated "Token parsing — accept BOTH shapes" subsection with side-by-side JSON of the two A2A-spec-legal `PushNotificationConfig` variants, a pointer to Quinn's `_extract_push_token` helper, and the specific failure mode when you only read one shape (silent 401 on every delivery — indistinguishable from "never delivered" without INFO logs).
  • Task-store-hygiene checklist picks up two new items:
    • Dual-shape token parsing
    • INFO-level delivery logging — calls out the Python default-WARNING pitfall specifically

Closes

Test plan

  • Renders cleanly; links to Quinn's helper + issue numbers resolve

🤖 Generated with Claude Code

Summary by CodeRabbit

Release Notes

  • Documentation

    • Expanded webhook and push notification guidance to support flexible token format parsing.
    • Added webhook delivery logging requirements for enhanced visibility at INFO level.
    • Updated implementation checklists and gold-standard requirements to reflect token parsing and logging configurations.
  • Chores

    • Updated external service health check configuration and orchestration service descriptions.

Automaker and others added 2 commits April 16, 2026 18:45
Both services decommissioned. Containers stopped + removed.
Only reference in protoWorkstacean was the rollcall script.

Note: homelab-iac/stacks/ai/docker-compose.yml still has a
worldmonitor network reference at line 521 + service at line 833.
Needs separate cleanup in that repo.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Pairs with quinn#64 (accept both PushNotificationConfig token shapes)
and quinn#62 (install logging.basicConfig at server boot). Both were
worth a full day of polling-fallback silence; capturing the lessons on
the gold-standard guide so the next agent author doesn't repeat them.

- Push notifications section grows a dedicated "Token parsing — accept
  BOTH shapes" subsection with side-by-side JSON of the two
  A2A-spec-legal PushNotificationConfig variants, a pointer to
  Quinn's `_extract_push_token` helper, and the specific failure mode
  when you only read one shape (silent 401 on every delivery).
- Task-store-hygiene checklist picks up two new items: dual-shape
  token parsing, and INFO-level delivery logging with the specific
  Python default-WARNING pitfall called out.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 17, 2026

📝 Walkthrough

Walkthrough

Documentation expanded with token-parsing guidance accepting both bearer token shapes and INFO-level logging requirements. Agent rollcall script updated to remove two service checks and modify one agent's display name.

Changes

Cohort / File(s) Summary
Documentation Updates
docs/guides/build-an-a2a-agent.md
Added "Token parsing — accept BOTH shapes" section clarifying dual token formats (token string or authentication.credentials). Updated implementation checklist to include INFO-level webhook delivery logging and ensured logging visibility via basicConfig. Gold-standard checklist revised to reflect SSRF allowlisting, dual token parsing, and configured logging levels.
Agent Rollcall Script
scripts/agent-rollcall.sh
Removed protovoice:7880 and protoaudio:8210 service checks. Updated workstacean:8081 display name to include "Tuner DeepAgents" alongside existing orchestration targets.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 A token may flow in two different ways,
Through bearer or credentials, the webhook obeys,
Now logs shine at INFO, no longer in hiding,
While agents align and the rollcall's been tiding! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main documentation changes: dual-shape token parsing and INFO logging requirements for the A2A agent guide.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ 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 docs/push-config-token-shapes

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

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/guides/build-an-a2a-agent.md`:
- Around line 274-290: The JSON examples under "Shape 1" and "Shape 2" include
inline JavaScript comments which make the fenced block invalid JSON; update the
doc so the fenced block is valid JSON by either removing the leading // comments
from inside the fenced code block or change the fence language to jsonc (or move
explanatory comments above/below the block), ensuring the two examples remain
syntactically valid and copy/pasteable as JSON.
- Line 302: The wording "curl the agent's container env" is incorrect; update
the line that suggests using curl to instead show proper container environment
inspection commands by replacing that phrase with concrete examples such as
`docker exec <container> printenv LOG_LEVEL` and add an alternative for k8s like
`kubectl exec -it <pod> -- printenv LOG_LEVEL` where the docs currently mention
"curl the agent's container env" so readers can reliably check LOG_LEVEL.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f327e185-5bc7-43f6-b17c-e18c26c19a3a

📥 Commits

Reviewing files that changed from the base of the PR and between 5dad709 and 2be5239.

📒 Files selected for processing (2)
  • docs/guides/build-an-a2a-agent.md
  • scripts/agent-rollcall.sh

Comment on lines +274 to +290
```json
// Shape 1 — top-level `token` (what @a2a-js/sdk serialises by default,
// what Workstacean's SkillDispatcherPlugin sends)
{
"url": "http://caller/api/a2a/callback/{taskId}",
"token": "per-task-secret"
}

// Shape 2 — structured RFC-8821 AuthenticationInfo
{
"url": "http://caller/api/a2a/callback/{taskId}",
"authentication": {
"schemes": ["Bearer"],
"credentials": "per-task-secret"
}
}
```
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Use valid JSON in copy/paste examples.

The fenced block is tagged json but includes // comments, which makes it invalid JSON. Consider moving comments outside the block or switching to jsonc to avoid copy/paste failures.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/guides/build-an-a2a-agent.md` around lines 274 - 290, The JSON examples
under "Shape 1" and "Shape 2" include inline JavaScript comments which make the
fenced block invalid JSON; update the doc so the fenced block is valid JSON by
either removing the leading // comments from inside the fenced code block or
change the fence language to jsonc (or move explanatory comments above/below the
block), ensuring the two examples remain syntactically valid and copy/pasteable
as JSON.

- Send `Authorization: Bearer <token>` if the caller registered a token
- Send `Authorization: Bearer <token>` if the caller registered a token (see token-parsing above)
- Do NOT log the webhook body or token — these carry task artifacts, which may contain sensitive data
- **Log delivery attempts at INFO, not DEBUG.** The default Python root level is WARNING; without `logging.basicConfig(level=INFO)` on your server, "webhook delivered" lines silently vanish and you can't tell delivery from silent-drop (Quinn #61). `curl` the agent's container env for `LOG_LEVEL` — if it's unset and the server doesn't set a basicConfig, you're flying blind.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Operational check wording is inaccurate.

curl the agent’s container env” is misleading—curl won’t read container env vars. Recommend replacing with a container-env inspection command example (e.g., docker exec <container> printenv LOG_LEVEL).

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/guides/build-an-a2a-agent.md` at line 302, The wording "curl the agent's
container env" is incorrect; update the line that suggests using curl to instead
show proper container environment inspection commands by replacing that phrase
with concrete examples such as `docker exec <container> printenv LOG_LEVEL` and
add an alternative for k8s like `kubectl exec -it <pod> -- printenv LOG_LEVEL`
where the docs currently mention "curl the agent's container env" so readers can
reliably check LOG_LEVEL.

@mabry1985 mabry1985 merged commit fc4ce52 into main Apr 18, 2026
4 checks passed
@mabry1985 mabry1985 deleted the docs/push-config-token-shapes branch April 18, 2026 06:47
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