feat(bench): freeze demo corpus as a release asset + wire bench capture: otel-demo (PR-N4) - #79
Conversation
…re: otel-demo (PR-N4) Two halves of the same plumbing: - capture-otel-demo-corpus.yml gains a release_tag input. When set, it gzips the captured logs.jsonl + manifest and publishes them as assets on a GitHub release at that tag (creating it, or clobbering assets on re-mint), with provenance — demo ref, locust users, window, source commit, record count, bytes — in the notes. Needs contents: write. - bench.yml gains an otel-demo capture choice + a corpus_release_tag input (default corpus/otel-demo-v1). When selected it gh-release-downloads the frozen corpus, gunzips it, and benches it — every run sees identical bytes (RFC 0006 §J4 reproducibility), unlike a live capture. The fetch step emits corpus_dir the same way the telemetrygen step does; BENCH_CORPUS prefers whichever capture step ran. telemetrygen and none paths are untouched. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughBench workflow gains ChangesFrozen OTel Demo Corpus Release Support
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Pull request overview
Wires the validated OTel Demo log corpus into the thesis-gate bench as a frozen, versioned GitHub release asset, so each bench run consumes byte-identical input (preserving RFC 0006 §J4 reproducibility) instead of regenerating a noisy live capture.
Changes:
capture-otel-demo-corpus.yml: adds an optionalrelease_taginput and a publish step that gzipslogs.jsonl, writes provenance into release notes, and creates the release or--clobbers its assets; bumpscontentspermission towrite.bench.yml: adds anotel-democapture choice with acorpus_release_taginput, a newfetchstep thatgh release downloads +gunzips the frozen corpus, and updatesBENCH_CORPUSfallback to considersteps.fetch.outputs.corpus_dir.- Tag is plumbed via
env:rather than${{ }}shell splicing, matching the existing template-injection mitigation pattern.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
.github/workflows/capture-otel-demo-corpus.yml |
New release_tag input + publish-to-release step; contents: write permission. |
.github/workflows/bench.yml |
New otel-demo capture path + corpus_release_tag input; BENCH_CORPUS selects across capture/fetch/input. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.github/workflows/capture-otel-demo-corpus.yml (1)
290-294: ⚡ Quick winRelease notes become stale when re-minting an existing tag.
When the release already exists,
gh release upload --clobberupdates the assets but the$noteswith current provenance (demo_ref, duration, commit, etc.) is discarded. Re-minting with different parameters would leave release notes showing outdated metadata whilemanifest.mdreflects the new corpus.🔧 Proposed fix to update release notes on re-mint
if gh release view "$RELEASE_TAG" >/dev/null 2>&1; then gh release upload "$RELEASE_TAG" logs.jsonl.gz manifest.md --clobber + gh release edit "$RELEASE_TAG" --notes "$notes" else gh release create "$RELEASE_TAG" logs.jsonl.gz manifest.md \ --title "$RELEASE_TAG" --notes "$notes" fi🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/capture-otel-demo-corpus.yml around lines 290 - 294, The current workflow uploads assets with gh release upload --clobber when RELEASE_TAG exists but does not update the release notes, causing stale metadata; after the existing-release branch where gh release upload "$RELEASE_TAG" logs.jsonl.gz manifest.md --clobber is executed, run gh release edit "$RELEASE_TAG" --notes "$notes" (and optionally --title "$RELEASE_TAG") to update the release metadata so the release notes match the new manifest.md and assets; ensure you reference the existing RELEASE_TAG and notes variables and run edit after upload to avoid losing provenance when re-minting the tag.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In @.github/workflows/capture-otel-demo-corpus.yml:
- Around line 290-294: The current workflow uploads assets with gh release
upload --clobber when RELEASE_TAG exists but does not update the release notes,
causing stale metadata; after the existing-release branch where gh release
upload "$RELEASE_TAG" logs.jsonl.gz manifest.md --clobber is executed, run gh
release edit "$RELEASE_TAG" --notes "$notes" (and optionally --title
"$RELEASE_TAG") to update the release metadata so the release notes match the
new manifest.md and assets; ensure you reference the existing RELEASE_TAG and
notes variables and run edit after upload to avoid losing provenance when
re-minting the tag.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 839b5500-46f1-4ba5-8cc1-3f5e7d48e334
📒 Files selected for processing (2)
.github/workflows/bench.yml.github/workflows/capture-otel-demo-corpus.yml
…h capture: otel-demo (PR-N4)
What
Wires the validated OTel Demo corpus into the bench as a frozen, reproducible release asset. Two halves:
1.
capture-otel-demo-corpus.yml— publish a releaserelease_taginput. When set, the workflow gzipslogs.jsonl+manifest.mdand publishes them as assets on a GitHub release at that tag — creating the release, or--clobbering assets on re-mint.demo_ref,locust_users,duration_seconds, source commit, record count, uncompressed bytes.contents: write(manual-dispatch workflow only).2.
bench.yml—capture: otel-demootel-demochoice +corpus_release_taginput (defaultcorpus/otel-demo-v1).gh release downloadthe frozen corpus,gunzip, bench it. Every run sees identical bytes (RFC 0006 §J4 reproducibility) — unlike a live capture.corpus_direxactly like the telemetrygen step;BENCH_CORPUSprefers whichever capture step ran (capture∥fetch∥ input). telemetrygen + none paths untouched.Why a frozen release, not capture-and-bench in one run
A live capture produces different bytes every run (timing, ordering, load variation), which breaks A1/C1/C2 reproducibility — the bench would be a smoke test, not a thesis gate. Minting the corpus once and freezing it as a versioned asset makes the bench deterministic and the §9 numbers re-derivable. Re-minting (e.g.
v2) is a deliberate act with its own provenance.Validation (in progress)
Branch-dispatching the mint (
capture-otel-demo-corpus.ymlwithrelease_tag=corpus/otel-demo-v1, 40 users / 1800s) thenbench.yml capture=otel-demoto get the first real A1/C1/C2 on the demo corpus. Will post the numbers before merging.Notes
cargo fmt --all --checkclean.corpus_release_tagflows viaenv:, not${{ }}splicing, per the established template-injection rule.🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
otel-demoas a corpus capture strategy for benchmarking workflowsBug Fixes / Improvements