Repository navigation
Closed
Labels
priority: highHigh prioritytype: bugSomething isn't workingtype: securityRelated to securityworkload: hoursLikely takes hours to resolve
Description
Why?
A review of the task controllers found several bugs:
GET /tasksraisesIndexError(500) when no task matches, and returns anext_page_tokenon the last page, so clients keep paging (Next page cursor loop #165; fix: resolve next page cursor loop #189 changed the bug but didn't fix it). Invalidpage_tokenvalues give 500 instead of 400.name_prefixis put unescaped into a MongoDB$regex(^{name_prefix}): callers can send arbitrary regular expressions (expensive patterns, matches beyond the prefix).- For non-Funnel backends,
create_task()replaces the task'sInput/Outputobjects with bare URL strings (remove_auth()), drops inputs without URL (content), and keeps the changed payload for the next backend tried. Tasks with inputs likely fail on TESK and Poiesis. creation_time,start_timeandend_timeare local-time strings (%m-%d-%Y %H:%M:%S), not RFC 3339 as TES requires.
How?
- Listing: empty
next_page_token("") when there is no next page, no error for empty results,400for invalidpage_tokens,page_sizebounds (TES: default and maximum as configured). name_prefix: escape withre.escape()(prefix match only).- Relay: strip credentials from URLs field by field, keeping the model objects and inputs without URL; build the payload per backend from an unchanged copy.
- Timestamps: timezone-aware UTC, RFC 3339.
- Tests for each case.
Acceptance criteria
- Paging through all tasks ends with an empty
next_page_token; empty listings return200with no tasks; invalid tokens return400. -
name_prefixmatches literally. - Inputs and outputs reach non-Funnel backends as objects, including inputs with
content; each backend gets the same payload. - Timestamps are RFC 3339 in UTC.
Closes #165.
Metadata
Metadata
Assignees
Labels
priority: highHigh prioritytype: bugSomething isn't workingtype: securityRelated to securityworkload: hoursLikely takes hours to resolve
Activity