Documentation
¶
Overview ¶
Package manifest reads and writes the .awf/awf.lock and detects drift between rendered output and its sources.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NormalizeSemver ¶ added in v0.22.0
func WriteFileAtomic ¶ added in v0.11.0
WriteFileAtomic writes data through a same-directory temporary file and rename, so a failed write never leaves a truncated destination.
func WriteFileAtomicMode ¶ added in v0.30.0
WriteFileAtomicMode is WriteFileAtomic with an explicit final mode, used when a restored file's recorded permissions must survive the replacement. touches-state: config/migrations-and-locks:lock-atomic-save - atomic temp-file+rename write site; proof in manifest_test.go
Types ¶
type AuthorityState ¶ added in v0.22.0
type AuthorityState uint8
AuthorityState distinguishes the frozen bridge input from ordinary locks.
const ( AuthorityBridge AuthorityState = iota + 1 AuthorityPermanent )
type BridgeAttestation ¶ added in v0.18.0
type BridgeAttestation struct {
Version int `json:"version"`
PreparedHead string `json:"preparedHead"`
TreeDigest string `json:"treeDigest"`
ADRFormatV1From int `json:"adrFormatV1From"`
LegacyADRGaps []int `json:"legacyADRGaps"`
}
BridgeAttestation preserves version-1 bridge bytes as frozen compatibility input. Its historical routing payload is never promoted into a Lock.
type Entry ¶
type Entry struct {
TemplateID string `json:"templateId"`
TemplateHash string `json:"templateHash"`
ConfigHash string `json:"configHash"`
OutputHash string `json:"outputHash"`
// RegenChecked marks an entry whose drift is checked by regeneration rather
// than by the frozen OutputHash: generated indexes and navigation plus
// in-place-editable files. Omitted when false so a plain entry's
// serialization is unchanged.
RegenChecked bool `json:"regenChecked,omitempty"`
}
type Lock ¶
type Lock struct {
AWFVersion string `json:"awfVersion"`
SchemaVersion int `json:"schemaVersion"`
Files map[string]Entry `json:"files"`
BridgeAttestation *BridgeAttestation `json:"bridgeAttestation,omitempty"`
InitializedWithVersion string `json:"initializedWithVersion,omitempty"`
}
func Parse ¶ added in v0.22.0
Parse accepts retired routing keys only in schema 30 and earlier, where it discards them. Schema 31 seals their retirement by refusing their presence.
func (*Lock) AuthorityState ¶ added in v0.22.0
func (l *Lock) AuthorityState() (AuthorityState, error)
AuthorityState validates the one still-active immutable lock value. Historical routing fields are compatibility input only and are discarded by Parse.