evidence

package
v0.0.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 26, 2026 License: Apache-2.0 Imports: 14 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package evidence is the engine's record of engineering evidence: a durable poll that observes version control, and the forge when there is one, and keeps each fact once in the store, with the facts' retention and their reads. The poll's timer only writes an intent; the intent reads the repo and the forge with no transaction open, and its Record stores the facts and moves the watermark in the transaction that marks it done, so a kill at any moment loses nothing and doubles nothing. Facts are observed, never reported, and hold no weight (design 05 section 6.5). The engine polls at once on open, every 5 minutes while a pursuit is active and daily otherwise, and backs off from a forge that fails.

Index

Constants

View Source
const (
	PollKind   = "evidence.poll"
	PollKey    = "poll"
	ExpireKind = "evidence.expire"
	ExpireKey  = "retention"
)

The kinds this package registers, and the keys of its timers.

Variables

This section is empty.

Functions

func List

func List(ctx context.Context, s work.Submitter, f Filter) ([]observe.Fact, error)

List returns the stored facts that match f, newest first, as a command that writes nothing, the way work's reads run.

func Options

func Options(newForge func(root string) forge.Forge) (timers []state.TimerKind, intents []state.IntentKind)

Options returns the timer and intent kinds of the evidence poll, to pass in state.Options. newForge gives the forge of a repo root; nil, or a forge that cannot list merged PRs, means version control only.

func Wake

func Wake(ctx context.Context, s work.Submitter) error

Wake makes the poll due now, as one command. When this engine does not register the poll there is no timer to move, and Wake does nothing.

Types

type Filter

type Filter struct {
	Capability, Pursuit string
	Limit               int
}

Filter narrows List to one capability or one pursuit, or both; empty is any. Limit is clamped to 1..500, and 0 is 50.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL