Skip to content

fix(plan): admit the preserved identities the delete plan now carries - #130

Merged
rldyourmnd merged 1 commit into
mainfrom
fix/plan-schema-admits-preserved-identities
Sep 10, 2026
Merged

fix(plan): admit the preserved identities the delete plan now carries#130
rldyourmnd merged 1 commit into
mainfrom
fix/plan-schema-admits-preserved-identities

Conversation

@rldyourmnd

Copy link
Copy Markdown
Contributor

#125 moved the operator's accepted losses onto ProviderTransition so the apply 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 --preserve=… after that merge failed with GDS_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 ParametersStepTransition, 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: TestDeleteParametersValidateAgainstThePlanSchema builds the actual delete plan — the same operations.NewPlan call the planner makes — and runs plan.Validate against the real schema set. Verified to fail without the schema change:

additional properties 'preserved_identities' not allowed

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 rather than three steps later.

Verification: scripts/validate_go_core.sh --quick exits 0, 66 packages ok.

https://claude.ai/code/session_01CKXKXND4zAgWisTtatyTHX

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
rldyourmnd force-pushed the fix/plan-schema-admits-preserved-identities branch from 5e05b3f to ffeca15 Compare September 10, 2026 19:22
@rldyourmnd
rldyourmnd merged commit 50842fd into main Sep 10, 2026
7 checks passed
@rldyourmnd
rldyourmnd deleted the fix/plan-schema-admits-preserved-identities branch September 10, 2026 19:26
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