Skip to main content

Module git_notes

Module git_notes 

Source
Expand description

Git notes attached at refs/notes/heddle carry Heddle state metadata (change_id, agent, confidence, status) without polluting the commit message — and so without changing the commit SHA.

This is the “fallback channel” half of the Phase B identity model. The primary channel is the bridge-mapping.json sidecar; notes are consulted when the sidecar is missing or empty (e.g., a developer ran git clone <url> of a heddle-exported repo without copying the heddle dir).

gix v0.80 has no high-level notes API; we hand-roll the standard tree layout (entry name = full 40-hex commit SHA, entry blob = serialized JSON) using the same primitives the rest of the bridge already relies on (write_blob, edit_tree, new_commit_as, set_reference).

Structs§

HeddleNote
JSON payload stored inside each note blob.
NoteAgent
NoteAttribution
OmittedBreakdown
Per-scope omitted-annotation counts emitted alongside refs/notes/heddle.
SignalCounts
Per-module risk-signal fire counts on this state.

Constants§

NOTES_REF
The notes ref heddle uses. Standard git notes --ref=heddle reads from this location, and git log --notes=heddle displays them inline.

Functions§

read_all_notes
Read every (commit_oid → note) entry under refs/notes/heddle. Used by the import path’s identity-recovery scan.
read_note
Look up the note attached to commit_oid, if any.
write_note
Attach note to commit_oid in repo under refs/notes/heddle.