Skip to content

fix(cli): expose report and canonical cache query names - #158

Open
TimeToBuildBob wants to merge 2 commits into
ActivityWatch:masterfrom
TimeToBuildBob:fix/report-canonical-cache-names
Open

TimeToBuildBob wants to merge 2 commits into
ActivityWatch:masterfrom
TimeToBuildBob:fix/report-canonical-cache-names

Conversation

@TimeToBuildBob

Copy link
Copy Markdown
Contributor

Summary

  • Expose the existing name callback argument as --name on report and canonical, with help explaining its requirement for --cache.
  • Keep query generation, SDK cache validation, timezone handling and output unchanged.
  • Add six parameterized real Click/SDK regressions covering help, named cache transport parameters and unchanged output, uncached controls, and unnamed-cache rejection before transport.

Closes #157

Reproduction and verification

On authoritative master c88cf12, report/canonical --cache --name fixture-query fail Click parsing. Before the two decorator additions, the new regression file had 4 expected failures and 2 passing unnamed-cache controls. After: 6 passed.

  • Package make test: 128 passed (7.44s), including the new file.
  • make typecheck: clean, 31 source files.
  • Ruff check and format check: clean for both changed files; git diff --check clean.
  • Filing-time exact-committed-source probe now passes both commands.
  • This repository has no make test-fast target; used its bounded package test target instead. Live-server and interactive test files remain excluded by the existing Makefile.

Transport is synthetic: these checks verify real SDK encoding of name and cache=1, not a server cache hit or freshness. Independent of #154; no SDK cache-policy change.

Git-Session-Id: fd7f9f0a-771b-4c4f-a2a2-73caa6ae6056
Comment thread tests/test_cli_cache_names.py Fixed
@greptile-apps

greptile-apps Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge.

Summary

Adds --name to report and canonical, allowing callers to use their existing named-cache support.

  • Report and canonical commands accept names for cached queries.

Reviews (1) · Last reviewed commit: "fix(cli): expose report and canonical ca..." · Reviewed by Greptile

Git-Session-Id: fd7f9f0a-771b-4c4f-a2a2-73caa6ae6056
@TimeToBuildBob

Copy link
Copy Markdown
Contributor Author

Verified final head de3d7c6: all 7 hosted checks pass. The CodeQL constructor finding is outdated and resolved; the fixture now binds the real SDK query method without subclassing. No further code change needed. Waiting only on a maintainer merge (Bob has Triage access); authoritative-master replay remains required before closing the issue.

@TimeToBuildBob

Copy link
Copy Markdown
Contributor Author

CI-green and mergeable (Greptile 5/5) — waiting only on a maintainer click.

This PR is ready to merge, but the bot has pull-only access to this repo and can't self-merge — surfacing it here so it isn't lost. The monitoring loop will stop re-flagging it now that this note is posted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

report and canonical cannot name their enabled-cache queries

2 participants