Documentation
¶
Overview ¶
Package scale is the installation-shaped fixture the scale budgets run on: 87 MCPServers (84 of them session-authenticated, in five families with an instanceArg, on 28 installations; three in-house servers without authentication), 18 distinct capability documents shared by the family members, 282 workflows referencing their tools, and 450 sessions each authenticated to every session-authenticated server -- the shape of a production installation, with every name invented.
The generator is the source of truth (Fixture); the committed YAML files are its rendering for the test harness (pre_configuration.yaml, loaded by `pre_configuration.fixture: scale`) and for review (sessions.yaml). `go generate ./internal/testing/fixtures/scale/` rewrites both; a test fails when they drift from the generator.
Nothing in the fixture comes from an installation: installations are named after minerals, hostnames end in .invalid, tool names are generic verbs over the family's nouns, workflow names are verb-object-qualifier combinations, people are numbered.
Index ¶
- Constants
- Variables
- func ExposedToolName(s Server, tool string) string
- func RenderPreConfiguration(f *Fixture) ([]byte, error)
- func RenderSessions(f *Fixture) ([]byte, error)
- type Arg
- type Document
- type Fixture
- type Property
- type Server
- type Session
- type Shape
- type Step
- type StepArg
- type Tool
- type Workflow
Constants ¶
const Name = "scale"
Name is the fixture's name in pre_configuration.fixture.
Variables ¶
var PreConfigurationYAML []byte
PreConfigurationYAML is the fixture rendered as the harness's pre_configuration fragment (RenderPreConfiguration), what `pre_configuration.fixture: scale` loads.
var SessionsYAML []byte
SessionsYAML is the fixture's session records (RenderSessions).
Functions ¶
func ExposedToolName ¶
ExposedToolName is exposedToolName for callers outside the package.
func RenderPreConfiguration ¶
RenderPreConfiguration renders the fixture as the pre_configuration fragment the harness loads through `pre_configuration.fixture: scale`: the two mock authorization servers, the broker trusting the fleet issuer, every server as a mock with its tools, every workflow. The capability documents are written once under `documents` and referenced by YAML alias from the servers that offer them, so the file is proportional to the distinct documents, like the store the fixture is about.
func RenderSessions ¶
RenderSessions renders the session records.
Types ¶
type Fixture ¶
type Fixture struct {
// Servers are the MCPServer definitions, in-house servers last.
Servers []Server
// Documents are the distinct capability documents (tool lists) the
// session-authenticated servers offer; a family member points at one by
// name. Sessions reference them, never copy them.
Documents []Document
// Workflows reference the servers' tools.
Workflows []Workflow
// Sessions are the session records: every session is authenticated to
// every session-authenticated server.
Sessions []Session
// MusterOAuthServer names the mock authorization server that is muster's
// own and whose provider tokens the SSO backends trust. FleetIssuer is a
// separate trusted issuer for workload authentication tests.
MusterOAuthServer, FleetIssuer string
}
Fixture is the typed fixture: what the generator produces and what the budgets in internal/aggregator run on. The harness reads the same shape from its YAML rendering.
func Get ¶
func Get() *Fixture
Get returns the fixture, generated once per process. The generator is deterministic: the same shape and seed give the same fixture, and the committed YAML is its rendering (TestFixtureFilesAreCurrent proves it).
func (*Fixture) DocumentByName ¶
DocumentByName returns the named document.
func (*Fixture) SessionAuthServers ¶
SessionAuthServers returns the servers that require per-session authentication -- the ones every session of the fixture is authenticated to.
type Property ¶
type Property struct {
Name, Description string
}
Property is one input schema property.
type Server ¶
type Server struct {
Name string
// Installation the server runs on; empty for an in-house server.
Installation string
// Family and InstanceArg group the server with its siblings on the other
// installations; empty for an in-house server.
Family, InstanceArg string
// Document names the capability document the server offers.
Document string
// SessionAuth: the server requires per-session authentication (a
// forwardToken server here); false for an in-house server whose tools
// every session sees.
SessionAuth bool
}
Server is one MCPServer definition.
type Shape ¶
type Shape struct {
Servers, SessionAuthServers, Families, Installations int
// Documents counts every distinct tool list; SessionDocuments the ones
// the session-authenticated servers offer -- what the capability store
// holds, once each, for every session.
Documents, SessionDocuments int
Workflows, Sessions int
}
Shape is the fixture's headline numbers, for reports and assertions.
type Step ¶
type Step struct {
ID string
Tool string
// Args are the step's arguments in declaration order (values may be
// templates over the workflow's input).
Args []StepArg
}
Step is one workflow step.
type Tool ¶
type Tool struct {
Name string
Description string
// Properties are the tool's input schema properties, name -> description;
// every property is a string.
Properties []Property
// Required lists the required properties.
Required []string
// ReadOnly is the tool's readOnlyHint annotation.
ReadOnly bool
}
Tool is one tool of a document.
Directories
¶
| Path | Synopsis |
|---|---|
|
Command gen rewrites the scale fixture's YAML files from the generator, so `go generate ./internal/testing/fixtures/scale/` is the one way to change the committed fixture.
|
Command gen rewrites the scale fixture's YAML files from the generator, so `go generate ./internal/testing/fixtures/scale/` is the one way to change the committed fixture. |