You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 959adde
Browse filesBrowse the repository at this point in the historyBrowse files
feat(lane-transcripts): pull one workflow run's transcripts with pull --run (#17534)
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
- #17261 (closed): this option pulled the run whose stored telemetry
rows met its completion check. This PR delivers no part of that issue.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01KeBVgaQE4QB75SPD3ky1jd
Co-authored-by: Claude Opus 5.5 <[email protected]>
|`pull`| Copies every new `lane-transcript-*` artifact, then prunes | 0 done, including one that missed an artifact; 1 failed, and `ALERT:` on stderr when no pull succeeded in 5 days (a pull that missed an artifact and is that stale exits 1 too), or when a budget-stopped backlog is over 5 days old. A stale `pull-outcomes` prints its `ALERT:` here too but does not change this exit code, so a timer that chains the two still reaches it |
21
+
|`pull --run RUN-ID`| Copies that one workflow run's `lane-transcript-*` artifacts, listed from the run itself, with the same checks and rows as `pull`; writes no pull state and prunes nothing, so the scheduled pull's cursors and resume point stay as they were | 0 done; 1 when an artifact was missed or the run's listing failed |
20
22
|`status`| Prints the last successful pull, its age, and the store's size and counts as JSON | 1 and `ALERT:` when no pull succeeded in 5 days, or a budget-stopped backlog is over 5 days old; the same two checks apply to `pull-outcomes` once it has run |
21
23
|`query`| Prints the metrics rows matching every filter given, as JSONL with the transcript's absolute path | 0 |
assert.ok(deps.calls.every((c)=>!c.includes("actions/artifacts?")&&!c.includes("/workflows/")),"no name listing and no workflow run listing");
42
+
assert.ok(!deps.calls.some((c)=>c.includes("artifacts/3/zip")||c.includes("artifacts/4/zip")),"another artifact of the run, and another run's, are not downloaded");
// Every candidate sealed to another key and none opened: the vault key does
380
-
// not match the repository variable, which must alert, not pass.
381
-
if(tally.sealed_mismatch>0&&tally.pulled===0&&tally.known===0)thrownewPullError(`key-mismatch: ${tally.sealed_mismatch} transcript(s) did not open for this key and none did`);
* Every candidate sealed to another key and none opened: the vault key does
411
+
* not match the repository variable, which must alert, not pass.
412
+
*/
413
+
functionfailIfKeyMismatch(tally){
414
+
if(tally.sealed_mismatch>0&&tally.pulled===0&&tally.known===0)thrownewPullError(`key-mismatch: ${tally.sealed_mismatch} transcript(s) did not open for this key and none did`);
415
+
}
416
+
417
+
/**
418
+
* One workflow run's transcripts, listed from that run's own artifacts and
419
+
* taken as a pull takes them. It writes no state and prunes nothing, so the
420
+
* scheduled pull's cursors, resume point and last success stay as they were.
0 commit comments