﻿# CommitPack: align commit messages with changed code

Align CommitPack messages with before/after file contents, distinguish the filtered FT derivative, and retain commit and repository ancestry for code-change tasks.

Author: Retrivium editorial team
Updated: 2026-11-03
Canonical URL: https://retrivium.ai/journal/data-guide-commitpack-message-diff-contract/
Language: en

## Choose CommitPack or its instruction-filtered derivative

The [official CommitPack card](https://huggingface.co/datasets/bigcode/commitpack/blob/main/README.md) describes file changes paired with commit metadata. The [CommitPackFT card](https://huggingface.co/datasets/bigcode/commitpackft/blob/main/README.md) identifies a filtered derivative intended to retain subjects resembling natural-language instructions. These are different training populations, not interchangeable names. Language-specific collections also do not themselves define independent evaluation holdouts. Preserve the selected resource, language partition, and revision before constructing a local instruction dataset. A larger original corpus and a shorter filtered artifact can support different questions about code evolution and instruction following.

## Align file identities with their contents

Records distinguish `old_file`, `new_file`, `old_contents`, and `new_contents`, alongside `commit`, `repos`, and `lang`. Keep both paths when a file changes identity; do not pair an old path with another record's new content after sorting. The original card also documents scraping-related `returncode` and `stderr` fields where applicable. Those describe collection status, not the result of compiling or testing the code. Track unresolved source retrieval separately in [provenance records](/journal/document-markdown-json-provenance/) instead of treating every collected record as an executable validated program.

## Separate subject and full message roles

The cards distinguish `subject` from the fuller `message`, and the [OctoPack paper](https://arxiv.org/html/2308.07124) specifies subject-based experiments. A body may include issue references or context absent from the subject. Choosing one rather than the other changes instruction information. For a code-editing task, the before-file plus intended instruction can be inputs and the after-file a target. For change explanation, the edit itself can be input and the message a target. Do not expose the chosen target through an accidentally retained neighboring field.

## Interpret filtering and change scope honestly

The paper describes instruction-oriented filters and a single-file commit selection. Its short change examples are not a general collection of coordinated multi-file repository repairs. A message can describe a feature, refactoring, formatting change, or bug fix; the resource name does not make every example a defect. An editorial labeling study can separate those activities with reviewed evidence. It should not promote keyword or subject-style filters into a verified semantic classification or a guarantee of test-backed correctness.

## Group related history before deriving an evaluation

Successive commits can repeat most file contents, while `repos` may record shared repository ancestry. Keep related histories together and apply [leakage checks](/journal/document-level-data-split-leakage/) to before/after text when designing new partitions. A chronological experiment must state which timestamps and branch relationships it actually knows. CommitPack is useful for learning natural code-change supervision and comparing edit/explanation formulations. Its license fields and hosting metadata remain provenance to inspect, and its finite historical changes do not establish that a generated patch satisfies every unrecorded developer requirement.
