Expand description
ExportSpec — what an ephemeral Process is allowed to leave behind.
The compounding move: ephemeral envs default to leaving nothing
behind. Anything that must survive teardown is named explicitly via
one or more ExportSpecs on :lifetime (:ephemeral … :exports …).
Each export declares:
- what artifact to ship out (a
ArtifactSourcevariant) - where to ship it through (a
VectorChannelvariant — Vector ingest endpoint, NATS JetStream subject, or stdout) - when to ship it (an
ExportTriggervariant)
The pleme-io convention is that everything emitted from a
workload flows through the Vector + NATS layer, never to ad-hoc
sinks. VectorChannel enforces that at the type level — there is
no S3Bucket or RawFileSystem variant. Vector’s downstream
sink graph (file, VictoriaLogs, VictoriaMetrics, Loki, …) handles
durability + analytics; this primitive only names the ingestion
shape.
The reconciler’s Releasing phase (between Attested/Failed and
Exiting) reads lifetime.ephemeral.exports, filters by
ExportTrigger against the terminal phase, and emits one
tatara-export-worker Job per surviving spec. Each Job emits a
receipt of its own export action so the export itself participates
in the BLAKE3 attestation chain.
Lisp authoring:
(defephemeral akeyless-closed-loop-attest
:aplicacao (…)
:ttl "1h"
:teardown OnAttested
:exports
(;; Receipts — tier-1 guaranteed delivery via NATS JetStream
(:source (:receipts)
:channel (:nats-subject :subject "pleme.pleme-dev.ephemeral.{{run_id}}.receipt"
:stream "EPHEMERAL_RECEIPTS")
:when OnAttested)
;; Test report — best-effort via Vector HTTP ingest
(:source (:test-report :configmap "akeyless-test-results"
:key "junit.xml"
:format Junit)
:channel (:http-event :signal-type "test-report")
:when Always)
;; Run marker — small synthetic event for shinryu cohort math
(:source (:run-marker :labels (:run-id "{{run_id}}"
:phase "end"))
:channel (:http-event :signal-type "ephemeral-marker")
:when Always)))Structs§
- Artifact
Source - What artifact this export ships out.
- Export
Spec - One declared export from an ephemeral Process.
- Http
Event Channel - HTTP POST channel — Vector
http_serversource. - Nats
Subject Channel - NATS JetStream channel — guaranteed-delivery publish.
- Process
Snapshot Source - Process snapshot source — bundles spec + status as JSON.
- Receipts
Source - Receipts source — no fields. The worker reads every
ReceiptEnvelopeannotated with this Process’s PID. - RunMarker
Source - Run marker source — small synthetic event with labels.
- Stdout
Channel - Stdout channel — worker prints the event; Vector picks up via
kubernetes_logs. - Test
Report Source - Test report source — a ConfigMap key with optional format hint.
- Unknown
Artifact Kind - Unknown
Channel Kind - Unknown
Export Trigger - Unknown
Report Format - Vector
Channel - Where the export bytes flow.
Enums§
- Artifact
Error - Artifact
Kind - Closed-set discriminator over
ArtifactSource’s four tagged-union slots. Single source of truth that drivesArtifactSource::variant’s ambiguity + emptiness resolver, theArtifactError::Emptymessage, and the reverseArtifactVariant::kindprojection. Adding a fifth artifact variant lands at oneALLentry + oneas_strarm + oneselectarm + oneArtifactVariant::kindarm — exhaustively checked by the compiler. - Artifact
Variant - Resolved enum view used by the worker.
- Channel
Error - Channel
Kind - Closed-set discriminator over
VectorChannel’s three tagged-union slots. Single source of truth that drivesVectorChannel::variant’s ambiguity + emptiness resolver, theChannelError::Emptymessage, and the reverseChannelVariant::kindprojection. Adding a fourth channel variant lands at oneALLentry + oneas_strarm + oneselectarm + oneChannelVariant::kindarm — exhaustively checked by the compiler. - Channel
Variant - Export
Trigger - When the export fires. Aligns with
ProcessPhaseso the reconciler’sReleasingphase can match against the terminal phase reached directly. - Report
Format - Bytes-shape hint for
TestReportSource. Tatara emits the bytes untransformed and tags the Vector event with this so shinryu can route to the right parser tier. - Report
Payload Shape - How the export worker should embed a
TestReportSource’s bytes into the shippedExportEvent.payload. Lifted as a closed-set typed projection fromReportFormat::payload_shapeso the worker’s dispatch is exhaustive onReportPayloadShape, not onReportFormatwith a silent_arm. Adding a futureReportFormatvariant forces the author to pick its shape here (single edit site); adding a future shape (e.g. compressed) forces every consumer to handle it.
Constants§
- DEFAULT_
NATS_ URL - Default NATS URL when
NatsSubjectChannel.urlis unset. - DEFAULT_
VECTOR_ INGEST - Default Vector ingest endpoint when
HttpEventChannel.endpointis unset. Single source of truth for downstream tooling.