Skip to content

feat(#5161): analyze-transcript audit subcommand, telemetry detection, HTTP filtering - #5164

Merged
rh-hemartin merged 1 commit into
mainfrom
fix/5161-analyze-transcript-improvements
Jul 31, 2026
Merged

feat(#5161): analyze-transcript audit subcommand, telemetry detection, HTTP filtering#5164
rh-hemartin merged 1 commit into
mainfrom
fix/5161-analyze-transcript-improvements

Conversation

@rh-hemartin

Copy link
Copy Markdown
Member

Summary

Closes #5161.

  • Add audit subcommand combining summary + errors + tool breakdown in one pass
  • Detect OTLP telemetry files early and exit with a clear warning instead of producing confusing output
  • Add --method and --host filters to network --http for targeted HTTP request analysis
  • Harden SKILL.md: allowed-tools patterns, no-shell-variables rule, question routing table, missing-transcript troubleshooting, full audit workflow docs

Test plan

  • Run audit against a real agent transcript JSONL and verify it outputs summary, tool counts, and errors in one pass
  • Pass a run-telemetry.jsonl file to summary and verify it exits with a telemetry warning
  • Run network <sandbox-log> --http --method POST --host github.com and verify filtering works
  • Invoke the skill via /analyze-transcript and confirm no permission prompts for standard commands

🤖 Generated with Claude Code

@rh-hemartin
rh-hemartin requested a review from a team as a code owner July 16, 2026 12:40
@rh-hemartin rh-hemartin self-assigned this Jul 16, 2026
@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Add analyze-transcript audit, OTLP telemetry detection, and HTTP request filters

✨ Enhancement 📝 Documentation 🕐 20-40 Minutes

Grey Divider

AI Description

• Add audit subcommand to emit summary, tool counts, and errors in one pass.
• Detect OTLP telemetry JSONL early and exit with a clear warning.
• Add --method/--host filters for network --http and document full workflow.
Diagram

graph TD
  U["User"] --> CLI["analyze-transcript.py CLI"] --> FT{"File type\ndetection"} --> OK["Transcript parsing"] --> AUD["audit: summary+tools+errors"]
  OK --> SUM["summary/tools/errors/search"]
  U --> NET["network --http"] --> FIL{"method/host\nfilters"} --> OUT["Filtered HTTP list"]
  FT --> WARN["Telemetry warning\n(exit 1)"]

  subgraph Legend
    direction LR
    _u["User"] ~~~ _p["Process"] ~~~ _d{"Decision"}
  end
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Refactor to shared aggregator used by summary/tools/errors
2. Make telemetry detection an explicit flag (e.g., `--telemetry`)
  • ➕ No heuristics; behavior is fully user-controlled.
  • ➕ Avoids false positives if a transcript line accidentally contains OTLP-like keys.
  • ➖ Worse UX for the common failure mode: users already pass the wrong file and want guidance.
  • ➖ Requires users to understand the difference before they get help.
3. Support richer HTTP filtering (regex / status / path filters)

Recommendation: Keep the PR’s approach: the audit single-pass command materially improves the common workflow without forcing a broad refactor, and heuristic OTLP detection is a pragmatic UX win for the frequent wrong-file case. If audit grows further, consider extracting a shared “transcript stats/errors/tools” aggregator to reduce drift between summary and audit outputs.

Files changed (2) +283 / -22

Enhancement (1) +178 / -3
analyze-transcript.pyAdd 'audit' subcommand, OTLP telemetry guard, and HTTP request filters +178/-3

Add 'audit' subcommand, OTLP telemetry guard, and HTTP request filters

• Introduces a lightweight file sniffer to detect OTLP telemetry JSONL and abort transcript-oriented commands with a clear warning. Adds a new 'audit' subcommand that aggregates summary stats, tool call counts, and detected errors in a single transcript pass. Extends 'network --http' output with '--method' and '--host' filters and makes the printed header reflect active filters.

skills/analyze-transcript/analyze-transcript.py

Documentation (1) +105 / -19
SKILL.mdDocument audit workflow and tighten skill execution rules +105/-19

Document audit workflow and tighten skill execution rules

• Adds explicit allowed-tools patterns and operational rules (relative paths only, no shell variables, output limiting, constrained 'find'). Documents question routing, missing-transcript troubleshooting (including OTLP telemetry files), HTTP filtering examples, and a full audit workflow sequence.

skills/analyze-transcript/SKILL.md

@github-actions

github-actions Bot commented Jul 16, 2026

Copy link
Copy Markdown

Site preview

Preview: https://2c83ea77-site.fullsend-ai.workers.dev

Commit: 1c14664511f0826d8cc29a24971a46dd067fe714

@codecov

codecov Bot commented Jul 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@qodo-code-review

qodo-code-review Bot commented Jul 16, 2026

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📜 Skill insights (0)

Context used
✅ Compliance rules (platform): 54 rules

Grey Divider


Remediation recommended

1. allowed-tools quote typo ✗ Dismissed 🐞 Bug ☼ Reliability
Description
skills/analyze-transcript/SKILL.md includes allowed-tools patterns with an unmatched " (e.g.,
Bash(mkdir -p ".transcripts/*)), which is likely not the intended pattern and may fail to match
real quoted shell commands. This matters because the same doc states mismatched commands vs
allowed-tools patterns can trigger permission prompts and derail the workflow.
Code

skills/analyze-transcript/SKILL.md[R12-15]

+  - Bash(mkdir -p .transcripts/*)
+  - Bash(mkdir -p ".transcripts/*)
+  - Bash(find .transcripts/run-*)
+  - Bash(find ".transcripts/run-*)
Relevance

●●● Strong

Team often fixes SKILL.md command/pattern correctness; analyze-transcript SKILL.md doc fixes were
accepted.

PR-#746

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The frontmatter contains patterns with a stray/unmatched quote, and the skill’s own rules explain
that mismatches against these patterns can cause permission prompts.

skills/analyze-transcript/SKILL.md[9-16]
skills/analyze-transcript/SKILL.md[35-40]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
`allowed-tools` includes patterns with an unmatched double-quote, which is likely a typo and may prevent quoted variants of the commands from matching the allowlist.

### Issue Context
The skill explicitly warns that commands drifting from `allowed-tools` patterns can trigger permission prompts; a typo in the patterns increases the chance of that drift.

### Fix Focus Areas
- skills/analyze-transcript/SKILL.md[9-16]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. Audit misses error mentions ✓ Resolved 🐞 Bug ≡ Correctness
Description
cmd_audit does not implement the assistant-text “mentions” heuristics that cmd_errors uses (e.g.
matching permission denied, fatal error), so audit can miss failures that errors would
report. This breaks the expectation set by the new documentation that audit is “summary + errors +
tools in one pass.”
Code

skills/analyze-transcript/analyze-transcript.py[R437-450]

+        for btype, block in extract_content_blocks(msg):
+            if btype == "tool_result":
+                if _is_error_result(block):
+                    text = get_tool_result_text(block)
+                    errors.append((i, truncate(text.strip(), max_w)))
+                else:
+                    text = get_tool_result_text(block)
+                    if _RESULT_ERROR_PATTERNS.search(text):
+                        errors.append((i, truncate(text.strip(), max_w)))
+            elif role == "user" and btype == "text":
+                text = block if isinstance(block, str) else block.get("text", "")
+                if "<error>" in text:
+                    errors.append((i, truncate(text.strip(), max_w)))
+
Relevance

●● Moderate

No prior evidence on audit matching errors’ mention heuristics; could be treated as scope change,
not bugfix.

PR-#746

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
cmd_errors explicitly adds assistant-text “mentions” based on common failure phrases, while
cmd_audit’s error collection loop lacks any analogous assistant-text scanning.

skills/analyze-transcript/analyze-transcript.py[324-366]
skills/analyze-transcript/analyze-transcript.py[385-450]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
The new `audit` subcommand claims to combine `summary + errors + tools`, but it only collects tool_result errors and user `<error>` strings. It omits the assistant-text error/denial heuristics present in `cmd_errors`, so `audit` can miss relevant failures.

### Issue Context
`cmd_errors` already has the desired behavior; `cmd_audit` should reuse the same logic (ideally via a shared helper) so the “quick audit” path is not less complete than running `errors` separately.

### Fix Focus Areas
- skills/analyze-transcript/analyze-transcript.py[324-366]
- skills/analyze-transcript/analyze-transcript.py[385-497]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Informational

3. Audit double-parses blocks ✓ Resolved 🐞 Bug ➹ Performance
Description
cmd_audit calls extract_content_blocks(msg) twice per message (once for tool counting, again for
error scanning), doubling block-walk overhead for assistant messages. For large transcripts, this
adds avoidable CPU and allocations in a command explicitly intended to be an efficient “one pass”
audit.
Code

skills/analyze-transcript/analyze-transcript.py[R421-438]

+        if role == "assistant":
+            model = msg.get("model")
+            if model:
+                models.add(model)
+            usage = msg.get("usage", {})
+            total_input_tokens += usage.get("input_tokens", 0)
+            total_output_tokens += usage.get("output_tokens", 0)
+            total_cache_read += usage.get("cache_read_input_tokens", 0)
+            total_cache_create += usage.get("cache_creation_input_tokens", 0)
+            sr = msg.get("stop_reason")
+            if sr:
+                stop_reasons[sr] += 1
+            for btype, block in extract_content_blocks(msg):
+                if btype == "tool_use":
+                    tool_counts[block.get("name", "unknown")] += 1
+
+        for btype, block in extract_content_blocks(msg):
+            if btype == "tool_result":
Relevance

●●● Strong

They’ve accepted removing redundant parsing/computation (single-parse refactors) for efficiency in
similar codepaths.

PR-#3820
PR-#816

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The code shows two separate loops over extract_content_blocks(msg) in cmd_audit, one nested
under role == "assistant" and one unconditional for error detection.

skills/analyze-transcript/analyze-transcript.py[421-449]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
`cmd_audit` iterates content blocks twice for the same message. This is redundant work and can be avoided by extracting blocks once per message and reusing them for both tool_use counting and tool_result/user-text error detection.

### Issue Context
This is a local refactor: materialize `blocks = list(extract_content_blocks(msg))` once per message, then iterate `blocks` for both purposes.

### Fix Focus Areas
- skills/analyze-transcript/analyze-transcript.py[402-450]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

To customize comments, go to the Qodo configuration screen, or learn more in the docs.

Qodo Logo

Comment thread skills/analyze-transcript/SKILL.md Outdated
Comment thread skills/analyze-transcript/analyze-transcript.py
Comment thread skills/analyze-transcript/analyze-transcript.py Outdated
@fullsend-ai-review

fullsend-ai-review Bot commented Jul 16, 2026

Copy link
Copy Markdown

Review

Findings

Medium

  • [logic-error] skills/analyze-transcript/analyze-transcript.py — JSON output with --host (no --method or --http) includes non-HTTP OCSF entries (DNS, TCP connections) matching the host via the third elif clause in the JSON filter branch, while text output with --host shows all denied entries unfiltered by host and only filters the HTTP requests list. The --host help text says "filter HTTP requests by host," so including non-HTTP entries in JSON mode contradicts the documented purpose. Additionally, text mode's denied.append(e) has no host check while JSON mode filters DENIED entries by host.

  • [protected-path] skills/analyze-transcript/SKILL.md, skills/analyze-transcript/analyze-transcript.py — This PR modifies files under the skills/ protected path. The changes are well-scoped to issue analyze-transcript: audit subcommand, telemetry detection, HTTP filtering, hardened skill rules #5161 and the PR description explains the rationale clearly. Human approval is required for all protected-path changes regardless of review outcome.

Low

  • [allowed-tools-pattern-format] skills/analyze-transcript/SKILL.md:9 — Three Bash patterns are missing the colon separator: Bash(mkdir -p .transcripts/*), Bash(find .transcripts/run-*), and Bash(ls -lh .transcripts/*). All other skills consistently use Bash(command:args) format with a colon separator. Without the colon, these patterns may not match actual tool invocations, causing unnecessary permission prompts.
Previous run

Review

Findings

Medium

  • [protected-path] skills/analyze-transcript/SKILL.md, skills/analyze-transcript/analyze-transcript.py — This PR modifies files under the skills/ protected path. The changes are well-scoped to issue analyze-transcript: audit subcommand, telemetry detection, HTTP filtering, hardened skill rules #5161 and the PR description explains the rationale clearly. Human approval is required for all protected-path changes regardless of review outcome.

  • [logic-error] skills/analyze-transcript/analyze-transcript.py:597 — JSON output with --host (no --method or --http) filters all OCSF entries by host (including TCP connections, DNS, etc.), while text output with --host only filters the HTTP requests list. The discrepancy is in the JSON branch: method_filter or explicit_http is False when only --host is used, so the elif host_filter: branch applies a broader host-only filter that includes non-HTTP entries. The --host flag is documented as filtering HTTP requests, so returning non-HTTP entries in JSON mode is inconsistent.

Low

  • [edge-case] skills/analyze-transcript/analyze-transcript.py:93detect_file_type() catches OSError silently and returns a misleading "No recognizable transcript lines found" warning when the file can't be opened (e.g., file not found, permission denied). Since _check_file_type() exits with code 1 on any warning, the user never reaches the actual open() call that would produce the proper error message.

  • [allowed-tools-pattern-format] skills/analyze-transcript/SKILL.md:9 — Three Bash patterns are missing the colon separator: Bash(mkdir -p .transcripts/*), Bash(find .transcripts/run-*), and Bash(ls -lh .transcripts/*). All other skills consistently use the Bash(command:args) format with a colon separator. Without the colon, these patterns may not match actual tool invocations, causing unnecessary permission prompts.

Previous run (2)

Review

Findings

Medium

Low

  • [logic-error] skills/analyze-transcript/analyze-transcript.py:434 — In cmd_audit, when the errors list is empty but mentions is non-empty, the code prints Errors (0): with no items beneath it before proceeding to the mentions section. The count is technically correct but the empty header reads as a formatting bug to users.

  • [edge-case] skills/analyze-transcript/analyze-transcript.py:96detect_file_type() returns None (no warning) when none of the first 5 lines contain valid JSON, or when all JSON lines have unrecognized schemas (neither OTLP markers nor transcript type fields). Non-transcript files pass through silently with no diagnostic. Additionally, detect_file_type opens the file without errors="replace" (unlike parse_lines).

  • [unnecessary-guard] skills/analyze-transcript/analyze-transcript.py:564 — The hasattr(args, "method") and hasattr(args, "host") guards are unnecessary because --method and --host are always registered on the network subparser via add_argument, so argparse will always set them (defaulting to None). A simple args.method / args.host truthiness check suffices.

  • [yaml-frontmatter-format] skills/analyze-transcript/SKILL.md:9 — The allowed-tools frontmatter uses a multi-line YAML list with space-separated Bash patterns (e.g., Bash(gh run view *)), while every other skill in the repo uses a single-line comma-separated format with colon-separated patterns (e.g., Bash(gh run view:*)). Both the list format and the glob separator diverge from the established convention.

Previous run (3)

Review

Findings

Medium

  • [logic-error] skills/analyze-transcript/analyze-transcript.py:567 — When --method or --host is passed without --http, the filters are silently ignored in both JSON and text output modes. In JSON mode, the guard if args.http and (method_filter or host_filter) requires --http for filtering to apply — a user running network <log> --json --method POST gets unfiltered output with no warning. In text mode, the filtered http_requests list is only displayed when args.http is True. The SKILL.md examples always pair --method/--host with --http, so this is unlikely in practice, but programmatic consumers of --json output are most affected by silent filter bypass.

  • [protected-path] skills/analyze-transcript/SKILL.md, skills/analyze-transcript/analyze-transcript.py — This PR modifies files under the skills/ protected path. The changes are well-scoped to issue analyze-transcript: audit subcommand, telemetry detection, HTTP filtering, hardened skill rules #5161 and the PR description explains the rationale clearly. Human approval is required for all protected-path changes regardless of review outcome.

Low

  • [edge-case] skills/analyze-transcript/analyze-transcript.py:96detect_file_type() returns None (no warning) when none of the first 5 lines contain valid JSON, or when all JSON lines have unrecognized schemas (neither OTLP markers nor transcript type fields). Non-transcript files (CSV, plain text, or unknown JSON formats) pass through silently, producing empty output with no diagnostic.

  • [yaml-frontmatter-format] skills/analyze-transcript/SKILL.md:9 — The allowed-tools frontmatter uses a multi-line YAML list with space-separated Bash patterns (e.g., Bash(gh run view *)), while every other skill in the repo uses a single-line comma-separated format with colon-separated patterns (e.g., Bash(gh run view:*)). Both the list format and the glob separator diverge from the established convention.

  • [unnecessary-guard] skills/analyze-transcript/analyze-transcript.py:561 — The hasattr(args, "method") and hasattr(args, "host") guards are unnecessary because --method and --host are always registered on the network subparser via add_argument, so argparse will always set them (defaulting to None). A simple args.method / args.host truthiness check would be consistent with how other subcommand functions handle their own registered arguments.

Previous run (4)

Review

Findings

Medium

Low

  • [edge-case] skills/analyze-transcript/analyze-transcript.py:96detect_file_type() returns None (no warning) when none of the first 5 lines contain valid JSON, or when all JSON lines have unrecognized schemas (neither OTLP markers nor transcript type fields). Non-transcript files (CSV, plain text, or unknown JSON formats) pass through silently, producing empty output with no diagnostic.

  • [edge-case] skills/analyze-transcript/analyze-transcript.py:554 — The --method and --host flags for the network subcommand are silently ignored unless --http or --json is also passed. A user running network <log> --method POST without --http will see no HTTP output and no indication that the filter was unused. The SKILL.md examples always pair --method/--host with --http, so this is unlikely to bite in practice.

  • [yaml-frontmatter-format] skills/analyze-transcript/SKILL.md:9 — The allowed-tools frontmatter uses a multi-line YAML list format with space-separated Bash patterns (e.g., Bash(gh run view *)), while most other skills use a single-line comma-separated format with colon-separated patterns (e.g., Bash(gh run view:*)).

Previous run (5)

Review

Findings

Medium

Low

  • [edge-case] skills/analyze-transcript/analyze-transcript.py:96detect_file_type() returns None (no warning) when none of the first 5 lines contain valid JSON, or when all JSON lines have unrecognized schemas (neither OTLP markers nor transcript type fields). Non-transcript files (CSV, plain text, or unknown JSON formats) pass through silently, producing empty output with no diagnostic.

  • [edge-case] skills/analyze-transcript/analyze-transcript.py:554 — The --method and --host flags for the network subcommand are silently ignored unless --http or --json is also passed. A user running network <log> --method POST without --http will see no HTTP output and no indication that the filter was unused. The SKILL.md examples always pair --method/--host with --http, so this is unlikely to bite in practice.

  • [yaml-frontmatter-format] skills/analyze-transcript/SKILL.md:9 — The allowed-tools frontmatter uses a multi-line YAML list format with space-separated Bash patterns (e.g., Bash(gh run view *)), while most other skills use a single-line comma-separated format with colon-separated patterns (e.g., Bash(gh run view:*)).

Previous run (6)

Review

Findings

Medium

  • [yaml-frontmatter-format] skills/analyze-transcript/SKILL.md — The allowed-tools frontmatter uses a multi-line YAML list format and space-separated Bash patterns (e.g., Bash(gh run view *)), but all other skills in the repo (e2e-health, cutting-releases, topissues, merge-queue, mint-enroll) use a single-line comma-separated format with colon-separated patterns (e.g., Bash(gh run view:*)). The colon vs space difference may affect pattern matching behavior — if the harness expects colon-delimited patterns, these allowed-tools entries may not auto-grant permissions as intended.

  • [protected-path] skills/analyze-transcript/SKILL.md, skills/analyze-transcript/analyze-transcript.py — This PR modifies files under the skills/ protected path. The changes are well-scoped to issue analyze-transcript: audit subcommand, telemetry detection, HTTP filtering, hardened skill rules #5161 and the PR description explains the rationale clearly. Human approval is required for all protected-path changes regardless of review outcome.

Low

  • [edge-case] skills/analyze-transcript/analyze-transcript.pydetect_file_type() returns None (no warning) when none of the first 5 lines contain valid JSON, or when all JSON lines have unrecognized schemas (neither OTLP markers nor transcript type fields). Non-transcript files (CSV, plain text, or unknown JSON formats) pass through silently, producing empty output with no diagnostic. The behavior is graceful degradation (no crash), but a warning for "no recognized content type" would improve the user experience when a wrong file is passed.

  • [edge-case] skills/analyze-transcript/analyze-transcript.py — The --method and --host flags for the network subcommand are silently ignored unless --http is also passed. A user running network <file> --method POST without --http will see no HTTP output and no indication that the filter was unused. The SKILL.md examples always pair --method/--host with --http, so this is unlikely to bite in practice.

  • [version-compatibility] skills/analyze-transcript/SKILL.md — The prerequisites state "Python 3.8+" but the script uses list[int] type hint syntax (PEP 585) which requires Python 3.9+. Both the claim and the usage are pre-existing; not introduced by this PR.

Previous run (7)

Review

Findings

Medium

Low

  • [edge-case] skills/analyze-transcript/analyze-transcript.pydetect_file_type() returns None (no warning) when none of the first 5 lines contain valid JSON, or when all JSON lines have unrecognized schemas (neither OTLP markers nor transcript type fields). Non-transcript files (CSV, plain text, or unknown JSON formats) pass through silently, producing empty output with no diagnostic. The behavior is graceful degradation (no crash), but a warning for "no recognized content type" would improve the user experience when a wrong file is passed.

  • [documentation-consistency] skills/analyze-transcript/SKILL.md — New top-level sections (Rules, Question routing, Full audit workflow) are not precedented in other examined skills (e2e-health, replay-session, filing-issues, topissues), which typically keep guidance within the Workflow section. This may represent an intentional evolution of the skill documentation pattern — the added structure is beneficial for a complex skill — but is worth noting for cross-skill consistency.

Previous run (8)

Review

Verdict: Approve — clean feature addition, well-scoped to issue #5161.

This PR adds three features to the analyze-transcript skill: a combined audit subcommand, OTLP telemetry file detection, and HTTP request filtering for the network subcommand. It also hardens the SKILL.md with allowed-tools patterns, explicit rules (no shell variables, relative paths, plain find), a question routing table, and missing-transcript troubleshooting. All changes trace to the authorized scope in #5161.

The code follows established patterns in analyze-transcript.py — argparse subcommands, cmd_* function naming, Counter-based aggregation, and consistent output formatting. The telemetry detection guard (detect_file_type) is a practical improvement that prevents confusing output when users accidentally pass OTLP span files instead of Claude transcripts.

Observations (non-blocking)

1. detect_file_type() silent pass-through for non-JSON files — If none of the first 5 lines contain valid JSON (e.g., a binary file or plain text log), the function returns None (treating it as a valid transcript). The subsequent parsing silently produces empty output. A warning for "no valid JSON lines found" would improve the user experience, but the current behavior is graceful degradation, not a crash.

2. cmd_audit() code duplication — The audit subcommand reimplements summary-computation and error-detection logic from cmd_summary() and cmd_errors() rather than sharing helpers. This is a maintainability concern: future fixes to summary or error logic would need to be applied in two places. Extracting shared helpers (e.g., _compute_summary(), _detect_errors()) would reduce drift risk. This is follow-up work, not a blocker for this PR.

3. No tests — No test file exists for analyze-transcript.py. The script is stdlib-only Python in the skills directory, and the project doesn't appear to require tests for skill scripts. The new detect_file_type() function and HTTP filtering logic have edge cases that would benefit from unit tests as the script grows.

Checks performed

  • ✅ Scope authorization: all changes trace to analyze-transcript: audit subcommand, telemetry detection, HTTP filtering, hardened skill rules #5161
  • ✅ PR title convention: feat(#5161) is correct per COMMITS.md — new CLI subcommand and flags are user-facing features
  • ✅ No breaking changes requiring ! suffix
  • ✅ No security concerns: CLI tool with no auth/permission surface
  • ✅ No prompt injection patterns in SKILL.md content
  • ✅ No secrets or credentials in diff
  • ✅ SKILL.md documents all new features (audit, --method, --host)
  • allowed-tools patterns are appropriately scoped
  • ✅ No cross-repo contract impact (internal skill, no exported APIs)

Protected paths detected — this PR modifies files under one or more
protected paths. The review agent cannot approve PRs that touch these paths.
A human reviewer must approve this PR.

Protected files in this PR:

  • skills/analyze-transcript/SKILL.md
  • skills/analyze-transcript/analyze-transcript.py

Labels: PR adds features to the analyze-transcript skill (new subcommand, telemetry detection, HTTP filtering)

@fullsend-ai-review fullsend-ai-review Bot added requires-manual-review Review requires human judgment component/skills labels Jul 16, 2026
@fullsend-ai-review

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 12:41 PM UTC · Completed 12:53 PM UTC
Commit: 0884698 · View workflow run →

@rh-hemartin
rh-hemartin force-pushed the fix/5161-analyze-transcript-improvements branch from 0884698 to 0be49b6 Compare July 17, 2026 09:29
@fullsend-ai-review

fullsend-ai-review Bot commented Jul 17, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 9:30 AM UTC · Completed 9:43 AM UTC
Commit: 0be49b6 · View workflow run →

@fullsend-ai-review fullsend-ai-review Bot added requires-manual-review Review requires human judgment and removed requires-manual-review Review requires human judgment labels Jul 17, 2026

@waynesun09 waynesun09 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Automated multi-pass review (3 independent review agents, cross-verified against source before posting). 6 findings survived verification (3 High, 3 Medium); several other raw findings were discarded after verification — including one that cited a nonexistent internal file/schema and turned out to be factually wrong once checked against the actual telemetry writer, and one about errors/audit echoing unredacted secrets that appears to already be mitigated by an existing upstream secret-redaction hook. Three prior qodo-code-review[bot] findings from earlier in this PR's history (allowed-tools quoting, audit missing error mentions, audit double-parsing blocks) were confirmed fixed in the current head commit and are not re-flagged.

Comment thread skills/analyze-transcript/analyze-transcript.py Outdated
Comment thread skills/analyze-transcript/analyze-transcript.py Outdated
Comment thread skills/analyze-transcript/analyze-transcript.py
Comment thread skills/analyze-transcript/analyze-transcript.py
Comment thread skills/analyze-transcript/analyze-transcript.py
Comment thread skills/analyze-transcript/SKILL.md
@rh-hemartin
rh-hemartin force-pushed the fix/5161-analyze-transcript-improvements branch from 0be49b6 to 71cf130 Compare July 23, 2026 09:47
@fullsend-ai-review

fullsend-ai-review Bot commented Jul 23, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 9:49 AM UTC · Completed 10:08 AM UTC
Commit: 71cf130 · View workflow run →

fullsend-ai-review[bot]

This comment was marked as outdated.

@waynesun09 waynesun09 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Re-review at head commit 71cf1301397b9e496d8a040efb80207f639b4024, using a 4-agent squad (two independent Claude passes, Grok, and Codex/Cursor).

Prior findings — 5 of 6 confirmed fixed against the current code (not just the "Fixed." replies):

  • --host unanchored substring match — fixed (exact-or-subdomain match; matched host now printed in the --http listing)
  • --method/--host inconsistently scoping the network report / silent Policies: undercount — fixed (filter now only gates the --http listing; Hosts:/DENIED:/Policies: stay unconditional)
  • detect_file_type crash on non-dict JSON — fixed (dict guard added)
  • cmd_audit/cmd_summary duplicated aggregation — fixed (shared _accumulate_stats/_print_stats)
  • SKILL.md "Filter POST/PUT/PATCH" example — fixed (--method now takes a comma-separated list, doc updated to match)
  • Test coverage for the new heuristics — still open, but by the author's explicit stated choice, not an oversight

New findings surfaced by this round's fix commits are inline below — all independently verified against the current head by re-reading the actual code (and in two cases, running the CLI against synthetic fixtures).

Comment thread skills/analyze-transcript/analyze-transcript.py Outdated
Comment thread skills/analyze-transcript/analyze-transcript.py
Comment thread skills/analyze-transcript/analyze-transcript.py Outdated
Comment thread skills/analyze-transcript/analyze-transcript.py Outdated
Comment thread skills/analyze-transcript/analyze-transcript.py Outdated
@rh-hemartin

Copy link
Copy Markdown
Member Author

Please, stop finding new issues, this is a tool we use locally, I want just to ship it and start using it, not to get it perfect. This will not consume UTF-8, it does not matter if some flags are just ignored, or if there is duplication.

@rh-hemartin
rh-hemartin force-pushed the fix/5161-analyze-transcript-improvements branch from 71cf130 to 1c14664 Compare July 24, 2026 07:18
@fullsend-ai-review

fullsend-ai-review Bot commented Jul 24, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 7:20 AM UTC · Completed 7:33 AM UTC
Commit: 1c14664 · View workflow run →

fullsend-ai-review[bot]

This comment was marked as outdated.

@rh-hemartin
rh-hemartin requested a review from waynesun09 July 28, 2026 09:44

@waynesun09 waynesun09 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Review sweep: 2 new findings (1 HIGH, 1 MEDIUM) verified against head 1c14664. Both are distinct from prior review rounds on this PR — see inline comments.

Comment thread skills/analyze-transcript/analyze-transcript.py
Comment thread skills/analyze-transcript/SKILL.md
@rh-hemartin
rh-hemartin force-pushed the fix/5161-analyze-transcript-improvements branch from 1c14664 to 1133f74 Compare July 29, 2026 07:20
@fullsend-ai-review

fullsend-ai-review Bot commented Jul 29, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 7:22 AM UTC · Completed 7:41 AM UTC
Commit: 1133f74 · View workflow run →

fullsend-ai-review[bot]

This comment was marked as outdated.

@rh-hemartin
rh-hemartin force-pushed the fix/5161-analyze-transcript-improvements branch from 1133f74 to 937e85b Compare July 29, 2026 14:56
@fullsend-ai-review

fullsend-ai-review Bot commented Jul 29, 2026

Copy link
Copy Markdown

🤖 Finished Review · ❌ Failure · Started 2:59 PM UTC · Completed 3:00 PM UTC
Commit: 937e85b · View workflow run →

@rh-hemartin

Copy link
Copy Markdown
Member Author

/fs-review

@fullsend-ai-review

fullsend-ai-review Bot commented Jul 29, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 3:48 PM UTC · Completed 4:05 PM UTC
Commit: 937e85b · View workflow run →

fullsend-ai-review[bot]

This comment was marked as outdated.

@waynesun09 waynesun09 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Review sweep: 4 findings (1 HIGH, 3 MEDIUM) verified directly against head 937e85b356c7adea2beb0184e23e34c611bdb070 by reproducing each one against the actual downloaded source (executed detect_file_type and cmd_network directly; inspected cmd_audit/cmd_tools/SKILL.md text). All four are distinct from every existing thread on this PR, including the most recent automated review pass at this same commit — see inline comments. One (the network --json/DENIED-drop) is a re-flag of a previously "Fixed"-marked HIGH thread that still reproduces due to an interaction with a later, separate fix.

Comment thread skills/analyze-transcript/analyze-transcript.py
Comment thread skills/analyze-transcript/SKILL.md Outdated
Comment thread skills/analyze-transcript/analyze-transcript.py Outdated
Comment thread skills/analyze-transcript/analyze-transcript.py Outdated
@rh-hemartin
rh-hemartin force-pushed the fix/5161-analyze-transcript-improvements branch from 937e85b to 6bbbc65 Compare July 30, 2026 06:06
@fullsend-ai-review

fullsend-ai-review Bot commented Jul 30, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 6:08 AM UTC · Completed 6:28 AM UTC
Commit: 6bbbc65 · View workflow run →

fullsend-ai-review[bot]

This comment was marked as outdated.

@waynesun09 waynesun09 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Review sweep: 6 findings (1 CRITICAL, 2 HIGH, 3 MEDIUM) verified directly against head 6bbbc6513b76627f1cccc9e08566c44052d8d83a by downloading the actual source and reproducing each one (ran detect_file_type/the CLI against missing paths and a synthetic queue-operation-led transcript; ran cmd_network against a synthetic sandbox log across several filter combinations; diffed allowed-tools patterns against the repo's other skills). All six are distinct from every existing thread on this PR — see inline comments for details on why each doesn't overlap with prior "Fixed" threads or open bot comments on the same lines.

Comment thread skills/analyze-transcript/analyze-transcript.py
Comment thread skills/analyze-transcript/analyze-transcript.py Outdated
Comment thread skills/analyze-transcript/analyze-transcript.py Outdated
Comment thread skills/analyze-transcript/SKILL.md Outdated
Comment thread skills/analyze-transcript/analyze-transcript.py Outdated
Comment thread skills/analyze-transcript/SKILL.md Outdated
…, HTTP filtering

Add `audit` subcommand that combines summary, errors, and tool breakdown
in a single pass. Detect OTLP telemetry files early and exit with a
warning instead of producing confusing output. Add `--method` and
`--host` filters to `network --http` for targeted HTTP analysis.

Harden SKILL.md with allowed-tools patterns, no-shell-variables rule,
question routing table, missing-transcript troubleshooting, and full
audit workflow docs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Hector Martinez <hemartin@redhat.com>
@rh-hemartin
rh-hemartin force-pushed the fix/5161-analyze-transcript-improvements branch from 6bbbc65 to 3f82432 Compare July 30, 2026 14:04
@fullsend-ai-review

fullsend-ai-review Bot commented Jul 30, 2026

Copy link
Copy Markdown

🤖 Review · ❌ Terminated · Started 2:06 PM UTC · Ended 2:27 PM UTC
Commit: 3f82432 · View workflow run →

@rh-hemartin

rh-hemartin commented Jul 30, 2026

Copy link
Copy Markdown
Member Author

Prompt for agents, please stop finding findings, I'm not joking. Next time I'm closing this PR and not implementing this issue. I will keep the improvements to myself and that is it.

@fullsend-ai-review fullsend-ai-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

See the review comment for full details.

Comment thread skills/analyze-transcript/SKILL.md
@fullsend-ai-review

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 2:06 PM UTC · Completed 2:27 PM UTC
Commit: 3f82432 · View workflow run →

@waynesun09 waynesun09 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Approving — this round's review squad found nothing new (all candidate findings deduped against existing threads). All required checks pass.

Note for the record: 3 unresolved, non-outdated threads remain open from an earlier fullsend-ai-review round (MEDIUM: JSON output with --host alone mis-filters OCSF entries; 2x LOW: --method/--host silently ignored in one path, detect_file_type() silently swallows OSError). Not treating them as blockers on this approval, but flagging since they haven't been replied to or fixed yet.

@rh-hemartin
rh-hemartin added this pull request to the merge queue Jul 31, 2026
Merged via the queue into main with commit 93c7a46 Jul 31, 2026
17 checks passed
@rh-hemartin
rh-hemartin deleted the fix/5161-analyze-transcript-improvements branch July 31, 2026 06:16
@fullsend-ai-retro

fullsend-ai-retro Bot commented Jul 31, 2026

Copy link
Copy Markdown

🤖 Finished Retro · ✅ Success · Started 6:18 AM UTC · Completed 6:32 AM UTC
Commit: 3f82432 · View workflow run →

@fullsend-ai-retro

Copy link
Copy Markdown

Retro: PR #5164 — analyze-transcript audit subcommand

Timeline: Human-authored PR by rh-hemartin (co-authored with Claude Opus), open 15 days (Jul 16–31). Modified 2 files (+361/−73 lines) in skills/analyze-transcript/. Went through 5 human review rounds (waynesun09), 7+ automated review bot runs (fullsend-ai-review[bot]), and generated 92 workflow runs on the source repo (46 from pull_request_review events alone).

What went well

  • waynesun09's reviews were excellent — 96% signal rate (23 of 24 comments were unique, actionable findings with zero false positives). Found a CRITICAL UnboundLocalError crash in the final round that would have shipped otherwise. Each finding included concrete reproduction scenarios.
  • Real bugs were caught — at least 21 genuine bugs/issues were identified across all reviewers, including security-relevant host-matching flaws and data-loss regressions.
  • CI was green throughout — all functional tests, E2E tests, and CI checks passed on every push.

What went poorly

  • fullsend-ai-review[bot] quality was low — 7 of 14 comments (50%) were exact duplicates of its own prior findings re-raised on subsequent commits. The YAML frontmatter finding was posted 4 separate times. One finding (experiment: integration-service design doc drift analysis using OpenCode #35) was factually wrong: it claimed detect_file_type() "returns a misleading warning" when it actually crashes with UnboundLocalError — the human reviewer explicitly corrected this misdiagnosis.
  • Fix-break oscillation — the network --json DENIED-entries bug was introduced by a fix, then re-flagged 4 times because each incremental patch only addressed the specific repro case from that round. waynesun09 eventually called for "a single deliberate design decision rather than another incremental patch."
  • Author frustration — rh-hemartin expressed strong frustration twice, once saying "please stop finding new issues" and later threatening to close the PR entirely. The sheer volume of iterative findings from multiple review sources was counterproductive.
  • Dispatch noise — 46 review-triggered workflow runs, though 39 were from human review comment submissions (author replying "Fixed." individually) that exited early with zero token cost. The noise is cosmetic, not financial.

Evidence for existing issues

This PR provides strong supporting evidence for several open issues. No new proposals are warranted — the patterns observed are well-covered by existing tracked work:

  • fullsend#2959 / fullsend#1285 (dedup findings across re-review iterations): The bot posted identical findings 2–4 times each across commits. The YAML frontmatter finding appeared 4 times, the detect_file_type concern 4 times, the hasattr guard nit twice.
  • fullsend#664 / agents#447 (incorporate existing reviews from other reviewers): The bot posted inferior and sometimes factually wrong analysis on code regions where waynesun09 had already posted precise, correct findings.
  • fullsend#5512 / agents#543 (detect cascading-fix anti-patterns): The DENIED-entries bug was a textbook cascading-fix — 4 rounds of incremental patches, each introducing a new regression in a different flag combination.
  • agents#270 (targeted side-effect analysis on fix commits): Each fix for a HIGH finding introduced a new regression, suggesting the review agent should specifically check whether the fix itself introduced side effects.
  • fullsend#2994 (filter bot-submitted review events): 7 of 46 review-triggered runs were from bot-submitted reviews. Filtering these at the workflow level would reduce dispatch noise.
  • fullsend#3782 / fullsend#3544 (cross-check factual claims against actual code): The bot's claim about detect_file_type behavior was factually wrong, demonstrating the need for code-behavior verification in review findings.
  • fullsend#5265 (incorporate author response context): The bot re-raised findings the author had already responded to with "Fixed" or "Not a problem," suggesting it did not read prior author responses.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/skills requires-manual-review Review requires human judgment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

analyze-transcript: audit subcommand, telemetry detection, HTTP filtering, hardened skill rules

2 participants