Skip to content

test: codify sandbox category A/B split in markers and docs#58

Merged
axisrow merged 1 commit into
mainfrom
chore/codify-sandbox-category-split
Apr 19, 2026
Merged

test: codify sandbox category A/B split in markers and docs#58
axisrow merged 1 commit into
mainfrom
chore/codify-sandbox-category-split

Conversation

@axisrow

@axisrow axisrow commented Apr 19, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds optional category kwarg to @pytest.mark.sandbox_limitation in pyproject.toml — backwards compatible, no functional changes.
  • Proactively classifies all 9 sandbox-limited write test classes with category="disabled" (7 classes, codes 8800/1000/5004) or category="unsupported" (2 classes, code 3500).
  • TestWriteBids and TestWriteSmartAdTargets receive the first class-level sandbox_limitation marker (previously relied on inline-only _is_sandbox_error).
  • Rewrites the module docstring in tests/test_integration_write.py to group sandbox-limited scenarios under Category A / Category B.
  • Appends "Sandbox Category Split" section to tests/API_COVERAGE.md with inline A/B tables, error codes, and test class cross-references (GitHub comments as historical reference).
  • Updates tests/API_ISSUE_AUDIT.md: test: roadmap for write integration beyond current Yandex sandbox limits #28 row marked resolved, test: add guarded live API draft create/delete tier for sandbox-limited coverage #56 row added.

Context

Follow-up to PR #57. The A/B split was published as GitHub comments on #28 and #56 (2026-04-19) but not yet codified in the repo. This PR closes that gap and satisfies the acceptance criteria for both issues.

Closes

Closes #28. Closes #56.

Test plan

  • pytest --collect-only -m integration_write --strict-markers -q — collection clean, 19 selected
  • pytest -m integration_write --record-mode=none -q -rs — 10 passed, 9 skipped, no cassette rewrites
  • pytest -m "not integration and not integration_write and not integration_live_write" -q — unit suite green
  • git diff --name-only main...HEAD — exactly 4 files

🤖 Generated with Claude Code

Each sandbox-limited write test class now carries
@pytest.mark.sandbox_limitation(category=...) with either "disabled"
(7 classes, codes 8800/1000/5004 — live API supports these but sandbox
does not) or "unsupported" (2 classes, code 3500 — campaign type absent
from sandbox by design).

TestWriteBids and TestWriteSmartAdTargets receive the first class-level
marker; all seven existing markers gain the category kwarg. The module
docstring, API_COVERAGE.md Sandbox Category Split section, and the #28
row in API_ISSUE_AUDIT.md reflect the same split.

Closes #28. Closes #56.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@axisrow

axisrow commented Apr 19, 2026

Copy link
Copy Markdown
Owner Author

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

claude Bot commented Apr 19, 2026

Copy link
Copy Markdown

Claude finished @axisrow's task in 1m 0s —— View job


Code Review

  • Read changed files
  • Analyze for bugs, security issues, logical errors, data loss risks, performance problems
  • Post findings

No critical issues found.

This PR is entirely documentation and metadata — there are no functional or runtime behavior changes.

Key observations:

  1. sandbox_limitation marker has no runtime hook. conftest.py has no get_closest_marker/iter_markers call for sandbox_limitation — the marker is purely informational. Adding category= kwarg is safe and backward-compatible; pytest accepts arbitrary kwargs on custom markers without validation.

  2. pyproject.toml marker string (sandbox_limitation(reason, category)) — the (reason, category) is documentation text only, not enforced by pytest. Fine.

  3. New class-level markers on TestWriteBids and TestWriteSmartAdTargets — these classes previously relied solely on inline _is_sandbox_error skips. Adding the class-level marker is additive; it doesn't trigger any skip logic since nothing in conftest processes it. Runtime behavior is identical.

  4. Documentation tables in API_COVERAGE.md — the Category A table lists 7 rows and the marker comment says "7 classes", consistent. Category B lists 2 rows / 2 classes. Cross-references match actual test class names in the file.

  5. API_ISSUE_AUDIT.mdtest: roadmap for write integration beyond current Yandex sandbox limits #28 row expansion and new test: add guarded live API draft create/delete tier for sandbox-limited coverage #56 row are accurate given the PR description context.

No bugs, no security issues, no logic errors, no data loss risk, no performance impact.

@axisrow
axisrow merged commit 2f802c3 into main Apr 19, 2026
6 checks passed
@axisrow
axisrow deleted the chore/codify-sandbox-category-split branch April 19, 2026 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant