claims

package
v0.5.8 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package claims holds a checkpoint's testimony up against what the host saw happen in the same session.

A checkpoint's verified and failed fields are an agent's own word, written as its context runs out, and the next agent builds on verified and will not re-try what failed names. Both go wrong in a way prose cannot show: a verified line naming a test that was never run reads exactly like one that was, and an empty failed after an hour of red builds reads exactly like a session where everything worked. The activity log is the one record here the agent did not choose to write, so it is the thing to check against.

Nothing here refuses a checkpoint. A claim the log cannot support is marked, and an empty failed is questioned, because a checkpoint is written when there is no context left to argue with.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MarkQuestioned

func MarkQuestioned(vault, project, session string) error

MarkQuestioned records that session's empty failed was asked about.

func Passed

func Passed(verify string, events []activity.Event, session string, after int64) bool

Passed reports whether a procedure's verify ran without failing in session at or after after, the time the procedure was shown. Every command of the verify must have run, matched as the log keeps commands — program and first argument — so "go test ./internal/auth" is met by any passing go test: the log keeps no more of a command line than that, and a verify the session never ran is what this exists to tell apart. A cd only says where the rest ran, so it is not asked for.

It is each command's last run that counts: a verify that passed and then failed is one that fails now.

Types

type Report

type Report struct {
	// Session is the log's id for the session checked, or "" when the log
	// holds nothing for this project and so nothing was checked.
	Session string
	// Unseen is the verified lines that name a command this session's log
	// never ran, in the order given.
	Unseen []string
	// Failures is the session's failing shell commands, oldest first.
	Failures []string
	// Questioned is whether this session's empty failed was already asked about.
	Questioned bool
}

Report is what the log says about one checkpoint's claims.

func Check

func Check(vault, project string, verified []string) (Report, error)

Check reads the activity log and holds verified up against the session that is checkpointing on project: the one that logged last for it, within fresh. Two agents on one project at once can be told apart only by the host, which is the limit mcpserver's hostSession lives with too. Recording off, no log, or no recent session is a Report with no Session: a log that was not kept cannot say a command did not run.

Jump to

Keyboard shortcuts

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