testgrid

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2026 License: Apache-2.0 Imports: 11 Imported by: 1 module, 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 testgrid maps a recipe's canonical coordinate to the AICR evidence dashboard (validation.aicr.run) and answers "does this coordinate have a dashboard presence?" — the two facts RQ1 (#1283) and RQ2 (#1284) share.

It is deliberately thin and owns no mapping of its own: the recipe → coordinate mapping is pkg/recipe.CoordinateFor — the criteria-only base coordinate; profile-bearing recipes' live dashboard routes append the lowercase "-<name>-<value>" segment to the tab (LivePaths reports the suffixed form; the criteria-only Health link generator therefore keeps profiled families' cells pending until profile-aware links land) — consumed by GP4/GP5/TG2/RQ1). testgrid only adds the dashboard host, the hash-routed deep-link scheme built around Coordinate.Path, and the committed presence manifest.

Two presence sources, one spelling of a coordinate path:

  • Committed (hermetic): presence.yaml, embedded here and read offline by the recipe-health generator so link *construction* never touches the network. LoadPresence exposes it as a Presence set.
  • Live: the published data/index.json the dashboard renderer boots from. LivePaths extracts the present coordinate paths from a parsed index so the warning-only link-check bot can compare the committed links against what the dashboard actually serves.

Index

Constants

View Source
const DataURL = Origin + "/data/index.json"

DataURL is the published boot payload the dashboard renderer fetches on load (index.json under the site's data/ directory). It is the same-origin data source the warning-only link-check bot reads to learn which coordinates the live dashboard actually serves — the hash fragment in a deep-link is client side only, so a GET on the fragment URL cannot reveal coordinate presence.

View Source
const Origin = "https://validation.aicr.run"

Origin is the AICR evidence dashboard's public origin. It is the single pinned host every consumer builds links against and the link-check bot pins its resolution to; a coordinate path is appended to it, never interpolated from recipe/overlay content, so the target can never be steered off-origin.

Variables

This section is empty.

Functions

func LinkFor

func LinkFor(co recipe.Coordinate) string

LinkFor returns the dashboard deep-link for a coordinate: the pinned Origin plus the hash route for the coordinate's canonical path. Construction is pure and offline — the same coordinate always yields the same byte-stable link — so the recipe-health generator stays hermetic.

func LivePaths

func LivePaths(idx *corroborate.Index) map[string]struct{}

LivePaths extracts the set of coordinate paths present in a parsed dashboard index. It reuses pkg/recipe.CoordinateFor as the single source of truth for how a coordinate path is spelled, so the live and committed sides can never drift on path formatting. A tab whose coordinate does not resolve to a concrete path (an "any"/empty required dimension the dashboard should never emit) is skipped rather than mis-placed.

Types

type Presence

type Presence struct {
	// contains filtered or unexported fields
}

Presence is the committed set of coordinate paths that currently carry a dashboard presence. It answers Has(coordinate) for the generator and exposes its Paths for the link-check bot.

func LoadPresence

func LoadPresence() (*Presence, error)

LoadPresence parses the embedded presence manifest. It fails closed on a malformed manifest or a malformed coordinate path rather than silently treating a broken file as "nothing is present", which would drop every Evidence link without warning. The decoder is strict (KnownFields) and an absent or empty `coordinates` list is rejected, so a typo such as `coordinate:` cannot load an empty presence set and make the whole matrix fall back to `pending`.

func (*Presence) Has

func (p *Presence) Has(co recipe.Coordinate) bool

Has reports whether the coordinate has a committed dashboard presence.

func (*Presence) Paths

func (p *Presence) Paths() []string

Paths returns the committed coordinate paths, sorted, for deterministic iteration by the link-check bot.

Jump to

Keyboard shortcuts

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