feat(package-service): add private package state model (#1750) - #1800
Merged
Merged
Conversation
Add canonical context binding, Ed25519 authority verification, public provenance digest derivation, bounded durable history, and a pure owner/package lifecycle model with drain, recovery, replay, and quota behavior. Assisted-by: Codex Signed-off-by: Joshua J. Bouw <[email protected]>
Signed-off-by: Joshua J. Bouw <[email protected]>
There was a problem hiding this comment.
CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
Validate first-install budgets and plan compatibility, reject zero-state substitution and stale admission, bind authority class and exact receipts, enforce drain deadlines after proofs, restore inactive successor boundaries, reconcile old-state and non-drain unknowns, and make replay protection match bounded retention. Assisted-by: Codex Signed-off-by: Joshua J. Bouw <[email protected]>
- enforce the drain deadline at commit after accepted proofs - reject drain proofs at the exclusive authority expiry - terminate unknown, pre-drain, and expired-intent records without fencing the slot, restoring the boundary only for real drain lineage - preflight generation headroom at admission, drain start, and proof advance so exhausted boundaries can never strand a record - fail begin_work closed past the drain deadline and recheck the artifact budget at commit - derive test nonce and signing material instead of hard-coded cryptographic values, and split drain regressions into their own integration test file Signed-off-by: Joshua J. Bouw <[email protected]> Assisted-by: Codex Signed-off-by: Joshua J. Bouw <[email protected]>
Keep canonical framing and nonce bytes as separate hash inputs while preserving the exact domain, length, and field-byte digest stream. Assisted-by: Codex Signed-off-by: Joshua J. Bouw <[email protected]>
Member
Author
|
Independent exact-head review accepted |
The canonical owner helpers seeded their encoding scratch with a constant zero array, which static analysis classifies as hard-coded cryptographic material. Build the buffer with a runtime fill instead: OwnerId::encode_canonical overwrites every byte of an exactly sized output before returning, so the canonical bytes are unchanged. Assisted-by: Codex Signed-off-by: Joshua J. Bouw <[email protected]>
joshuajbouw
marked this pull request as ready for review
September 1, 2026 19:09
This was referenced Sep 1, 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.
Linked Issue
Tracking #1750
Summary
Repairs the private registry-neutral package-service contract and pure owner/package state model at the rejected exact head.
This slice adds no package parsing, transport, durable persistence engine, execution wiring, or external authority mapping. It does not close #1750.
Changes
begin_work, and the artifact budget is rechecked at commit.Repair Law
Exactzero state so it cannot substitute for absence.OwnerIdencoding and conservative durable-record accounting.Verification
cargo test -p astrid-package-service --all-features --all-targets --lockedcargo check --workspace --all-features --all-targets --lockedcargo clippy --workspace --all-features --all-targets --locked -- -D warningscargo fmt --all --checkgit diff --checkpython3 scripts/changelog.py check --base b868d0a770704fbca262e27ed2e6bd08c9ec5133 --head HEADAI / Tool Assistance
Assisted-by: Codex
Codex drafted the successor repair, tests, changelog update, and workspace evidence. Independent review remains required.
Checklist
changes/{issue}.{kind}.mdSigned-off-bytrailer.