Repository navigation
Retention plan follow-ups: re-plan hint, -r, rust-only list (server#522) - #179
Merged
Merged
Conversation
Review follow-ups to #178: - After a stale or mismatched namespace:retention-apply, the suggested re-plan command repeats the proposal the apply tried: its --retention-mode and --retention, or the proposed policy in its --plan-file. A bare "dw namespace:retention-plan <name>" would plan the current policy against itself. ErrorContext carries the command, built from the apply's own input. - namespace:retention-plan and namespace:retention-apply accept -r for --retention, as namespace:create and namespace:update do (catalog and catalog-additions). - rust/README lists every Rust-only command with its issue (cli#60, Server #522, #577, #519, #520, #1131, .github#220). Tests: a re-plan hint test (options, -r, forever, and both kinds of plan file, human and JSON), the refusal test now expects the attempted --retention, and a -r plan request. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Member
Author
|
Independent review: PASS at head 56ce9f1 The branch is already up to date with main (it is based on the #178 merge, e6072f3). I reviewed this PR's own changes against e6072f3. What I verified:
No findings. |
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.



This fixes the three non-blocking review items from #178 (durable-workflow/server#522).
409 retention_policy_revision_stale) or mismatched (409 retention_plan_revision_mismatch)namespace:retention-apply, the suggested command used to be a baredw namespace:retention-plan <name>. Run as written, that plans the current policy against itself.--retention-modeand--retention. When the apply came from--plan-file, it uses the plan's proposed policy instead, for exampledw namespace:retention-plan billing --retention-mode=bounded --retention=7.ErrorContexthas a newretention_replanfield, built from the apply's own input byretention_plan::replan_command. It appears both as the humanTry:line and asrecommendations[0].commandin the JSON envelope.-rworks for--retentionon both new commands, the same as onnamespace:createandnamespace:update. Nothing else in either command uses-r. I updatedsrc/catalog.jsonandparity/catalog-additions.json(shortcut and synopsis) and added a-rexample to the plan's help.rust/README.mdlist of commands with no 2.x equivalent is up to date. It now lists everyrust_onlycommand with its issue: cli#60, Server #522, #577, #519, #520 and #1131, and Show which open runs still depend on a legacy version branch .github#220. It also notes thattest_parity.pychecks this list against the catalog.docs/cli-reference.mdnow mentions-rand the re-plan hint.Local checks (Rust 1.99, Docker)
cargo fmt --check: passcargo clippy --locked --all-targets -- -D warnings: passcargo test --test namespace_retention: 10/10 pass. The new re-plan test covers explicit options with-r, a forever proposal, and bounded and forever plan files, in both human and JSON output. The refusal test now expects the attempted--retention, and there is a new-rplan request.cargo test --bin dw: 139 pass.queues_workers,namespace_listandsystem_debug: pass.python3 -m unittest test_parity: 27/27 pass.🤖 Generated with Claude Code