Docs Guardian sweep — 2026-08-17 (slice 4: invoicing, one-off invoices, emails) - #642
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
📝 Slack announcement (posted here — Slack was unreachable this run)No Slack tooling is available in this run's environment (no Slack MCP tools, no webhook), so per the skill's failure handling the
Run notes for the record:
|
Checked lago-front: the settings route is BILLING_ENTITY_EMAIL_SCENARIOS_ROUTE, and the tab label used in BillingEntityMain.tsx:44 / BillingEntityEmailScenariosConfig.tsx is translation key text_1742367202528mfhsv0f4fxq = "Email scenarios". So the prerequisites line ("Settings > [Your billing entity] > Email scenarios") is correct, and the steps section ("Open the Emails tab") is the stale one. Fix: change step 2 from "Open the Emails tab" to "Open the Email scenarios tab" (or "section", matching current UI copy). |
Checked Fees::ApplyTaxesService#applicable_taxes in lago-api — the billing-entity-level fallback (Tax.joins(:billing_entities_taxes).where(billing_entity_id: customer.billing_entity_id)) applies uniformly to every fee type, subscription or one-off. There's no separate organization-level tax fallback in code. So "Organization taxes" in the one-off-invoices hierarchy section is the same terminology drift already fixed in the subscription-invoices section above it, not a genuine semantic difference. Fix: change "Organization taxes apply to all fees" → "Billing entity taxes apply to all fees" and "override organization taxes" → "override billing entity taxes" in the one-off invoices hierarchy list, matching the subscription section's wording. |
The steps section said "Open the Emails tab" while the prerequisites correctly said "Email scenarios" — lago-front's tab label (text_1742367202528mfhsv0f4fxq) is "Email scenarios", not "Emails". Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Fees::ApplyTaxesService#applicable_taxes in lago-api falls back to billing-entity-level taxes for every fee type, one-off included — there's no separate organization-level tax fallback in code. Aligns the one-off hierarchy wording with the subscription hierarchy above it. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
changelog/product.mdx:751 relative image path Re-verified: 1 relative ./images/... path vs. 96 absolute /changelog/images/... paths in the same file; Mintlify resolves relative paths against the file's own directory, so it renders fine. Leave it — this is a durable decision, not something to keep re-flagging as a consistency nit in future sweeps. |
The sweep rewrote two fence titles in grace-period.mdx and lost the
Mintlify {28} line-highlight annotation on both. The highlights point
readers at the invoice_grace_period value in the payload, so they are
restored while keeping the corrected organization -> billing entity
titles.
|
Per Michael Ponrajah's review point that Mintlify fence annotations should be preserved, I restored the two Generated by Claude Code |
|
guide/emails.mdx, line 12 🔴 must fix This rewrite changed the meaning, and now contradicts the rest of the page:
|
|
guide/invoicing/invoicing-settings/overview.mdx, line 28 Nice fix on the missing closing quote in step 3 — the label in step 2 is also wrong. |
Address review feedback on the guardian sweep: - guide/emails.mdx: the sweep's intro asserted that emails are sent automatically on invoice creation. Scenarios are opt-in and off by default (line 40), invoices are emailed when finalized rather than created (line 36), and payment receipts were dropped. Restore the opt-in framing and cover all three scenarios. - guide/invoicing/invoicing-settings/overview.mdx: correct the settings tab label to "Invoice custom sections" to match the dashboard.
|
Applied your Generated by Claude Code |
Docs Guardian sweep — 2026-08-17 (slice 4: invoicing, one-off invoices, emails)
Automated documentation sweep. A human must review and merge — this agent never merges.
Weekly cadence this run, so the rotation slice was picked as ISO week % 10 (week 34 → slice 4) rather than the skill's twice-weekly formula.
Fixed in this PR
__YOU_*_ID__→__YOUR_*_ID__placeholders27 files changed, well under the 40-file cap.
Inaccuracy fixes (evidence required)
Wrong HTTP verb —
PUT /customersdoes not existguide/invoicing/invoicing-settings/net-payment-term.mdx,guide/invoicing/invoicing-settings/taxes.mdx:PUT→POSTon/api/v1/customers— evidence:lago-api config/routes.rb:46declaresresources :customers, param: :external_id, only: %i[create index show destroy](no update route); the published spec lists onlypostandgeton/customers. 28 other doc pages already usePOST.Wrong customer identifier field
guide/invoicing/invoicing-settings/taxes.mdx:"code": "acme_inc"→"external_id": "acme_inc"— evidence:CustomerCreateInputrequiresexternal_idand has nocodeproperty.Wrong wrapper key and missing nesting on billing-entity payloads
guide/invoicing/invoicing-settings/grace-period.mdx:"organization"→"billing_entity", andinvoice_grace_periodmoved underbilling_configuration— evidence:billing_entities_controller.rb:70/103usesparams.require(:billing_entity).permit(..., billing_configuration: [:invoice_footer, :invoice_grace_period, ...]).guide/invoicing/invoicing-settings/overview.mdx:invoice_footeranddocument_localemoved underbilling_configuration(same evidence). The page's own prose already saiddocument_localelives inbilling_configuration, so the example contradicted the text.Wrong field name
guide/invoicing/fees.mdx:regroup_paid_fee→regroup_paid_fees— evidence: 14 occurrences of the plural in the published spec, 0 of the singular;rate_card.rb:34definesenum :regroup_paid_fees. Every other doc page uses the plural.Terminology drift: organization vs billing entity
guide/invoicing/invoicing-settings/empty-invoices.mdx: customers inheritfinalize_zero_amount_invoicefrom the billing entity, not the organization; code-block title "Update the organization's settings" → "billing entity's" (the call targets/billing_entities/{code}).guide/invoicing/invoicing-settings/grace-period.mdx: "the organization's grace period" → "the billing entity's", matching the section heading and the endpoint used.Copy-paste error
guide/invoicing/invoicing-settings/overview.mdx: the Translate invoices tab said "You can update the customer footer of invoices by changing thedocument_locale" — rewritten to describe the document language. The custom footer tab also called a universal footer a "customer footer", contradicting the paragraph above it.Add-on deletion scope
guide/one-off-invoices/create-add-ons.mdx: "removes the add-on from all plans and subscriptions where it is used" → removes the add-on and the fixed charges that use it from plans; already-issued invoices are unchanged — evidence:AddOns::DestroyServicecallsadd_on.discard!andadd_on.fixed_charges.update_all(deleted_at:); subscriptions are not touched.Contradictory sentence
guide/invoicing/fees.mdx: "embedded within an invoice or credit note object, making it retrievable on its own" → "…, but it can also be retrieved on its own" — evidence:/fees/{lago_id}exists in the spec.Missing documented constraint
guide/invoicing/invoice-metadata.mdx: added "Keys must be unique within an invoice" — evidence:Metadata::InvoiceMetadatavalidateskeywithuniqueness: {scope: :invoice_id}. (The existing limits of 5 pairs / 20-char keys / 140-char values were verified correct againstCOUNT_PER_INVOICE = 5and the length validations.)Wrong payloads — invalid JSON in example bodies
All found by parsing every
--data-rawbody in the repo. These would fail if a reader copy-pasted them:guide/dunning/manual-dunning.mdx: doubled opening brace'{ {guide/wallet-and-prepaid-credits/wallet-top-up-and-void.mdx: missing colon in"value" "manual-void"; missing commas after"method": "fixed"(×2) and after"threshold_credits"guide/plans/charges/invoiceable-vs-noninvoiceable.mdx: missing comma after"regroup_paid_fees"guide/subscriptions/edit-subscription.mdx: trailing comma after"group_properties": []guide/invoicing/previews.mdx: trailing comma after"plan_code": "new_plan"Also fixed structurally broken examples in slice 4: unbalanced braces and a missing comma in
credit-notes/credit-note-metadata.mdx, and a missing comma plus a trailing comma ininvoicing-settings/grace-period.mdx.Typos and mechanical fixes
__YOU_INVOICE_ID__→__YOUR_INVOICE_ID__(7) and__YOU_CREDIT_NOTE_ID__→__YOUR_CREDIT_NOTE_ID__(1);**LAGO_INVOICE_ID**→__LAGO_INVOICE_ID__; "Overriden" → "Overridden" (×2); "recomend" → "recommend"; "everytime" → "every time"; "(add ons)" → "(add-ons)"; "an Cross Industry Invoice" → "a"; "european" → "European"; "premium licence" → "license"; "below.:" → "below:"; unbalanced**"Invoice custom section**; four-backtick fences closing three-backtick blocks (×2);`net_payment_term argument`backtick placement (also removed two stray non-breaking spaces); "Filter invoice by" → "Filter invoices by"; "all customers invoices" → "all customer invoices".Tone and verbosity
Applied the tone guide and the recorded convention against em-dashes (this diff introduces zero em-dashes and removes five existing ones). Highlights: removed marketing fluff and an exclamation mark from
taxes.mdx; removed "sit back and relax" / "we take care of it" fromemails.mdxand switched first person to Lago; present tense instead of "will" acrossdownload-invoices.mdx,previews.mdx,void.mdx,create-one-off-invoices.mdx; removed "kindly note", "Please note that", "As mentioned above/previously", "Here are a few things to keep in mind"; title-case headings to sentence case; deleted a duplicated "Use an add-on" section that repeated the page intro verbatim; replaced the dangling "Please follow this page to know more about these actions." ingrace-period.mdxwith a real link to the draft-invoices page; and aligned thevoid.mdxAPI tab with the placeholder convention used elsewhere on the same page.Missing examples added
guide/invoicing/invoice-metadata.mdxdocumented editing metadata via the API but contained no code at all. Added aPUT /invoices/{lago_id}example validated againstInvoiceUpdateInput, showing both updating an existing pair (withid) and creating a new one (withoutid).Needs human confirmation (not changed)
guide/emails.mdx: the prerequisites say to turn scenarios on in Settings > [Your billing entity] > Email scenarios, but the steps below say Settings > Emails tab. One of the two UI labels is stale; I could not verify the current label from the repo or the API. The three scenarios themselves are correct (EMAIL_SETTINGS = ["invoice.finalized", "credit_note.created", "payment_receipt.created"]).guide/invoicing/invoicing-settings/taxes.mdx: the Tax hierarchy section uses "Billing entity taxes" for subscription invoices but "Organization taxes" for one-off invoices. This looks like pre-billing-entity drift, but changing tax precedence semantics needs someone who knows whether the two genuinely differ.guide/one-off-invoices/create-add-ons.mdxcreates an add-on with codesetup, whilecreate-one-off-invoices.mdxconsumessetup_fee. The examples do not chain. Harmless individually; worth aligning if you want the pages read in sequence.changelog/product.mdx:751is the only image reference in the repo using a relative./images/…path (96 siblings use/changelog/images/…). It renders correctly on the live site, so it is not broken and I left the changelog untouched per the changelog-only-fix-breakage rule. Flagging as a consistency nit.docs.jsonnavigation (orphans), includingguide/payments/stripe-integration,integrations/payments/custom-payment-integration,templates/payg/aws,templates/payg/klaviyo,templates/per-transaction/column,templates/per-transaction/swan, and foursnippets/templates/*. Snippets are expected to be unreferenced; the others may be intentional or may be lost pages. Not deleted, per policy.Suspected spec issues (for the OpenAPI guardian)
BillingEntityUpdateInputis missing its request wrapper. The schema exposesname,default_currency, … at the top level, butbilling_entities_controller.rbdoesparams.require(:billing_entity). The docs (and this PR) use the"billing_entity": {...}wrapper, which matches the code. The spec appears wrong.unitstyped as string-only on one-off invoice fees.InvoiceOneOffCreateInput.fees[].unitsis["string","null"]with a numeric pattern, but the docs pass integers ("units": 1) and Rails coerces both. Worth confirming whether the spec should also allow integers.Deferred to next run
[](#anchor "Direct link to heading")artifacts across 31 files. These are redundant under Mintlify's auto-generated anchors, but removing them would touch far more files than this sweep should, and at least one anchor (grace-period.mdx's#define-a-grace-period-at-organization-level) no longer matches its heading. Worth a dedicated mechanical PR.http://pdf:3000is a docker-compose service name in the self-hosted guide and is correct as written.Process feedback for the retro
--data/-dcurl bodies. Nearly every Lago doc example uses--data-raw, so the first pass reported 60 JSON blocks and missed 7 genuinely broken payloads across the repo. The check should match--data-rawexplicitly, and should skip bodies containing$(...)command substitution (twoapi-reference/events/*examples use$(date +%s)and are valid as written)./api-reference/customers/get-all?playground=openwas reported as broken when the page exists.🤖 Generated with Claude Code