Skip to content

Retain LangSmith fleet rollup artifact - #2424

Merged
stranske merged 1 commit into
mainfrom
codex/langsmith-fleet-artifact-upload
Jun 17, 2026
Merged

stranske merged 1 commit into
mainfrom
codex/langsmith-fleet-artifact-upload

Conversation

@stranske

@stranske stranske commented Jun 16, 2026

Copy link
Copy Markdown
Owner

Summary

  • upload the raw .metrics-tmp/fleet/combined-fleet.ndjson dashboard rollup as a distinct langsmith-fleet-rollup-<run_id> artifact
  • include the raw rollup in dashboard diagnostics/report artifacts for easier inspection
  • add workflow test coverage so the downstream ingestion handoff remains wired

Validation

  • uv run pytest tests/workflows/test_langsmith_metrics_dashboard.py tests/scripts/test_langsmith_fleet.py tests/scripts/test_langsmith_fleet_conformance.py
  • uv run pytest tests/workflows/test_workflow_naming.py

Notes

The artifact name is intentionally distinct from per-repo langsmith-fleet.ndjson producer artifacts to avoid double-counting when individual registered repos start publishing their own fleet records. The local Orchestrator fetcher has been updated separately to use this rollup only as a fallback when no direct per-repo artifacts are available.

Summary by CodeRabbit

Release Notes

  • New Features

    • Enhanced dashboard diagnostics uploads by bundling combined fleet NDJSON with fleet status outputs in both Markdown and JSON, plus fleet error logs.
    • Added an always-run “fleet rollup” artifact upload for dedicated downstream retrieval.
  • Chores

    • Extended the main report artifact bundle to include the combined fleet NDJSON and enabled hidden-file inclusion for the relevant uploads.
  • Tests

    • Strengthened workflow checks to verify the fleet rollup artifact name, exact upload path, and expected upload-artifact configuration.

@coderabbitai

coderabbitai Bot commented Jun 16, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 8f82b3ad-2dd6-4ef5-b477-3b9bcfbaf98f

📥 Commits

Reviewing files that changed from the base of the PR and between 4d6bc4e and a18ba5b.

📒 Files selected for processing (2)
  • .github/workflows/maint-80-langsmith-metrics-dashboard.yml
  • tests/workflows/test_langsmith_metrics_dashboard.py
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • stranske/Template (auto-detected)

📝 Walkthrough

Walkthrough

The workflow gains three additions to artifact publication: the combined fleet NDJSON is appended to the diagnostics artifact path list, a new always-run "Upload fleet rollup artifact" step publishes it as a standalone artifact with 90-day retention, and its path is added to the report artifact bundle. The test extends existing assertions to verify both the artifact name and path are present.

Changes

Fleet NDJSON Artifact Publication

Layer / File(s) Summary
Fleet NDJSON artifact uploads and validation
.github/workflows/maint-80-langsmith-metrics-dashboard.yml, tests/workflows/test_langsmith_metrics_dashboard.py
Diagnostics artifact path list is expanded to include the combined fleet NDJSON plus fleet status and error logs, with hidden-file inclusion enabled. A new Upload fleet rollup artifact step uploads .metrics-tmp/fleet/combined-fleet.ndjson with 90-day retention and if-no-files-found: ignore. The same path is appended to the report artifact bundle along with fleet status files. Test assertions verify the presence of the langsmith-fleet-rollup-${{ github.run_id }} artifact name, the NDJSON path, the pinned actions/upload-artifact commit reference, and multiple occurrences of include-hidden-files: true.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Retain LangSmith fleet rollup artifact' directly and clearly summarizes the main change: uploading and retaining the combined fleet NDJSON as a distinct artifact with proper naming and integration.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/langsmith-fleet-artifact-upload

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 OSV Scanner (2.3.8)

Error: ENOENT: no such file or directory, scandir '/inmem/1293/nsjail-0bbb189f-5b67-4994-88ee-047b38e98ccd/merged/.git/hooks'


Comment @coderabbitai help to get the list of available commands and usage tips.

@stranske
stranske temporarily deployed to agent-high-privilege June 16, 2026 19:23 — with GitHub Actions Inactive
@stranske-keepalive

stranske-keepalive Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Workflow source detected

PR #2424 now has valid workflow source context (origin=local_request).

