audit surface: migrate to the consolidated campus_python.audit client (post-#178) and re-pin

Open
#100 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
43/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Active
Tech stack
python
Domain
api, cli

Research direction

Start in campus_cli/audit/client.py and inspect the audit call sites under campus_cli/audit/; the issue estimates about 46 call sites whose dict-consuming code may need to handle CampusResponse via .json(). Read the consolidated client changes in campus-api-python#178 and the response and query fixes in #180, then run the audit tests. Done means the audit commands work with campus-api-python v0.11.0, the dependency is pinned, and release 0.8.2 is cut.

Written by the indexing model from the issue text.

Description

Follow-up from the 2026-11-21 bugfix sweep.

Current state (campus-cli 0.8.0/0.8.1 + campus-api-python v0.10.9 wheel):

  • campus audit traces list/search and apikeys list crash client-side:
    CampusRequest.get() got an unexpected keyword argument 'params' — the
    v0.10.9 wheel's audit resources pass params= where get() takes
    query= (kwarg fix: campus-api-python#180).
  • The installed 0.8.0 is affected today; cli#99 (0.8.1) stays pinned at
    v0.10.9 so it inherits the crash. Workaround until the migration: drive
    traces via the campus-admin audit UI, raw HTTP, or the SDK directly.

The migration: the audit-namespace reorg (campus-api-python#178,
merged unreleased) consolidated the flask-campus audit client into the
SDK as campus_python.audit — the PR itself notes "campus-cli vendors a
duplicate today, can adopt it later". The next SDK release from main is
v0.11.0 (minor: CampusResponse return types are breaking for the CLI's
dict-consuming audit code, ~46 call sites in campus_cli/audit/).

Scope: adopt the consolidated client in campus_cli/audit/
(AuditRoot/CampusRequest construction in client.py already matches the
new surface's auth style), unwrap CampusResponse (.json()) at the
render boundary, pin campus-api-python v0.11.0, cut 0.8.2.

Dominant language
Python
Stars
0
Forks
0
Avg merge
14m
Merged PRs (30d)
24

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

  • No Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from nyjc-computing/campus-cli

All issues in nyjc-computing/campus-cli

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.