Implement RuntimeInstallReceipt emission for runtime install/update flows#25
Draft
Implement RuntimeInstallReceipt emission for runtime install/update flows#25
Conversation
…lows Agent-Logs-Url: https://github.com/SourceOS-Linux/agent-machine/sessions/8c94ac85-6722-473e-8277-be860a20533e Co-authored-by: mdheller <21163552+mdheller@users.noreply.github.com>
Agent-Logs-Url: https://github.com/SourceOS-Linux/agent-machine/sessions/8c94ac85-6722-473e-8277-be860a20533e Co-authored-by: mdheller <21163552+mdheller@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add RuntimeInstallReceipt emission for install/update flows
Implement RuntimeInstallReceipt emission for runtime install/update flows
May 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes the runtime-install observability gap: agent-machine had no structured receipt type for runtime installation lifecycle transitions. This adds
RuntimeInstallReceiptemission covering all 10 install states with artifact verification, policy decision linkage, rollback tracking, and compact log references.Schema
contracts/runtime-install-receipt.schema.json— copied verbatim fromSourceOS-Linux/sourceos-spec(commit5e3ba19d); no local fork, no drift risksrc/agent_machine/contracts.py— registersRuntimeInstallReceiptinschema_by_kind(); extendsvalidate_by_kind()to accepttypeas fallback tokind(upstream spec usestype, local schemas usekind)Emission module
src/agent_machine/runtime_install_receipt.py:Semantic invariants enforced beyond JSON Schema:
failed | partial | denied | deferred→failureReasonrequiredrolled_back→rollbackRefrequiredinstalled→failureReasonmust be absentevidenceRefsmust be non-emptyExamples
Six canonical fixtures in
examples/runtime-install-receipt.*.json:installStateinstalledinstalledfailedfaileddenieddeniedpartialpartialrolled_backrolled_backdeferreddeferredValidation
scripts/validate-runtime-install-receipts.py— validates all six examples, compact log output, and semantic rejection casesMakefile—validate-runtime-install-receiptsadded to top-levelvalidatetarget