Skip to content

feat(review-tutor): honor session model scope and add package docs - #65

Merged
ElbertePlinio merged 1 commit into
mainfrom
feat/review-tutor-package
Aug 24, 2026
Merged

ElbertePlinio merged 1 commit into
mainfrom
feat/review-tutor-package

Conversation

@ElbertePlinio

Copy link
Copy Markdown
Member

Refs #59 — completes the PR 3 slice (package and installation proof). Remaining in the Review Tutor vision: #62 (Structure view), #64 (streaming/multi-tab hardening), optional #63 (Claude Code/Codex connectors).

What changed

  • /review-tutor model discovery now honors the Pi session's scoped models (--models / settings enabledModels) and falls back to the availability snapshot only when no scope is configured; repeated scope entries are deduplicated. Out-of-scope models such as gpt-5.6-luna no longer appear.
  • Three regression tests pin scoped preference, snapshot fallback, and dedupe/label/thinking-level mapping.
  • New packages/review-tutor/README.md: install (local path / pi -e), usage, model selection, local data paths, security boundary, GitHub head handling, honest platform matrix (Linux validated; macOS and Windows code paths unproven).

Tested

  • bun run check green: 410 passed | 25 skipped, coverage 78.28% statements (above floors), typecheck, lint, build.
  • Sandboxed clean-install proof (isolated HOME/XDG, real pi install from local path and from an npm pack tarball into a second sandbox): package listed, extension and skill loaded, /review-tutor server started, page fetched with auth gate (401 without token) and CSP headers verified. Real ~/.pi untouched.
  • Real end-to-end smoke with a real Pi TUI session (worktree package via pi -e): scoped model list served exactly the 5 resolvable scoped models (no Luna/Terra vs ~90 in the availability snapshot); real GitHub PR feat(review-tutor): redesign guided review interface #61 loaded through the head-race guard pinned to 7d10887; real provider question (deepseek-v4-flash) answered in the explain format; learning log persisted with kind: pr and head SHA provenance under ~/.pickforge/review-tutor.

Not tested

  • pi install npm:@pickforge/review-tutor against a real registry (package is private; tarball file-set proven instead).
  • macOS and Windows native behavior (documented as unproven in the README).
  • Browser-open success path in the sandbox (fallback URL path proven; the success path was seen in the real-HOME smoke).

Risks

  • Low. The discovery change only narrows the model list when a scope exists; snapshot behavior is preserved otherwise.

Local review: standard risk class, one independent correctness reviewer + KISS gate. Not release-note-worthy for a product app (platform packages repo; no docs/releases/UNRELEASED.md).

Human gate per #59: this PR stops at ready for human review; merge only on Elberte's authorization.

Prefer ctx.scopedModels over the full availability snapshot so the tutor
model dialog matches the session's configured scope, deduplicate repeated
scope entries, and document install, usage, storage, security boundary,
GitHub head handling, and honest platform support in the package README.
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