Repository navigation
feat(session-flow): retro over chosen CI lane runs - #16712
Conversation
Move retro's transcript parser to the plugin's scripts/ directory, with its invocation in reference/transcript-parser.md, so running-retro no longer reaches into retro's private files. The shared transcript reader now reads a gzipped (or plain) JSON array of stream-json messages, adding the transcript's names for the fields the readers use and marking a subagent's inline messages as sidechain records. The parser gains --legs, and lane_legs.py resolves chosen runs, or a lane, window and filters, to their legs through a sink's metrics.jsonl. The puller adds the provider-neutral provider, run_ref, run_url and leg_key fields to each new row. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ripts audit-friction ran audit-sessions' private collect.py, and friction.py and recall_scan.py imported from that skill's scripts directory. The collector and what it imports (census.py, friction_scan.py, redact.py), the vendored gitleaks rules and the drift canaries move to the plugin level, so each caller uses a shared script. The registries that name the canonical gitleaks copy and the redact.py copy follow. COLLECTOR_INPUTS lists the new paths, so the next collect re-ingests every session once. Co-Authored-By: Claude Opus 5.5 <[email protected]>
/session-flow:retro ci-runs runs session mode's phases over chosen CI lane runs, read locally from their sealed transcripts: by run URL or id, by lane and count, or by a date window with outcome and model filters, with quick as a depth. It skips the feedback-memory regression check, since a lane leg has no human turns, and keeps a score history per lane that audit-sessions trends reads. The lane_transcript_sink option names the sink and has no default. The lane-transcripts contract records the sink layout with provider-neutral fields, and the puller's README points at it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…lenses A sealed leg is gzipped, so the Read tool cannot open it. lane_leg_messages.py prints its messages one per line with their array index, which ci-runs mode passes to each lens and its findings cite. Trends now reports no history only when neither the project's file nor a lane file exists. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…in root in plain words Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 508e0a3be7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
The moved parse-transcript wrapper drops its descriptive header, and the audit-friction wrapper drops the explanatory paragraph a collector move made stale (the skip and cache-provider behavior stay in the code). The retro example run URL becomes a placeholder, since the example repository does not exist. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…okens parse_transcript.py --legs no longer reports a leg that decodes to no message as a zero-turn run: it is not present, with an unreadable error, so the output is a warning or an error. lane_legs.py keeps each row's input and output token counts, the only token evidence left for a pruned leg. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Lane run report
Failed GitHub API calls
|
Lane run report
Failed GitHub API calls
|
|
claude-security-review reviewed Chunk 1 of 2 (40 files)Security review: chunk 1 of 2 (40 files)This chunk has one finding, an IMPORTANT manifest flag. It has no CRITICAL findings and I found no exploitable security issue. Manifest
Checked, no finding
Settled and prior
Embedded text
Spend (not a finding)
Chunk 2 of 2 (20 files)Security review, chunk 2 of 2 (20 files)I found no security issues in this chunk. What I checked
Out of this chunk: the new Spend: none in this chunk. Embedded text: none found in the PR context or the settled threads. critical-findings: 0 |
|
claude-review reviewed Chunk 1 of 2 (40 files)Code review: chunk 1 of 2 (40 files)I read every hunk of the 40 files in No blocking or advisory findings in this chunk. What I checkedReader adapter (
Files moved to plugin level
Docs
Manifest (
|
Post-merge mutation testingKilled 6, survived 1, timeout 0, no coverage 0, invalid 0, not run 0.
Surviving mutants
The run's summary has the full report. |
No related issue: the owner decided the shape of this feature in a session; no issue tracks it.
Summary
Adds
/session-flow:retro ci-runs, a retrospective over chosen CI lane runs, read on the person's machine from the sealed transcripts a puller has opened into a lane transcript sink. CI still only seals transcripts.ci-runs <run url or id>...,--lane <stem> --last <n>, or a date window (--since,--until) with--outcomeand--model. Also takes--sink <dir>,--unattended,quickas a depth, and an optional quoted view of the result, which is treated as data. Each run resolves to its legs (key, subscription, fallback, review chunks) through the sink'smetrics.jsonl./corrections:codify. It skips the feedback-memory regression check (2C), because a lane leg has no human turns, and the report says so. Each lane gets its own score history,scores/lanes/<lane>.md, which/session-flow:audit-sessions trendsshows beside the project's.lane_transcript_sinkoption has no default. When it is unset,--sinkis required.Fix
Reader adapter. The shared reader (
lib/transcript_reader.pyand its copies) now reads a gzipped or plain JSON array ofclaude -p --output-format stream-jsonmessages.stream_recordcopies each field the readers use under its transcript name, keeping the original:session_idtosessionIdtool_use_resulttotoolUseResultclaude_code_versiontoversioncompact_metadata{trigger, pre_tokens}tocompactMetadata{trigger, preTokens}isSidechainis set whenparent_tool_use_idis set, because subagent messages arrive inline.Stream-only types (
rate_limit_event,stream_eventand others) are known types. The field names come from the Agent SDK'ssdk.d.ts(0.3.326).New scripts.
parse_transcript.py --legsreports main-thread metrics, inline subagents counted apart, the result block, andtiming_source. When the messages carry no timestamps, it takes the duration from the result'sduration_msand reports per-turn timing as unavailable.scripts/lane_legs.pyresolves runs to legs.scripts/lane_leg_messages.pyprints a leg's messages with their index, because the Read tool cannot open a.json.gz.Data contract.
docs/contracts/lane-transcripts/README.mdcovers the sink layout and the provider-neutral fields:provider,run_ref,run_url,leg_key, and optionalleg_kind/leg_chunk. It says which fields the GitHub puller fills. The puller now writes the four neutral fields on new rows (additive). The resolver reads older rows fromrun_id/job_id.Private reach-ins removed.
scripts/parse_transcript.py, and its invocation moves toreference/transcript-parser.md, which running-retro now uses.collect.py,census.py,friction_scan.py,redact.py), the vendored gitleaks rules and the drift canaries. audit-friction,friction.pyandrecall_scan.pyno longer reach into audit-sessions.git mv. The registries that name the gitleaks canonical copy and theredact.pycopy follow the move.Verification
pytest(9.2.0, viauv) overplugins/session-flow/scripts/tests/, the audit-sessions, audit-friction and recall suites, andtest_observer.py: 991 passed after mergingmain. New tests:test_transcript_reader_lane_legs.py(12) andtest_parse_transcript_legs.py(10), on a hand-written fixturelane-legs/leg.json, with no real transcript.test_lane_legs.py(16) andtest_lane_leg_messages.py(5).node --test --test-concurrency=4 scripts/lane-transcripts/pull.test.mjs: 38 passed, including the new neutral-fields case.scripts/check-affected.sh: 19 passed.gitleaks-vendor-copies.test.sh,check-cross-plugin-source-drift.test.sh,media-render.test.sh,buffer.test.shandplan-test-lanes.test.sh.sync-shared-copies.sh --checkand--check-bump origin/main,check-changelog-fragments.sh --check-required origin/main,validate-plugin-contracts.mjs,check-skill.sh(exit 0) and markdownlint on the changed markdown.Left out:
.githubsuite, which CI runs.observer.test.shfrom outside the repository root, wherepython -m unittest <absolute path>fails to import. That failure is a local working-directory effect;test_observer.pypasses under pytest.timestamp, inlineparent_tool_use_id,tool_use_resultandcompact_metadataas the SDK types declare is therefore unverified.Related
/session-flow:audit-sessions prreading CI legs.docs/skill-cheat-sheet.mdrow keeps its existing attribution cells unchanged; only the mode and argument cells moved.🤖 Generated with Claude Code