No linked GitHub issue is required for this PR.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e9bfaf95a7

ℹ️ 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".

uses: actions/upload-artifact@v7
with:
name: langsmith-fleet-rollup-${{ github.run_id }}
path: .metrics-tmp/fleet/combined-fleet.ndjson

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Opt in to uploading the hidden rollup file

For the new langsmith-fleet-rollup-* artifact, the only uploaded path is under .metrics-tmp, and actions/upload-artifact@v7 treats files inside dot-prefixed directories as hidden and excludes them unless include-hidden-files: true is set. Since this step also uses if-no-files-found: ignore, dashboard runs will pass while silently not creating the durable rollup artifact that downstream ingestion is supposed to consume.

Useful? React with 👍 / 👎.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 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.

Inline comments:
In @.github/workflows/maint-80-langsmith-metrics-dashboard.yml:
- Around line 311-318: The upload-artifact action uses an unpinned tag reference
(v7) instead of a SHA-pinned commit hash, which poses a security risk across all
fleet-wide deployments. Replace `actions/upload-artifact@v7` with a SHA-pinned
version of the same action (e.g., `actions/upload-artifact@<commit-sha>`) to
ensure a specific, immutable version is used and prevent unintended changes from
action updates.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 5aba20f2-c314-4aef-8928-6fea8e3ca3f1

📥 Commits

Reviewing files that changed from the base of the PR and between 44d51b7 and e9bfaf9.

📒 Files selected for processing (2)
  • .github/workflows/maint-80-langsmith-metrics-dashboard.yml
  • tests/workflows/test_langsmith_metrics_dashboard.py
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • stranske/Template (auto-detected)

Comment thread .github/workflows/maint-80-langsmith-metrics-dashboard.yml
@stranske
stranske force-pushed the codex/langsmith-fleet-artifact-upload branch from e9bfaf9 to 2d2acb4 Compare June 16, 2026 19:31
@agents-workflows-bot

agents-workflows-bot Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Automated Status Summary

Head SHA: 1669e8a
Latest Runs: ⏳ pending — Gate
Required contexts: Gate / gate, Health 45 Agents Guard / guard
Required: core tests (3.12): ⏳ pending, core tests (3.13): ⏳ pending, docker smoke: ⏳ pending, gate: ⏳ pending

Workflow / Job Result Logs
(no jobs reported) ⏳ pending

Coverage Overview

  • Coverage history entries: 1

Coverage Trend

Metric Value
Current 70.30%
Baseline 85.00%
Delta -14.70%
Minimum 70.00%
Status ✅ Pass

Top Coverage Hotspots (lowest coverage)

File Coverage Missing
scripts/check_api_wrapper_guard.py 0.0% 123
scripts/cleanup_labels.py 0.0% 127
scripts/issue_dedup_smoke.py 0.0% 4
scripts/list_registered_consumer_repos.py 0.0% 33
scripts/repo_review_backlog_scan.py 0.0% 203
scripts/repo_review_queue_builder.py 0.0% 105
scripts/repo_review_round1_runner.py 0.0% 225
scripts/repo_review_round1_schema.py 0.0% 194
scripts/runner_lib/__main__.py 0.0% 3
scripts/update_langchain_versions.py 0.0% 34
scripts/validate_dependency_test_setup.py 0.0% 112
scripts/validate_template_completeness.py 0.0% 88
scripts/validate_template_sync.py 0.0% 77
scripts/validate_workflow_yaml.py 0.0% 98
scripts/repo_review_round2_schema.py 8.8% 185

Low Coverage Files (<50.0%)

File Coverage Missing
scripts/check_api_wrapper_guard.py 0.0% 123
scripts/cleanup_labels.py 0.0% 127
scripts/issue_dedup_smoke.py 0.0% 4
scripts/list_registered_consumer_repos.py 0.0% 33
scripts/repo_review_backlog_scan.py 0.0% 203
scripts/repo_review_queue_builder.py 0.0% 105
scripts/repo_review_round1_runner.py 0.0% 225
scripts/repo_review_round1_schema.py 0.0% 194
scripts/runner_lib/__main__.py 0.0% 3
scripts/update_langchain_versions.py 0.0% 34
scripts/validate_dependency_test_setup.py 0.0% 112
scripts/validate_template_completeness.py 0.0% 88
scripts/validate_template_sync.py 0.0% 77
scripts/validate_workflow_yaml.py 0.0% 98
scripts/repo_review_round2_schema.py 8.8% 185

