Documentation
¶
Overview ¶
Package architecture makes interaction-architecture experiments explicit.
Cascade, Omni, and duplex are not model species here. A cell is the resolved composition of independently selected ownership and capabilities plus the identities of the components that produced it. The P/T/C/N level is a treatment label; validation and pairing use the complete structure.
Index ¶
- Constants
- func ReadStatus(path string) (binding.Status, error)
- func WriteCell(path string, cell Cell) error
- func WriteManifest(path string, manifest Manifest) error
- type ActHandoff
- type Architecture
- type Availability
- type Cell
- type Claim
- type Comparison
- type EvidenceIdentity
- type EvidenceSource
- type InteractionIdentity
- type Level
- type Manifest
- type ModelIdentity
- type Observation
- type Pins
- type ProtocolIdentity
- type Result
Constants ¶
const ManifestVersion = 4
const PinsVersion = 2
const ResultVersion = 4
Variables ¶
This section is empty.
Functions ¶
func ReadStatus ¶
ReadStatus strictly reads a post-handshake runtime status captured through the protocol rather than reconstructed from launch flags.
func WriteManifest ¶
WriteManifest writes a validated experiment manifest.
Types ¶
type ActHandoff ¶
type ActHandoff string
ActHandoff says how a selected act reaches the machinery that performs it.
const ( HandoffNone ActHandoff = "none" HandoffDirect ActHandoff = "direct" HandoffTyped ActHandoff = "typed" HandoffTranslated ActHandoff = "translated" )
type Architecture ¶
type Architecture struct {
// Definition is the immutable project-level architecture revision this
// deployment realises. The rest of the fields bind that structural
// definition to exact models, adapters, policies, and experimental evidence.
Definition projectarch.Definition `json:"definition"`
Level Level `json:"level"`
RuntimeBinding string `json:"runtime_binding"`
Profile string `json:"profile"`
Foreground ModelIdentity `json:"foreground"`
Perception ModelIdentity `json:"perception,omitempty"`
Speech ModelIdentity `json:"speech,omitempty"`
SpeakerIdentity ModelIdentity `json:"speaker_identity,omitempty"`
VisualNarrator ModelIdentity `json:"visual_narrator,omitempty"`
Slow ModelIdentity `json:"slow"`
Ownership binding.Ownership `json:"ownership"`
Capabilities binding.StackCapabilities `json:"capabilities"`
Policies interaction.Report `json:"policies"`
Observers []string `json:"observers"`
Interaction InteractionIdentity `json:"interaction"`
ToolAuthority binding.ToolStatus `json:"tool_authority"`
}
Architecture is one fully resolved composition. RuntimeBinding is only an evidence label; no behavior is inferred from it.
func (Architecture) Validate ¶
func (architecture Architecture) Validate() error
Validate checks one resolved architecture from first principles.
type Availability ¶
type Availability string
Availability distinguishes a runnable cell from a desired cell whose model boundary cannot currently realize the declared selection. Keeping the latter in the manifest prevents the experiment matrix from silently shrinking to whatever happened to work.
const ( AvailabilityRunnable Availability = "runnable" )
type Cell ¶
type Cell struct {
Name string `json:"name"`
Availability Availability `json:"availability"`
Architecture Architecture `json:"architecture"`
// Execution is independent of the P/T/C/N architecture description. It
// proves which executable graph realised that description for benchmark
// tasks, rather than treating a binding label as execution evidence.
Execution bench.ExecutionRequirement `json:"execution,omitzero"`
}
Cell names one architecture in an experiment manifest.
func BuildCell ¶
func BuildCell( name string, definition projectarch.Definition, status binding.Status, pins Pins, ) (Cell, error)
BuildCell combines one immutable architecture definition, one live status, and one immutable deployment pin set. No source is allowed to stand in for another: definitions provide structure, status provides negotiated reality, and pins provide artifact identities.
func (Cell) MeasurementCell ¶
MeasurementCell is the compact cell used by the generic benchmark report. The architecture artifact carries the structure this F52 level cannot.
type Comparison ¶
type Comparison struct {
Measurement bench.Comparison `json:"measurement"`
Claim Claim `json:"claim,omitempty"`
Reportable bool `json:"reportable"`
Differences []string `json:"non_treatment_differences,omitempty"`
Refusal string `json:"refusal,omitempty"`
}
Comparison distinguishes a controlled architecture ablation from a useful but confounded system comparison.
func Pair ¶
func Pair(baseline, variant Result) Comparison
Pair compares two architecture results. P/T, T/C, and T/N count as architecture evidence only when every non-treatment field is identical.
type EvidenceIdentity ¶
type EvidenceIdentity struct {
Source EvidenceSource `json:"source"`
Capabilities binding.InteractionEvidenceCapabilities `json:"capabilities"`
Recognizer ModelIdentity `json:"recognizer,omitempty"`
}
EvidenceIdentity describes what the interaction policy sees. Source names the broad representation for compatibility; Capabilities is the exact selected vector and is the experiment authority. Recognizer is required for transcript evidence and absent for native multimodal evidence.
type EvidenceSource ¶
type EvidenceSource string
EvidenceSource names the representation available to the interaction decider. It is deliberately not inferred from the model name.
const ( EvidenceAcousticPredicates EvidenceSource = "acoustic-predicates" EvidenceTranscript EvidenceSource = "transcript" EvidenceNativeMultimodal EvidenceSource = "native-multimodal" )
type InteractionIdentity ¶
type InteractionIdentity struct {
PolicyName string `json:"policy_name,omitempty"`
Model ModelIdentity `json:"model,omitempty"`
InstructionRevision string `json:"instruction_revision,omitempty"`
DecisionTimeoutMS int `json:"decision_timeout_ms,omitempty"`
Evidence EvidenceIdentity `json:"evidence"`
Protocol ProtocolIdentity `json:"protocol"`
NativeSuppressionContract string `json:"native_suppression_contract,omitempty"`
Control binding.InteractionControl `json:"control"`
}
InteractionIdentity is every treatment-specific detail needed to reproduce the selection. PolicyName is the live interaction.Report spelling; Model is the endpoint identity behind it.
type Level ¶
type Level string
Level names the interaction treatment, not the foreground model family. C is an explicit composition of P and T with one arbitration contract; it is not a fourth model species.
type Manifest ¶
type Manifest struct {
Version int `json:"version"`
Name string `json:"name"`
Suite string `json:"suite"`
FixtureRevision string `json:"fixture_revision"`
Cells []Cell `json:"cells"`
}
Manifest is a versioned experiment definition shared by every cell in a controlled comparison.
type ModelIdentity ¶
type ModelIdentity struct {
Provider string `json:"provider"`
Model string `json:"model"`
Revision string `json:"revision"`
AdapterRevision string `json:"adapter_revision,omitempty"`
RuntimeID string `json:"runtime_id,omitempty"`
}
ModelIdentity is an immutable identity, plus the spelling a live runtime uses when that spelling is not simply provider/model.
type Observation ¶
Observation binds one task to the runtime status negotiated for its live session. Intended configuration and observed configuration are retained separately so a label cannot substitute for what actually ran.
type Pins ¶
type Pins struct {
Version int `json:"version"`
Foreground ModelIdentity `json:"foreground"`
Perception ModelIdentity `json:"perception,omitempty"`
Speech ModelIdentity `json:"speech,omitempty"`
Slow ModelIdentity `json:"slow"`
InteractionPolicy ModelIdentity `json:"interaction_policy,omitempty"`
InteractionRecognizer ModelIdentity `json:"interaction_recognizer,omitempty"`
SpeakerIdentity ModelIdentity `json:"speaker_identity,omitempty"`
VisualNarrator ModelIdentity `json:"visual_narrator,omitempty"`
InstructionRevision string `json:"interaction_instruction_revision,omitempty"`
}
Pins supplies immutable deployment identities that a live protocol status cannot discover honestly. It contains no endpoint, credential, or launch option: status remains authoritative for what ran, while pins identify the model and instruction artifacts behind those runtime spellings.
type ProtocolIdentity ¶
type ProtocolIdentity struct {
Transport string `json:"transport"`
Version int `json:"version,omitempty"`
Handoff ActHandoff `json:"handoff"`
}
ProtocolIdentity describes the control boundary. Transport is "in-process" when no process boundary exists and "sidecar" when acts cross one.
type Result ¶
type Result struct {
Version int `json:"version"`
Experiment string `json:"experiment"`
ManifestID string `json:"manifest_id"`
FixtureRevision string `json:"fixture_revision"`
Cell Cell `json:"architecture_cell"`
Measurement bench.Result `json:"measurement"`
Observed []Observation `json:"observed"`
Records []json.RawMessage `json:"records,omitempty"`
}
Result is a scenario/benchmark cell plus its structured architecture identity and raw suite records.
func ReadResult ¶
ReadResult decodes an artifact without treating a refusal as a parse error. A partial, dirty-tree, or immediately preceding schema run must remain inspectable; Reportable and Pair are the authorities on which claims it may support. Version 2 predates exact evidence vectors and can never become reportable under current rules, but rejecting it at read time would erase the diagnostic history which motivated those rules. Version 3 added exact evidence but predates exact controller/arbitration attestation, so it is likewise inspectable and non-reportable under version 4.
func (*Result) Finish ¶
func (result *Result) Finish()
Finish derives the generic benchmark summary.
func (Result) Reportable ¶
Reportable enforces both the generic benchmark rules and architecture attestation for every expected task.