Repository navigation
Description
Split from #5448.
Problem: The issue asks for a measurement in the agent transcripts 7 days after the release. The measurement shows whether the share of devops results that hold Elapsed: goes to 0 and whether new grep -v Elapsed filters go down. Why deferred: The measurement waits for a release and 7 days of agent transcripts. The pull request cannot complete it. Acceptance criteria: - A query over the 7 days of transcripts after the release reports the share of devops results that hold Elapsed:. - The same query reports the count of new grep -v Elapsed filters. - The report compares the result with the 47% share and the 2,331 filters of the 2026-11-11 to 2026-11-13 window.
Proposed design
Problem statement
The change from #5448 keeps the Elapsed: line for a terminal only, so an agent that captures stderr in a pipe no longer receives it. Seven days after the release, a measurement must show whether the share of devops result blocks that hold Elapsed: falls to 0, and whether new grep -v Elapsed filters fall. The report compares both values with the 47% share and 2,331 filters of the 2026-11-11 to 2026-11-13 window.
Acceptance criteria
Requirement: Elapsed share
The post-release report SHALL state the share of devops result blocks whose output holds a line that starts with Elapsed: over the 7-day window.
Scenario: Seven-day Elapsed share
- WHEN the 7-day window after the release closes and the query runs over the Claude Code transcripts
- THEN the report gives the count of
devopsresult blocks, the count that hold anElapsed:line, and the share as a percentage.
Requirement: New filter count
The report SHALL state the count of distinct grep -v Elapsed command signatures in the 7-day window that the baseline window does not hold.
Scenario: New filter count
- WHEN the same query runs over the 7-day window
- THEN the report gives the count of distinct
command_signaturevalues that containgrep -v Elapsedand that no baseline record holds.
Requirement: Baseline comparison
The report SHALL compare the post-release share and filter count with the 47% share and 2,331 filters of the 2026-11-11 to 2026-11-13 window by running the same query and counting rules over both windows.
Scenario: Baseline comparison
- WHEN the report presents the post-release results
- THEN it gives the baseline values that the same query computes, the published 47% share and 2,331 filters, and the change from each.
Requirement: Method record
The report SHALL name the transcript path, the query text, and the start and end timestamps of both windows.
Scenario: Method record
- WHEN the report is published
- THEN it gives the
~/.claude/projects/<project>/*.jsonlpath, the query text, and the start and end timestamps of the 7-day and baseline windows.
Existing Tool Considered
The open, maintained ripgrep (rg, pinned at uv.lock:4221; docs/adr/0028-a-research-agent-composes-open-tools-and-a-research-index.md:19 names it an open line search) finds the literal Elapsed: and grep -v Elapsed text in the Claude Code JSONL transcripts. It lacks the pairing of each command with the result that answered it, the timestamp window and the share arithmetic. The repository already holds that pairing in src/devops_cli/ai/agent_audit/transcript.py:50 and src/devops_cli/ai/agent_audit/sources.py:69, so the report is a short query over read_sources records and adds no product code.
Key questions
- How does the report identify the 7-day window after the release?: Start at the tag timestamp of the first release that contains fix(cli): print the Elapsed line only when stderr is a terminal #5448 and end 7 days later at the same time. Filter the records by
ToolCall.timestamp, not by the reader'ssince_days, because that cutoff reads file modification time and cannot name the baseline window. (best practice) [sources: CONTEXT.md:75, CONTRIBUTING.md:208, src/devops_cli/ai/agent_audit/transcript.py:57, src/devops_cli/ai/agent_audit/transcript.py:110]- Chosen: Release tag timestamp. release-please publishes the release and writes its tag, and the issue measures after the release (CONTEXT.md:75, CONTRIBUTING.md:208).
- Rejected: Merge time of fix(cli): print the Elapsed line only when stderr is a terminal #5448. The release can come after the merge, and the issue measures after the release.
- Rejected: Fixed calendar date. A fixed date does not follow the release.
- What is the denominator of the
Elapsed:share?: EachToolCallwhosecommand_signaturenamesdevopsas the program, directly or afteruv run, counts once. The numerator is the calls among them whoseoutputholds a line that starts withElapsed:. (best practice) [sources: src/devops_cli/ai/agent_audit/transcript.py:50, src/devops_cli/ai/agent_audit/transcript.py:212, src/devops_cli/ai/agent_audit/signature.py:37, src/devops_cli/main.py:40]- Chosen: Per result block. The reader pairs one command with the result that answered it, and the issue asks for the share of
devopsresults. - Rejected: Per transcript line. A result block has many lines, so a line count changes the share.
- Rejected: Per command. One command can make several results, and the issue measures results.
- Chosen: Per result block. The reader pairs one command with the result that answered it, and the issue asks for the share of
- How does the report count a new
grep -v Elapsedfilter?: Count distinctcommand_signaturevalues of commands that containgrep -v Elapsed, and subtract the signatures that the baseline window holds. A signature replaces a path, a number and a flag value with a placeholder, so two runs of one filter count once. (best practice) [sources: src/devops_cli/ai/agent_audit/signature.py:3, src/devops_cli/ai/agent_audit/signature.py:37]- Chosen: Distinct command signature. Repeated shell history must not inflate the count, and the repository already groups two runs of one command by signature.
- Rejected: All occurrences. A repeated command in many sessions counts many times.
- Rejected: Distinct sessions. One session can run the same filter several times, so a session count hides the number of filters.
- Which data source holds the agent transcripts?: The Claude Code session transcripts under
<home>/.claude/projects/<project>/*.jsonl, for the repository and each of its worktrees, read byread_sources/read_transcripts. The transcripts live on the host, not in the repository, so a person runs the query. [sources: src/devops_cli/ai/agent_audit/sources.py:9, src/devops_cli/ai/agent_audit/sources.py:103, src/devops_cli/ai/agent_audit/transcript.py:90, openspec/changes/archive/2026-11-13-5448-print-the-elapsed-line-only-when/tasks.md:37] - How does the report compare the post-release values with the baseline?: Run the same query and the same counting rules over both windows, filtering each by
ToolCall.timestamp, and report the baseline value beside the post-release value. The project's measurement method takes a baseline, waits the same window and runs the same query again. (best practice) [sources: docs/guidelines/kubernetes.md:44, docs/guidelines/kubernetes.md:47, src/devops_cli/ai/agent_audit/transcript.py:57]- Chosen: Same query on both windows. A comparison is valid only when the query and the counting rules are the same, and the project method runs the same query again after the wait.
- Rejected: Use the published baseline values only. The issue gives the values, but the report must show the method that produces them.
- Rejected: Compare with the previous 7 days. The issue names the 2026-11-11 to 2026-11-13 window.
Fit
Fits in one pull request.
Suspected block
The first release that contains #5448, then the 7 days of Claude Code transcripts after it, which live on the host and not in the repository.
Activity
devops-cli-service commentedon Nov 13, 2026
The measurement waits for a release and 7 days of transcripts, and no user is blocked.Both items measure a metric after a rollout; this item counts Elapsed lines and filters, and #3866 measures the GitHub request drop.devops-cli-service commentedon Nov 20, 2026
Owner question: See Suspected block in the section Proposed design of the body.
Options
Recommendation: Decide the question: only a person can answer it.
Evidence