Documentation
¶
Overview ¶
Package buildinfo carries the compiled-in version and the running binary's self-hash.
Both exist for experiment admission rule A1 (config pinning, Tier 2 of the 2026-08-21 Phase 2 re-aim): a paired cross-seat measurement is only pairable when BOTH sides of the serving stack are pinned. The seat's llama-server state is pinned by internal/agent.ProbeSeatPin (server side); the harness's own request construction — per-call temperature, the re-pack's chat_template_kwargs enable_thinking:false, profile toolsets — is CODE, so it is pinned by naming the exact binary that ran. A version string alone cannot do that: two checkouts can both say "0.81.0" while one carries uncommitted changes (observed on the fleet the day this was written), and the enable_thinking defect that invalidated the 2026-08-17 corpus was exactly a request-side code change a server-side hash would never have seen.
Index ¶
Constants ¶
const Version = "0.209.0"
Version is the single authoritative compiled-in version. main.go's `version` const aliases it (keeping the VERSION-file agreement test in main_test.go binding), and fleet/pipeline stampers read it directly so no plumbing carries it through config.
Variables ¶
This section is empty.
Functions ¶
func BuildSHA256 ¶
func BuildSHA256() string
BuildSHA256 returns the hex SHA-256 of the running executable, computed once per process. It returns "" when the executable cannot be resolved or read — the caller's omitempty then leaves the field ABSENT, which readers must treat as "unknown, refuse to pair", never as a value. (Absence ≠ provably-unpinned: a failed self-read is a could-not-determine, and inventing a sentinel hash for it would let two failures pair with each other.)
The hash is taken at the first call, so a process that wants the hash of the image it STARTED from calls CaptureStartup at start: a long-lived process whose first call came after a rename-swap deploy used to hash the NEW file at the path os.Executable names and stamp its rows with a build it was not running (D-36). A short-lived CLI process never captures anything and keeps this lazy path, so a hook invocation does not hash the whole executable.
Types ¶
type Startup ¶
type Startup struct {
Version string
// SHA256 is "" when the self-hash failed (see BuildSHA256: absent means unknown, never a value).
SHA256 string
Path string
Size int64
ModTime time.Time
}
Startup is the identity of the image a process started from: the version compiled into it, the SHA-256 of the executable as it was when the process began, and where that executable was (its stat, so a later reader can tell whether the file at the path is still the one the process started from without hashing it again).
func CaptureStartup ¶
func CaptureStartup() Startup
CaptureStartup records the identity of the image this process started from, once: the first call hashes the executable (the same one latch BuildSHA256 uses, taken now instead of at first use) and every later call returns that first answer. The MCP server calls it as it starts; the hash is the one every row the process writes carries.
func StartupIdentity ¶
StartupIdentity returns the identity CaptureStartup recorded, and false in a process that never captured one.