You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(privacy): show where page text is processed; correct the "local AI" claim - #46
MapleClear is used on pages like benefits and tax forms, and the README sells it as "Privacy-first approach using local inference." But the default backend (MAPLECLEAR_BACKEND, defaulting to groq) is Groq's cloud API. The popup only said groq backend ready, and /health hard-coded local_mode: true. A citizen had no way to tell that the page text leaves their machine.
What
Server:/health reports the truth.
local_mode is computed from the backend (CLOUD_BACKENDS = {"groq"}).
A new demo_mode flag is read from the live backend. Groq with no API key falls back to canned responses and sends nothing.
Popup: the status line reads those fields and shows one of:
Ready · groq cloud (text leaves this device)
Ready · on this device (<backend>)
Ready · demo mode (sample output, nothing is sent)
README: the feature bullet now describes local and cloud modes accurately and points at the popup indicator.
Verification
ruff check server passes, and pytest server/tests is 4/4. The new test covers Groq without a key, which reports demo_mode and local_mode true.
npm run lint:extension (0 warnings) and npm run build:extension pass.
Also reviewed (no change needed)
The server's CORS is already restricted to extension and localhost origins, with allow_credentials=False. FastAPI won't parse text/plain bodies as JSON, so arbitrary websites can't drive the local inference server.
…AI' claim
The README promised 'privacy-first local inference', but the default
backend is Groq's cloud API, and the popup only said 'groq backend
ready'. For a tool people use on benefits and tax pages, users should
know before they click whether the page text leaves their device.
- Popup status now reads 'Ready · groq cloud (text leaves this device)'
or 'Ready · on this device (<backend>)'.
- README feature bullet describes local and cloud modes accurately.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hvd6pkP1fCFrGoA5FmeKF3
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
The popup incorrectly claims page text leaves the device when Groq is in demo mode because it infers processing behavior from the configured backend rather than the actual runtime mode.
This PR corrects MapleClear’s local-only privacy claim and adds a popup indicator showing whether the selected backend processes page text locally or through Groq’s cloud API.
Changes:
Classifies Groq as a cloud backend and adds processing-location text to the connected status.
Updates the README to describe local and cloud options and explain Groq’s data transfer.
File
Description
README.md
Replaces the local-only claim with local/cloud processing guidance.
extension/src/popup.js
Adds backend classification and processing-location status messages.
…llback
Review follow-up: Groq without an API key falls back to canned demo
responses, but /health still said backend=groq (and hard-coded
local_mode=True), so the popup claimed text left the device when
nothing was sent - and would have claimed local for real cloud use.
- /health now returns local_mode computed from the backend and a new
demo_mode flag read from the live backend instance.
- The popup reads those instead of guessing from the backend name:
demo / on this device / <backend> cloud.
- Test: Groq with no key reports demo_mode and local_mode true.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hvd6pkP1fCFrGoA5FmeKF3
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Demo fallback modes in vLLM, Hugging Face, and LM Studio are incorrectly reported as ready because only Groq exposes the demo-state property checked by the popup.
/health read demo_mode off the backend, but only GroqBackend set it, so
vLLM, Hugging Face, LM Studio and llama.cpp reported "Ready · on this
device" even while serving canned demo responses (e.g. when the library or
model is unavailable). The popup then hid the sample-output warning.
Default demo_mode on the base backend and set it in each backend's
initialize() wherever that backend decides to fall back to demo output:
vLLM/HF when the library or model is missing, LM Studio when aiohttp is
missing or no model is loaded, llama.cpp when the model file is absent.
Groq is unchanged.
Add a /health test for a non-Groq backend (vLLM, uninstalled in CI) that
asserts demo_mode and local_mode are both reported true.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hvd6pmyDV2J1mdVgk1Gi79
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
The popup can falsely claim on-device processing while a legacy server sends page text to Groq, and the vLLM backend presents canned responses as real inference.
Do not trust legacy health responses for processing location
extension/src/popup.js:72
An updated extension can still connect to an already-running pre-change server. That server returns local_mode: true even for live Groq requests and has no demo_mode field, so this code displays “on this device” while sending page text to Groq. Require the new health-response fields before trusting the location claim, and show an unknown/update-required message for legacy responses instead of defaulting to on-device processing.
…tion claim
Two review follow-ups:
- VLLMBackend.simplify/translate/expand_acronyms return canned responses
unconditionally (they never call _run_inference), so the backend is demo
even when vLLM initializes. Mark it demo_mode = True from construction so
/health and the popup don't present sample output as real on-device
inference.
- The popup defaulted to "on this device" whenever demo_mode was absent and
local_mode wasn't false. An older, still-running server omits demo_mode and
returns local_mode:true even for live Groq requests, so an updated extension
could claim on-device processing while page text went to the cloud. Require
the demo_mode field (added by this server version) before trusting the
location, and show "processing location unknown - update the server"
for legacy responses.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hvd6pmyDV2J1mdVgk1Gi79
Also addressed the "previously missed" HIGH finding on extension/src/popup.js in the same commit (86e0db8): an updated extension could connect to an older, still-running server that omits demo_mode and returns local_mode: true even for live Groq, so the popup would claim "on this device" while text went to the cloud.
The popup now requires the demo_mode field (added by this server version) before trusting the location claim. If it's absent, it shows "Ready · processing location unknown — update the MapleClear server" instead of defaulting to on-device. (No inline thread existed for it, since the flagged code was unchanged since the last review.)
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Human assessment is needed to evaluate the mismatch between the README’s advertised vLLM support and the backend’s permanently demo-only, canned responses.
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
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.
Why
MapleClear is used on pages like benefits and tax forms, and the README sells it as "Privacy-first approach using local inference." But the default backend (
MAPLECLEAR_BACKEND, defaulting togroq) is Groq's cloud API. The popup only saidgroq backend ready, and/healthhard-codedlocal_mode: true. A citizen had no way to tell that the page text leaves their machine.What
/healthreports the truth.local_modeis computed from the backend (CLOUD_BACKENDS = {"groq"}).demo_modeflag is read from the live backend. Groq with no API key falls back to canned responses and sends nothing.Ready · groq cloud (text leaves this device)Ready · on this device (<backend>)Ready · demo mode (sample output, nothing is sent)Verification
ruff check serverpasses, andpytest server/testsis 4/4. The new test covers Groq without a key, which reportsdemo_modeandlocal_modetrue.npm run lint:extension(0 warnings) andnpm run build:extensionpass.Also reviewed (no change needed)
The server's CORS is already restricted to extension and localhost origins, with
allow_credentials=False. FastAPI won't parsetext/plainbodies as JSON, so arbitrary websites can't drive the local inference server.🤖 Generated with Claude Code
https://claude.ai/code/session_01Hvd6pkP1fCFrGoA5FmeKF3