Skip to content

fix(inventory): add status validation to transfer service#334

Merged
robotlearning123 merged 7 commits intomainfrom
fix/transfer-status-check
Mar 28, 2026
Merged

fix(inventory): add status validation to transfer service#334
robotlearning123 merged 7 commits intomainfrom
fix/transfer-status-check

Conversation

@robotlearning123
Copy link
Copy Markdown
Member

Summary

  • transfer() allowed moving disposed/depleted/deleted/expired items without validation
  • Added status check consistent with consume(), dispose(), and open_item()
  • Prevents invalid inventory state transitions (e.g. transferring a disposed item to a new location)

Test plan

  • Added parametrized test covering all 4 inactive statuses (disposed, depleted, deleted, expired)
  • All 52 inventory service tests pass

🤖 Generated with Claude Code

Comment thread alembic/versions/0c2125df7c3a_merge_heads.py Fixed
Comment thread alembic/versions/0c2125df7c3a_merge_heads.py Fixed
Comment thread alembic/versions/0c2125df7c3a_merge_heads.py Fixed
Comment thread alembic/versions/0c2125df7c3a_merge_heads.py Fixed
Comment thread alembic/versions/0c2125df7c3a_merge_heads.py Fixed
Comment thread alembic/versions/0c2125df7c3a_merge_heads.py Fixed
transfer() allowed moving disposed/depleted/deleted/expired items
without error, inconsistent with consume/dispose which validate status.
Added same status check to prevent invalid state transitions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@robotlearning123 robotlearning123 force-pushed the fix/transfer-status-check branch from 82a4727 to aa58fee Compare March 27, 2026 20:24
@robotlearning123 robotlearning123 enabled auto-merge (squash) March 27, 2026 20:24
@github-actions github-actions Bot added python ci-verified All required CI checks have passed labels Mar 27, 2026
@robotlearning123
Copy link
Copy Markdown
Member Author

QA: APPROVED ✓ Clean, tested, single concern. Merge when CI green.

sandia777 and others added 5 commits March 28, 2026 11:08
merge-gate timed out (150/150 attempts) due to race condition —
CI checks were still registering when merge-gate started polling.
All actual checks passed. Empty commit to retrigger workflows.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@robotlearning123 robotlearning123 merged commit 15c64ae into main Mar 28, 2026
22 checks passed
@robotlearning123 robotlearning123 deleted the fix/transfer-status-check branch March 28, 2026 18:59
robotlearning123 added a commit that referenced this pull request Mar 28, 2026
## Summary
- `transfer()` allowed moving disposed/depleted/deleted/expired items
without validation
- Added status check consistent with `consume()`, `dispose()`, and
`open_item()`
- Prevents invalid inventory state transitions (e.g. transferring a
disposed item to a new location)

## Test plan
- [x] Added parametrized test covering all 4 inactive statuses
(disposed, depleted, deleted, expired)
- [x] All 52 inventory service tests pass

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Cong <72737794+robolearning123@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
robotlearning123 added a commit that referenced this pull request Mar 28, 2026
## Summary
- `transfer()` allowed moving disposed/depleted/deleted/expired items
without validation
- Added status check consistent with `consume()`, `dispose()`, and
`open_item()`
- Prevents invalid inventory state transitions (e.g. transferring a
disposed item to a new location)

## Test plan
- [x] Added parametrized test covering all 4 inactive statuses
(disposed, depleted, deleted, expired)
- [x] All 52 inventory service tests pass

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Cong <72737794+robolearning123@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
robotlearning123 added a commit that referenced this pull request Mar 28, 2026
## Summary
- `transfer()` allowed moving disposed/depleted/deleted/expired items
without validation
- Added status check consistent with `consume()`, `dispose()`, and
`open_item()`
- Prevents invalid inventory state transitions (e.g. transferring a
disposed item to a new location)

## Test plan
- [x] Added parametrized test covering all 4 inactive statuses
(disposed, depleted, deleted, expired)
- [x] All 52 inventory service tests pass

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Cong <72737794+robolearning123@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-verified All required CI checks have passed python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants