Legal pages: Terms, Privacy Policy, DPA (EN) - #35
Conversation
🤖 CodeAnt AI — Review Status
|
✅ Deploy Preview for moderaty ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
📝 WalkthroughSummary by CodeRabbit
WalkthroughAdds shared metadata, reusable rendering, and prerendered routes for Terms, Privacy, and DPA documents. Adds legal content, tables of contents, SEO metadata, footer links, licensing notices, and registry tests. ChangesLegal document publishing
Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
participant Visitor
participant LegalRoute
participant LegalPage
participant LegalDoc
participant LegalContent
Visitor->>LegalRoute: request a legal-document route
LegalRoute->>LegalPage: provide document metadata and content
LegalPage->>LegalDoc: render the document frame
LegalDoc->>LegalContent: render route-specific content
LegalDoc-->>Visitor: return the formatted legal page
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
User descriptionPublishes the three legal documents as site pages, linked from the footer. English-only for now — the docs state a Portuguese version must follow (PT prevails for Brazilian users); tracked as a follow-up. Pages
Shared shell — Placeholders filled
Drafting notes ("template for commercial use", "complete annex before execution", Word TOC fields) removed; docs cross-link to each other and keep all external links (YouTube ToS, Google privacy/revocation, ANPD). Footer — Terms, Privacy, DPA added to the link row (built from Gates: svelte-check 0 errors/warnings, 208/208 tests (3 new for Note: branched from CodeAnt-AI DescriptionPublish Terms, Privacy Policy, and Data Processing Agreement pages What Changed
Impact
💡 Usage GuideChecking Your Pull RequestEvery time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later. Talking to CodeAnt AIGot a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask: This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code. ExamplePreserve Org Learnings with CodeAntYou can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input: This helps CodeAnt AI learn and adapt to your team's coding style and standards. ExampleRetrigger reviewAsk CodeAnt AI to review the PR again, by typing: Check Your Repository HealthTo analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health. |
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | ✅ 27 (≤ 100 complexity) |
| Duplication | ✅ 0 (≤ 1 duplication) |
AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.
TIP This summary will be updated as you push new changes.
🏁 CodeAnt Quality Gate ResultsCommit: ✅ Overall Status: PASSEDQuality Gate Details
|
There was a problem hiding this comment.
This PR successfully implements the three legal document pages (Terms, Privacy, DPA) with proper structure and Brazilian legal compliance requirements. The implementation includes comprehensive tests, correct imports, and proper footer integration. One critical security issue was identified: the Google Privacy Policy URL uses HTTP instead of HTTPS, which must be fixed before merge to prevent potential man-in-the-middle attacks.
You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.
PR Summary by QodoPublish Terms/Privacy/DPA pages (EN) and link from footer
AI Description
Diagram
High-Level Assessment
Files changed (10)
|
PR Code Suggestions ✨Latest suggestions up to commit
|
| Category | Suggestion | Severity | Generated at (UTC) |
| Api mismatch |
Published retention promises contradict persistent storage of comment text and author identifiersThe DPA promises that raw comment content and author identifiers are not src/lib/components/landing/legal/Dpa.svelte [169-180] Why it matters? 🤔
(Use Cmd/Ctrl + Click for best experience) Prompt for AI Agent 🤖This is a comment left during a code review.
**Path:** src/lib/components/landing/legal/Dpa.svelte
**Line:** 169:180
**Comment:**
*Api Mismatch: The DPA promises that raw comment content and author identifiers are not persistently stored and that only moderation outcomes are retained, but the runtime pipeline inserts the full comment text, author name, and author channel ID into the persistent `comments` table for every decision. Either change the implementation to discard these fields or correct the DPA before publishing it.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix | Critical | 2026-08-01 20:00
|
The terms promise an available Portuguese version that is not published by the new routesThe Terms claim that English and Portuguese versions are both published and equally src/lib/components/landing/legal/Terms.svelte [182] Why it matters? 🤔
(Use Cmd/Ctrl + Click for best experience) Prompt for AI Agent 🤖This is a comment left during a code review.
**Path:** src/lib/components/landing/legal/Terms.svelte
**Line:** 182:182
**Comment:**
*Api Mismatch: The Terms claim that English and Portuguese versions are both published and equally available before acceptance, but this PR adds only the English document and the routes render only the English component. Brazilian users therefore cannot access the promised prevailing Portuguese version; either publish and link the Portuguese version or remove the availability claim until it exists.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix | Major | 2026-08-01 20:00
| |
| Security |
The recipient disclosure omits service providers that receive or store user and comment dataThe policy says personal data is shared only with the listed recipients, but it src/lib/components/landing/legal/Privacy.svelte [100-106] Why it matters? 🤔
(Use Cmd/Ctrl + Click for best experience) Prompt for AI Agent 🤖This is a comment left during a code review.
**Path:** src/lib/components/landing/legal/Privacy.svelte
**Line:** 100:106
**Comment:**
*Security: The policy says personal data is shared only with the listed recipients, but it omits OpenAI even though comment text is sent to both the moderation and tone-classification endpoints, and omits Turso even though moderation records are stored in the Turso-backed database. This makes the recipient and international-transfer disclosures incomplete; list all actual processors consistently with Annex III.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix | Critical | 2026-08-01 20:00
|
| Logic error |
Legal tables are rendered below the document's stated minimum readable body sizeThe shared legal-document styles reduce all table content to 14px, and table headers src/lib/components/landing/legal/LegalDoc.svelte [185-189] Why it matters? 🤔
(Use Cmd/Ctrl + Click for best experience) Prompt for AI Agent 🤖This is a comment left during a code review.
**Path:** src/lib/components/landing/legal/LegalDoc.svelte
**Line:** 185:189
**Comment:**
*Logic Error: The shared legal-document styles reduce all table content to 14px, and table headers to 10px, despite the document requirements and surrounding comment stating that body text must be at least 16px (12pt). This makes the LGPD processing table and DPA annex tables non-compliant with the stated minimum; keep table cells at the required body size and adjust layout responsively instead.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix | Major | 2026-08-01 20:00
|
| Incomplete implementation |
The binding terms expose unresolved operator-identity placeholders instead of the legal counterparty detailsSection 21 still publishes literal placeholders for the operator's legal name, CNPJ, src/lib/components/landing/legal/Terms.svelte [194] Why it matters? 🤔
(Use Cmd/Ctrl + Click for best experience) Prompt for AI Agent 🤖This is a comment left during a code review.
**Path:** src/lib/components/landing/legal/Terms.svelte
**Line:** 194:194
**Comment:**
*Incomplete Implementation: Section 21 still publishes literal placeholders for the operator's legal name, CNPJ, and registered address, while Section 1.1 makes that identification part of the binding contract. Publishing the page in this state leaves users with an incomplete operator identity and prevents the stated contract from identifying the counterparty; replace the placeholders before exposing the Terms as effective.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix | Major | 2026-08-01 20:00
|
| Inconsistent naming |
The English legal document displays a Portuguese heading labelThe published pages are described as English-only, but this new DPA page displays a src/routes/dpa/+page.svelte [72] Why it matters? 🤔
(Use Cmd/Ctrl + Click for best experience) Prompt for AI Agent 🤖This is a comment left during a code review.
**Path:** src/routes/dpa/+page.svelte
**Line:** 72:72
**Comment:**
*Inconsistent Naming: The published pages are described as English-only, but this new DPA page displays a Portuguese kicker above its English title. This creates a visible language mismatch on the document and should be translated to English or the English-only publication claim should be corrected.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix | Minor | 2026-08-01 20:00
|
There was a problem hiding this comment.
Actionable comments posted: 9
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/lib/components/landing/legal/LegalDoc.svelte`:
- Around line 26-40: Update the legal route metadata passed to LegalDoc so each
route uses an English kicker value: set the terms route to “Terms of Service,”
the privacy route to “Privacy Policy,” and the DPA route to “Data Processing
Agreement.”
In `@src/lib/components/landing/legal/Privacy.svelte`:
- Line 26: In Privacy.svelte, update both occurrences of the statutory name
“Protecao” in the legal text to the correctly accented “Proteção,” including the
DPO title near section 1.3 and the occurrence around line 128. Do not change
surrounding wording.
- Line 108: Update the sub-processor disclosure in Privacy.svelte, including the
provider list near the referenced paragraph, to include OpenAI, LLC and Turso
(ChiselStrike, Inc.) or clearly state their processing functions. Keep the
existing Netlify, Inc. and Stripe, Inc. disclosures and ensure the Privacy
Policy list aligns with Dpa.svelte Annex III.
In `@src/lib/components/landing/legal/Terms.svelte`:
- Line 87: Wrap each highlighted clause in Terms.svelte—including the
occurrences around lines 87 and 142–150—in a block-level paragraph element,
matching the structure used by Privacy.svelte, while preserving the existing
strong class="highlight" markup and text.
- Line 194: Replace the operator identity placeholders in Section 21 of
src/lib/components/landing/legal/Terms.svelte at lines 194-194 with the legal
name, CNPJ, and registered address. Apply the identical values to Section 1.1 in
src/lib/components/landing/legal/Privacy.svelte at lines 24-24; if those values
are unavailable, gate the footer links instead of publishing either document
with placeholders.
- Line 65: Update the Google Privacy Policy link in Terms.svelte section 5.2 to
use https://policies.google.com/privacy instead of the insecure legacy URL, and
apply the same URL update to the corresponding link in Privacy.svelte.
In `@src/routes/terms/`+page.svelte:
- Line 68: Use the same English kicker value, such as “Legal”, for the LegalDoc
components in src/routes/terms/+page.svelte:68-68,
src/routes/privacy/+page.svelte:61-61, and src/routes/dpa/+page.svelte:72-72.
Keep the existing Portuguese strings for the Portuguese document versions.
- Around line 32-63: Move the repeated legal-page metadata and table-of-contents
wiring into shared code: add a toc field to the LegalDoc type and its document
definitions in legal.ts, create a reusable component for the shared svelte:head
tags, and update the legal routes to consume it. Keep each route’s toc alongside
its corresponding document metadata, while preserving the route-specific kicker
and content component behavior.
- Around line 22-30: Because the terms page relies on static prerendering, add a
route-level `prerender` export set to true in the terms page route module
(`+page.ts`). Keep the existing `+page.svelte` content unchanged and place the
configuration before the route depends on the static-route exception.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 49f8a48d-e2a9-4b2b-b594-72bdf9ea85f6
📒 Files selected for processing (10)
src/lib/components/landing/Footer.sveltesrc/lib/components/landing/legal/Dpa.sveltesrc/lib/components/landing/legal/LegalDoc.sveltesrc/lib/components/landing/legal/Privacy.sveltesrc/lib/components/landing/legal/Terms.sveltesrc/lib/landing/legal.test.tssrc/lib/landing/legal.tssrc/routes/dpa/+page.sveltesrc/routes/privacy/+page.sveltesrc/routes/terms/+page.svelte
| let { | ||
| kicker, | ||
| title, | ||
| version, | ||
| effectiveDate, | ||
| toc = [], | ||
| children | ||
| }: { | ||
| kicker: string; | ||
| title: string; | ||
| version: string; | ||
| effectiveDate: string; | ||
| toc?: TocEntry[]; | ||
| children: Snippet; | ||
| } = $props(); |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Description: Check kicker prop values passed to LegalDoc across the terms/privacy/dpa routes.
rg -n 'kicker=' -g 'src/routes/{terms,privacy,dpa}/+page.svelte'Repository: Bonobo791/Moderaty
Length of output: 156
🏁 Script executed:
#!/bin/bash
printf '%s\n' 'Candidate route files:'
fd -t f -p 'src/routes' | rg '/(terms|privacy|dpa)/\+page\.svelte$' || true
printf '%s\n' 'LegalDoc usages and kicker values:'
rg -n -C 2 'LegalDoc|kicker\s*=' src/routes src/lib/components/landing/legal 2>/dev/null || trueRepository: Bonobo791/Moderaty
Length of output: 3301
🏁 Script executed:
#!/bin/bash
for f in src/routes/terms/+page.svelte src/routes/privacy/+page.svelte src/routes/dpa/+page.svelte; do
printf '\n--- %s ---\n' "$f"
sed -n '55,80p' "$f"
done
printf '\n--- legal metadata ---\n'
rg -n -C 3 'TERMS_DOC|PRIVACY_DOC|DPA_DOC|title:|description:' src/lib/landing/legalRepository: Bonobo791/Moderaty
Length of output: 1917
🏁 Script executed:
#!/bin/bash
printf '%s\n' 'Legal metadata declarations:'
rg -n -C 3 'TERMS_DOC|PRIVACY_DOC|DPA_DOC' srcRepository: Bonobo791/Moderaty
Length of output: 3580
Use English kicker values on all legal routes.
The legal metadata and TOCs are English, but these routes pass Portuguese labels:
src/routes/terms/+page.svelte:68→Terms of Servicesrc/routes/privacy/+page.svelte:61→Privacy Policysrc/routes/dpa/+page.svelte:72→Data Processing Agreement
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/lib/components/landing/legal/LegalDoc.svelte` around lines 26 - 40,
Update the legal route metadata passed to LegalDoc so each route uses an English
kicker value: set the terms route to “Terms of Service,” the privacy route to
“Privacy Policy,” and the DPA route to “Data Processing Agreement.”
Code Review by Qodo
Context used✅ Compliance rules (platform):
56 rules 1.
|
| // Commercial licensing: contact@marketingprowess.simplelogin.com — see COMMERCIAL.md | ||
|
|
||
| import { describe, expect, it } from 'vitest'; | ||
| import { LEGAL_DOCS, LEGAL_EFFECTIVE_DATE, LEGAL_VERSION } from './legal'; |
There was a problem hiding this comment.
2. Relative import in legal.test.ts 📘 Rule violation ⚙ Maintainability
src/lib/landing/legal.test.ts imports src/lib code via a relative path (./legal) instead of using the $lib alias. This violates the import convention and can lead to inconsistent import styles.
Agent Prompt
## Issue description
A relative import is used to reference a module under `src/lib`, but the project requires using the `$lib` alias for `src/lib` imports.
## Issue Context
This keeps imports consistent and resilient to refactors.
## Fix Focus Areas
- src/lib/landing/legal.test.ts[19-21]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| // I12 exception (approved for static marketing routes, same as the | ||
| // homepage): this page is fully static and prerendered — there is no data | ||
| // loading, so loading/empty/error states cannot occur and SSR always | ||
| // renders the populated page. |
There was a problem hiding this comment.
4. Prerender claim unverified 🐞 Bug ⚙ Maintainability
The new legal routes state in comments that they are prerendered static pages, but this PR doesn’t show any explicit prerender configuration for these routes or a global prerender default, making the comment potentially misleading and the behavior unclear.
Agent Prompt
### Issue description
The new /terms, /privacy, and /dpa pages include comments asserting they are “fully static and prerendered”, but the PR does not explicitly configure prerendering in the route files, and the shown SvelteKit config does not set a prerender default.
### Issue Context
This is primarily a maintainability/configuration clarity problem: comments imply a specific build/deploy behavior that is not established by the code shown.
### Fix Focus Areas
- src/routes/terms/+page.svelte[21-25]
- src/routes/privacy/+page.svelte[21-25]
- src/routes/dpa/+page.svelte[21-25]
- svelte.config.js[19-31]
### Suggested fix
Choose one:
- If these pages should be prerendered: add explicit `prerender = true` for these routes (e.g., create `+page.ts` next to each with `export const prerender = true;`, or configure an appropriate parent layout/global default).
- If they are intentionally SSR-rendered: update/remove the “prerendered” wording in the comments so they accurately describe the route behavior.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
Co-authored-by: amazon-q-developer[bot] <208079219+amazon-q-developer[bot]@users.noreply.github.com>
…igned sub-processor lists, EN-only language clauses, prerender config, shared LegalPage frame
Review triage — verdicts and resolutionsFixed (valid findings):
Every fix above is covered by a new guard test in Declined (with reasons):
|
|
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/lib/components/landing/legal/Privacy.svelte (1)
110-112: 🔒 Security & Privacy | 🟠 Major | 🏗️ Heavy liftPublish the Portuguese transfer disclosure before using ANPD SCCs.
Resolution 19/2024, Art. 17 §2, requires a Portuguese website disclosure covering transfer details, destinations, responsibilities, security, and data-subject rights. Clause 14.4 requires SCC information provided to data subjects in Portuguese. The current Policy and DPA are English, and Annex IV only incorporates the SCCs by reference. Add the Portuguese disclosure and complete, unmodified ANPD SCCs to each transfer contract.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/lib/components/landing/legal/Privacy.svelte` around lines 110 - 112, Add a Portuguese-language international transfer disclosure covering transfer details, destinations, party responsibilities, security measures, and data-subject rights before the section describing ANPD standard contractual clauses. Include the complete, unmodified ANPD SCC text in each applicable transfer contract rather than relying on Annex IV incorporation by reference, and preserve the existing Article 33 mechanism disclosures.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/lib/components/landing/legal/Privacy.svelte`:
- Line 103: Update the OpenAI disclosure in Privacy.svelte and the corresponding
language in Dpa.svelte to accurately reflect the configured retention period, or
configure an eligible OpenAI retention control and document that control. Ensure
the disclosure covers both OpenAI endpoints and removes the inaccurate “no
retention” statement.
In `@src/lib/landing/legal.test.ts`:
- Around line 99-104: Update the test around “discloses the same sub-processors”
to read both the Privacy and DPA documents using readComponent, then assert each
required provider is contained in both document contents. Preserve the existing
provider list and ensure the test cannot pass when a provider is missing from
Dpa.svelte.
---
Outside diff comments:
In `@src/lib/components/landing/legal/Privacy.svelte`:
- Around line 110-112: Add a Portuguese-language international transfer
disclosure covering transfer details, destinations, party responsibilities,
security measures, and data-subject rights before the section describing ANPD
standard contractual clauses. Include the complete, unmodified ANPD SCC text in
each applicable transfer contract rather than relying on Annex IV incorporation
by reference, and preserve the existing Article 33 mechanism disclosures.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 56a71fe3-9ebd-4ed3-9ac2-412acffe1751
📒 Files selected for processing (11)
src/lib/components/landing/legal/LegalPage.sveltesrc/lib/components/landing/legal/Privacy.sveltesrc/lib/components/landing/legal/Terms.sveltesrc/lib/landing/legal.test.tssrc/lib/landing/legal.tssrc/routes/dpa/+page.sveltesrc/routes/dpa/+page.tssrc/routes/privacy/+page.sveltesrc/routes/privacy/+page.tssrc/routes/terms/+page.sveltesrc/routes/terms/+page.ts
| <h2 id="s5">5. Sharing and Recipients</h2> | ||
| <p>We share personal data only with:</p> | ||
| <ul> | ||
| <li>(a) Infrastructure and service providers acting as our sub-processors or processors under contract — hosting provider Netlify, Inc. (United States), database provider Turso (ChiselStrike, Inc.), classification provider OpenAI, LLC (transient comment classification only, no retention, no model training), payment processor Stripe, Inc. — limited to what each needs to perform its function;</li> |
There was a problem hiding this comment.
🔒 Security & Privacy | 🟠 Major | 🏗️ Heavy lift
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -eu
printf '%s\n' '--- candidate file ---'
sed -n '85,155p' src/lib/components/landing/legal/Privacy.svelte
printf '%s\n' '--- OpenAI references ---'
rg -n -i --glob '!node_modules' --glob '!dist' --glob '!build' 'openai|responses\.create|chat\.completions|zero.?data|modified abuse|retention' .
printf '%s\n' '--- relevant files ---'
git ls-files | rg -i 'privacy|openai|env|legal|dpa|terms'Repository: Bonobo791/Moderaty
Length of output: 23002
🌐 Web query:
OpenAI API data retention default abuse monitoring logs 30 days Zero Data Retention Modified Abuse Monitoring endpoint eligibility official documentation
💡 Result:
By default, the OpenAI API retains data, including prompts and responses, for up to 30 days for abuse monitoring purposes [1][2][3]. After this period, data is removed unless legal requirements necessitate longer retention [2][3]. For organizations with specific security or compliance needs, OpenAI offers Zero Data Retention (ZDR) and other advanced retention controls [4][5][6]. Key details regarding these configurations include: 1. Zero Data Retention (ZDR): Under a ZDR agreement, API inputs and outputs are not logged and are not retained by OpenAI [3]. This option is not a default feature but is available for eligible, qualifying use cases [7][8][6]. Interested organizations must typically coordinate with OpenAI sales to establish eligibility and the necessary agreements [9][8]. 2. Advanced Retention Controls: OpenAI provides administrative APIs that allow organizations to configure specific retention policies at the project level [4][5]. Available types include [4][5]: - organization_default: Follows the standard retention policy [5]. - zero_data_retention: Configures the project for ZDR [5]. - modified_abuse_monitoring: A specialized retention configuration [4]. - enhanced_zero_data_retention: An advanced tier of ZDR [4]. - enhanced_modified_abuse_monitoring: An advanced tier of modified abuse monitoring [4]. Organizations can retrieve or update these project-level settings using the OpenAI API (e.g., via the /v1/organization/projects/{project_id}/data_retention endpoint) [4][5]. Because eligibility is determined on a per-customer basis, users seeking ZDR or modified monitoring often report that initiating the process requires contacting OpenAI Sales or relevant account management teams [9][8]. Documentation indicates that these controls are part of a broader suite of enterprise-grade privacy and compliance tools designed for businesses with sensitive data requirements [6].
Citations:
- 1: https://developers.openai.com/api/docs/guides/your-data
- 2: https://community.openai.com/t/data-retention-for-batches/770572/1
- 3: https://openai.com/index/response-to-nyt-data-demands/
- 4: https://developers.openai.com/api/reference/resources/admin/subresources/organization/subresources/projects/subresources/data_retention/methods/update
- 5: https://developers.openai.com/api/reference/resources/admin/subresources/organization/subresources/projects/subresources/data_retention/methods/retrieve
- 6: https://openai.com/business-data/
- 7: https://community.openai.com/t/openai-data-retention-policy/391946
- 8: https://community.openai.com/t/zero-data-retention-information/702540/1
- 9: https://community.openai.com/t/how-to-contact-sales-to-enable-zero-data-retention-controls/1375972
🏁 Script executed:
#!/bin/bash
set -eu
printf '%s\n' '--- OpenAI call sites ---'
sed -n '1,105p' src/lib/server/moderation.ts
sed -n '1,95p' src/lib/server/tone.ts
printf '%s\n' '--- DPA processor entry ---'
sed -n '600,640p' src/lib/components/landing/legal/Dpa.svelte
printf '%s\n' '--- deployment/config references ---'
sed -n '1,125p' DEPLOY.md
sed -n '90,110p' README.md
sed -n '20,38p' .env.exampleRepository: Bonobo791/Moderaty
Length of output: 13703
🏁 Script executed:
#!/bin/bash
set -eu
python3 - <<'PY'
from pathlib import Path
import re
files = {
"moderation": Path("src/lib/server/moderation.ts").read_text(),
"tone": Path("src/lib/server/tone.ts").read_text(),
"deploy": Path("DEPLOY.md").read_text(),
"env": Path(".env.example").read_text(),
}
checks = {
"moderation_endpoint": r"https://api\.openai\.com/v1/moderations",
"tone_endpoint": r"https://api\.openai\.com/v1/chat/completions",
"api_key_configured": r"OPENAI_API_KEY",
"retention_control_configured": r"(?i)(zero.?data|modified.?abuse|data.?retention)",
}
for name, text in files.items():
print(f"[{name}]")
for check, pattern in checks.items():
print(f"{check}={bool(re.search(pattern, text))}")
PYRepository: Bonobo791/Moderaty
Length of output: 609
Correct the OpenAI retention disclosure. The service sends comments to both OpenAI endpoints, but its configuration defines no ZDR or Modified Abuse Monitoring control. OpenAI retains API data for up to 30 days by default for abuse monitoring. Configure an eligible retention control, or state the actual retention period in Privacy.svelte and Dpa.svelte.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/lib/components/landing/legal/Privacy.svelte` at line 103, Update the
OpenAI disclosure in Privacy.svelte and the corresponding language in Dpa.svelte
to accurately reflect the configured retention period, or configure an eligible
OpenAI retention control and document that control. Ensure the disclosure covers
both OpenAI endpoints and removes the inaccurate “no retention” statement.
| it('discloses the same sub-processors in the Privacy Policy as in DPA Annex III', () => { | ||
| const privacy = readComponent('privacy'); | ||
| for (const provider of ['Netlify', 'Turso', 'OpenAI', 'Stripe']) { | ||
| expect(privacy).toContain(provider); | ||
| } | ||
| }); |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Test both documents before claiming alignment.
This test reads only Privacy.svelte. It passes if a listed provider is removed from DPA Annex III. Read Dpa.svelte and assert that each required provider occurs in both documents.
Proposed fix
it('discloses the same sub-processors in the Privacy Policy as in DPA Annex III', () => {
const privacy = readComponent('privacy');
+ const dpa = readComponent('dpa');
for (const provider of ['Netlify', 'Turso', 'OpenAI', 'Stripe']) {
expect(privacy).toContain(provider);
+ expect(dpa).toContain(provider);
}
});📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| it('discloses the same sub-processors in the Privacy Policy as in DPA Annex III', () => { | |
| const privacy = readComponent('privacy'); | |
| for (const provider of ['Netlify', 'Turso', 'OpenAI', 'Stripe']) { | |
| expect(privacy).toContain(provider); | |
| } | |
| }); | |
| it('discloses the same sub-processors in the Privacy Policy as in DPA Annex III', () => { | |
| const privacy = readComponent('privacy'); | |
| const dpa = readComponent('dpa'); | |
| for (const provider of ['Netlify', 'Turso', 'OpenAI', 'Stripe']) { | |
| expect(privacy).toContain(provider); | |
| expect(dpa).toContain(provider); | |
| } | |
| }); |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/lib/landing/legal.test.ts` around lines 99 - 104, Update the test around
“discloses the same sub-processors” to read both the Privacy and DPA documents
using readComponent, then assert each required provider is contained in both
document contents. Preserve the existing provider list and ensure the test
cannot pass when a provider is missing from Dpa.svelte.
…ation, dedupe legal docs, wider copy guardrail - Terms §1.2/§7.3: acceptance and post-window finality were framed around 'purchasing credits' only; generalized to every charge type introduced in §6.1 (subscription, lifetime, top-ups) - Terms §6.2/§6.3: promised cancellation and top-up configuration 'in your account settings', a surface that does not exist; the mechanism is now the Section 21 contact channels, matching reality - PlanCard: body snippet wrapper is a div, not a p, so snippet content is not restricted to phrasing content - legal.ts: three doc literals shared kicker/version/effectiveDate boilerplate (SonarQube duplication block); one defineDoc builder now holds the shared fields - pricing-faq guardrail now also reads the visible billing copy in the plan panels, hero, math terminal, homepage section, and page meta — the finding that it only policed the data sources was correct - new failing tests landed before each fix (legal.test.ts: charge-type scope, no phantom settings UI) Declined, with rationale: the $lib-alias import rule (sibling components in this repo import relatively, matching the existing files; same finding rejected on PR #35), routing the hosted CTA to checkout (no billing exists yet; this PR is copy-only; same finding rejected on PR #33), and recoloring the mint cards' CTA (pink is the site's single primary-action color, intentional).



Publishes the three legal documents as site pages, linked from the footer. English-only for now — the docs state a Portuguese version must follow (PT prevails for Brazilian users); tracked as a follow-up.
Pages
/terms— Terms of Service, 21 sections. CDC Art. 54 §4 clauses (7.3, 14, 15) rendered as bold highlighted panels; body text 16px (≥12pt, Art. 54 §3). The internal "Deployment Checklist" appendix was dropped per its own instruction ("remove before publishing")./privacy— Privacy Policy, 14 sections, LGPD Art. 9 processing table as a real table./dpa— Data Processing Agreement, 20 sections + signature page + Annexes I–IV, all annex tables rendered.Shared shell —
LegalDoc.svelte: kicker, title, version/effective-date line, anchored contents nav, styled prose (tokens only, no new deps).Placeholders filled
Drafting notes ("template for commercial use", "complete annex before execution", Word TOC fields) removed; docs cross-link to each other and keep all external links (YouTube ToS, Google privacy/revocation, ANPD).
Footer — Terms, Privacy, DPA added to the link row (built from
LEGAL_DOCS).Gates: svelte-check 0 errors/warnings, 208/208 tests (3 new for
legal.ts), adapter-netlify build ✓. QA screenshots verified at desktop and 390px for all three pages (TOC anchors, tables, highlight blocks, footer links).Note: branched from
feat-pricingHEAD before PR #34 merged; diff against main is only8ecbd79.