Documentation
¶
Overview ¶
Package abcdrepo names abcd's own repository: the one identity every verb that behaves differently in abcd's own checkout, or in a copy of it, reads. It is a standard-library leaf, so a light package (a lab, the report inbox) can import it without pulling in whatever else holds the rule it serves.
Index ¶
Constants ¶
const CheckoutBuildEnv = "ABCD_CHECKOUT_BUILD"
CheckoutBuildEnv is the variable scripts/abcd.sh sets, to the absolute path of the binary it has just relinked, before it execs that binary. The script clears any value it inherits and the binary takes the mark out of its own environment as it starts (vintage.CheckoutMark), so a binary left in the local tier and run directly, by a person or by anything abcd started, carries no such mark: only the script's own run of a fresh build can show it (vintage.CheckoutBuild).
const CheckoutBuildRel = ".abcd/.work.local/bin/abcd"
CheckoutBuildRel is where scripts/abcd.sh builds a source checkout's own abcd, relative to the checkout root, slash-separated: the gitignored local tier, relinked from the tree as it stands each time the script runs it (iss-2610241240133009). The script and this constant name the same path, and TestTheCheckoutsAbcdBuildsToTheLocalTierAndRunsInPlace (internal/core/lint) holds them together.
const RootCommit = "488a0aa96ac5de805348635b27036addf15cddc2"
RootCommit is abcd's own identity as git records it: the root commit of its repository. A report is promoted only in a checkout whose root commit is this one, and a lab holds its snapshot to the dual-binary gate when the repository it studies is this one (or its pin carries abcd's entry point).
It is a pinned constant rather than something derived at run time. A root commit cannot change without rewriting every commit after it, so the value is as fixed as the module path, and a constant fails closed: a shallow clone, a rewritten history or an archive copy is refused rather than guessed at. The derivations on offer are weaker. The binary's embedded build revision is absent from a dirty or checkout-less build, and proves only that the checkout holds that one commit; the module path is text any repository can declare. TestAbcdRootCommitIsThisCheckouts (internal/core/report) holds the constant to the checkout the tests run in, so it cannot drift silently. A fork shares abcd's root commit and is abcd's code, so it counts as abcd.
Variables ¶
This section is empty.
Functions ¶
func LooksLikeSourceTree ¶
LooksLikeSourceTree reports whether dir is laid out as abcd's source tree: it carries abcd's entry point, cmd/abcd/main.go, as a regular file. The curated plugin payload carries no cmd/, so its presence is the tell the binary resolution ladder relies on (internal/core/launch/commandladder_test.go). It reads a live working tree; a lab reads the same path at its pin commit instead, so a later commit cannot take it out of its gate. It is a layout check, not an identity: any repository can ship that file.
Types ¶
This section is empty.