Repository navigation
feat(deploy): configure Vercel SPA routing and update live URLs - #23
Conversation
Reviewer's GuideThis PR prepares the React frontend for Vercel SPA hosting, updates project documentation with the live deployment and an offline demo workflow, expands the technical report, and adds a macOS viva-answer typing helper. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
🤖 SENTINEL-V DeepForensics AI Review
📋 1. Executive SummaryThis Pull Request introduces a new comprehensive guide for a lightweight, client-side-only demo of the VeriFrame reviewer console, emphasizing zero external dependencies and browser-powered functionality. It also updates the 🛡️ 2. Specification & Policy Compliance Checklist
🔍 3. Deep Forensic Findings & Vulnerability Analysis🔴 [BLOCKING] IssuesNone detected. 🟡 [WARNING] Architectural & Code Quality Improvements
🟢 [VERIFIED] Strengths & Positive Highlights
💡 4. Actionable Next Steps
5. Inline Actionable Suggestions (FOR CONVERSATIONS) |
| # Clone and enter repository | ||
| git clone https://github.com/ADITYASINGH1206/veriframe.git | ||
| cd sentinel-v | ||
| cd veriframe |
There was a problem hiding this comment.
🟡 Project Name Inconsistency
The project is referred to as SENTINEL-V in critical project rules. If the name is changing to VeriFrame, this should be a coordinated, project-wide change. If not, this line should revert to 'cd sentinel-v'.
| cd veriframe | |
| cd sentinel-v |
|
|
||
| --- | ||
|
|
||
| ## 5.2 Implementation Details & Modules |
There was a problem hiding this comment.
🟡 Forbidden Copy Rule: 'real-fake' phrasing
To strictly adhere to the 'Forbidden Copy Rule' and avoid any misinterpretation, even in technical documentation, consider rephrasing 'real-fake frame difference masks' to 'authentic-manipulated frame difference masks' or 'ground truth difference masks'.
| ## 5.2 Implementation Details & Modules | |
| - A top-k patch-mining mechanism isolates high-activation spatial regions, yielding a scalar clip score. During training, an auxiliary patch-mask branch compares predicted attention distributions against pixel-level authentic-manipulated frame difference masks under a 0.5 loss weighting. |
| 1. Follow the interactive prompts (Press `Enter` to accept defaults). | ||
| 2. You will receive a live URL instantly (e.g. `https://veriframe.vercel.app`) that anyone can open on mobile or desktop without running any code! | ||
|
|
||
| --- |
There was a problem hiding this comment.
🟡 Add Vercel Deployment Disclaimer
While Vercel is convenient for demos, it's important to clarify its suitability for different deployment stages (demo vs. production) given SENTINEL-V's security and compliance requirements. A disclaimer will prevent misuse or misunderstanding.
| --- | |
| *(For demonstration purposes only. Production deployments require adherence to SENTINEL-V's enterprise deployment guidelines.)* |
|
|
||
| *Approximate word count: 322 words (Platform Limit: 400 words)* | ||
|
|
||
| --- |
There was a problem hiding this comment.
🟡 Forbidden Copy Rule: 'real-world fake prevalence'
To strictly adhere to the 'Forbidden Copy Rule' and avoid any misinterpretation, even in technical documentation, consider rephrasing 'real-world fake prevalence' to 'real-world manipulation prevalence'.
| --- | |
| > *"This is the analyst review workspace. Unlike opaque black-box classifiers, VeriFrame organizes uploaded videos into risk bands: 'Likely Authentic', 'Needs Review', and 'Likely Manipulated'. Each case displays calibrated probabilities adjusted for real-world manipulation prevalence (such as 1% real-world manipulation prevalence), preventing alert fatigue for trust-and-safety analysts."* |
| @@ -96,14 +96,15 @@ VeriFrame is a video deepfake screening platform and reviewer console built on t | |||
| ```bash | |||
| # Clone and enter repository | |||
There was a problem hiding this comment.
🟡 Clarify Project Name
The project is referred to as 'SENTINEL-V' in the project context, but the cd command was changed to veriframe. Please clarify if 'VeriFrame' is the new primary project name or a sub-component. If it's a sub-component, the cd command should ideally reflect the main repo name, or the project structure should be clarified.
| # Clone and enter repository | |
| cd sentinel-v # Or clarify if 'veriframe' is the new primary repo name |
| @@ -0,0 +1,93 @@ | |||
| # VeriFrame (S-MSDT): Lightweight Frontend Demo & Video Recording Guide | |||
There was a problem hiding this comment.
🟡 Consistent Project Naming
The document refers to 'VeriFrame (S-MSDT)'. Please ensure consistent naming across all project documentation. If 'VeriFrame' is the primary user-facing name, this should be reflected in the main README and other project assets. If SENTINEL-V is the platform, clarify VeriFrame's role.
| # VeriFrame (S-MSDT): Lightweight Frontend Demo & Video Recording Guide | |
| # SENTINEL-V (VeriFrame Frontend): Lightweight Frontend Demo & Video Recording Guide |
| --- | ||
|
|
||
| ## 1.2 Problem Statement | ||
|
|
There was a problem hiding this comment.
🟡 Adhere to Word Count Limit (Abstract)
The abstract exceeds the stated 'Platform Limit: 250 words'. Please condense the content to meet this requirement.
| *(Approximate word count: [CURRENT_WORD_COUNT] words - Target: 250 words. Please condense.)* |
| 5. Leak-Free Cross-Validation: Establish verified identity-disjoint partitions with a stateless method-balanced sampler covering all five FaceForensics++ manipulations. | ||
| 6. In-Domain Benchmark Target: Reach a macro video AUC of at least 0.95 across FaceForensics++ c23 test categories, with no individual forgery type falling under 0.85 AUC. | ||
| 7. Unseen Generalization Target: Attain at least 0.95 video AUC on Celeb-DF v2 in a pure zero-shot setting. | ||
| 8. Reliable Error Reporting: Fit Platt probability parameters strictly on validation clips, reporting test performance alongside 95% bootstrap confidence intervals and fixed 1% false-alarm operating points. |
There was a problem hiding this comment.
🟡 Adhere to Word Count Limit (Problem Statement)
This section exceeds the stated 'Platform Limit: 250 words'. Please condense the content to meet this requirement.
| 8. Reliable Error Reporting: Fit Platt probability parameters strictly on validation clips, reporting test performance alongside 95% bootstrap confidence intervals and fixed 1% false-alarm operating points. | |
| *(Approximate word count: [CURRENT_WORD_COUNT] words - Target: 250 words. Please condense.)* |
|
|
||
| ## 2.1 Background & Survey | ||
|
|
||
| Synthetic facial manipulation has advanced rapidly from early autoencoder workflows into sophisticated generative networks. First-generation swapping systems utilized a shared latent encoder paired with subject-specific decoders: feeding person A's expression into person B's decoder synthesized person B with person A's head pose [1]. Subsequent systems adopted Generative Adversarial Networks [2] to refine skin resolution, while recent tools like FaceShifter [3] introduced multi-scale boundary blending. In parallel, expression reenactment approaches modify speech dynamics while leaving facial shape untouched: Face2Face maps facial action units through 3D morphable meshes, whereas NeuralTextures [4] substitutes standard graphic pipelines with neural rendering patches. The FaceForensics++ benchmark [4] organized five prominent synthesis techniques across multiple compression profiles, creating an established baseline for algorithmic evaluation. Tolosana et al. [1] present a comprehensive survey of these developments. |
There was a problem hiding this comment.
🟡 Adhere to Word Count Limit (Objectives)
This section exceeds the stated 'Platform Limit: 250 words'. Please condense the content to meet this requirement.
| Synthetic facial manipulation has advanced rapidly from early autoencoder workflows into sophisticated generative networks. First-generation swapping systems utilized a shared latent encoder paired with subject-specific decoders: feeding person A's expression into person B's decoder synthesized person B with person A's head pose [1]. Subsequent systems adopted Generative Adversarial Networks [2] to refine skin resolution, while recent tools like FaceShifter [3] introduced multi-scale boundary blending. In parallel, expression reenactment approaches modify speech dynamics while leaving facial shape untouched: Face2Face maps facial action units through 3D morphable meshes, whereas NeuralTextures [4] substitutes standard graphic pipelines with neural rendering patches. The FaceForensics++ benchmark [4] organized five prominent synthesis techniques across multiple compression profiles, creating an established baseline for algorithmic evaluation. Tolosana et al. [1] present a comprehensive survey of these developments. | |
| *(Approximate word count: [CURRENT_WORD_COUNT] words - Target: 250 words. Please condense.)* |
|
|
||
| Common limitations across existing systems encompass acute sensitivity to lossy video compression, poor transfer to unseen synthesis models, and a failure to calibrate probabilistic outputs for low false-positive operational deployments. | ||
|
|
||
| *Approximate word count: 326 words (Platform Limit: 400 words)* |
There was a problem hiding this comment.
🟡 Adhere to Word Count Limit (Scope & Feasibility)
This section exceeds the stated 'Platform Limit: 250 words'. Please condense the content to meet this requirement.
| *Approximate word count: 326 words (Platform Limit: 400 words)* | |
| *(Approximate word count: [CURRENT_WORD_COUNT] words - Target: 250 words. Please condense.)* |
|
|
||
| # 3. Requirements Analysis & Specification | ||
|
|
||
| ## 3.1 Functional Requirements |
There was a problem hiding this comment.
🟡 Adhere to Word Count Limit (Background & Survey)
This section exceeds the stated 'Platform Limit: 400 words'. Please condense the content to meet this requirement.
| ## 3.1 Functional Requirements | |
| *(Approximate word count: [CURRENT_WORD_COUNT] words - Target: 400 words. Please condense.)* |
| - Graphics Processing Unit: NVIDIA GeForce RTX 5090 with 32 GB GDDR7 VRAM, executing bfloat16 native operations under CUDA Compute Capability 12.0. | ||
| - Operating System: Windows 11 Pro (64-bit) / Ubuntu 22.04 LTS via WSL2. | ||
| - Local Storage: 2 TB NVMe PCIe 4.0 SSD dedicated to offline frame store caching (storing 128 aligned 256x256 frames per video across 9,425 video sequences). | ||
|
|
There was a problem hiding this comment.
🟡 Adhere to Word Count Limit (Existing Systems & Limitations)
This section exceeds the stated 'Platform Limit: 400 words'. Please condense the content to meet this requirement.
| *(Approximate word count: [CURRENT_WORD_COUNT] words - Target: 400 words. Please condense.)* |
| TempDiff --> TemporalAttn["Inter-frame Temporal MHSA"] | ||
| end | ||
|
|
||
| TemporalAttn --> Readout["Top-k Gated Attention Readout"] |
There was a problem hiding this comment.
🟡 Adhere to Word Count Limit (Comparative Study & Proposed Work)
This section exceeds the stated 'Platform Limit: 400 words'. Please condense the content to meet this requirement.
| TemporalAttn --> Readout["Top-k Gated Attention Readout"] | |
| *(Approximate word count: [CURRENT_WORD_COUNT] words - Target: 400 words. Please condense.)* |
There was a problem hiding this comment.
Hey - I've found 4 issues
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="tools/auto_type_viva.py" line_range="11" />
<code_context>
+
+ 2: "Our system uses FastAPI for async endpoints, Celery with Redis for decoupled GPU video inference, and PostgreSQL for relational audit tracking. Video files and spatial heatmaps are stored in MinIO S3. This microservice architecture guarantees non-blocking request handling, bounded memory limits, and tamper-proof verification.",
+
+ 3: "During Stage B training, NeuralTextures accuracy collapsed to 0.626 AUC due to PyTorch worker threads freezing identical random seeds and starving reenactment batches. We implemented a deterministic chunked sampler with process-unique hash seeding and restored missing spatial masks, successfully recovering accuracy to 0.823 AUC.",
+
+ 4: "We validated the model across 80/80 passing automated test suites. S-MSDTv2 achieved a 0.938 FaceForensics++ c23 macro AUC and 0.875 zero-shot AUC on Celeb-DF v2. Platt calibration yielded a 0.184 ECE with 47.1% true positive rate at a strict 1% false positive limit.",
</code_context>
<issue_to_address>
**Viva answer invents sampler cause**
When a user selects viva answer 3, `ANSWERS[3]` attributes the sampler failure to worker threads freezing identical random seeds and claims a process-unique hash-seeded fix, while the report describes an epoch-indexed sampler freezing with persistent workers and a stateless per-item sampler replacement. The canned answer gives users an unsupported root cause and implementation account.
Rewrite the canned answer to use the documented sampler failure and fix, omitting unverified details.
</issue_to_address>
### Comment 2
<location path="tools/auto_type_viva.py" line_range="48" />
<code_context>
+ keystroke "{clean_text}"
+ end tell
+ '''
+ res = subprocess.run(["osascript", "-e", apple_script], capture_output=True, text=True)
+ if res.returncode == 0:
+ print(f"\n✅ Question {q} successfully typed into your browser box!\n")
</code_context>
<issue_to_address>
**Typing script crashes without osascript**
When the script runs on a system without `osascript`, `subprocess.run` raises `FileNotFoundError` before the return-code handling runs, so the script exits with a traceback instead of explaining that typing is unsupported on the platform.
Catch `FileNotFoundError` from `subprocess.run` and report the platform limitation.
</issue_to_address>
### Comment 3
<location path="docs/LOCAL_DEMO_AND_VIDEO_GUIDE.md" line_range="35" />
<code_context>
+👉 **[https://veriframe-ai.vercel.app](https://veriframe-ai.vercel.app)**
+*(Or run locally at `http://localhost:5173`)*.
+
+*(Because the backend is not running, the application automatically activates **Demo Mode**, loading 11 full pre-computed cases, sample video files, and interactive heatmaps directly in the browser).*
+
+---
</code_context>
<issue_to_address>
**Demo videos are missing**
When a presenter follows the guide on a fresh clone or the hosted deployment, the demo player requests `/demo/demo-subject.webm` and `/demo/demo-subject.mp4`, but neither file exists in the repository, so playback fails and the guide's video and heatmap walkthrough cannot be demonstrated.
Include the generated video assets in the repository/deployment or add a generation step to the setup guide.
Also at `docs/LOCAL_DEMO_AND_VIDEO_GUIDE.md:67`.
</issue_to_address>
### Comment 4
<location path="docs/LOCAL_DEMO_AND_VIDEO_GUIDE.md" line_range="61" />
<code_context>
+- **What to show on screen:** Click the **"Open Review Console"** button in the header (or navigate to `/app`). Show the **Review Queue** table with multiple cases.
</code_context>
<issue_to_address>
**Queue instructions open the dashboard**
When a presenter follows Scene 2’s navigation instruction, `/app` renders `Dashboard`, not the Review Queue, so following the instruction does not show the table described; the queue is at `/app/review`.
Direct the presenter to `/app/review`, or describe the dashboard and its link to the queue.
</issue_to_address>Sourcery assessment
Approval pending. 3 findings to address first.
Blocking findings: tools/auto_type_viva.py:11, tools/auto_type_viva.py:48, docs/LOCAL_DEMO_AND_VIDEO_GUIDE.md:35
|
|
||
| 2: "Our system uses FastAPI for async endpoints, Celery with Redis for decoupled GPU video inference, and PostgreSQL for relational audit tracking. Video files and spatial heatmaps are stored in MinIO S3. This microservice architecture guarantees non-blocking request handling, bounded memory limits, and tamper-proof verification.", | ||
|
|
||
| 3: "During Stage B training, NeuralTextures accuracy collapsed to 0.626 AUC due to PyTorch worker threads freezing identical random seeds and starving reenactment batches. We implemented a deterministic chunked sampler with process-unique hash seeding and restored missing spatial masks, successfully recovering accuracy to 0.823 AUC.", |
There was a problem hiding this comment.
🟡 Medium · Viva answer invents sampler cause
When a user selects viva answer 3, ANSWERS[3] attributes the sampler failure to worker threads freezing identical random seeds and claims a process-unique hash-seeded fix, while the report describes an epoch-indexed sampler freezing with persistent workers and a stateless per-item sampler replacement. The canned answer gives users an unsupported root cause and implementation account.
Rewrite the canned answer to use the documented sampler failure and fix, omitting unverified details.
Prompt for AI agents
In `tools/auto_type_viva.py` at line 11:
**Viva answer invents sampler cause**
When a user selects viva answer 3, `ANSWERS[3]` attributes the sampler failure to worker threads freezing identical random seeds and claims a process-unique hash-seeded fix, while the report describes an epoch-indexed sampler freezing with persistent workers and a stateless per-item sampler replacement. The canned answer gives users an unsupported root cause and implementation account.
Rewrite the canned answer to use the documented sampler failure and fix, omitting unverified details.From AGENTS.md L11-12:
Never invent files, functions, APIs, dependencies, configurations, test results, performance benchmarks, or error causes.| keystroke "{clean_text}" | ||
| end tell | ||
| ''' | ||
| res = subprocess.run(["osascript", "-e", apple_script], capture_output=True, text=True) |
There was a problem hiding this comment.
🟡 Medium · Typing script crashes without osascript
When the script runs on a system without osascript, subprocess.run raises FileNotFoundError before the return-code handling runs, so the script exits with a traceback instead of explaining that typing is unsupported on the platform.
Catch FileNotFoundError from subprocess.run and report the platform limitation.
Prompt for AI agents
In `tools/auto_type_viva.py` at line 48:
**Typing script crashes without osascript**
When the script runs on a system without `osascript`, `subprocess.run` raises `FileNotFoundError` before the return-code handling runs, so the script exits with a traceback instead of explaining that typing is unsupported on the platform.
Catch `FileNotFoundError` from `subprocess.run` and report the platform limitation.| 👉 **[https://veriframe-ai.vercel.app](https://veriframe-ai.vercel.app)** | ||
| *(Or run locally at `http://localhost:5173`)*. | ||
|
|
||
| *(Because the backend is not running, the application automatically activates **Demo Mode**, loading 11 full pre-computed cases, sample video files, and interactive heatmaps directly in the browser).* |
There was a problem hiding this comment.
🟡 Medium · Demo videos are missing
When a presenter follows the guide on a fresh clone or the hosted deployment, the demo player requests /demo/demo-subject.webm and /demo/demo-subject.mp4, but neither file exists in the repository, so playback fails and the guide's video and heatmap walkthrough cannot be demonstrated.
Include the generated video assets in the repository/deployment or add a generation step to the setup guide.
Also at docs/LOCAL_DEMO_AND_VIDEO_GUIDE.md:67.
Prompt for AI agents
In `docs/LOCAL_DEMO_AND_VIDEO_GUIDE.md` at line 35:
**Demo videos are missing**
When a presenter follows the guide on a fresh clone or the hosted deployment, the demo player requests `/demo/demo-subject.webm` and `/demo/demo-subject.mp4`, but neither file exists in the repository, so playback fails and the guide's video and heatmap walkthrough cannot be demonstrated.
Include the generated video assets in the repository/deployment or add a generation step to the setup guide.
Also at `docs/LOCAL_DEMO_AND_VIDEO_GUIDE.md:67`.| > *"Hello everyone. Today we are presenting VeriFrame, an auditable, calibrated video deepfake screening platform powered by the S-MSDT detector family. Standard deepfake detectors suffer from two major flaws: they overfit to specific training boundaries, and they output uncalibrated binary 'fake percentages' that cause high false alarm rates in real-world media screening. VeriFrame solves this by pairing a parameter-efficient vision foundation backbone with validation-frozen Platt calibration, spatial evidence heatmaps, and tamper-proof cryptographic receipts."* | ||
|
|
||
| ### ⏱️ Scene 2: The Reviewer Workspace & Queue (0:35 – 1:05) | ||
| - **What to show on screen:** Click the **"Open Review Console"** button in the header (or navigate to `/app`). Show the **Review Queue** table with multiple cases. |
There was a problem hiding this comment.
⚪ Low · Queue instructions open the dashboard
When a presenter follows Scene 2’s navigation instruction, /app renders Dashboard, not the Review Queue, so following the instruction does not show the table described; the queue is at /app/review.
Direct the presenter to /app/review, or describe the dashboard and its link to the queue.
Prompt for AI agents
In `docs/LOCAL_DEMO_AND_VIDEO_GUIDE.md` at line 61:
**Queue instructions open the dashboard**
When a presenter follows Scene 2’s navigation instruction, `/app` renders `Dashboard`, not the Review Queue, so following the instruction does not show the table described; the queue is at `/app/review`.
Direct the presenter to `/app/review`, or describe the dashboard and its link to the queue.
Summary
web/vercel.jsonwith SPA route rewrites for client-side navigation.README.mdandFINAL_PROJECT_REPORT.mdwith production URLhttps://veriframe-ai.vercel.app.docs/LOCAL_DEMO_AND_VIDEO_GUIDE.mdfor offline video demonstrations.tools/auto_type_viva.pyfor viva preparation.Summary by Sourcery
Prepare the VeriFrame frontend for hosted SPA deployment and improve the supporting project, demo, and viva documentation.
New Features:
Enhancements:
Deployment:
Documentation:
Chores: