refactor: migrate bids/bidmodifiers get to make_get_command (completes #587)#600
Conversation
…#587) Move the last two migratable `get` commands onto the shared `make_get_command` factory, reusing its existing `criteria_limits`, `require_criteria_message` and `nested_field_options` hooks — no new factory parameters: - `bids get`: criteria-limit + require-at-least-one-filter, `include_ids=False`. - `bidmodifiers get`: criteria-limit + 13 optional nested `*FieldNames` projections + a defaulted `--levels` criteria. `--help` (option order, the 13 nested-field options, the `--levels` choice/default) and `--dry-run` payloads (criteria-limit enforcement, the `bids get` require-filter UsageError, the always-present `Levels` criteria and nested-field params) are byte-identical to the pre-migration baselines. Net -80 lines (code-only more negative). This closes the migratable surface of #587. The three remaining `get`s stay hand-rolled as documented carve-outs (in the `_get.py` module docstring + CHANGELOG), each for a structural reason the factory deliberately does not encode: `leads get` (datetime options between `--limit` and `--fetch-all`), `keywordbids get` (nested `*FieldNames` carry their own defaults and are always emitted), and `reports get` (custom non-RPC TSV stream). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
@claude @codex review. Focus on critical issues: bugs, security vulnerabilities, logical errors, data loss risks, performance problems. Do NOT nitpick style, naming conventions, minor formatting, or subjective preferences — only flag issues that could break functionality or cause real harm in production. |
|
Claude finished @axisrow's task in 2m 42s —— View job Code Review — bids/bidmodifiers →
|
|
Codex Review: Didn't find any major issues. Chef's kiss. Reviewed commit: ℹ️ 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". |
Что
Завершает #587 — переводит последние две мигрируемые
get-команды на общую фабрикуmake_get_command, переиспользуя её существующие хукиcriteria_limits,require_criteria_messageиnested_field_options. Новых параметров фабрики не добавлено.bids get— criteria-limit + require-at-least-one-filter,include_ids=False.bidmodifiers get— criteria-limit + 13 опциональных вложенных*FieldNames+ дефолтный--levelsв criteria.Инварианты (байт-идентичность)
--help(порядок опций, 13 вложенных*FieldNames, choice/default у--levels) и--dry-runpayload'ы (enforcement лимитов criteria,UsageErrorrequire-filter уbids get, всегда-присутствующийLevelsи вложенные параметры) — байт-идентичны эталонам до миграции (проверено на 8 кейсах через CliRunner на свежем коде репозитория). Net −80 строк (по коду — сильнее в минус).Carve-outs (осознанно оставлены hand-rolled)
Закрыта мигрируемая поверхность #587. Три оставшихся
getзадокументированы как carve-out'ы (в docstring_get.py+ CHANGELOG), каждый — по структурной причине, которую фабрика намеренно не кодирует:leads get—--datetime-from/--datetime-toмежду--limitи--fetch-all(нестандартный порядок опций, общийget_optionsрендерит--limit/--fetch-allсмежно).keywordbids get— вложенныеSearchFieldNames/NetworkFieldNamesнесут собственные дефолты и эмитятся всегда (фабрика делает provided-only проекции).reports get— кастомный non-RPC TSV-стрим, не JSON-RPCget.Проверки
/simplify(4 агента: reuse / simplification / efficiency / altitude) — все чисто, правок не потребовалось.Closes #587
🤖 Generated with Claude Code