Repository navigation
feat(demo): run a simulated review end to end in mock mode - #1
Merged
Merged
Conversation
Adds a safe, self-contained demo so the deployed app can be exercised without a GitHub App, credentials or an AI provider. - app/services/demo.py: idempotent seeding of the demo user, installation and simulated repository (mock + AUTO_INIT_DB only; never in real mode) and run_demo_review(), which reuses analyze()/persist_outcome() against the in-memory mock client, skips publishing and AI, records the real running -> succeeded/failed job, and labels the result as simulated. - app/main.py: POST /demo/review (authenticated, CSRF-protected, mock-only, quota-enforced, 403 in real mode), seeding on startup and on the dashboard, and a fix so ?code=mock cannot authenticate anyone when GITHUB_MODE=real. - Dashboard: a "Run demo review" action; recent reviews show files; the review detail page shows a simulated badge. - pyproject: ruff and bandit are runtime dependencies, because the pipeline executes those binaries at runtime and the serverless demo needs them to produce findings. - docs/vercel.md: the demo workflow, exact environment variables, limitations. - tests: seeding, idempotency across sessions, real-mode rejection, persisted result/findings/job, no publishing, mock-client-only, quota enforcement, repeated runs, and the route's auth/CSRF/mode/429 behaviour. Tests: 126 passed; ruff check, ruff format --check and bandit all clean.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Adds a safe, self-contained demo so the deployed app can be exercised without a GitHub App, credentials or an AI provider.
Tests: 126 passed; ruff check, ruff format --check and bandit all clean.