Skip to content

unexpected HTTP status can be reported as success #26

Closed

Description

@aarash94

Problem

drive_node_to follows every non-success answer with a GET and lets the observed state decide. That includes statuses outside the contract, so POST 204 followed by GET present, or DELETE 403 followed by GET absent, end as success. The README says only the documented success codes count as success, and the design says an unexpected status is a failure.

Fix

  • A status outside the contract is a failure whatever GET shows. The GET is kept, once, so the rollback knows the node's state.
  • Tests for the two dangerous cases: unexpected status then GET shows the desired state, for create and for delete.
  • While here: check that the group id is a string before checking for whitespace; validate the hosts before creating the HTTP client; README wording ("key failure-path tests", the retry budget).

Acceptance criteria

  • POST 204 + GET present and DELETE 403 + GET absent both fail
  • create_group(123) raises a ValueError before any call
  • pytest, ruff and CI green

Activity

  1. self-assigned this
    on Sep 12, 2026
  2. moved this from Todo to In Progress in api consumeron Sep 12, 2026
  3. moved this from In Progress to Done in api consumeron Sep 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions