Skip to content

[codex] Fix changes timestamp Z format#379

Merged
axisrow merged 2 commits into
mainfrom
codex/issue-235-changes-timestamp-z
May 26, 2026
Merged

[codex] Fix changes timestamp Z format#379
axisrow merged 2 commits into
mainfrom
codex/issue-235-changes-timestamp-z

Conversation

@axisrow

@axisrow axisrow commented May 26, 2026

Copy link
Copy Markdown
Owner

Summary

  • Align changes check and changes check-campaigns timestamp input with Yandex Direct docs: YYYY-MM-DDTHH:MM:SSZ only.
  • Stop accepting bare YYYY-MM-DDTHH:MM:SS for Changes timestamps.
  • Update help text, README/AGENTS examples, safe-command fixtures, integration timestamp generation, and regression tests.

Why

Yandex documents Changes.check / Changes.checkCampaigns Timestamp as YYYY-MM-DDThh:mm:ssZ. The CLI previously accepted a bare timestamp and appended Z internally, which drifted from the API contract and broke the plugin-side expectation tracked in axisrow/yandex-direct-mcp-plugin#115.

Closes #235.

Validation

  • python3 -m pytest tests/test_low_coverage_payloads.py tests/test_changes.py tests/test_cli.py tests/test_cli_contract.py -q -> 122 passed, 30 subtests passed
  • python3 -m pytest -m "not integration" -q -> 1323 passed, 44 skipped, 32 deselected, 30 subtests passed
  • git diff --check -> clean

Copilot AI review requested due to automatic review settings May 26, 2026 08:49

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR tightens the direct changes check / direct changes check-campaigns timestamp contract to match the Yandex Direct API docs by accepting only YYYY-MM-DDTHH:MM:SSZ and rejecting bare timestamps without the trailing Z.

Changes:

  • Updated parse_datetime() and changes command help text to require ...SSZ and stop auto-appending Z.
  • Refreshed documentation/examples (README, AGENTS) and command fixtures/scripts to use the canonical ...SSZ timestamp.
  • Updated and extended regression/unit/integration tests to cover acceptance/rejection and payload wiring.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
direct_cli/utils.py Enforces strict YYYY-MM-DDTHH:MM:SSZ parsing for Changes timestamps.
direct_cli/commands/changes.py Updates --timestamp help text and relies on strict parsing for API payloads.
README.md Updates documented datetime rules and all changes examples to include Z.
AGENTS.md Updates agent-facing rules/examples for changes timestamps.
tests/test_changes.py Verifies strict timestamp passthrough and adds direct parse_datetime() regression tests.
tests/test_low_coverage_payloads.py Updates canonical payload expectations and adds rejection coverage for bare/malformed timestamps.
tests/test_cli.py Ensures help output documents the strict ...SSZ format.
tests/test_cli_contract.py Adjusts README contract checks: allow Z only for direct changes ... examples; reject bare changes timestamps.
tests/test_integration.py Generates integration probe timestamps with a trailing Z.
scripts/test_safe_commands.sh Updates safe-command probe to pass a ...SSZ timestamp.
scripts/build_api_coverage_report.py Updates fixture command args to use a ...SSZ timestamp.

Comment thread direct_cli/commands/changes.py Outdated
Comment thread direct_cli/utils.py Outdated
Comment thread AGENTS.md
@axisrow

axisrow commented May 26, 2026

Copy link
Copy Markdown
Owner Author

@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.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

@axisrow

axisrow commented May 26, 2026

Copy link
Copy Markdown
Owner Author

@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.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

@axisrow
axisrow merged commit 3d8d30b into main May 26, 2026
6 checks passed
@axisrow
axisrow deleted the codex/issue-235-changes-timestamp-z branch May 26, 2026 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Регрессия 0.3.11: changes check отвергает ISO 8601 timestamp с суффиксом Z

2 participants