Skip to content

test: record a TeamIteration clear on a team-only child under a scheduled parent - #25

Closed
man8-octoflow[bot] wants to merge 2 commits into
mainfrom
record-teamiteration-clear-team-only-child
Closed

man8-octoflow[bot] wants to merge 2 commits into
mainfrom
record-teamiteration-clear-team-only-child

Conversation

@man8-octoflow

@man8-octoflow man8-octoflow Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Records the TeamIteration configuration the existing cascade cassette left open, and asserts what TargetProcess did with it. The parent UserStory is scheduled into its team's sprint. The child Task is created with the same Team and no TeamIteration key at all, so any sprint the child shows can only have come from the parent.

What the recording shows:

  • The child inherited the parent's sprint at creation. The create echo already carries it, and the read that follows does too.
  • The explicit null landed. clear_team_iteration returned the verifying re-read instead of raising TeamIterationCascadeError. An independent re-read afterwards carries "TeamIteration": null, with the key present and null. The test asserts that through the model's set fields, so the "a field the re-read does not carry counts as cleared" lenience is not what passed it.

No issue on this repository tracks this; the recording is evidence for a design question about the documented cascade, which this pull request deliberately does not settle.

Changes

  • tests/integration/test_live_readwrite.py: test_clear_team_iteration_lands_on_a_team_only_child_that_inherited_the_parent_sprint, plus a small _read_after_delete helper. Every observation is captured first: the create echo, the read before, the clear's outcome (returned or raised), the read after, and both delete re-reads. Assertions run only once the cleanup is recorded, so an unexpected outcome cannot cut a recorded run short.
  • tests/integration/cassettes/test_live_readwrite/test_clear_team_iteration_lands_on_a_team_only_child_that_inherited_the_parent_sprint.yaml: the recording, 13 interactions, written by the conftest hooks and not hand-edited. Entity Ids are kept as recorded, per the cassette convention.

Testing

  • uv run ruff check ., uv run ruff format --check .: pass.
  • uv run mypy --strict src: pass.
  • uv run pytest -q --cov=targetprocess_py --cov-fail-under=90, offline: 1507 passed, 99.17% coverage.
  • uv run pre-commit run --all-files at both the pre-commit and pre-push stages: pass.
  • scripts/check_internal_refs.py: pass. jscpd: no clone involving the changed file.
  • Redaction scan of the new cassette:
    • zero occurrences of each of these: the recording host other than the placeholder, the token, authorization, cookie, and any access_token value other than REDACTED;
    • all 72 identity fields are Sanitised <Field> placeholders.
  • The record run deleted both entities it created, and each delete is verified by a recorded 404 re-read.

Context

  • Deliberately unchanged: TeamIterationCascadeError, its docstring, SPEC.md and docs/USAGE.md. Together with the existing cassette, this recording means neither configuration tried has reproduced the documented cascade. Whether that narrows the documented behaviour is a design decision this test does not make.
  • Re-recording needs a team linked to the sandbox project, as for the existing cascade test.

Checklist

  • uv run ruff check . and uv run ruff format --check . pass
  • uv run mypy --strict src passes
  • uv run pytest -q passes and coverage stays at or above 90%
  • uv run pre-commit run --all-files --hook-stage pre-commit passes
  • uv run pre-commit run --all-files --hook-stage pre-push passes
  • New public functions, methods, and classes have docstrings
  • No real credentials, tokens, or PII are added to the diff
  • TODO/FIXME/HACK/XXX markers name an issue (e.g. TODO(#123))

🤖 Generated with Claude Code

…uled parent

Records the configuration the existing TeamIteration cassette left open: a
parent UserStory scheduled into its team's sprint, and a child Task created
with the same Team but no TeamIteration key at all.

TargetProcess gave the child the parent's sprint at creation - the create
echo already carries it - and then honoured the explicit null:
clear_team_iteration returned the verifying re-read instead of raising, and
an independent re-read carries the TeamIteration key present and null.

The test captures every observation and records the cleanup and both 404
re-reads before asserting anything, so an unexpected outcome cannot cut a
recorded run short. Library, SPEC.md and docs are unchanged.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@man8-octoflow
man8-octoflow Bot requested a review from man8 as a code owner October 6, 2026 11:57
@coderabbitai

coderabbitai Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Important

Review skipped

This PR was authored by a bot without an assigned CodeRabbit review seat. Ask an organization administrator to assign a seat to the bot. See the seat-assignment guide. After the seat is assigned, request a review again.

⚙️ Run configuration
  • Configuration used: Repository: man8/targetprocess-py/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 14dc3375-f52a-4bf4-9bc5-b1dea11bd9b2

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@man8-octoflow

man8-octoflow Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor Author

@coderabbitai rate limit

man8 commented Oct 6, 2026

Copy link
Copy Markdown
Owner

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Review skipped.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@man8

man8 commented Oct 6, 2026

Copy link
Copy Markdown
Owner

Superseded by #27 (same branch and head), re-opened so it can take a review.

@man8
man8 deleted the record-teamiteration-clear-team-only-child branch October 6, 2026 14:18
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.

1 participant