Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat(package-service): add registry-neutral lifecycle contract - #1770

Closed
joshuajbouw wants to merge 6 commits into
mainfrom
codex/1750-package-service-cure
Closed

feat(package-service): add registry-neutral lifecycle contract#1770
joshuajbouw wants to merge 6 commits into
mainfrom
codex/1750-package-service-cure

Conversation

@joshuajbouw

@joshuajbouw joshuajbouw commented Aug 29, 2026

Copy link
Copy Markdown
Member

Linked Issue

Tracking #1750. Superseded by #1800.

Summary

Preserved non-landing evidence for the first registry-neutral package-service lifecycle design.

Independent review rejected this implementation. The replacement was rewritten, reviewed, and landed through #1800; #1750 is closed. This PR must not be merged or retargeted.

Changes

  • Introduced the original private package-service contract and state model.
  • Supplied adversarial tests that informed the accepted replacement.
  • Does not represent the implementation now present on os/universal.

Verification

AI / Tool Assistance

Assisted-by: Codex:GLM-5.3 Flash

AI assistance was used for the original implementation. The maintainer owns the rejection and supersession decision.

Checklist

  • Superseding landed PR identified
  • Historical evidence preserved
  • Ready to merge

Add a private, registry-neutral package-service contract and pure executable state model. Owner/package slots co-locate canonical state with the authoritative journal so a later durable backend can commit them as one value.

The model binds authority to a complete canonical operation context and validates expected-state lifecycle transitions, bounded drains, cancellation, recovery, receipt replay, and fail-closed quota and retention behavior. It deliberately does not add transport, durable storage, byte parsing, runtime integration, or a public compatibility surface.

Closes #1750

Signed-off-by: Joshua J. Bouw <[email protected]>

Assisted-by: Codex
Bind update success to canonical completion evidence, refuse mid-drain success, and restore aborted drains inactive with a fresh generation. Bind lifecycle plans to canonical state, keep package generations monotonic, reject zero binding digests, and expose validated shared contract inputs to internal consumers.

Closes #1750

Signed-off-by: Joshua J. Bouw <[email protected]>

Assisted-by: Codex
Make the recorded drain deadline authoritative for proof, completion, and late replacement recovery, while leaving explicit expiry and old-content recovery fail-closed. Validate runtime evidence and observed state at the internal recovery boundary, bind canonical transitions to exact package-generation successors, and cover non-drain cancellation.

Closes #1750

Signed-off-by: Joshua J. Bouw <[email protected]>

Assisted-by: Codex
Retain the exact pre-drain state and monotonic boundary generation in the authoritative journal. Advance the boundary on each lease proof and restore prior content as the current boundary successor on cancel, expiry, or old-state recovery.

Closes #1750
Refs #1719
Assisted-by: Codex

Signed-off-by: Joshua J. Bouw <[email protected]>
Bind staged install/update commits before uncertainty, require recorded removal lineage for absence recovery, reject outcome-mismatched evidence, and clear stale drain lineage on successful recovery.

Closes #1750
Refs #1719
Assisted-by: Codex

Signed-off-by: Joshua J. Bouw <[email protected]>
Copilot AI balanced review requested due to automatic review settings August 29, 2026 22:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Comment thread crates/astrid-package-service/src/lifecycle/mod.rs Fixed
Retain slot generation high-watermarks across absent states and all lifecycle resolutions, with overflow checked before any effect. Bind install and update authority, staging, commit, and recovery to one exact content and lifecycle plan.

Split lifecycle generation and commit seams while preserving recovery and drain lineage behavior.

Closes #1750

Refs #1719

Assisted-by: Codex
Signed-off-by: Joshua J. Bouw <[email protected]>
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.

3 participants