update-golden-values

Refresh golden-value JSON artifacts from GitHub Actions runs with per-metric relative differences.

Updated May 23, 2026
One-click install
npx skills add https://github.com/yo-steven/skills-exploration-20260522 --skill update-golden-values
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: update-golden-values
Source: https://github.com/yo-steven/skills-exploration-20260522/tree/main/skills/Megatron-Core/update-golden-values
Command: npx skills add https://github.com/yo-steven/skills-exploration-20260522 --skill update-golden-values

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill refreshes Megatron-Core golden-value artifacts from a specified GitHub Actions workflow run and produces a reviewer-friendly summary of how much the new goldens differ from the previous ones.

Core Features & Use Cases

  • Golden refresh from CI artifacts: Downloads golden-value JSON artifacts generated by a workflow run and overwrites the local tests/functional_tests/test_cases/**/golden_values_*.json files.
  • Failing-only or full refresh: Supports only-failing mode to pull artifacts from failing/cancelled jobs (or all mode to pull from every job that produced goldens).
  • Per-metric relative-difference scoring: Computes a per-(file, metric) signed avg_rel_diff = mean((old − new) / old) over shared steps and aggregates it into a PR-ready interpretation.
  • PR-ready summary generation: Produces a structured blurb including headline per-metric statistics and a distribution table for |avg_rel_diff|.

Quick Start

Provide a GitHub Actions workflow run ID and choose scope only-failing or all, then run the skill to download goldens, compute relative-diff scoring, and generate a PR-ready summary for the resulting golden-value changes.

Frequently Asked Questions about update-golden-values

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I update golden values from a GitHub Actions workflow run?

To update golden values from a GitHub Actions workflow run, provide the workflow run ID and select a refresh scope. The skill downloads the CI artifacts and overwrites local golden-value JSON files with the new test outputs.

Can I refresh golden values only for failing tests in CI?

Yes, you can refresh golden values for failing tests by using the only-failing mode. This pulls artifacts exclusively from failing or cancelled jobs, rather than pulling artifacts from every job that produced goldens.

How do I generate a PR summary for golden value changes?

You can generate a PR summary for golden value changes by computing per-metric relative differences between old and new files. The skill aggregates these signed differences into headline statistics and a distribution table suitable for a PR description.

What is relative-diff scoring for golden value artifacts?

Relative-diff scoring for golden value artifacts measures the signed average relative difference between old and new values over shared steps. It calculates mean((old − new) / old) to quantify metric changes and bucket them by magnitude.

Do I need specific scripts to download and compare golden values?

Yes, you need specific scripts to download and compare golden values. The process requires download_golden_values.py to fetch and overwrite local goldens, and compare_golden_values_kl.py to compute the signed avg_rel_diff and generate a CSV summary.

What are the limitations of refreshing Megatron-Core golden values?

A limitation of refreshing Megatron-Core golden values is that the process specifically targets golden_values_*.json files within tests/functional_tests/test_cases. It requires a valid GitHub Actions workflow run ID to fetch the necessary CI artifacts.