fix(plan): admit the preserved identities the delete plan now carries - #130
Merged
Merged
Conversation
path could rebuild the retirement evidence the approver signed. It did not teach the plan schema about them, and `repositoryProviderParameters` sets `additionalProperties: false`, so the first real `gds repository delete --plan` with `--preserve` failed as GDS_PLAN_INVALID. My own change, incomplete. Nothing caught it: the Go round-trip test asserted the field survives `Parameters`/`StepTransition`, and no test validated those parameters against the schema that governs them. This adds the test that does — it builds the actual delete plan and runs `plan.Validate`, and it fails without the schema change. The item pattern is the exact retirement vocabulary `core/repository/ retirement.go` emits: `commits:unpushed`, `review-threads`, and the `worktree:`, `ref:`, `branch:`, `pull-request:` and `issue:` prefixes. An unrecognized value was already harmless — it preserves nothing, so the plan fails closed as work-remaining — but a typo should be refused where it is written, not three steps later. Claude-Session: https://claude.ai/code/session_01CKXKXND4zAgWisTtatyTHX
rldyourmnd
force-pushed
the
fix/plan-schema-admits-preserved-identities
branch
from
September 10, 2026 19:22
5e05b3f to
ffeca15
Compare
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.
#125 moved the operator's accepted losses onto
ProviderTransitionso the apply path could rebuild the retirement evidence the approver signed. It did not teach the plan schema about them, andrepositoryProviderParameterssetsadditionalProperties: false— so the first realgds repository delete --plan --preserve=…after that merge failed withGDS_PLAN_INVALID. My own change, shipped incomplete.Nothing caught it, and that is the more interesting part. The Go round-trip test asserted the field survives
Parameters→StepTransition, which it does. No test validated those parameters against the schema that governs them, so the whole suite stayed green while the feature could not build a single plan.This adds the test that closes it:
TestDeleteParametersValidateAgainstThePlanSchemabuilds the actual delete plan — the sameoperations.NewPlancall the planner makes — and runsplan.Validateagainst the real schema set. Verified to fail without the schema change:The item pattern is the exact retirement vocabulary
core/repository/retirement.goemits:commits:unpushed,review-threads, and theworktree:,ref:,branch:,pull-request:andissue:prefixes. An unrecognized value was already harmless — it preserves nothing, so the plan fails closed as work-remaining — but a typo should be refused where it is written rather than three steps later.Verification:
scripts/validate_go_core.sh --quickexits 0, 66 packages ok.https://claude.ai/code/session_01CKXKXND4zAgWisTtatyTHX