Updated automatically; will refresh on subsequent CI/Docker completions.


Keepalive checklist

Scope

No scope information available

Tasks

  • No tasks defined

Acceptance criteria

  • No acceptance criteria defined

@stranske
stranske temporarily deployed to agent-high-privilege June 16, 2026 19:32 — with GitHub Actions Inactive

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/maint-80-langsmith-metrics-dashboard.yml (1)

294-297: ⚠️ Potential issue | 🟠 Major

Pin actions/upload-artifact by SHA in all upload steps, not just the new one.

Upload dashboard diagnostics (line 296) and Upload report artifact (line 324) still reference actions/upload-artifact@v7 (mutable tag). This keeps a fleet-wide supply-chain risk in a synced workflow.

🔒 Minimal fix
       - name: Upload dashboard diagnostics
         if: always()
-        uses: actions/upload-artifact@v7
+        uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
         with:
       - name: Upload report artifact
         if: env.REPORT_AVAILABLE == 'true'
-        uses: actions/upload-artifact@v7
+        uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
         with:

As per coding guidelines, flag unpinned third-party actions — this workflow YAML is synced to 9 consumer repos, so one bug replicates fleet-wide.

🤖 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/maint-80-langsmith-metrics-dashboard.yml around lines 294
- 297, Replace the mutable tag references for the upload-artifact action with
pinned SHA hashes to mitigate supply-chain risk. In both the "Upload dashboard
diagnostics" step and the "Upload report artifact" step, change
`actions/upload-artifact@v7` to `actions/upload-artifact@` followed by the
specific commit SHA for that version. This ensures the workflow cannot be
compromised by mutations to the v7 tag and prevents fleet-wide replication of
any potential vulnerabilities across all synced consumer repositories.

Source: Coding guidelines

🤖 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.

Inline comments:
In `@tests/workflows/test_langsmith_metrics_dashboard.py`:
- Around line 74-79: The test validates that the new rollup step uses a
SHA-pinned upload-artifact action, but lacks a negative assertion to prevent
unpinned upload-artifact@v7 references elsewhere in the workflow. Add an
assertion that ensures unpinned upload-artifact@v7 (without the SHA hash) does
not appear anywhere in the source, which will catch any regressions where other
upload-artifact steps lack proper SHA pinning and prevent this policy from being
bypassed in the synced consumer repositories.

---

Outside diff comments:
In @.github/workflows/maint-80-langsmith-metrics-dashboard.yml:
- Around line 294-297: Replace the mutable tag references for the
upload-artifact action with pinned SHA hashes to mitigate supply-chain risk. In
both the "Upload dashboard diagnostics" step and the "Upload report artifact"
step, change `actions/upload-artifact@v7` to `actions/upload-artifact@` followed
by the specific commit SHA for that version. This ensures the workflow cannot be
compromised by mutations to the v7 tag and prevents fleet-wide replication of
any potential vulnerabilities across all synced consumer repositories.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: c37518ef-752a-4935-97ad-26e4fbf46193

📥 Commits

Reviewing files that changed from the base of the PR and between e9bfaf9 and 2d2acb4.

📒 Files selected for processing (2)
  • .github/workflows/maint-80-langsmith-metrics-dashboard.yml
  • tests/workflows/test_langsmith_metrics_dashboard.py
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • stranske/Template (auto-detected)

@stranske
stranske force-pushed the codex/langsmith-fleet-artifact-upload branch from 2d2acb4 to 4d6bc4e Compare June 16, 2026 19:41
@stranske
stranske temporarily deployed to agent-high-privilege June 16, 2026 19:41 — with GitHub Actions Inactive

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 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.

Inline comments:
In `@tests/workflows/test_langsmith_metrics_dashboard.py`:
- Around line 74-80: The assertion on line 80 that checks for
".metrics-tmp/fleet/combined-fleet.ndjson" is redundant with the assertion on
line 76 that already verifies the full path string "path:
.metrics-tmp/fleet/combined-fleet.ndjson" is present in the source. Remove the
redundant assertion on line 80 to reduce test noise and improve clarity, unless
the explicit intent is to verify the path appears in multiple contexts (in which
case, replace it with a count-based assertion to make that intent clear).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: bab2d7fa-c8f4-4e79-8ec8-60891bf4e522

