✨ feat: generic --filter passthrough on sessions list, on tapes-client 0.5 - #80
Merged
Conversation
Stable 1.98's clippy fails the workspace on three pre-existing sites: an excessive-nesting block in the plugin dry run (flattened into the loop's own filter), the reap-poll in the upgrade probe tests (the if-break flattened into a while over the surviving pids), and the seven-argument launch-plan builder (allowed, with the reason recorded — its inputs are genuinely independent and a one-caller args struct would be ceremony). No behavior changes.
Repeatable --filter key=value maps to ?key=value through the sealed sessions method — param names are data, so claimed params from any cassette work without recompiling. No label noun is added: the discovery-generated cassette surface already drives any labels-like cassette with zero compiled-in knowledge, and an integration test now pins that property.
The path override onto the sibling checkout was the documented co-development loan: the claimed-filter seam the --filter flag rides on was committed upstream but not yet published. tapes-client 0.5.0 now carries it on crates.io, so the workspace entry returns to the registry form and the lockfile records the published crate. 0.5.0 also retires the typed search, export, and skills surfaces with the read contract's move to tapes v0.39.0: those operations left the sealed document — each is a cassette a deployment serves — and the typed spellings went with them. What that means here: * `tapesctl search` and `tapesctl export` keep their routes, requests, and output unchanged, but issue their calls directly against the cassette routes the retired methods had been rerouting to, through the transport's described-call seam. The response models and the accepted --detail grains move into the two commands, which own those shapes now that the sealed contract does not declare them. * The coverage tables shrink to the operations the contract still declares: searchSpans and exportSession leave the exposed table, and the unexposed allow-list drops exportSessions and the eleven skills routes whose deletion it had been predicting.
|
| Filename | Overview |
|---|---|
| crates/tapesctl/src/api/mod.rs | Adds filter grammar parsing and forwards ordered claimed parameters through the sealed sessions-list operation. |
| crates/tapesctl/src/cli.rs | Adds the repeatable --filter KEY=VALUE sessions-list argument and documents its deployment-defined semantics. |
| crates/tapesctl/src/ports/search.rs | Replaces the removed typed search method with a direct cassette call and command-owned response models. |
| crates/tapesctl/src/ports/export.rs | Replaces the removed typed export method with a direct streaming cassette call and local detail validation. |
| crates/tapesctl/tests/filter_passthrough_integration.rs | Exercises the real binary to verify repeated filter forwarding, untouched JSON output, and discovery-only cassette commands. |
| Cargo.toml | Upgrades the registry-backed tapes-client dependency from the 0.4 to 0.5 series. |
| Cargo.lock | Resolves tapes-client to registry release 0.5.0. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[CLI arguments] --> B{Command}
B -->|sessions list| C[Parse repeatable filters]
C --> D[Core call with claimed parameters]
B -->|search| E[Build cassette Call]
E --> F[Decode local search model]
B -->|export| G[Build streaming cassette Call]
G --> H[Stdout or output file]
D --> I[Read API]
F --> I
H --> I
Reviews (1): Last reviewed commit: "🧹 chore: repay the tapes-client loan — ..." | Re-trigger Greptile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🧍
🤖
Related to PCC-1280.
--filter key=valueonsessions list. Repeatable flag mapping to?key=valuethrough the sealed sessions method's claimed-filter seam (CoreClient::call_with_claimed). Param names are data, not contract — a cassette claims them at admission — so claimed params from any cassette work without recompiling, and the declared-parameter refusal stays intact. An integration test pins that the discovery-generated cassette surface drives a labels-like cassette with zero compiled-in knowledge; nolabelnoun is added.The tapes-client loan, repaid. The workspace's temporary path override onto the sibling checkout returns to the registry form:
tapes-client = { version = "0.5", ... }, resolved to 0.5.0 from crates.io.check-tapes-pins.shpasses with no override notice.Fallout from 0.5.0's breaking removals. The typed search/export/skills surfaces left the client with the contract re-pin to tapes v0.39.0.
tapesctl searchandtapesctl exportkeep their routes, requests, and output unchanged, but now issue their calls directly against the cassette routes the retired methods had been rerouting to, through the transport's described-call seam; the response models and--detailgrains move into the two commands. The coverage tables shrink to the operations the contract still declares.Also folds a third current-stable clippy site (the upgrade probe tests' reap-poll) into the existing gate-green chore.