Workflows

What makes a software bug fix useful as data

A useful bug-fix case lets someone follow the reported failure, reproduce it at a known code revision, inspect attempted changes and check the resulting behavior. A closed issue records a status; a merged patch records a change. Neither alone proves the defect was fixed.

Choose the repair question before collecting the repository

For an engineering owner assessing old work, the useful unit is a linked repair case, not every file in a repository. Start with a particular task: diagnosing a reported failure, proposing a patch, reviewing a proposed change or finding similar past incidents. Each needs a different starting point and enough evidence to check the answer.

For a patch task, preserve the report, expected and actual output, the exact starting revision, relevant configuration and dependencies, and a small permitted input that reproduces the failure. A commit identifier pins the code; a dependency lockfile and runtime version help explain the environment. If a missing service or original input prevents reproduction, record that limit rather than call the case replayable.

Follow the evidence across code, discussion and execution

Keep stable links between the issue, attempted patches, review comments and test runs. A current issue description can differ from what an engineer saw at the time, so retain dated evidence where available and mark edits or missing history. The following is an inspection map, not a claim that a particular repository contains these records.

EvidenceKeep with itWhat it establishes
Report and reproductionIssue ID; dated report; expected/observed output; sanitized input; starting commit and environmentThe failure the engineer was asked to address
Diagnosis and attempted changesDated reasoning; each candidate diff and its base commit; rejected or reverted attemptsWhat was tried and why a change was rejected
ReviewPull request ID; comment text and code location; reviewed commit; response and later revisionWhether a concern applies to the final patch or an earlier version
Tests and artifactsRun ID; tested commit; commands; environment; actual output and expected assertions; relevant log or report filesWhich behavior was checked, including failures and tests that were skipped
Delivery and follow-upMerged commit; release/build identifier; deployment time; scoped smoke check; later regression or reopen recordWhether a checked change reached the relevant environment and what was observed there

Fictional case: the first fix silently changes an amount

This entire case, its labels and its results are fictional. It illustrates a human-led repair sequence; no repository or client records were inspected. Invoice importer case B-17 supports two file formats: a dot-decimal format with optional thousands commas, and a comma-decimal format without thousands separators. Each file declares its format.

At starting revision C0, the importer ignores that declaration and tries the same numeric conversion for both formats. The reported dot-decimal input “1,200.00” should become 1200.00 but raises an error. The reproduction includes that input, its format declaration and the exact failing command.

EventEvidence retainedConclusion and limit
Report and reproductionB-17 and run R0 at C0 reproduce the error for “1,200.00”; the supported-format contract is attachedThe reported defect is reproduced in the recorded environment
First attempted patchDiff C1 removes every comma. Run R1 passes the reported input, but a new comma-decimal fixture “12,50” produces 1250.00 instead of 12.50The patch fixes one example while corrupting another supported input. Keep this failed attempt
Review and revised patchReview V1 flags the format mismatch and asks for an assertion on the numeric value. C2 uses the declared format and rejects malformed values; both fixtures are retainedThe revision responds to a specific review concern; the diff alone does not prove its behavior
Verification and mergeRun R2 at C2 checks both expected amounts and the recorded tests for previously supported behavior, with no skipped tests. The pull request merges and B-17 closesThe tests support those checked behaviors. Merge and closure are separate events
Observed resultBuild D2 contains the merged change. A dated staging smoke check of the same two synthetic inputs records the expected amountsThe release behaves as expected for these inputs in staging. Production behavior and other formats remain unknown

Keep closed, merged and verified as separate findings

GitHub documents that merging a linked pull request into the default branch can close its issue automatically. That makes closure useful for tracing work, but it is not a test result. Record issue status, merge identity and verification evidence separately.

In the fictional case, “closed” would be misleading if the only saved evidence were R1’s passing check on the reported input. R1 also exposes an incorrect amount in another supported format. The stronger label is “verified for the two recorded inputs in staging,” supported by R2 and D2. Do not promote it to a production-wide guarantee or assume no later regression because none was captured.

Sources: Linking a pull request to an issue

Package a fair task without giving away the repair

A proposed patch evaluation could stop immediately after R0. Give the assistant the original report, both supported-format definitions, the C0 code it needs, the failing reproduction and the recorded environment. Ask for a patch and tests that preserve the meaning of amounts in both formats.

Withhold C1, C2, the review, R1/R2 and D2 from that task input: they reveal attempted solutions or later results. A reviewer can use them as reference evidence, without requiring a new solution to copy C2 byte for byte. In an isolated permitted test environment, check that the original code reproduces the reported failure and that the candidate handles both stated formats, preserves exact expected amounts and passes the relevant regression tests (checks that previously supported behavior still works). A test that merely checks “no exception” would miss C1’s corruption.

Training could instead include permitted starting context, unsuccessful attempts and verified revisions as a labelled sequence. Retrieval could help internal engineers find similar parsing mistakes. Operational analysis could measure time from a reproducible report to a verified change, with missing timestamps disclosed. These are possible uses, not demonstrated buyer demand; each needs its own scope and permissions. Mark real human work, AI-assisted changes and commissioned or generated examples separately. Keep related reports and patch variants together when separating training examples from evaluation cases, so one version does not reveal another’s answer.

Check what survived extraction, especially test evidence

GitHub is one possible source, not a required home for this workflow. Its backup guidance describes a mirror clone for code and revision history, an additional fetch for Git Large File Storage objects (large files held separately from ordinary Git history), and a separate wiki repository. A code backup therefore should not be your evidence that every required discussion or test artifact was collected.

