outcome-record: add the broker-required coarse outcome field - #11
Merged
Merged
Conversation
The broker's RECORD_SCHEMA marks operation and outcome REQUIRED; a record missing either is schema_invalid at write_outcome (the Part B finding was a missing outcome). .outcome_record() now derives a coarse outcome -- ok for a success status (ok/no_op), error for every closed failure/refusal -- while the detailed per-package result stays in observed. .validate_record() enforces the required pair locally so a future omission fails hermetically, not only in the VM.
Contributor
Author
|
Part B authoritative run 4: 68/68 (matrix 23/23) on a real broker/polkit. Per the agreed sequence this coarse- |
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.
The broker's
RECORD_SCHEMAmarksoperationandoutcomeREQUIRED; a recordmissing either is
schema_invalidatwrite_outcome. The disposable-VM (Part B)run surfaced a
.outcome_record()that omittedoutcome-- the hermetic fakebroker validates nothing, so every unit test passed.
.outcome_record()now derives the coarseoutcomefrom the closed statusclassification:
okfor a success status (ok/no_op),errorfor everyclosed failure or refusal. The detailed per-package result stays in
observed;the coarse field is never a collapse of it. This mirrors the reference boundary
(
runix-audit-brokertools/rab-exercise.c), which writes the same split..validate_record()gains.PKGOPS_RECORD_REQUIRED(operation,outcome) andrejects a record missing either, so a future omission fails hermetically rather
than only in the VM.
session_ops.R) already carriedoutcome(intent+status); the native effect-session
open_intentgained the field on the runixside. This closes the write side of the same finding.
Tests:
test_record.Rasserts the coarse mapping (success ->ok, every closedfailure ->
error) and the required-presence guard; the type-check records nowcarry the required pair so the presence guard does not mask the type check.
test_commit.Rasserts the written record'soutcomeon the success, no_op, andfailure paths. 670 tinytest, all pass.
Held as a draft until the fresh-guest Part B run re-proves the fixed native path
against a real broker/polkit.