Skip to content

docs: pkgops VM-gate increment plan - #75

Merged
TroyHernandez merged 2 commits into
masterfrom
docs/pkgops-vm-gate-plan
Aug 20, 2026
Merged

TroyHernandez merged 2 commits into
masterfrom
docs/pkgops-vm-gate-plan

Conversation

@TroyHernandez

Copy link
Copy Markdown
Contributor

The reviewed plan for the VM-gated increment that closes the release gate on pkgops PR #9 (cornball-ai/pkgops#9).

Pins, per the review requirements:

  • Broker record schema/version — schema version 1; the 16-field allow-list (RECORD_SCHEMA in runix-audit-broker/src/json.c); the reserved-key list; hard-reject of unknown fields; changed/state_changed are T_BOOL, observed is the only object field.
  • Exact durable fields — verified/verify_detail map into the existing observed/changed/state_changed/observed_failed/observed_reason fields (no schema bump), plus authorized_via/scope/preview. Per-verb observed object shapes fixed in §2.4.
  • Harness commits — reuse the deploy/canary-apt/ harness, swapping rab-exercise for real pkgops::apt_<verb>(); run from pinned SHAs of runix/pkgexec/broker/pkgstate/pkgops.
  • Evidence — 23/23 polkit matrix + 37/37 §7 gates through pkgops + a new durable-record round-trip (broker acceptance, value correctness, a negative schema_invalid gate, a verification-mismatch gate).
  • Teardown — provision.sh destroy, marker-guarded, VM-only, never the troy-g5 host.

Decisions D1-D7 resolved in §8. D6: authorized_via provenance returned by .authorize() (autonomous = a machine-mode grant of an autonomous-class verb). D7 = S-B: state_changed is the observed pre/post pkgstate diff, never derived from effect_issued.

Companion to the approved contract + implementation plan (#73).

…ble-VM proof)

Pins the broker record schema (version 1, the 16-field allow-list in
runix-audit-broker/src/json.c, the reserved-key list, hard-reject of
unknown fields), the exact durable fields pkgops writes (verification
mapped into observed/changed/state_changed/observed_failed/observed_reason
plus authorized_via/scope/preview -- no schema bump), the per-verb
observed object shapes, the disposable-VM proof (reuse the canary-apt
harness, swap rab-exercise for real pkgops), the evidence requirements,
and the teardown procedure. Splits into Part A (durable record grammar,
hermetic) and Part B (the destructive VM proof); pkgops PR #9 stays held
until Part B is green.

Decisions D1-D7 resolved: map into existing allow-list fields; enrich
.verify() with observed + mismatch/read-failure; merge Part A first with
#9 held; harness edits as their own commit; authorized_via provenance
returned by .authorize() (autonomous = machine-mode grant of an
autonomous-class verb); state_changed = the observed pre/post pkgstate
diff (S-B), never derived from effect_issued.
Two review blockers on Part A (pkgops PR #10) resolved at the contract:

1. Hold observation keying. An unqualified hold record carries no architecture
   and can match several selection rows (pkg:amd64 + pkg:i386). The prior rule
   ("bare package when unqualified") collapsed them to one entry, so a change
   confined to a second architecture was invisible to the state_changed pre/post
   diff (while .verify_hold, checking every row, still failed). Pinned: one
   package:arch entry per matched selection row, radix-ordered on architecture; a
   no-match target keeps its identity with a null selection.

2. apt.update state_changed. Removed the ambiguity in section 1.4 that read as a
   functional-effect-derived transition. update reads no per-package or index
   state, so observed / changed / state_changed are all OMITTED, never inferred
   from effect_issued. Added the wire-realization note: optional nulls are written
   by omitting the key (absent == null at the broker), so an update record carries
   only operation/resource/effect_issued/scope/preview + authorized_via +
   observed_failed=false.
@TroyHernandez
TroyHernandez merged commit 86c5974 into master Aug 20, 2026
9 of 14 checks passed
@TroyHernandez
TroyHernandez deleted the docs/pkgops-vm-gate-plan branch August 20, 2026 02:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant