Documentation
¶
Overview ¶
Package commitattribution retains session-owned Git hook observations beyond the lifetime of the live session tracker. Pushes are context; only a post-commit observation establishes commit creation.
Index ¶
Constants ¶
const Commit = "commit"
const Push = "push"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Observation ¶
type Observation struct {
Repository string `json:"repository"`
CommitSHA string `json:"commit"`
Agent string `json:"agent"`
SessionID string `json:"session"`
Kind string `json:"kind"`
EventID string `json:"event"`
At time.Time `json:"at"`
}
Observation records the session identified by a Git hook's process ancestry. Repository includes the GitHub host for enterprise repositories. No local paths or conversation text are retained.
type Store ¶
type Store struct{ Path string }
Store uses the shared application database. The empty Path selects its default location. Reads never create a database, and records have no TTL.
func (*Store) Lookup ¶
Lookup reads observations of exactly these commits, scoped to repositories named by the clone's remotes. Missing application state is an empty result.
func (*Store) Record ¶
func (s *Store) Record(observations []Observation) error
Record merges observations idempotently under SQLite's write transaction. A failed write leaves the prior records available for retry.