📥 Commits

Reviewing files that changed from the base of the PR and between 2d2acb4 and 4d6bc4e.

📒 Files selected for processing (2)
  • .github/workflows/maint-80-langsmith-metrics-dashboard.yml
  • tests/workflows/test_langsmith_metrics_dashboard.py
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • stranske/Template (auto-detected)

Comment on lines +74 to +80
# The raw combined NDJSON is retained for downstream durable ingestion.
assert "name: langsmith-fleet-rollup-${{ github.run_id }}" in source
assert "path: .metrics-tmp/fleet/combined-fleet.ndjson" in source
assert "actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7" in source
assert "actions/upload-artifact@v7" not in source
assert source.count("include-hidden-files: true") >= 3
assert ".metrics-tmp/fleet/combined-fleet.ndjson" in source

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial | 💤 Low value

Consider removing redundant path assertion.

Line 76 already asserts that path: .metrics-tmp/fleet/combined-fleet.ndjson is present in the workflow source. Line 80 repeats this check by asserting the same path string is present. While this might be intentionally testing that the path appears in multiple contexts (artifact upload steps), the redundancy reduces test signal-to-noise.

If the intent is to verify the path appears in multiple upload steps, consider making this explicit with a count assertion or targeted context checks. Otherwise, remove line 80.

♻️ Optional: Remove redundant assertion
     assert "actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7" in source
     assert "actions/upload-artifact@v7" not in source
     assert source.count("include-hidden-files: true") >= 3
-    assert ".metrics-tmp/fleet/combined-fleet.ndjson" in source

Alternatively, if verifying multiple occurrences is intentional:

-    assert ".metrics-tmp/fleet/combined-fleet.ndjson" in source
+    # Path appears in diagnostics, rollup, and report artifacts (3 times)
+    assert source.count(".metrics-tmp/fleet/combined-fleet.ndjson") >= 3
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# The raw combined NDJSON is retained for downstream durable ingestion.
assert "name: langsmith-fleet-rollup-${{ github.run_id }}" in source
assert "path: .metrics-tmp/fleet/combined-fleet.ndjson" in source
assert "actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7" in source
assert "actions/upload-artifact@v7" not in source
assert source.count("include-hidden-files: true") >= 3
assert ".metrics-tmp/fleet/combined-fleet.ndjson" in source
# The raw combined NDJSON is retained for downstream durable ingestion.
assert "name: langsmith-fleet-rollup-${{ github.run_id }}" in source
assert "path: .metrics-tmp/fleet/combined-fleet.ndjson" in source
assert "actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7" in source
assert "actions/upload-artifact@v7" not in source
assert source.count("include-hidden-files: true") >= 3
🤖 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 `@tests/workflows/test_langsmith_metrics_dashboard.py` around lines 74 - 80,
The assertion on line 80 that checks for
".metrics-tmp/fleet/combined-fleet.ndjson" is redundant with the assertion on
line 76 that already verifies the full path string "path:
.metrics-tmp/fleet/combined-fleet.ndjson" is present in the source. Remove the
redundant assertion on line 80 to reduce test noise and improve clarity, unless
the explicit intent is to verify the path appears in multiple contexts (in which
case, replace it with a count-based assertion to make that intent clear).

@stranske
stranske force-pushed the codex/langsmith-fleet-artifact-upload branch from 4d6bc4e to a18ba5b Compare June 16, 2026 19:50
@stranske
stranske temporarily deployed to agent-high-privilege June 16, 2026 19:50 — with GitHub Actions Inactive
@stranske

Copy link
Copy Markdown
Owner Author

Post-push follow-up complete for a18ba5b. Addressed the hidden .metrics-tmp artifact upload issue with include-hidden-files, pinned all upload-artifact uses in this workflow to the existing v7 SHA, replaced the redundant path assertion with an explicit multi-bundle count assertion, and added the workflow-source marker. Local validation passed: uv run pytest tests/workflows/test_langsmith_metrics_dashboard.py tests/scripts/test_langsmith_fleet.py tests/scripts/test_langsmith_fleet_conformance.py; uv run pytest tests/workflows/test_workflow_naming.py; git diff --check. Final PR checks are green and CodeRabbit reported no actionable comments in the latest review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant