Skip to content

feat(lane-transcripts): pull one workflow run's transcripts with pull --run - #17534

Merged
kyle-sexton merged 3 commits into
mainfrom
feat/lane-transcripts-pull-run
Nov 20, 2026
Merged

kyle-sexton merged 3 commits into
mainfrom
feat/lane-transcripts-pull-run

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

No related issue: operator tooling for the lane-transcript sink. It pulls one workflow run on demand; #17261 is complete and closed, and this option only collected its evidence, so no issue remains for it to deliver.

Summary

The scheduled pull reads the whole 7-day backlog and stops at its 1,000-call gh budget, so two pulls on 2026-11-19 never reached run 44552939041. pull --run RUN_ID pulls just that one run.

Fix

  • --run is accepted only with pull and must be a positive integer; anything else exits 2.
  • It lists repos/<repo>/actions/runs/<id>/artifacts (paged) and takes only the lane-transcript-* artifacts, each through the same code as a scheduled pull (take()/store(), factored out of pullWithin): same known, expired, fork and size checks, decrypt, telemetry and rows, and the same key-mismatch failure.
  • It writes no pull state and prunes nothing, so the scheduled pull's cursors, resume point and last success stay as they were. It exits 1 when an artifact was missed or the run's listing failed. README documents the command.

Verification

  • node --test --test-concurrency=4 on pull-run.test.mjs, pull.test.mjs and pull-listing.test.mjs: 72/72 pass (5 new).
  • Live pull --run 44552939041: 16 transcripts pulled with 18 gh calls, against the 1,000 a full pull spends without reaching the run. All 16 rows have telemetry_outcome: stored and telemetry_joined_spans > 0.
  • The scheduled job (provisioning lane-transcript-pull/pull.sh) runs only pull and pull-outcomes with no flags from an export of this directory; no export was removed or changed.

Related

🤖 Generated with Claude Code

https://claude.ai/code/session_01KeBVgaQE4QB75SPD3ky1jd

kyle-sexton and others added 2 commits November 19, 2026 14:17
… --run

The scheduled pull walks the whole 7-day backlog and stops at its 1,000-call
budget, so a specific run can stay out of reach for several pulls.
`pull --run RUN_ID` lists that run's own artifacts, takes each one exactly as
a pull does (same checks, store, telemetry and rows), and writes no pull state
and prunes nothing, so the scheduled pull's cursors and resume point stay put.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01KeBVgaQE4QB75SPD3ky1jd
@kyle-sexton
kyle-sexton marked this pull request as ready for review November 19, 2026 21:18
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-19T21:20:28.203467Z bc4b0fd Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-refine/fix-docs
Model rung 0
Leg base
Run job success
Activity step success
Commits pushed none (read lane)
Run 44617655762

Failed GitHub API calls

Method Path Status
GET /repos/{repo}/git/ref/tags/* 404

@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review needs no new review of 3dde3b6c1832f055345961bb6ac5cc648f3c6b20: no file of this pull request changed since the review of bc4b0fd.

Security review: pull --run RUN_ID for lane-transcripts

I found no security issues in this change.

None of the 4 changed files matches a trusted-path glob. The change only touches an operator-run local script and its tests. It changes no workflow, token request, trusted-actor list, kill switch, merge hold or plugin manifest.

What I checked:

  • Argument injection or path injection through --run. parseArgs only accepts --run on pull, and only when it matches ^[1-9]\d*$ (pull.mjs#L161). So the value put into repos/${repo}/actions/runs/${runId}/artifacts is always a positive integer, passed to gh as an argv element rather than through a shell. Duplicate flags are still rejected.
  • Same trust checks as a scheduled pull. Each artifact in the run listing goes through the same take() path as pullWithin. That path keeps the fork check !wf.id || wf.head_repository_id !== wf.repository_id, which fails closed when workflow_run is missing. It also keeps the expired, known and size (MAX_SEALED) checks and the bound decrypt in store(), where openRecord is tied to the run ID and job ID. A forked head therefore still cannot get a record it sealed with the public key into the store. The lane-transcript- name prefix filter is an extra narrowing, and parseArtifactName still applies.
  • The refactor keeps behaviour. store({ ...ctx, artifact, named }) gets the same sink/repo/recipient/deps/runs/byTrace/now as before. failIfKeyMismatch is unchanged in what it checks.
  • Secrets. Error output goes through failureKind(...), which names only the kind of failure. The tests check that neither the marker nor the private key text appears on stdout or stderr.
  • State. pullRun writes no pull state and prunes nothing. It cannot move the scheduled pull's cursors or last-success time, so the staleness alerts are unaffected.

Spend: none. The command is run by hand and draws only on the operator's gh API quota, capped by the same gh call budget.

critical-findings: 0

@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

claude-review needs no new review of 3dde3b6c1832f055345961bb6ac5cc648f3c6b20: no file of this pull request changed since the review of bc4b0fd.

Code review: pull --run RUN_ID for lane-transcripts

No blocking or advisory findings. I read every hunk of all 4 changed files, plus the unchanged code the new lines call in scripts/lane-transcripts/pull.mjs: ghRetried, fetched, store, failureKind, main and the fixture router.

What I checked

  • The refactor keeps the old behavior. The per-artifact loop body, the key-mismatch throw and the tally setup moved into takeContext(), take() and failIfKeyMismatch(). The skip order (unnamed → known → expired → fork → too_large) is unchanged, and so is the FetchFailed handling. store({ ...ctx, artifact, named }) gets the same runs and byTrace fields as before. On a BudgetSpent thrown from recentRuns, ctx.runs stays an empty Map, as runs did before.

  • pullRun writes no pull state and prunes nothing. store() only appends rows and files; it never calls writeState. A BudgetSpent becomes a PullError that names only the budget, and a listing failure goes through failureKind(..., "run-artifact-list"), which reports only the kind and exit status. Both routes exit 1, matching the README row.

  • Argument parsing. --run is rejected on any command other than pull, on any value that is not a positive integer, and when given twice. All of these exit 2, as the PR describes, and the new test covers each case.

  • Tests. The new fixture route filters by workflow_run.id. The tests assert:

    • only one run's artifacts are listed and fetched;
    • rows are the same as a scheduled pull writes;
    • state is left byte for byte;
    • a second run counts the held artifacts as known;
    • fork, key-mismatch, missed-artifact and listing-failure exits behave as described.

    I did not run them. The 72/72 pass and the live run against 44552939041 are the author's claims and are unverified.

  • Closing issue. The PR only references ci(lanes): re-pin to ci-workflows v0.76.0 and opt a lane into the sealed telemetry receiver #17261 and closes no issue, so there are no acceptance criteria to check.

  • Path-scoped rules. No .claude/rules/ glob matches scripts/lane-transcripts/**.

  • Embedded instructions. The PR context contains no text directed at this lane.

  • Spend. The new command spends GitHub API calls under the existing 1,000-call budget; it adds no billable resource.

Loosened-check verdict: fail (default; no loosened_check_verdict:/loosened_check_patterns: lines in the prompt); patterns: 0. The change adds tests and one fixture route and loosens no check. There is no loosened_check_decision_record: line, so the citation requirement was not checked.

Verifier dropped 0 of 0 candidates.

@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 19, 2026
@github-actions

Copy link
Copy Markdown
Contributor

The pr-verify verifier failed head 3dde3b6c1832f055345961bb6ac5cc648f3c6b20. What it wrote, as data:

Summary: The PR links issue #17261 only through a `Refs:` line, so the rules for a partial delivery
  apply. Those rules require the body to name what remains for later work, and this body names
  nothing. It says #17261 is already closed on the evidence this option produced, so the body treats
  the issue as finished. The issue's own scope is re-pinning ci-workflows, opting a lane into
  `otel-receiver`, and showing sealed telemetry and the trace join in the sink. A `pull --run`
  command is at most a tool for collecting that evidence. The code itself looks sound. `take()`,
  `failIfKeyMismatch()` and `takeContext()` were moved out of `pullWithin` without changing
  behaviour. `pullRun` lists the run's own artifacts page by page, keeps only `lane-transcript-*`
  ones, writes no state and prunes nothing. `--run` is accepted only on `pull` and must be a
  positive integer. The new `pull-run.test.mjs` checks that the rows match a full pull, that state
  is left untouched byte for byte, the fork and key-mismatch cases, the exit codes and the argument
  validation. Test Node, which covers `scripts/lane-transcripts`, concluded success on the judged
  head
  (https://github.com/melodic-software/claude-code-plugins/actions/runs/44629457817/job/135948166388).
  There was no capture to check.
- PR body: a `Refs: #17261` pull request must name both the part it delivers and the work that
  remains, and this body names no remaining work. It says #17261 is already closed, and `pull --run`
  is a sink tool outside that issue's done-when items. Either link a spec that asks for `pull
  --run`, such as a new issue this PR closes, or name what remains of #17261 and how this part fits
  within its scope.

This pull request leaves the merge queue, and ci-status holds it out while it carries pr-verify-failed. A pr-verify pass removes the label, at a new commit or at this same head: once a trusted person edits the body, and only trusted people have edited it since the fail, this head is judged again, so a fail on the body or the issues it links needs only the body fixed, no new commit.

@github-actions github-actions Bot added the pr-verify-failed pr-verify failed this head; a pass at a new commit, or after a trusted body edit, removes it. label Nov 19, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 19, 2026
@github-actions github-actions Bot removed the pr-verify-failed pr-verify failed this head; a pass at a new commit, or after a trusted body edit, removes it. label Nov 19, 2026
@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 19, 2026
Merged via the queue into main with commit 959adde Nov 20, 2026
71 of 72 checks passed
@kyle-sexton
kyle-sexton deleted the feat/lane-transcripts-pull-run branch November 20, 2026 00:00
@github-actions github-actions Bot added the merge-path: owner-agent Post-merge accounting record (README.md, Merge paths) label Nov 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-path: owner-agent Post-merge accounting record (README.md, Merge paths)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant