nightly-sync

Merge main into dev nightly while preserving dev-only features and validating APIs.

17.4k|4.3k|Updated Mar 21, 2019
One-click install
npx skills add https://github.com/NVIDIA/Megatron-LM --skill nightly-sync-nvidia
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nightly-sync
Source: https://github.com/NVIDIA/Megatron-LM/tree/main/skills/nightly-sync
Command: npx skills add https://github.com/NVIDIA/Megatron-LM --skill nightly-sync-nvidia

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It standardizes how to merge main into dev every night without accidentally dropping dev-only features, breaking APIs, or leaving CI in an undebuggable state.

Core Features & Use Cases

  • Safe merge strategy: Preserves dev-only additions by resolving conflicts surgically instead of using broad “take main” strategies.
  • Squash-merge conflict detection: Detects when main and dev histories diverged via squash chains so fixes don’t silently discard newer dev improvements.
  • Post-merge API mismatch auditing: Checks caller/implementation compatibility for files where main’s version was taken to prevent runtime “Frankenstein” failures.
  • CI iteration and gating workflow: Provides a deterministic loop for triggering functional tests, diagnosing failures, and only marking the PR ready when required checks pass.
  • Special-case handling: Includes explicit rules for problematic paths (e.g., data_schedule.py) and strict prohibitions (e.g., never modify CODEOWNERS).

Quick Start

Use the nightly-sync skill to guide the automated sync bot when resolving conflicts, validating APIs, and iterating CI for a nightly main-to-dev PR.

Frequently Asked Questions about nightly-sync

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

FAQPage Schema
How do I prevent losing dev-only features during a nightly git merge from main?

To prevent losing dev-only features during a nightly git merge, resolve conflicts surgically rather than using broad 'take main' strategies. This preserves dev-only additions while integrating the latest main updates safely.

Why does a squash-merge silently discard newer dev improvements when syncing main?

Squash-merges silently discard dev improvements because main and dev histories diverge through squash chains. Detecting these squash chains prevents fixes from accidentally overwriting newer dev-side code during the sync.

How do I audit API compatibility after taking main's version in a merge conflict?

Audit API compatibility after a merge by checking caller and implementation compatibility for files where main's version was taken. This prevents runtime 'Frankenstein' failures caused by cross-boundary API mismatches.

What is the best way to gate CI for a nightly dev branch sync?

The best way to gate CI for a nightly sync is to use a deterministic loop: trigger functional tests, diagnose failures, and only mark the PR ready when required checks pass. This ensures strict 'mark ready only when checks are green' gating.

What files should I avoid modifying when resolving main to dev merge conflicts?

When resolving main to dev merge conflicts, never modify CODEOWNERS files. The workflow includes strict prohibitions and explicit override rules for problematic paths like data_schedule.py to ensure deterministic branch setups.