Documentation
¶
Overview ¶
Package gitidentity holds what a run's commits carry and leave out: the signature shared by codeaf's own commits and the commands a program runs on its behalf, the identity senior-dev's engine commits under, and the caches a run's own tests leave behind.
IT BUILDS ON EVERY PLATFORM. internal/seniordev does not build on Windows (its own law says so), and codeaf's side of a run still has to know these facts there, so they live here rather than in the engine.
Index ¶
Constants ¶
const ( Name = "codeaf" Email = "agentfield-bot@users.noreply.github.com" )
const ( EngineName = "senior-dev" EngineEmail = "senior-dev@localhost" )
The identity senior-dev's engine commits under: its starting tree, every write it checkpoints and the candidate it submits (internal/seniordev/util says why it carries one of its own).
const GeneratedRunPaths = "__pycache__/,.pytest_cache/,*.pyc"
GeneratedRunPaths is the one narrow list of test droppings a run is known to create. A general guess would hide a person's actual deliverable.
const InputsEnv = "SENIOR_DEV_INPUTS_AT_START"
InputsEnv names, in the program's environment, the file listing its copy's inputs and their fingerprints (WriteInputs). It is senior-dev's name beside SENIOR_DEV_IGNORED_AT_START, which codeaf sets the same way.
Variables ¶
This section is empty.
Functions ¶
func Environment ¶
func Environment() []string
Environment makes Git attribute a model-written commit to the run even when the repository carries the person's user.name and user.email.
func Fingerprint ¶
Fingerprint is a file's fingerprint: the SHA-256 of its bytes, or of its target for a symbolic link, and false when there is no file there.
func GeneratedRunPath ¶
GeneratedRunPath reports whether a path is one of GeneratedRunPaths.
func WriteInputs ¶
WriteInputs writes the inputs to file as NUL-separated fingerprint and path pairs, readable by ReadInputs; a path may hold any byte but NUL.
Types ¶
type Inputs ¶
Inputs is a copy's inputs: each path, relative to the copy's top and slash-separated, with its fingerprint when it was copied in. An empty fingerprint is an input whose copying had not finished, which is kept out.
func ReadInputs ¶
ReadInputs reads what WriteInputs wrote. An empty name is no list at all, which is every run codeaf did not start in a copy.
func (Inputs) LeftAlone ¶
LeftAlone says path is one of the inputs and the run has not changed it in the copy at root: it still has the fingerprint it was copied in with, it is gone (an untracked file's deletion is nothing a branch can hold), or its fingerprint was never taken. A path that is not an input is never left alone in this sense — it is the run's, or the repository's.