Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var PathToOpRE = regexp.MustCompile(`OPS/(?P<stack>(?:\$boot)|(?:\$service(?:\/\$slot)*)).*?/?(?P<scope>\d+)\D*\/(?P<file>(?:resonator.txcl))$`)
Functions ¶
func MetaFromContext ¶
MetaFromContext returns the meta string set by WithMeta, or "" if none was attached. Empty return is safe to gjson.Get against.
Types ¶
type Operation ¶
type Operation struct {
Input string `json:"input,omitempty"`
Output string `json:"output,omitempty"`
Service string `json:"service,omitempty"`
Slot string `json:"slot,omitempty"`
Stack string `json:"stack,omitempty"`
Scope int `json:"scope,omitempty"`
Name string `json:"name,omitempty"` // filename-derived identity within (stack, scope); empty for legacy rules
Txcl string `json:"txcl,omitempty"`
MockRes string `json:"mockRes,omitempty"`
MockReq string `json:"mockReq,omitempty"`
Resonator *resonator.Resonator
Meta string `json:"meta,omitempty"`
OpID string `json:"opId,omitempty"` // unique ID for this Operation
// FullInput is the pre-projection envelope view, set by the
// processor's SELECT block only when a SELECT projected Input
// down to its assignments. In-memory only (json:"-"): stored
// continuation records persist Input (the dispatched view), and
// resumed ops recompute the projection through ResonatingOps, so
// FullInput never needs to survive suspension. Read via
// EnvelopeView() by chassis-internal consumers (mock selection,
// EMIT/TTL resolution, mcp debug) that must see the whole
// envelope regardless of projection.
FullInput string `json:"-"`
// Secrets holds materialized secret cleartext for this op
// instance. The field is tagged `json:"-"` AND its type's
// MarshalJSON / MarshalText / GobEncode all panic, so cleartext
// cannot reach any envelope, trace, log, mock, or continuation
// by construction (internal docs/todo-secret-store.md §4.1).
//
// Populated by the processor (PR 3) between WHEN/SET/SELECT/WITH
// decoration and Exec; zeroed via defer on every exit path. Read
// directly by secret-aware op handlers as op.Secrets.Get(NAME);
// handlers never call the Resolver or Store themselves.
Secrets secrets.SecretBag `json:"-"`
}
func PathToOperation ¶
func (*Operation) Copy ¶
Copy Create a shallow copy of the Operation, forcing a new OpID.
Secrets bag is shared by reference (SecretBag's internal map is not deep-copied). Copy() is called within a single request scope to spawn a new execution instance; the copy and the original both see the same materialized cleartext, and the processor's deferred Zero() wipes both views in one call. Sharing is correct here.
func (*Operation) EnvelopeView ¶ added in v0.2.24
EnvelopeView returns the full pre-projection envelope when a SELECT projected op.Input, else op.Input. Chassis-internal reads of envelope control state (`_txc.mocks`, `_txc.ttl`, `_txc._debug`, EMIT value resolution) go through this so a SELECT-narrowed wire view doesn't disable them; transports dispatch op.Input directly — the projection IS the wire contract.