Skip to contents

The parity payload in a fixed field order, drawn from the facts lnk_stamp() already collects plus the git state of the checkout this host installed from. Kept separate from lnk_stamp() so the shell contract — the field order — is a documented, tested thing rather than an inline Rscript -e incantation that drifts between two call sites.

Usage

lnk_preflight_stamp(cfg = lnk_config("bcfishpass"), repo = ".")

Arguments

cfg

An lnk_config from lnk_config(). Supplies config_hash.

repo

Path to the git checkout this host's install came from.

Value

A named character vector in the documented field order.

Details

repo_sha is the load-bearing field for link, not link_sha. .lnk_pkg_git_state() resolves link's SHA from a .git beside the installed package. On the dispatcher link is pkgload::load_all'd from a checkout, so it finds one; on every cypher link is pak-installed from a local source tree, so it does not and returns NA. Comparing link_sha across hosts would therefore always fail — a check that looks like a check. repo_sha is read from ~/Projects/repo/link on the host itself, which on a cypher is exactly what git reset --hard origin/<branch> produced. It is an independent observation rather than a restatement of what the dispatcher believes (link#246).

fresh_sha is different, and stopped being vacuous in link#264. This paragraph used to say it was NA on both hosts, making any comparison a NA == NA pass. That was measured false on 2026-09-01: the dispatcher's installed fresh carried RemoteSha 7f12d99115b7…, byte-identical to the value its cyphers recorded, and the resolver simply never read the field. It does now, so fresh_sha resolves everywhere and lnk_preflight_parity() keys on it.

Unresolvable facts are the literal string "NA", never empty, so a truncated ssh response is distinguishable from a resolved absence.

Examples

s <- lnk_preflight_stamp(lnk_config("bcfishpass"))
names(s)
#>  [1] "host"          "link_version"  "link_sha"      "fresh_version"
#>  [5] "fresh_sha"     "repo_sha"      "repo_dirty"    "config_hash"  
#>  [9] "fwapg_sha"     "r_version"    
s[["fresh_version"]]
#> [1] "0.33.0"