Skip to content

Assistant look-ups crash the whole turn on a bad days or from value #68

Description

@ldbumble

tasks_list and calendar_read clamp their days argument; activity_list and errors_list do not, and calendar_read trusts its from date. Whatever they raise goes up through read_op to the concierge, which logs "the model pass failed" and drops the owner's turn.

Where: taskuary/lookups.py - activity_list, errors_list, calendar_read.

activity_list(store, {'days': -5})     -> cutoff in the future -> "Nothing was recorded"
activity_list(store, {'days': 1e9})    -> OverflowError
activity_list(store, {'days': 'week'}) -> ValueError: could not convert string to float
calendar_read(store, {'from': '2026-02-30'}) -> ValueError: day is out of range for month

Done when days is clamped the way its siblings do it, and a non-number or impossible date comes back as a plain sentence instead of an exception.

Test - tests/test_lookups.py: activity.list with days='week', days=1e9, days=-5, and calendar.read with from='2026-02-30' each return a string.


Getting started: pip install -e ".[dev]", then python -m pytest -q (offline, a few seconds). UI work: cd website && npm ci && npm test. See CONTRIBUTING.md. One small PR with the change and its test is perfect.

Activity

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

    bugSomething isn't workinggood first issueGood for newcomers

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions