Skip to content

feature: validate markers against Portage CONTENTS before ancestor promote (issue #66) - #69

Merged
rich0 merged 2 commits into
developfrom
feature/validate-marker-contents-promote
Jul 18, 2026
Merged

feature: validate markers against Portage CONTENTS before ancestor promote (issue #66)#69
rich0 merged 2 commits into
developfrom
feature/validate-marker-contents-promote

Conversation

@rich0

@rich0 rich0 commented Jul 18, 2026

Copy link
Copy Markdown
Owner

Summary

  • Before promoting a staged ._cfg* snapshot to ._new-cfg_* (Stage 2 ancestor), compare its MD5 to Portage VDB CONTENTS for the live path, using the most recently installed package (BUILD_TIME, else CONTENTS mtime).
  • On mismatch: warn and do not store the tampered marker as the ancestor; live update still completes.
  • On missing/unparseable VDB or non-Portage: fail open with a warning (maintainer guidance on Validate ._cfg* markers against Portage CONTENTS hashes before promoting to backup ancestors #66).
  • New helpers lookup_contents_md5_for_live and promote_backup_new take all inputs via parameters/returns (no new global coupling).
  • Wired into update_merge_complete, update_replace_complete, and update_keep_complete.
  • Tier G file-focused tests: pristine promote, tampered skip, missing CONTENTS fail-open, last-install wins.
  • Brief docs in ARCHITECTURE + INVENTORY.

Closes #66

Test plan

  • perl -c cfg-update
  • ./test/run-tests.sh --full (227 passed)
  • Review warning wording for mismatch vs fail-open paths

…stor promote (issue #66)

Before promoting a staged marker snapshot to ._new-cfg_*, compare its MD5 to
the Portage VDB CONTENTS digest for the live path (last-install BUILD_TIME).
Mismatch skips ancestor promotion with a warning; missing VDB fails open.
New helpers take all inputs via parameters/returns.
@rich0
rich0 merged commit 18af008 into develop Jul 18, 2026
1 check passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in Refactor/cleanup cfg-update Jul 18, 2026
@rich0
rich0 deleted the feature/validate-marker-contents-promote branch August 1, 2026 14:09
@rich0
rich0 restored the feature/validate-marker-contents-promote branch August 1, 2026 14:09
@rich0
rich0 deleted the feature/validate-marker-contents-promote branch August 1, 2026 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant