streaming-testing
Skill438 starsChanged 53 days agoApache-2.0View on GitHub
Compare A2A streaming behaviour across supervisor versions. Captures SSE events, analyzes metadata flags (is_narration, is_final_answer), and produces side-by-side comparison reports.
- Installs packages
1 other project uses a version of this.
Adopted by
Most recently taken up by
- caipe-io/ai-platform-engineeringword for word, first seen Sep 22, 2026
Other versions1 project uses a version of this.
Word for word · 1
- caipe-io/ai-platform-engineering★ 438100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository21 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .cursor/rules/docker-compose-first-install.mdcCursor rule
- .cursor/rules/safe-git-worktree.mdcCursor rule
- .cursor/rules/specify-rules.mdcCursor rule
- docker-compose-first-installSkill
- local-integration-testingSkill
- release-docsSkill
- run-caipe-integration-testsSkill
- skillsSkill
- speckit.analyzeSkill
- speckit.checklistSkill
- speckit.clarifySkill
- speckit.constitutionSkill
- speckit.implementSkill
- speckit.planSkill
- speckit.specifySkill
- speckit.sync-templateSkill
- speckit.tasksSkill
- speckit.taskstoissuesSkill
- ui-performance-benchmarkSkill
- update-docsSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 1 is distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 28
All scripts live in scripts/ and use Python stdlib only.
- Very specific: line 58
No internal metadata leaked (is_task_complete=, Returning structured response)
- Very specific: line 130
If capture_a2a_events.py produces 0 artifacts:
- Very specific: line 131
Verify the supervisor is healthy: curl http://localhost:8000/.well-known/agent.json
- Distinctive: line 132
Check if the supervisor uses SSE or JSON-RPC (the script handles both)
- Very specific: line 133
Look at supervisor logs for errors: docker logs caipe-supervisor 2>&1 | tail -50
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Streaming Testing
Compare A2A streaming behaviour across supervisor versions (e.g. 0.3.0 vs 0.2.41). Captures SSE events, analyzes metadata correctness, and generates side-by-side markdown reports.
Prerequisites
- Docker Compose dev stack running (
docker-compose.dev.yaml) - 0.3.0 supervisor on port 8000 (
caipe-supervisor) - 0.2.41 supervisor on port 8041 (
caipe-supervisor-041) - Python 3.10+ (scripts use stdlib only — no pip install needed)
Quick Start
# One command — captures from both supervisors, analyzes, compares
./skills/streaming-testing/run_comparison.sh "what can you do?"
# Output lands in /tmp/streaming-comparison-<timestamp>.mdIndividual Scripts
All scripts live in scripts/ and use Python stdlib only.
| Script | Purpose | Usage |
trace_a2a_streaming.py | SSE timeline with summary stats | python3 scripts/trace_a2a_streaming.py 8000 "query" |
capture_a2a_events.py | Save raw A2A events to JSON | python3 scripts/capture_a2a_events.py http://localhost:8000/ "query" /tmp/out.json |
analyze_a2a_metadata.py | Validate metadata flags in a capture | python3 scripts/analyze_a2a_metadata.py /tmp/out.json |
compare_a2a_events.py | Side-by-side comparison of two captures | python3 scripts/compare_a2a_events.py /tmp/a.json /tmp/b.json |
analyze_accumulation_flow.py | Content accumulation + duplicate detection | python3 scripts/analyze_accumulation_flow.py "query" --port 8000 |
validate_artifacts.py | Parse/validate artifact reports | python3 scripts/validate_artifacts.py --query "query" --port 8000 |
Workflow
Step 1: Capture events from both supervisors
python3 scripts/capture_a2a_events.py http://localhost:8000/ "what can you do?" /tmp/cap-030.json
python3 scripts/capture_a2a_events.py http://localhost:8041/ "what can you do?" /tmp/cap-041.jsonStep 2: Analyze metadata on each capture
python3 scripts/analyze_a2a_metadata.py /tmp/cap-030.json
python3 scripts/analyze_a2a_metadata.py /tmp/cap-041.jsonThis validates:
is_final_answeris present on streaming_result artifacts- No
[FINAL ANSWER]marker leaked into text - No internal metadata leaked (
is_task_complete=,Returning structured response) is_narrationandis_final_answerare mutually exclusivefinal_resultorpartial_resultartifact exists- Streaming content is non-empty
Step 3: Compare side-by-side
python3 scripts/compare_a2a_events.py /tmp/cap-030.json /tmp/cap-041.json --output /tmp/comparison.mdGenerates a markdown report with:
- Summary table (total time, time to first content, artifact counts, char counts)
- Artifact name breakdown
- Safety checks (marker leaks, metadata leaks)
- Per-artifact detail table with metadata flags
Step 4 (optional): Deep-dive traces
For a live timeline view of each SSE event as it arrives:
python3 scripts/trace_a2a_streaming.py 8000 "what can you do?"
python3 scripts/trace_a2a_streaming.py 8041 "what can you do?"Interpreting Results
Key Metrics
| Metric | What it means | Good value |
| Time to first content | How long until the user sees text | < 5s |
| Total time | End-to-end response time | < 20s (simple), < 120s (RAG) |
| has is_final_answer | Supervisor correctly tags the final answer | True |
| Narration events | Narration chunks for typing-status display | 0 for simple queries, > 0 for RAG |
| Marker leaks | [FINAL ANSWER] leaked to client | Must be 0 |
| Metadata leaks | Internal state leaked to client | Must be 0 |
What to look for
- 0.3.0 has a "dead gap" before content: The
generate_structured_responsenode builds JSON preamble before thecontentkey. Time to first content will be higher than 0.2.41. - 0.2.41 may leak narration text: Pre-marker buffer flush sends LLM thinking text (e.g. "Excellent! I now have comprehensive information...") to the client.
- Narration events should NOT appear in 0.2.41: The
is_narrationflag was added in 0.3.0. - Both versions should have 0 marker leaks: The Slack bot and agent_executor both strip markers.
Troubleshooting
Supervisor not reachable
# Check containers
docker ps | grep supervisor
# Restart
docker restart caipe-supervisor
docker restart caipe-supervisor-041Script hangs
The scripts have a default 120s (trace) or 300s (capture) timeout. For RAG queries, increase the timeout:
# capture_a2a_events.py reads timeout from the URL (not a CLI arg).
# For trace, it's hardcoded at 120s in http.client timeout.
# If queries consistently time out, check supervisor logs:
docker logs caipe-supervisor 2>&1 | tail -20Empty captures
If capture_a2a_events.py produces 0 artifacts:
- Verify the supervisor is healthy:
curl http://localhost:8000/.well-known/agent.json - Check if the supervisor uses SSE or JSON-RPC (the script handles both)
- Look at supervisor logs for errors:
docker logs caipe-supervisor 2>&1 | tail -50
Examples
# Simple query comparison
./skills/streaming-testing/run_comparison.sh "what can you do?"
# RAG query comparison (takes longer)
./skills/streaming-testing/run_comparison.sh "what is caipe?"
# Just analyze a single capture
python3 scripts/analyze_a2a_metadata.py /tmp/cap-030.json --verbose
# Custom labels in comparison report
python3 scripts/compare_a2a_events.py /tmp/cap-030.json /tmp/cap-041.json \
--label-a "0.3.0 (post-fix)" --label-b "0.2.41 (golden)"Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