Ask the administrator to reconcile the selected cases across the issue tracker, code host, review system and test service. GitHub documents separate APIs for issue/pull-request timeline events and pull-request reviews. Their list endpoints are paginated. Check all required pages and compare the result with the source; a first response is not a complete-history guarantee. Review state and comments need the commit they refer to, especially when the patch changed afterward.

Artifacts are saved files such as test reports or build outputs. For GitHub Actions, the documented default retention for logs and artifacts is 90 days and can be customized. Artifact downloads require sign-in and repository read access. Ask the test-service custodian which relevant runs and files still exist before choosing old cases. A saved green check without the test output cannot establish which amount was asserted; an expired artifact is missing evidence, not evidence that the run failed.

Sources: Backing up a repository, REST API endpoints for timeline events, REST API endpoints for pull request reviews, Downloading workflow artifacts

Measure usable cases, not just commits or gigabytes

Count candidate defect cases, linked issues, attempted patches, review threads, test runs and files separately. One defect may have several reports and several attempted patches. Deduplicate related reports before reporting case counts. File size and token count describe storage or model input, not how many repairs can be reproduced.

For the patch-evaluation task above, count a case as complete only when its starting failure can be reproduced from the permitted package and the reference repair has linked, inspectable verification. State separately whether delivery or later operational checks exist. A diagnosis-only task may still use a case with no recoverable final patch.

A fictional inspection might read: “15 distinct defect cases inspected: nine complete for patch evaluation, four missing the original dependency environment and two retaining only a closure record.” Those are example counts, not actual inventory or buyer thresholds. Include unsuccessful, reverted and unresolved repairs in your selection notes; a collection chosen only from successful merges hides important failure modes.

Resolve code and conversation permissions together

Ask the responsible owner to check the intended use of employer code, contractor contributions, third-party dependencies and copied snippets. GitHub’s licensing guidance explains that a software licence defines permitted uses; public visibility alone is not a complete licence decision. A repository licence also should not be assumed to resolve separate customer or employee material in reports and review threads.

Before an external sample, identify confidential product details, credentials, customer inputs, personal details and security-sensitive reports in both files and history. Replace permitted identifiers consistently so links still work, and have the responsible owner approve what remains. Name removal alone may leave a distinctive incident identifiable. Do not run captured code or scripts merely to inspect the package; arrange any replay in an isolated environment approved for that material.

No current external buyer for this particular collection is established here. First produce a non-sensitive inventory and define the proposed task. A later buyer discussion must resolve suitability, permitted training/evaluation/retrieval uses, retention and onward sharing. Internal repository access does not settle those questions.

Sources: Licensing a repository

Give each custodian a specific inspection request

Choose one permitted defect case with the engineering lead and complete this handoff before attempting a bulk collection. Record “missing” or “not checked” where appropriate; do not reconstruct lost reasoning as though it were an original engineering record.

  • Write an inventory line: case ID, covered dates, starting/final commit, available records, verification scope, missing evidence and responsible owner.
  • Record separate counts for inspected cases and cases meeting the chosen task definition; identify human, AI-assisted and synthetic origins.
  • If the first case cannot be reconstructed, name the missing record and custodian. Recover it, select a narrower task or exclude the case before scaling up.
CustodianRequestDecision to record
Engineering leadPin the starting and final commits, dependency environment and reproduction command; identify every attempted patchCan another authorized engineer reproduce the starting failure and distinguish rejected attempts from the final change?
Issue/review administratorCollect the linked report, dated discussion, review comments and reviewed commits; check edits, attachments and paginationWhich decisions are preserved, and which parts of the history are absent?
Test/release ownerMatch run IDs to commits; inspect assertions, logs, skipped tests, artifact retention and the deployed build if relevantIs the result reproduced, test-verified, observed in a named environment or still unknown?
Record/rights ownerReview code licences, contributor/customer obligations and sensitive material against the proposed useWhat may be inspected internally, what may be shared, and what remains unresolved?

Sources and scope

Source checks support the statements identified below. Product access, contractual rights and suitability for a particular buyer still need to be confirmed for your situation.

  1. Linking a pull request to an issue ↗GitHub · Checked

    Linked issue closure when a pull request merges into the default branch.

    Location: About linked issues and pull requests; Linking a pull request to an issue using a keyword

    Workflow event only; no correctness or production-verification claim.

  2. Backing up a repository ↗GitHub · Checked

    Mirror backup preserves code history; LFS objects and wiki have additional collection steps.

    Location: Backing up a Git repository with the Git CLI; Backing up a wiki with the Git CLI

    Public documentation only; no selected repository was backed up or inspected.

  3. REST API endpoints for timeline events ↗GitHub · Checked

    Dedicated issue/pull-request timeline endpoint with paginated list parameters.

    Location: About timeline events; List timeline events for an issue: Parameters

    A documented route is not proof of complete recoverable history for any case.

  4. REST API endpoints for pull request reviews ↗GitHub · Checked

    Review records have state, comments and commit context; list requests are paginated.

    Location: About pull request reviews; List reviews for a pull request: Parameters and example response

    No API extraction tested; additional line-level comments and source coverage must be checked for the selected case.

  5. Downloading workflow artifacts ↗GitHub · Checked

    Default log/artifact retention is 90 days and customizable; artifact download requires sign-in and read access.

    Location: Who can use this feature?; retention paragraph before download steps

    Actual retention, artifact existence and completeness of test output were not inspected.

  6. Licensing a repository ↗GitHub · Checked

    Software licences specify permitted uses; public repository access does not by itself settle reuse rights.

    Location: Choosing the right license; note on public repositories

    General documentation, not a determination of any code, contribution or proposed AI-use rights.