Expand description
Build-origin integrity verification and rebrand resistance.
Detects if the binary has been modified by automated rebranding tools
(e.g. sed s/lean-ctx/better-ctx/g). The integrity seed is a compile-time
constant; its hash is precomputed and embedded. If the seed is altered by
a text-replacement tool, the hash will no longer match.
Structs§
- Build
Info - Which pipeline built this binary, stamped by
build.rsat compile time (never a runtime git call).officialis the upstream release workflow only;dogfoodthe promoted Instance state,devany other checkout,sourcea packaged crate or a tree without git. - Integrity
Report
Functions§
- build
- The build stamped into this binary. A dev binary without a stamp (other binaries, tests) reports its kind with no commit.
- check
- origin_
line - set_
binary_ stamp - Called once by the
lean-ctxbinary at start with its own compile-time stamp (crates/lean-ctx/build.rs): the binary links every crate, so its commit and dirty flag describe the whole build, anddogfoodpromotes adevEngine kind whenHEADwas the promoted Instance state. An emptycommit(a packaged crate, no git) keeps the Engine’s stamp. Anofficialbuild keeps its release commit. - version_
json lean-ctx --version --json.