Repository navigation
v0.0.5
This release fixes a class of silent-failure bugs across the query tools where filter and enum arguments documented in the spec either did nothing or fell through to a default without any error.
Every gap closes with a structured ToolError that echoes the offending value and lists the accepted set, so the LLM can correct in one retry instead of guessing why a query came back empty.
Fixed
- (query) wire process filter (name + sub-pid) (#43).
ProcessFilter::Namewas a TODO that always returnedfalse, andpid:parsed only bareu64, so samply's.Nsub-pid form fell through to the broken name path.
Everyprocess=value silently returned 0 samples.
Namenow matches each thread'sprocessName;Pidwidens toraw::Pidso a bare pid matches every sub-process sharing the OS pid and a suffixed pid pins to one.
Unknown values now surfaceprocess_not_foundwithavailable_processesinstead of an empty result. - (query) wire
time_rangefilter through sample iteration (#48).
time_rangewas parsed intoFilterand documented in the spec fortop_functions,call_tree,stacks_containing,folded_stacks, andcompare_profiles, but no aggregator consulted it — the unsliced full profile came back regardless.
Per-sample gating now lives onProfile::stack_indicesand usessamples.absolute_times()/markers.start_timeto drop items outside the inclusive range.
Fully-disjoint or inverted ranges returnout_of_boundsvia the newvalidate_time_range; partial overlap clamps silently per the design spec. - (query) reject unknown sort_by/group_by/align_by values (#49).
Five tool entry points used catch-all_ =>arms that silently fell back to the default on unrecognized string-enum values — asort_by="selfTime"typo silently ranked by self-time anyway,group_by="lib"silently grouped by function.
All five sites now route through aparse_string_enumhelper that returnsToolError::InvalidValue { field, value, accepted }with the full accepted set. - (query) reject malformed pid:/tid: prefix instead of name fallback (#50).
tid:andpid:opt into integer matching, but the parser silently fell back to a literal name match when the rest didn't parse —process="pid:abc"then surfacedprocess_not_foundlisting every real process, none of which resembled the input.
parse_filteris now fallible: malformed prefixes returninvalid_valuewith the accepted syntax (tid:NNN,pid:NNN,pid:NNN.M,<thread/process name>).
Bare-name matches without a prefix still work unchanged.
Other
- enable
clippy::match_wildcard_for_single_variantsas defensive hygiene against future enum exhaustiveness mistakes - drop redundant
#![allow(dead_code)]fromsrc/profile/event_source.rsandsrc/query/event.rsafter the iterator refactor