-
Notifications
You must be signed in to change notification settings - Fork 2
fix(insights): finish typed session-PR evidence + wire root: filter #3431
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
829d700
f3cdb87
7867b7c
74ce554
87f192a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -125,6 +125,7 @@ class _ArchiveFilterKwargs(TypedDict): | |
| since_ms: int | None | ||
| until_ms: int | None | ||
| since_session_id: str | None | ||
| root: bool | None | ||
| boolean_predicate: NotRequired[QueryPredicate] | ||
|
|
||
|
|
||
|
|
@@ -304,6 +305,7 @@ def _execute_archive_query_stdout(env: AppEnv, request: RootModeRequest) -> None | |
| "since_ms": since_ms, | ||
| "until_ms": until_ms, | ||
| "since_session_id": since_session_id, | ||
| "root": compiled_spec.root, | ||
|
Comment on lines
305
to
+308
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For AGENTS.md reference: AGENTS.md:L193-L197 Useful? React with 👍 / 👎. |
||
| } | ||
| if compiled_spec.boolean_predicate is not None: | ||
| filter_kwargs["boolean_predicate"] = compiled_spec.boolean_predicate | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -275,6 +275,15 @@ def _validate_origin_tokens( | |
| ), | ||
| click.option("--reverse", is_flag=True, help="Reverse sort order"), | ||
| click.option("--sample", type=int, help="Random sample of N sessions"), | ||
| click.option( | ||
| "--root/--no-root", | ||
| "root", | ||
| default=None, | ||
| help=( | ||
| "Only top-level sessions (--root) or only subagent/branch children " | ||
| "(--no-root). Unset (default) selects both, unfiltered by structure." | ||
|
Comment on lines
+279
to
+284
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When a daemon is reachable—the normal AGENTS.md reference: AGENTS.md:L193-L197 Useful? React with 👍 / 👎. |
||
| ), | ||
| ), | ||
| ) | ||
|
|
||
| OUTPUT_OPTION_DECORATORS: tuple[Callable[[ClickCallable], ClickCallable], ...] = ( | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When a spec is executed through the Python API/MCP plan path, this activates
plan.root, butarchive_execution._plan_filter_kwargsstill omits it even though the storage readers now accept SQL-levelroot. The residual filter runs only after_archive_summarieshas applied the requested offset and fetched at mostlimit * 4, so a page whose leading rows are children can return short or empty forroot:truedespite matching roots later in the archive (and conversely forroot:false). Addrootto the plan-to-storage kwargs so partitioning occurs before pagination.AGENTS.md reference: AGENTS.md:L227-L229
Useful? React with 👍 / 👎.