Skip to content

Add failing tests for #508: budget tracker drops test costs#512

Draft
Serhan-Asad wants to merge 3 commits intopromptdriven:mainfrom
Serhan-Asad:fix/issue-508-v2
Draft

Add failing tests for #508: budget tracker drops test costs#512
Serhan-Asad wants to merge 3 commits intopromptdriven:mainfrom
Serhan-Asad:fix/issue-508-v2

Conversation

@Serhan-Asad
Copy link
Contributor

Summary

  • 5 failing unit tests reproducing the tuple index bug at sync_orchestration.py:1752
  • 2 failing E2E tests verifying budget tracking at integration level
  • result[-2] on a 4-tuple returns model name string instead of cost float, silently dropping test/test_extend costs

Root Cause

result[-2] on (content, cost, model, agentic_success) returns result[2] (model), not result[1] (cost). The isinstance(..., (int, float)) check fails silently, defaulting to $0.00.

Fixes #508

Serhan-Asad and others added 3 commits February 12, 2026 14:56
Unit and E2E tests that reproduce the bug where result[-2] on a 4-tuple
from cmd_test_main extracts the model name string instead of the cost float,
causing test/test_extend costs to be silently dropped from budget tracking.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Serhan-Asad Serhan-Asad marked this pull request as draft February 12, 2026 21:15
@Serhan-Asad
Copy link
Contributor Author

The CI failure in test_auto_deps_lock.py::test_concurrent_calls_serialize_and_share_cache is unrelated to this PR.

Root cause: filelock 3.21.0 was released today (Feb 12) and changed behavior — lock files are now deleted on release. The test at line 128 asserts lock_file.exists() after the lock is released, which no longer holds.

Verified locally:

  • filelock==3.20.3 → test passes
  • filelock==3.21.0 → test fails with the same error as CI

This will affect any PR or push to main until the test is fixed or filelock is pinned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Budget tracker drops test/test_extend costs due to wrong tuple index

1 participant