rehearse

package
v0.45.0 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package rehearse is the rehearse-report ingestion adapter: it reads `.specscore/rehearse/latest.json` from the repo and emits `verified-behavior` facts — one `verified-by` and one `has-verification-status` pair for every scenario–AC combination whose status is `pass` or `fail`.

Feature: cli/rehearse/evidence (REQ: adapter-rehearse, REQ: verification-facts, REQ: verified-behavior-class, REQ: observed-at-run-time)

Subjects are emitted repo-relative (`#<verifies-entry>`, e.g. `#x#ac:y`); the pipeline prefixes them with the workspace-scoped repo slug. Scenarios with status `skipped` or `no-steps`, or with an empty `verifies` list, emit no facts. A missing report file is silent; an unreadable or unparsable file emits one warning (REQ: partial-tolerance).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

type Adapter struct{}

Adapter is the rehearse-report ingestion adapter. The zero value is ready to use.

func New

func New() Adapter

New returns the adapter.

func (Adapter) ID

func (Adapter) ID() string

ID returns the stable adapter id stamped into every emitted fact.

func (Adapter) Ingest

func (Adapter) Ingest(repoPath string) ([]fact.Fact, []fact.Warning)

Ingest reads the rehearse report at <repoPath>/.specscore/rehearse/latest.json and emits two facts per scenario–AC pair for pass/fail scenarios:

  1. subject `#<verifies-entry>`, predicate `verified-by`, object = scenario file
  2. subject `#<verifies-entry>`, predicate `has-verification-status`, object = status

A missing report is silently ignored. An unreadable or unparsable report produces one warning and no facts (REQ: partial-tolerance).

func (Adapter) Version

func (Adapter) Version() string

Version returns the adapter version stamped into every emitted fact.

Jump to

Keyboard shortcuts

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