Skip to content

fix(metrics): restore snapshots after release ownership change - #1023

Open
adamgell wants to merge 1 commit into
mainfrom
fix/download-metrics-release-contract
Open

adamgell wants to merge 1 commit into
mainfrom
fix/download-metrics-release-contract

Conversation

@adamgell

@adamgell adamgell commented Nov 4, 2026 •

Copy link
Copy Markdown
Owner

The daily download snapshot stops in project-links.test.ts because it still expects Unix to render release notes. PR #981 moved that responsibility to Windows, so collection has not reached the GitHub asset counters since October 21.

Replace the three stale assertions with the current contract: Windows creates the draft using rendered notes, and Unix validates the exact stable draft without creating or editing release notes. Existing branded-download links and direct updater URL checks remain intact. This changes one test file and no release artifacts or workflows.

Validation:

  • Reproduced on main: 1 failing test, 126 passing.
  • Isolated collector TypeScript check and all 127 tests pass.
  • All 24 related AppImage/release workflow tests pass.
  • git diff --check passes.
  • Independent review found no actionable defects; CI and CodeRabbit remain required before integration.

After integration, run the existing Download metrics snapshot workflow and verify the published report. Current surviving asset totals can be recovered; missing daily history and final counts for replaced nightly assets cannot be reconstructed.

Summary by CodeRabbit

  • Tests
    • Updated release workflow checks to verify that stable releases are drafts, use the expected release tag, and include generated release notes.
    • Added checks to ensure stable releases are not marked as prereleases and are not created or edited through disallowed commands.

@github-actions github-actions Bot added bug Something isn't working enhancement New feature or request labels Nov 4, 2026
@coderabbitai

coderabbitai Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The project-links test now checks stable release draft status and Windows draft creation with release-notes.md. It removes assertions for stable release-note template selection and placeholder substitution.

Changes: Release workflow test assertions

Layer / File(s) Summary
Update release workflow assertions
tools/download-metrics/tests/project-links.test.ts
The test checks that stable releases are drafts and not prereleases, rejects gh release create and edit commands and a releaseBody field, and checks that the Windows workflow creates a draft using release-notes.md.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix

Suggested labels: bug

Merge Risk: Minimal · up to 0f7f2

The test updates accurately reflect current release ownership and introduce no actionable merge risk.

Pre-merge checks: Passed 4
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title uses the required Conventional Commits form. Type is fix and scope is metrics. The title names the main change: the stable release assertions in project-links.test.ts are updated to match th…
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.
Full details: Title check

Explanation

The title uses the required Conventional Commits form. Type is fix and scope is metrics. The title names the main change: the stable release assertions in project-links.test.ts are updated to match the release ownership change. The scope metrics names the affected download-metrics area. The title does not say that the change touches only the test file. The requirement lists example scopes such as intune, jamf, parser, dsregcmd, sysmon, and ci, but it presents them as examples, not a closed list. The title is therefore compliant.

Finishing Touches
Generate docstrings
  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Tip

🎯 Customize your risk assessments

Guide how CodeRabbit assesses merge risk and security architecture risk. Highlight sensitive changes and explain your security boundaries using Merge Risk Instructions and Security Risk Instructions in your review settings. Security architecture risk assessments require the Advanced plan or above.

✅ Automatic approvals, with your rules

Let CodeRabbit approve pull requests once required threads are resolved, pre-merge checks pass, and your risk limits are met. Enable Automatic approvals in review settings, with overrides for teams or file paths.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 85eb62b and 0f7f268.

Files selected for processing: 1
  • tools/download-metrics/tests/project-links.test.ts

Included review availability: This review used your included allowance. 9 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 10 reviews per hour.

@adamgell

adamgell commented Nov 4, 2026

Copy link
Copy Markdown
Owner Author

Independent review of 0f7f26852fd9068e670f9d3dbf3cb66ff39812ed against 85eb62b290e6888845025062819d637771c16462 found no actionable defects in the one-file test change.

Contract coverage: Windows template rendering and draft creation remain asserted; Unix exact stable-draft validation replaces obsolete note-generation expectations; branded links and direct updater URLs remain covered. The new negative assertion catches Unix release creation/editing and replacement bodies. Existing workflow tests exercise absent, published, prerelease, duplicate, and API-error drafts.

Observed validation:

  • Collector TypeScript check and all 127 tests pass locally (baseline had 1 failure).
  • All 24 related release-workflow tests and whitespace validation pass.
  • GitHub verifies the commit signature. Local and remote heads match.
  • CodeRabbit approved this exact head; stable review-state read reports zero unresolved threads.
  • Fresh local collection against the October 21 published snapshot succeeds and includes all 27 v1.6.3 assets (6,916 cumulative requests at collection time).

CI is not yet green: the Rust test job is still running. ESP Diagnostics (Windows) failed during Pester installation because the runner could not find PSGallery; GitHub rejected a job retry while the containing workflow remains in progress. Platform builds depend on those jobs. No integration or published snapshot update has occurred, and this report is not a merge-readiness claim. Release artifacts are unchanged.

@adamgell

adamgell commented Nov 4, 2026

Copy link
Copy Markdown
Owner Author

CI attempt 1 is terminal and failed. The required Check & Test (Rust) job passed its tests and lint, then failed Supply chain audit (licenses & bans) on dependencies unchanged by this PR:

Evidence: https://github.com/adamgell/cmtraceopen/actions/runs/41910282330/job/126855707090

Once attempt 1 completed, the Windows job retry was accepted. Attempt 2 job 126866868323 cleared the PSGallery/Pester setup failure, signing checks, and parser-contract tests; it remains active. The required Rust audit failure is carried forward, so the latest attempt cannot satisfy normal integration gates regardless of the Windows result.

This repair changes only tools/download-metrics/tests/project-links.test.ts. Dependency upgrades and integration of other PRs are outside its current scope. No gates have been weakened, no merge attempted, and no release artifacts or public metrics reports changed. The collector fix remains signed, independently reviewed, and CodeRabbit-approved. Scheduled collection still requires resolving the audit blockers, completing CI, integrating this PR, then dispatching and verifying the snapshot workflow.

This branch has not been deployed

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

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant