Skip to content

feat: validate changeset chains from live git - #41

Merged
shaug merged 2 commits into
mainfrom
scott/32-live-derived-validation
Jul 21, 2026
Merged

feat: validate changeset chains from live git#41
shaug merged 2 commits into
mainfrom
scott/32-live-derived-validation

Conversation

@shaug

@shaug shaug commented Jul 21, 2026

Copy link
Copy Markdown
Owner

TL;DR

Validates rehydrated changeset chains directly against current git refs, ancestry, stamped source identity, and tree equivalence without cached branch-head state.

Summary

  • Re-resolve every changeset ref and reject ambiguity, head movement, or chain-shape drift after rehydration.
  • Prove base-to-first and predecessor-to-successor ancestry from current commits.
  • Compare the live chain-tip tree with the source commit carried by every Changeset-Source trailer.
  • Distinguish an unchanged source, a legitimately advanced source, a different source history, and unavailable ancestry evidence.
  • Cover clean post-propagation validation, post-rehydration branch rewrites, non-equivalent tips, source advancement, source divergence, and Git comparison failure.

Scope boundary

Validation

  • just format — pass.
  • just lint-py — pass.
  • just lint-md — pass.
  • just test-carve-changesets — pass (17 tests).
  • just test — pass.
  • git diff --check — pass.
  • skills-ref validate — pass for every complete skill other than carve-changesets.
  • Repository-owned review-code-change — clean at 721a1ea07c0e8d8af1265bbf70326afaf286aa4a versus 9428d09942a32123839c47fea6cec1421c41ff44 after one correctness fix/re-review cycle.

The epic grants a pre-packaging exception for the exact repository-wide just lint failure skills/carve-changesets: Missing required file: SKILL.md. Issue #35 owns that future file. Python lint, Markdown lint, all complete-skill validations, focused tests, and the full repository suite pass; no other local or remote gate is waived.

Tickets

Fixes #32

shaug added 2 commits July 21, 2026 14:21
## Summary

- Check predecessor ancestry and source-tree equivalence from rehydrated refs
- Distinguish source advancement from a different stamped source history
- Cover propagated, rewritten, and non-equivalent chain topologies

## Why

- Make cached branch-head drift semantics unnecessary and unrepresentable
- Keep validation clean after legitimate propagation while rejecting real drift
## Summary

- Re-resolve changeset branch refs immediately before invariant checks
- Reject branch movement and live chain-shape changes after rehydration
- Keep Git ancestry failures distinct from proven source divergence

## Why

- Prevent stale rehydration snapshots from passing after a branch rewrite
- Preserve accurate fail-closed diagnostics when Git evidence is unavailable
@shaug
shaug merged commit 242b422 into main Jul 21, 2026
1 check failed
@shaug
shaug deleted the scott/32-live-derived-validation branch July 21, 2026 21:52
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.

Derive carve-changesets chain state from live git instead of a state.json cache

1 participant