Skip to content

docs: STORE-001/002/003 test commands do not exist #96

@evan-zhang11

Description

@evan-zhang11

Problem

The test commands referenced in behaviors.md for STORE-001/002/003 do not exist in the codebase.

Missing Commands

  1. STORE-001: cargo test test_storage_*

    • Expected: Tests for file storage in ./uploads/<id>/
    • Actual: No tests matching this pattern found
  2. STORE-002: pytest test_db_schema

    • Expected: Python unit tests for DuckDB schema
    • Actual: No Python tests in the project (no *.py files found)
  3. STORE-003: pytest test_state_machine

    • Expected: Python unit tests for task state machine
    • Actual: No Python tests in the project

Evidence

# STORE-001
$ grep -r "test_storage_" backend/tests/
(no output)

# STORE-002/003
$ find . -name "*.py" -type f
(no output)

Root Cause

These appear to be outdated test specifications from an earlier design phase:

  • Project uses Rust integration tests (cargo test), not Python (pytest)
  • Storage behavior is verified through lifecycle tests (API-001, E2E-001, etc.)
  • State machine behavior is verified through upload processing tests

Recommendations

Option 1: Update Documentation (Recommended)

Replace STORE-001/002/003 with references to actual tests:

| STORE-001 | 文件存储 | 原始文件存储在 `./uploads/<id>/` | 通过 E2E-001/002/003 上传流程验证 | E2E tests | P0 |
| STORE-002 | 数据库 Schema | DuckDB 表结构验证 | 通过 API-003/005/006 集成测试隐式验证 | Integration tests | P0 |
| STORE-003 | 状态机 | 任务状态生命周期 | 通过 `cargo test test_upload_*_lifecycle` 验证 | Integration | P0 |

Option 2: Add Tests

If these behaviors need explicit unit tests:

  • Add Rust unit tests for storage layer
  • Add state machine tests
  • Update test commands accordingly

Option 3: Remove

If these are implementation details covered by integration tests, remove them from the behavior contract.

Priority

P2 - Documentation accuracy, but tests exist via integration tests

Impact

  • Testers following documentation will encounter errors
  • May cause confusion about testing approach

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions