Skip to content

fix(test): make test_issue231 graph_edges query cross-platform (path separator) #268

Description

@Wolfvin

Mengapa

Ditemukan saat verifikasi lokal BOS terhadap PR #263 (merged). 2 test di `tests/test_issue231_async_handler_edges.py` GAGAL di Windows tapi lolos di Linux CI:

  • `TestAsyncHandlerEdgeReachesGraph::test_getgoogleclient_edge_in_graph_edges`
  • `TestDirectArgumentPatternNoRegression::test_requirepermission_edge_in_graph_edges`

Root cause (diverifikasi via inspeksi DB langsung): test ambil node `id` dari `backend.json` yang di Windows pakai separator OS-native backslash (`src\services\google.ts:2`), lalu query `graph_edges` SQLite yang menyimpan target_id dengan forward slash (`src/services/google.ts:2`). Exact-match `WHERE target_id = ?` → 0 hasil → gagal. Di Linux kedua pakai `/` jadi lolos.

Fix #231 sendiri BENAR — edge `customer-auth.ts:0:` → `src/services/google.ts:2` CALLS terbukti ada di graph_edges. Ini murni bug portabilitas test.

Konteks

Ada inkonsistensi laten: `backend.json` node id pakai separator OS-native, `graph_edges` normalize ke forward slash. Test tidak boleh asumsikan keduanya sama.

Tujuan

Test query graph_edges harus normalize separator (atau pakai node_id dari graph_nodes langsung, yang sudah forward-slash) supaya lolos di Windows DAN Linux.

Constraint

  • Jangan ubah product code hanya untuk test — normalize di sisi test/query helper.
  • Pertimbangkan juga: apakah backend.json SEBAIKNYA normalize ke forward slash biar konsisten dgn graph_edges? (evaluasi terpisah, jangan campur ke fix test ini kecuali terbukti perlu)

Definition of Done

  • Kedua test lolos di Windows (saat ini gagal)
  • Tetap lolos di Linux

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