Repository navigation
Preview Azure area and iteration moves with rule refusals and relation impact - #42
Conversation
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Reviewer's GuideThis PR implements a deterministic Azure area/iteration move preview that reuses the existing contract and SDK infrastructure to validate explicit linked items through revision-bound non-saving requests, classify refusals, expose direct relation scope impact, and provide bounded CLI/SDK output with comprehensive synthetic and no-git validation evidence. Sequence diagram for the Azure move preview validationsequenceDiagram
actor User
participant CLI as move-preview CLI
participant SDK as Host SDK
participant Preview as simulateMove
participant Contract as discoverProjectContract
participant Azure as Azure DevOps
User->>CLI: runMoveCommand
CLI->>SDK: listAllComplete
SDK-->>CLI: complete item snapshot
CLI->>Preview: simulateMove
Preview->>Contract: discoverProjectContract
Contract-->>Preview: field contract
Preview->>Azure: getWorkItemsReport
Azure-->>Preview: selected items and revisions
Preview->>Azure: getWorkItemsReport
Azure-->>Preview: direct relation targets
loop each selected item
Preview->>Azure: PATCH buildUpdatePatch with validateOnly=true&bypassRules=false
Azure-->>Preview: validation status
end
Preview-->>CLI: rows and preserved relation evidence
CLI-->>User: JSON or TOON preview
Flow diagram for Azure move preview decisionsflowchart TD
A[Explicit linked pm IDs and one destination] --> B{Selection and scope valid?}
B -- No --> C[Whole-preview refusal with remedy]
B -- Yes --> D[Discover shared project field contract]
D --> E[Read selected items and direct relation targets]
E --> F{Within item, relation, and request limits?}
F -- No --> C
F -- Yes --> G[Validate each item at observed revision]
G --> H{Azure validation result}
H -- 200 --> I[allowed row]
H -- 401 or 403 --> J[permission_denied row]
H -- 400 --> K[process_rule row]
H -- 409 or 412 --> L[revision_changed row]
H -- Other refusal --> M[Typed refusal row]
I --> N[Compute direct relation boundaries]
J --> N
K --> N
L --> N
M --> N
N --> O[Return preview only; links preserved and no save]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
unbraind
left a comment
There was a problem hiding this comment.
Orchestrator review (built-in Claude review agent, verified by the orchestrator; bots are not waited for since 2026-10-22):
Pre-merge review (codex gpt-6.1-sol read-only review agent + orchestrator diff check).
VERDICT: MERGE
FINDINGS:
- none
SUMMARY: Adds revision-checked Azure area and iteration previews with typed refusals and direct relation boundary evidence. The tests cover synthetic permissions, process rules, request limits, malformed responses and non-git CLI operation; I reviewed them without rerunning them, and live Azure acceptance remains unverified.
Orchestrator check: every PATCH goes to validateOnly=true&bypassRules=false (asserted in test/moves.test.ts:61 and :210, so a persisting request fails the suite); no private data or absolute paths in the diff; CI release gate green on npm and bun (226/226, 100% coverage).
Azure backlog moves previously required an agent to attempt a classification update to discover inherited permission denials or custom iteration rules.
pm ado move-previewand the typedsimulateMoveSDK now return compact allowed/refused rows and direct relation scope evidence before any separate application request.The command requires explicit linked pm IDs and one project/type. It reuses the shared project field contract, host SDK complete reads and renderer, existing batch reader, revision patch builder and same-organization relation mapper. All validation patches assert the observed revision and set
validateOnly=true&bypassRules=false; no apply/save or implicit bulk-update path exists. Classification moves preserve links; relation output shows endpoint area/iteration boundaries in the scenario where all allowed rows move. Unreadable and opaque targets are explicit unknowns.Before: moving
Example\OldintoExample\Releasecould discover an inherited deny or conditional process rule during application. After: each selected item reportsallowed,permission_denied,process_rule, a stale revision or another typed refusal with a remedy, without saving changes.Validation:
npm run typecheck,npm run build,npm run build:test,npm run docstring(12 source files, 86 documented declarations), andgit diff --check: pass. No standalone lint script is defined.node --test --experimental-test-coverage --test-coverage-include=moves.ts test/moves.test.ts: 11/11 pass, zero skips; simulator 100% lines/branches/functions.npx --no-install pm test pm-ado-move-simulator --run --progress: one linked command / 11 tests pass, zero skips.simulateMoveto treat rejected validation responses as allowed. The permissions/rules regression failed with exit 1: the expectedpermission_deniedandprocess_rulerows became allowed. Restored the function and reran the linked test successfully.npm run release:checkandbun run release:check: implementation CI passed both release gates and both Node 22/26 jobs. Each suite passed 226/226 with zero skips, in both native-coverage and statement-instrumented passes; 100/100/100/100 coverage across 8 measured source files, including 1,361/1,361 statements. Production audit: zero vulnerabilities. Final exact-head CI passed all four jobs at463ae1a64905955aae5c1937cc9643d93a81a4fawith the same counts and coverage; this final commit only records the passing gates and releases the pm claim. The saturated host ran targeted checks only.Real-data validation used a read-only, non-git export of the public
unbraind/pm-adotracker at3592ce90e40331217021b053c479402642a23478. The SDK read 29 items, and all 63 authoritative files remained unchanged. The actual unlinked selection refused at zero remote requests. An explicitly synthetic Azure projection of those public identities, lifecycle states and relations produced 7 allowed rows, 6 inherited denials, 16 custom iteration-rule refusals, 8 direct relations with 5 boundary changes, 34 requests per preview and 11,057 JSON bytes. First preview: 62 ms; repeat with a git ceiling: 107 ms. Reversed-selection replay was identical; zero local or remote fixture mutations. This does not claim live Azure acceptance. Reproduction is documented indocs/move-simulator.mdandtest/real-data-moves.ts.Limits: individual validation is not an atomic multi-item plan or a future authorization. Relation evidence covers direct classification boundaries, not transitive/team-board membership. Live Azure credentials were not used. No merge or release requested. Automated review skips/rate limits are missing review evidence; no human approval is claimed.
PM items:
Commits:
b5112e3(implementation and pm evidence),463ae1a(CI receipt and claim release).pm-ado-move-simulatorremains in progress and unclaimed for orchestrator verification; it was not closed.