Add clients ERIR contragent flags#317
Conversation
|
Claude finished @axisrow's task in 4m 6s —— View job Claude Code Review
VerdictNo blocking bugs found. Implementation mirrors the existing Notable1. The PR description already calls this out, but it's the only real correctness risk worth flagging. Effects:
2. Test contract:
3.
Non-issues verified
RecommendationLGTM to merge from a correctness/contract perspective. Consider opening a small follow-up issue to track the |
|
Codex Review: Didn't find any major issues. Keep them coming! ℹ️ 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". |
There was a problem hiding this comment.
Pull request overview
Adds first-class typed direct clients update flags for ErirAttributes.Contragent so users can construct the documented ERIR contragent payload (including nested TinInfo) without raw JSON, and updates the WSDL parity/audit gates accordingly.
Changes:
- Added new
clients updateflags forErirAttributes.Contragent.*and wired them into the update payload builder. - Extended shared ERIR payload builders to include a
Contragentblock underErirAttributes. - Updated WSDL optional-field audit/parity mappings and added dry-run/help/README coverage for the new flags.
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-contragent-* flags and includes ErirAttributes.Contragent in the update payload. |
direct_cli/utils.py |
Introduces build_erir_contragent() and extends build_erir_attributes() to include Contragent. |
tests/test_dry_run.py |
Adds dry-run assertions for full/partial contragent payload shape and invalid tin-type rejection. |
tests/test_cli.py |
Verifies clients update --help documents the new contragent flags. |
tests/test_wsdl_parity_gate.py |
Maps new flags to WSDL optional paths and removes the prior follow-up exclusion. |
tests/WSDL_OPTIONAL_FIELD_AUDIT.md |
Marks the Contragent optional paths as supported and updates summary counts. |
README.md |
Adds single-line examples for the new contragent flags (EN/RU sections). |
| contragent=build_erir_contragent( | ||
| erir_contragent_name, | ||
| erir_contragent_kpp, | ||
| erir_contragent_phone, | ||
| erir_contragent_epay_number, | ||
| erir_contragent_reg_number, | ||
| erir_contragent_oksm_number, | ||
| parse_tin_info(erir_contragent_tin_type, erir_contragent_tin), | ||
| ), |
|
@codex @claude review. Re-run after addressing Copilot feedback on ambiguous tin type errors. 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 23s —— View job Claude Code Review (re-run)
VerdictCopilot's What the fix does
Critical checks (all pass)
Standing follow-up (from prior review, not introduced here)
RecommendationLGTM — Copilot's ambiguity concern is resolved cleanly. Merge when CI is green. --- • Branch: |
|
Codex Review: Didn't find any major issues. Keep it up! ℹ️ 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: FIX - Copilot ambiguous tin type error was addressed in 729abdd; Claude rerun verified the fix. FOLLOW-UP - Kpp docs/WSDL mismatch is non-blocking and can be tracked outside this PR. No blocking/actionable comments remain; CI is green. |
Summary
Documentation Check
Official Yandex Direct clients.update docs place Contragent under ErirAttributes and document Name, Kpp, Phone, EpayNumber, RegNumber, OksmNumber, and nested TinInfo: https://yandex.ru/dev/direct/doc/en/clients/update
The cached WSDL audit currently contains Name, Phone, EpayNumber, RegNumber, OksmNumber, and TinInfo rows; Kpp is implemented from the official docs but has no audit row in the current cache.
Verification
Closes #308