Documentation
¶
Overview ¶
Package feedback implements local journaling and opt-in upstream POST for the `vers feedback` command (F18 Phase A).
Storage is an append-only JSONL file at ~/.vers/feedback.jsonl by default. Upstream delivery is opt-in via the VERS_FEEDBACK_ENDPOINT env var; when set, each new entry is POSTed best-effort with a 5s timeout.
Index ¶
Constants ¶
const EndpointEnvVar = "VERS_FEEDBACK_ENDPOINT"
EndpointEnvVar is the env var used to enable upstream POST.
const PathEnvVar = "VERS_FEEDBACK_PATH"
PathEnvVar overrides the default journal path. Primarily for tests.
Variables ¶
This section is empty.
Functions ¶
func Append ¶
Append writes an entry as a single JSON line to path, creating parent directories as needed.
func DefaultPath ¶
DefaultPath returns the default journal path (~/.vers/feedback.jsonl), honoring VERS_FEEDBACK_PATH when set.
func NewID ¶
NewID returns a short random base32 identifier (10 chars, lowercase, no padding). Used as the entry id.
func PostUpstream ¶
PostUpstream POSTs the entry payload to endpoint as application/json with a 5s timeout. It returns the HTTP status code on success. On any failure (transport, non-2xx) it returns a non-nil error along with the status code (0 if the request never completed).