Skip to content

feat(graph): pepper graph entity and graph catalog - #264

Merged
allenhutchison merged 2 commits into
mainfrom
eg-graph-entity
Nov 15, 2026
Merged

allenhutchison merged 2 commits into
mainfrom
eg-graph-entity

Conversation

@allenhutchison

@allenhutchison allenhutchison commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Human overview

Adds pepper graph entity ID (an entity's page: edges by type, follows included, and its catalog entry) and pepper graph catalog ID | --scheme S --value V (a catalog entry plus your entities that link to it), both with --history and --json. Read-only; needs Vycari/pepper#6407 deployed for live use (merged, deploying). Refs Vycari/pepper#6365.

Human required (optional)

  • Merge only after Vycari/pepper#6407 is live (it is merged; deploy in progress).

AI reviewer

Details for agents: what the diff does, invariants, verification, checklist

What the diff does.

  • api_client.py: graph_entity, graph_catalog, graph_catalog_lookup over GET /api/v1/graph/entities/{id}, /catalog/{id}, /catalog?scheme=&value=, each sending history=true|false. Ids are percent-quoted into the path. No new # MIRROR: dataclasses: the bodies are passed as dicts like the existing graph reads, so tests/test_api_contract.py is unaffected.
  • cli.py: graph entity and graph catalog parsers and handlers. catalog takes an ID or --scheme with --value (parser-checked against the server's scheme list), never both; blank or missing arguments exit 2 before any request. A 200 whose status is timeout or error (or whose page is null) prints a plain message and exits 1; with --json the body is printed first. A 404 gets one message covering unknown id, not yours, and rollout off (the server answers all three identically). Other errors go through _fail_api (a non-UUID id is a server 422).
  • graph_view.py: entity_page and catalog_page rendering. Edges are grouped by type in server order; a follow shows its follow_ref; --history marks closed edges with their close time and open ones "open". A merged-away id shows "merged: X is now this entity". Timestamps are rendered from the data; nothing reads the clock.
  • Conformance tests (tests/test_cli_conformance.py): entity and catalog added to the verb allowlist, both leaves listed as not room-scoped, and JSON-mode fixtures added; the entity help says "listed by type" because the wording check bans "group".
  • Docs: README table, CHANGELOG, help/cli.md (inside the existing entity-graph rollout block), bundled SKILL.md.

Invariants. graph show (event detail) is untouched. The CLI holds no gating of its own; the server's 404 is the gate. /api/v1 use is additive. No token is printed.

Where to look hardest. _graph_page (fail-soft exit codes) and the 404 wording shared by all graph commands (it now also covers "unknown or not yours").

Verification (actual, run in the worktree). uv run ruff format --check, uv run ruff check, uv run ty check src/pepper_cli/ clean; uv run pytest -n auto: 3360 passed, 2 skipped. The WIP commit had never been run; four conformance tests failed on it and are fixed in the second commit.

Deferred. None.

Checklist (repo-specific)

  • uv run ruff format --check and uv run ruff check clean (no new lint ignores)
  • uv run ty check src/pepper_cli/ clean
  • uv run pytest passes; coverage floor in .claude/maintainerd.json not lowered
  • Server-contract changes: /api/v1 usage stays additive-only, # MIRROR: comments updated (none needed), unknown fields and frames still tolerated
  • No token or credential is logged, printed, or put in a fixture
  • README and the bundled SKILL.md updated if commands or output changed
  • Help: help/cli.md updated for a new or changed command

🤖 Generated with Claude Code

https://claude.ai/code/session_01QNDeh973CCmhrDbk68xBDz

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge.

Summary

Adds pepper graph entity and pepper graph catalog with --history and --json.

  • Entity pages show an entity's catalog link and typed edges.
  • Catalog pages show shared entries and entities that link to them.

Reviews (1) · Last reviewed commit: "fix(graph): satisfy the CLI conformance ..." · Reviewed by Greptile

allenhutchison and others added 2 commits November 15, 2026 01:22
…atalog

Allow the entity and catalog verbs, mark both leaves as not room-scoped, give
them JSON-mode fixtures, and drop the word 'grouped' from the entity help.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QNDeh973CCmhrDbk68xBDz
@vycari-review

vycari-review Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

Vycari Review

Round 1 on abc8af1. The verdict is the Vycari Review check run, and each open finding is an inline thread. Reply on every P0 and P1 thread: Fixed in <sha>, or Disputed: with a reason. P2s are the author's call: fix one, or reply Deferred: #<issue> (the PR's one follow-up issue) or Declined: with a reason, and VR stops re-raising it. From round 2 on, VR raises no new P2s: it checks the fixes and looks for P0s and P1s.

Open: P0 0 · P1 0 · P2 0 · disputed 0 · confirmed fixed 0 · withdrawn 0

Hand-off: Greptile requested on abc8af1.

No open findings this round.

P2s, judge's notes and closed findings

Judge's notes

No candidate findings were raised.

@vycari-review

vycari-review Bot commented Nov 15, 2026

Copy link
Copy Markdown

@greptileai review

@allenhutchison
allenhutchison added this pull request to the merge queue Nov 15, 2026
Merged via the queue into main with commit a39a568 Nov 15, 2026
5 checks passed
@allenhutchison
allenhutchison deleted the eg-graph-entity branch November 15, 2026 05:23
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.

1 participant