Skip to content

fix(tests): freeze wall clock in stage agent snapshot test #7181

Done

Description

@dan-petty

Problem Description

tests/roadmap/stage/test_roadmap_stage_github_snapshot.py::test_agent_phase_offers_stock_tools_only_without_read_issue_or_find_issues freezes _prepare to NOW = datetime(2026, 11, 25, 9, 0, tzinfo=UTC) (tests/roadmap/stage/test_roadmap_stage_github_snapshot.py:47), which computes inputs.deadline in the past once the wall clock passes 13:00 UTC on 2026-11-25. However, run_stage_agent(folders, model=script.model()) (line 362) runs against real datetime.now(UTC) without time_machine.travel(NOW). Inside stage_agent.py (within_budget at lines 92-99), datetime.now(UTC) >= deadline raises RoadmapTimeBudgetError before the model receives any request, leaving script.tools_offered == [].

This failure breaks Tests & Coverage (shard 2 of 5) on origin/main for every pull request.

Reproduction Steps

  1. Run at or after 2026-11-25T13:00:00Z:
    UV_COMPILE_BYTECODE=0 VIRTUAL_ENV= uv run pytest -n 0 tests/roadmap/stage/test_roadmap_stage_github_snapshot.py::test_agent_phase_offers_stock_tools_only_without_read_issue_or_find_issues -q

Expected vs Actual Behavior

Expected: script.tools_offered == stock.tools_offered and test passes regardless of wall-clock time.
Actual: AssertionError: assert [] == [['edit_file', 'grep', 'list_files', 'read_file', 'shell', 'write_file']].

Environment Diagnostics

  • DevOps CLI / Repo commit: 0b9c6983f (origin/main)
  • Python Version: 3.14.10
  • OS & Architecture: Linux (x86_64 DevContainer & GitHub Actions ubuntu-latest)
  • Execution Environment: DevContainer and GitHub Actions (Tests & Coverage (shard 2 of 5))

Logs, Traces, or Terminal Output

FAILED tests/roadmap/stage/test_roadmap_stage_github_snapshot.py::test_agent_phase_offers_stock_tools_only_without_read_issue_or_find_issues - AssertionError: assert [] == [['edit_file'...'write_file']]

Pre-Submission Checklist

  • I have verified that no sensitive credentials, private keys, or internal tokens are contained in this issue report.
  • I have checked existing issues and pull requests to ensure this is not a duplicate.

Source

Source: #7142

Activity

  1. added
    type/bug
    source/agent
    status/new
    effort/low
    on Nov 25, 2026
  2. dan-petty commented on Nov 25, 2026

    @dan-petty
    OwnerAuthor
  3. added
    value/high
    scope/tests
    priority/p0-critical
    owner/agent
    status/in-progress
    status/in-review
    and removed
    status/new
    status/in-progress
    on Nov 25, 2026
  4. removed
    status/in-review
    owner/agent
    on Nov 25, 2026
  5. devops-cli-service commented on Nov 25, 2026

    @devops-cli-service
    Contributor
  6. devops-cli-service commented on Nov 25, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-25 17:09 UTC

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/lowpriority/p0-criticalscope/testssource/agenttype/bugvalue/high

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions