Add clients ERIR organization flags#315
Conversation
|
Claude finished @axisrow's task in 3m 52s —— View job Review: PR #315 — clients ERIR organization flags
Focused on critical issues per the trigger. Style/naming intentionally not nitpicked. 1.
|
There was a problem hiding this comment.
Pull request overview
Adds canonical typed CLI flags for clients update to populate ErirAttributes.Organization (ERIR organization attributes) and wires them into both dry-run and live request bodies, while updating the WSDL optional-field parity gate/audit and documentation examples.
Changes:
- Introduce
--erir-organization-*flags ondirect clients updateand buildErirAttributes.Organizationpayload. - Add utility builders (
build_erir_organization,build_erir_attributes) and include ERIR attributes inbuild_client_update_item. - Update parity gate + audit markdown rows to mark
ErirAttributes.Organizationas supported; add CLI help and dry-run tests; add README examples.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
direct_cli/commands/clients.py |
Adds --erir-organization-* Click options and injects ErirAttributes.Organization into the update payload. |
direct_cli/utils.py |
Adds ERIR builder helpers and extends build_client_update_item to include ErirAttributes. |
tests/test_dry_run.py |
Adds a focused dry-run payload shape assertion for ErirAttributes.Organization. |
tests/test_cli.py |
Verifies clients update --help documents the new ERIR flags. |
tests/test_wsdl_parity_gate.py |
Marks clients.update ERIR organization optional paths as supported via flag mappings and removes prior follow-up routing. |
tests/WSDL_OPTIONAL_FIELD_AUDIT.md |
Updates generated audit summary and marks ERIR organization rows as supported. |
README.md |
Adds single-line usage examples demonstrating the new ERIR flags (EN/RU sections). |
| notification, | ||
| parse_client_setting_specs(list(settings)), | ||
| parse_tin_info(tin_type, tin), | ||
| build_erir_attributes( |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
b01c0fa to
5cb6099
Compare
|
Addressed the actionable Copilot comment by passing the new ErirAttributes payload as the explicit keyword argument Re-verified:
@codex @claude review. Focus on critical issues: bugs, security vulnerabilities, logical errors, data loss risks, documentation or test contract regressions, and issue-scope gaps. Do not nitpick style, naming, minor formatting, or subjective preferences. |
|
Claude finished @axisrow's task in 2m 7s —— View job Review: PR #315 follow-up (keyword-arg fix)
Verdict: LGTM — Copilot follow-up addressed correctly, no critical issues.Copilot keyword-arg follow-up — fixed ✅
client_data = build_client_update_item(
client_info, phone, notification,
parse_client_setting_specs(list(settings)),
parse_tin_info(tin_type, tin),
erir_attributes=build_erir_attributes(...),
)The new optional argument is passed by keyword exactly as suggested, and the underlying signature in Critical-issue checks
Non-blocking observations
Nothing else to flag — the follow-up is good to merge from a correctness / data-safety standpoint. |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Review triage after latest commit 5cb6099:
No blocking/actionable review comments remain. |
Summary
Documentation Check
Official Yandex Direct clients.update docs place Organization under ErirAttributes and document Name, Kpp, EpayNumber, RegNumber, OksmNumber, and OkvedCode: https://yandex.ru/dev/direct/doc/en/clients/update
The cached WSDL audit currently contains Name, EpayNumber, RegNumber, OksmNumber, and OkvedCode rows; Kpp is implemented from the official docs but has no audit row in the current cache.
Verification
Closes #306