Help us shape the future of Go! Take the 2026 Go Developer Survey

transcriptfreeze

command
v0.16.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Command transcriptfreeze implements CONTEXT.md D-03's anti-regeneration cross-change rule as a CI-invokable guard: a pull request must never both change a frozen wire-oracle transcript AND change something that could have caused the diff (internal/mcp/*.go, or the MCP dependency line in go.mod). This file holds the pure, I/O-free classifier; main.go is the CI entrypoint that reads the merge-base diff and drives it.

The rule is deliberately narrow. Touching only a frozen transcript, or only internal/mcp, or only go.mod's MCP dependency line, is NOT a violation — regenerating transcripts in their own pull request is the sanctioned Phase 3 path. See Classify's doc comment and buildReason for the "floor, not a proof of innocence" disclosure this narrowness requires.

One shape of the rule's collision is exempted rather than forbidden: 02-CONTEXT.md's D-01/D-02/D-03 supersede D-03's original "Phase 2 = frozen, no exceptions" clause with a single self-expiring waiver for SDK-01's one-time mark3labs-to-go-sdk transition. See sdkSwapExemption and buildSwapExemptionNotice for that narrow exception.

As of 03-02: a detected collision is advisory, not blocking. The guard's own "split into two pull requests" remedy is structurally unavailable in this repository (03-CONTEXT.md D-06 — a server-change-only PR fails the required wire-oracle leg, and a transcripts-only PR has no mergeable base), so main.go's run() reports Verdict.Reason in full but no longer fails the build on it. This does not change Classify's predicate or Verdict.Violation's meaning — see buildReason for what did change.

This file is the CI entrypoint for the D-03 anti-regeneration guard (see classify.go's package doc comment for the rule itself). It reads a merge-base `git diff --name-status` changed-file list and a merge-base go.mod diff, both as files, classifies them via Classify, and exits accordingly:

0 - advisory: the guard never fails the build. This covers three
    distinct outcomes, distinguishable only via stderr, since 03-02
    made a detected collision advisory rather than blocking (the
    guard's own "split into two pull requests" remedy is
    structurally unavailable in this repository — see classify.go's
    package doc comment):
      - a genuinely clean diff: nothing is printed.
      - a detected D-03 collision: the full Verdict.Reason — naming
        both offending sides — is printed to stderr, but the run
        still exits 0. The report is the deliverable now that the
        exit code no longer is.
      - an SDK-01 swap exemption firing: the exemption notice is
        printed to stderr, exactly as before this change. An
        exempted run is never a silent pass.
2 - unusable input: either input file is missing or unreadable
    (wrapping ErrNoInput), or ParseChangedList returned a parse
    error. An unusable input must never be reported as a pass; an
    empty-but-readable input must never be reported as a failure —
    that distinction is the whole reason this file, not
    ParseChangedList, owns the file-read step.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL