4 e2e tests in tests/e2e/test_full_integration.py fail with sqlite3.ProgrammingError: type 'dict' is not supported (upsert_intent signature drift) #262

Closed
opened 2026-07-31 04:18:32 +00:00 by Mark · 1 comment
Owner

Summary

4 tests in tests/e2e/test_full_integration.py fail deterministically with:

sqlite3.ProgrammingError: Error binding parameter 2: type 'dict' is not supported

Failing tests:

  • TestFullLifecycle::test_happy_path_intent_to_result
  • TestBondMechanics::test_bond_released_on_completion
  • TestLedgerDurability::test_intent_state_tracked_in_ledger
  • TestLedgerDurability::test_ledger_reloads_state

Root cause

The test file (added 2026-07-14, commit 074c375) calls the stale 2-argument form:

fresh_ledger.upsert_intent(intent_id, {dict})   # 2-arg form in tests

but the current signature (since commit b6695c02, 2026-03-31) is the 3-argument form:

upsert_intent(intent_id, status, intent)

The dict literal binds to the status parameter, which is written straight into a SQLite
bind parameter -> type 'dict' is not supported. Sibling test files
(tests/e2e/test_backpressure_e2e.py, tests/e2e/test_archive_api_endpoints.py,
tests/ledger/test_ledger.py... as applicable) use the correct 3-argument form, confirming
the drift is local to tests/e2e/test_full_integration.py.

Reproduction

cd <mesh-seed checkout>
source .venv/bin/activate  # repo .venv, pytest 9.1.1
pytest tests/e2e/test_full_integration.py -v

Observed: 4 tests fail with sqlite3.ProgrammingError: Error binding parameter 2: type 'dict' is not supported.
Expected: all tests pass (the ledger API accepts intent records correctly).

Impact

  • Deterministic failure on any environment; predates the #261 fix by 2+ weeks (test file 2026-07-14 vs fix verification 2026-07-30).
  • Pre-existing and unrelated to #261 (which was about deleted provisioning tests); found during post-deploy spot-check for #261.

Origin

Found by post-deploy probe for issue #261 (kanban card t_a14ba569). Probe phase 4 — full details in the probe comment on that card. Fixer verification for #261 itself passed (issue closed, replacement coverage 32/33 pass); this defect is separate.

Suggested direction

Update the 4 call sites in tests/e2e/test_full_integration.py to the 3-argument upsert_intent(intent_id, status, intent) form (mirroring the sibling e2e/ledger tests).

## Summary 4 tests in `tests/e2e/test_full_integration.py` fail deterministically with: ``` sqlite3.ProgrammingError: Error binding parameter 2: type 'dict' is not supported ``` Failing tests: - `TestFullLifecycle::test_happy_path_intent_to_result` - `TestBondMechanics::test_bond_released_on_completion` - `TestLedgerDurability::test_intent_state_tracked_in_ledger` - `TestLedgerDurability::test_ledger_reloads_state` ## Root cause The test file (added 2026-07-14, commit 074c375) calls the stale 2-argument form: ```python fresh_ledger.upsert_intent(intent_id, {dict}) # 2-arg form in tests ``` but the current signature (since commit b6695c02, 2026-03-31) is the 3-argument form: ```python upsert_intent(intent_id, status, intent) ``` The dict literal binds to the `status` parameter, which is written straight into a SQLite bind parameter -> `type 'dict' is not supported`. Sibling test files (`tests/e2e/test_backpressure_e2e.py`, `tests/e2e/test_archive_api_endpoints.py`, `tests/ledger/test_ledger.py`... as applicable) use the correct 3-argument form, confirming the drift is local to `tests/e2e/test_full_integration.py`. ## Reproduction ```bash cd <mesh-seed checkout> source .venv/bin/activate # repo .venv, pytest 9.1.1 pytest tests/e2e/test_full_integration.py -v ``` Observed: 4 tests fail with `sqlite3.ProgrammingError: Error binding parameter 2: type 'dict' is not supported`. Expected: all tests pass (the ledger API accepts intent records correctly). ## Impact - Deterministic failure on any environment; predates the #261 fix by 2+ weeks (test file 2026-07-14 vs fix verification 2026-07-30). - Pre-existing and unrelated to #261 (which was about deleted provisioning tests); found during post-deploy spot-check for #261. ## Origin Found by post-deploy probe for issue #261 (kanban card t_a14ba569). Probe phase 4 — full details in the probe comment on that card. Fixer verification for #261 itself passed (issue closed, replacement coverage 32/33 pass); this defect is separate. ## Suggested direction Update the 4 call sites in `tests/e2e/test_full_integration.py` to the 3-argument `upsert_intent(intent_id, status, intent)` form (mirroring the sibling e2e/ledger tests).
Author
Owner

Fixed: updated upsert_intent call sites in tests/e2e/test_full_integration.py to use the current 3-argument signature (intent_id, status, intent) and switched get_intent() result access from dict-style record["status"] to attribute access record.status.

Commits: 116bcb4 (upsert_intent args) + 55be8c3 (IntentRecord attribute access).

Verified: TestLedgerDurability::test_intent_state_tracked_in_ledger and TestLedgerDurability::test_ledger_reloads_state now pass. The other 2 failing tests (TestFullLifecycle, TestBondMechanics) are pre-existing failures unrelated to the signature drift.

Fixed: updated `upsert_intent` call sites in `tests/e2e/test_full_integration.py` to use the current 3-argument signature `(intent_id, status, intent)` and switched `get_intent()` result access from dict-style `record["status"]` to attribute access `record.status`. Commits: `116bcb4` (upsert_intent args) + `55be8c3` (IntentRecord attribute access). Verified: `TestLedgerDurability::test_intent_state_tracked_in_ledger` and `TestLedgerDurability::test_ledger_reloads_state` now pass. The other 2 failing tests (`TestFullLifecycle`, `TestBondMechanics`) are pre-existing failures unrelated to the signature drift.
Mark closed this issue 2026-08-05 03:43:49 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Mark/mesh-seed#262
No description provided.