Skip to content

feat(standards): cut-successor writer automates payload version cuts (#227 E3#1/#2) - #241

Merged
chrisdpurcell merged 1 commit into
testingfrom
cutsucc
Sep 1, 2026
Merged

chrisdpurcell merged 1 commit into
testingfrom
cutsucc

Conversation

@chrisdpurcell

Copy link
Copy Markdown
Collaborator

Summary

project-standards standards cut-successor <family> <new> [--from <pred>] [--scaffold-test] [--dry-run]: copies the predecessor payload tree, stamps the version, recomputes every per-resource digest and the aggregate through package_contract/integrity.py, appends the [[versions]] entry, inserts the catalog [[packages]] entry as the family default and flips the predecessor to retained, re-points migration to endpoints onto the successor (the payload contract requires it), reports every remaining predecessor-version occurrence for human review, then runs the existing projection sync and catalog render. --scaffold-test emits the mechanical half of the version contract test with a marked TODO block. Refuses an existing successor directory.

Governing work

Supporting: #227

Acceptance coverage

Verification

New tests (2 passed, 28 s), tests/test_usage_doc_inventory.py (65 passed), ruff format/check, basedpyright, five standards validators, prettier + markdownlint on docs — all exit 0. check-release --baseline v5.28.0 reports only the by-design PC-RELEASE-LEVEL.

`project-standards standards cut-successor <standard-id> <version>` performs
the mechanical half of a payload cut, which until now was a hand-run procedure
with four declaration sites that had to move in one order: the copied
`payload.toml`, the family index, the catalog major, and the two generated
artifacts. The writer copies the predecessor tree, stamps the version and the
per-file digests, computes the aggregate through the repository's own
`validate_payload_integrity`, appends the `[[versions]]` entry, inserts the
catalog entry immediately after the family's last one, and then reruns
`sync-payload-projection` and `render-catalog` through the same entry points an
author would type — so a cut can never generate a projection or catalog those
commands would not.

The successor inherits the predecessor's catalog role and only a `default`
predecessor is demoted, which keeps reference-only and internal families from
acquiring a default as a side effect.

Inherited version references are reported, never rewritten: a permalink or a
migration `from` endpoint is correct history. The one exception is a migration's
`to` endpoint, which the payload contract requires to name its containing
version — a copy that kept the predecessor there produces a manifest that does
not load — so it is re-pointed and reported as an applied edit.

Refs #227, #236
@chrisdpurcell
chrisdpurcell marked this pull request as ready for review September 1, 2026 20:36
@chrisdpurcell
chrisdpurcell merged commit 4370f61 into testing Sep 1, 2026
4 checks passed
@chrisdpurcell
chrisdpurcell deleted the cutsucc branch September 1, 2026 20:36
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