Repository navigation
Keep full-app demo on semantic providers - #57
Conversation
The previous full-app demo path still had two high-risk launch surfaces: it returned the internal semantic prompt/context to the browser and it could fall through to generic non-semantic providers if those were the only configured providers. This keeps the public API result clean and requires semantic providers for the demo. Constraint: Public browser APIs must not expose internal prompt contracts or silently downgrade from semantic LLM behavior. Rejected: Allow LibreTranslate/MyMemory in the demo path | repeats the fake-working product-surface problem when users expect semantic dialect behavior Confidence: high Scope-risk: narrow Directive: The browser demo is a semantic-provider proof surface; do not reintroduce generic provider fallback or prompt/context leakage. Tested: pnpm build; pnpm test; pnpm audit --audit-level low; focused web-demo and demo-server tests; npm pack dry-run guard
Code Review Roast 🔥Verdict: No Issues Found | Recommendation: Merge Oh wait, this PR is actually clean. I had my flamethrower warmed up and everything. This is rare security-minded work: you're blocking internal prompts from leaking into browser-visible responses, requiring semantic providers only for the demo path, AND preventing fallback to weaker MT providers when the fancy ones fail. That's three layers of defense against product-surface misrepresentation. Chef's kiss. 📊 Overall: Like finding a unicorn in production — I didn't think secure-by-default PRs existed anymore, but here we are. Files Reviewed (6 files)
Reviewed by minimax-m2.5 · 335,877 tokens |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1790dd5641
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| for (const [attemptIndex, name] of providers.entries()) { | ||
| try { |
There was a problem hiding this comment.
Skip circuit-open providers in semantic demo fallback
translateWithSemanticDemoProviders iterates every semantic provider name it is given without checking registry.isAvailable(name), so circuit-breaker state is ignored in the demo path. When a semantic provider is already open/failing, requests still call provider.translate and wait on repeated failing network attempts instead of short-circuiting; this regresses resilience compared with the previous translateWithFallback flow, which filtered with isAvailable before attempting providers.
Useful? React with 👍 / 👎.
| if (!providerStatus.ready) { | ||
| throw new Error(providerStatus.message); |
There was a problem hiding this comment.
Classify non-semantic readiness failures as 503
The new !providerStatus.ready branch throws a message for “configured but not semantic enough” providers, but scripts/demo-server.mjs:123-127 only maps /No provider configured|No translation providers|Provider not available/ to HTTP 503. This new readiness failure now falls through as HTTP 500, so a normal setup/unavailability condition is reported as an internal server error and clients lose the expected service-unavailable semantics.
Useful? React with 👍 / 👎.
Tree is identical to Forgejo main ef214e5. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RXhEX6WJsRZUyGhsp5WgGe
Brings GitHub main level with Forgejo main (ef214e5), the canonical repo, so GitHub carries what v0.3.2 is cut from. - **Roast fixes:** dictionary accents and meaning-safe swaps (#50), accented words in the register, voseo, gender and grammar checks (#51), the file sandbox and patched dependencies (#52), honest claims and a pinned toolchain (#53), and adjective agreement, MCP vosotros parity, the real engine in the demo, and no more "first" claim (#55). - **Branding:** the Hermes plugin icon (#54). - **Release:** every version and install path moves to 0.3.2 (#56). - **Security:** the voseo quote regex CodeQL flagged on this PR now runs in linear time (#57). - **Pages:** `docs/CNAME` is removed. The site already serves from kyanitelabs.github.io/DialectOS/ without a redirect. After this merges, both mains have the same files. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01RXhEX6WJsRZUyGhsp5WgGe --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
Summary
Why
Based on recent failures, the highest-probability next class of bugs is product-surface misrepresentation: the UI/API looks like it works while either leaking implementation details or silently using a weaker provider. The demo is supposed to prove semantic dialect behavior, so it must require semantic providers and keep internal prompts server-side.
Verification
pnpm buildpnpm testpnpm audit --audit-level lowweb-demo-servicetestsdemo-servertestsgit diff --check