Repository navigation
docs: remove locale pages that call ObjectOS Apache-2.0, fix search in CJK locales, fix the Quickstart anchor - #302
Merged
Conversation
…Apache-2.0, fix the Quickstart anchor
Deletes content/docs/resources/license.{de,es,fr,ja,ko}.mdx and
support.{de,es,fr,ja,ko,zh-Hans,zh-Hant}.mdx. Each still asserted that
ObjectOS itself is Apache-2.0 (License: "ObjectOS-Runtime — Apache-2.0",
free forever, no licence server; Support: "ObjectOS is Apache-2.0 and
accepts contributions"), which the English sources reversed. Per ruling
5989567068 on #256, letter A, those routes now fall back to the current
English body. license.zh-Hans.mdx and license.zh-Hant.mdx are correct and
stay; support.zh-Hant.mdx goes with its zh-Hans source, and
gen-zh-hant --check passes with 64 files.
The Quickstart's Path A link now targets the heading's generated id,
path-a--os-start-operator--first-time-evaluator.
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FeA1nwBz1ohH65dvffUGKr
createFromSource built one Orama index per locale and took each one's tokenizer from the locale code. Orama has none for Chinese, Japanese or Korean, so those four indexes threw LANGUAGE_NOT_SUPPORTED and /api/search answered 500, which the dialog shows as an empty list. The route now passes a localeMap with one entry per locale in lib/i18n.ts. A `satisfies` makes a missing entry a type error. en, de, es and fr keep the Orama language they already resolved to. The four CJK locales get an Intl.Segmenter word tokenizer, which is built into V8 (Node and workerd), so it adds no dependency. Orama's English tokenizer is not used as a fallback for them, because it drops every CJK character and a Chinese query would find nothing. Those locales search with threshold 0 and tolerance 0. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FeA1nwBz1ohH65dvffUGKr
check-search-locales.mjs loads the built /api/search handler out of apps/docs/.next/ and calls its GET in-process for every locale that lib/i18n.ts declares. Each locale must answer 200 with a JSON array and find hits for "permissions". Every page with a source file in that locale must be found by its own title. A nonce query must find nothing, which is the run's live negative control. It runs as a ci.yml step after the build, next to Locale surface and Positioning. Its --self-test drives every rule with fake handlers and joins run-self-tests.mjs. Measured on the unfixed build (b754364): 4 findings, zh-Hans, zh-Hant, ja and ko, each `threw LANGUAGE_NOT_SUPPORTED`. On this branch: 8 of 8 locales answer 200, and 330 of 330 own pages are found by title. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FeA1nwBz1ohH65dvffUGKr
This was referenced Oct 6, 2026
This was referenced Oct 6, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #296
This PR makes three fixes from the seat's site audit of
main@b754364. The branch is rebased onto6b0e9a5(#294) with no conflicts; the head isdd17bd2.1. Delete 12 locale pages that call ObjectOS Apache-2.0
The English
resources/license.mdxandresources/support.mdxsay ObjectOS is a commercial product with no open-source edition. They say only the ObjectStack framework is Apache-2.0. These 12 locale siblings still said the opposite. They are deleted under ruling5989567068on #256 (letter A): when an English correction removes or reverses a capability assertion, that page's locale siblings are deleted. The routes now fall back to the current English body.I re-measured each claim on
origin/main@b754364before deleting it:mainresources/license.de.mdx:10## ObjectOS-Runtime — Apache-2.0·:60**Kostenlos.** Für immer. Keine Plätze, keine Nutzungsstufe, kein Lizenzserver, kein Schlüssel.·:95A: Nein. Es gibt keine Telemetrie, keine Lizenzprüfung, keinen Update-Ping.resources/license.es.mdx:10## Runtime de ObjectOS — Apache-2.0·:60**Gratis.** Para siempre. Sin asientos, sin niveles de uso, sin servidor de licencias, sin clave.·:95R: No. No hay telemetría, ni comprobación de licencia, ni ping de actualización.resources/license.fr.mdx:10## Runtime ObjectOS — Apache-2.0·:60-61**Gratuit.** Pour toujours. Pas de sièges, pas de palier d'utilisation, pas de serveur de licences, pas de clé.·:96R : Non. Il n'y a aucune télémétrie, aucune vérification de licence, aucun ping de mise à jour.resources/license.ja.mdx:10## ObjectOS ランタイム — Apache-2.0·:59**無料。** 永久に。シート課金なし、使用量ティアなし、ライセンスサーバーなし、キーなし。·:94A: いいえ。テレメトリも、ライセンスチェックも、アップデートの ping もありません。resources/license.ko.mdx:10## ObjectOS 런타임 — Apache-2.0·:60**무료입니다.** 영원히. 좌석도, 사용량 등급도, 라이선스 서버도, 키도 없습니다.·:96A: 아니요. 텔레메트리, 라이선스 검사, 업데이트 핑이 없습니다.resources/support.de.mdx:67ObjectOS steht unter Apache-2.0 und nimmt Beiträge an:resources/support.es.mdx:67ObjectOS usa la licencia Apache-2.0 y acepta contribuciones:resources/support.fr.mdx:67ObjectOS est sous licence Apache-2.0 et accepte les contributions :resources/support.ja.mdx:67ObjectOS は Apache-2.0 ライセンスであり、コントリビューションを受け付けています:resources/support.ko.mdx:67ObjectOS는 Apache-2.0이며 기여를 받습니다:resources/support.zh-Hans.mdx:66ObjectOS 是 Apache-2.0,接受贡献:resources/support.zh-Hant.mdx:67ObjectOS 是 Apache-2.0,接受貢獻:(generated from the zh-Hans file, so it goes with it)The English
support.mdx:66says only "The underlying ObjectStack framework is Apache-2.0 and accepts contributions".license.zh-Hans.mdxandlicense.zh-Hant.mdxare correct (## ObjectOS 是商业产品), so they stay.meta.LOCALE.jsonfiles list pages by slug, and a slug with no locale file falls back to English, so no sidebar or registry entry needed editing.Served from the build (
next start, port 3296, for the screenshot check):/de/docs/resources/licensereturns 200. Its h1 isLicense & Pricingand its first h2 isObjectOS is a commercial product./zh-Hans/docs/resources/supportreturns 200 with the h1Support./es,/fr,/ja,/ko/docs/resources/licenseand/zh-Hant,/de,/ko/docs/resources/supportwere checked too.2. Search answers in all 8 locales
Before (
b754364, built and served):Cause.
createFromSourcebuilds one Orama index per locale. It takes each index's tokenizer from the locale code:debecomesgerman, whilezh-Hans,jaandkostay as they are. Orama has no tokenizer for Chinese, Japanese or Korean. The top-levellanguage: 'english'was never consulted, because every locale's own mapping overrides it.Fix (
apps/docs/app/api/search/route.ts): an explicitlocaleMapwith one entry per locale inlib/i18n.ts.satisfiesclause keyed by everyLocalemakes a missing entry a type error.en,de,esandfrkeep the language they already resolved to, so their behaviour is unchanged.zh-Hans,zh-Hant,jaandkoget a tokenizer built onIntl.Segmenter, through Orama'scomponents.tokenizerextension point.package.jsonand the lockfile are untouched.1.20260526.1through miniflare.threshold: 0, tolerance: 0, as fumadocs recommends for CJK tokenizers.After,
GET /api/search?locale=L&query=permissions:next startopennextjs-cloudflare preview)Queries in each locale's own script, both runtimes:
权限/zh-Hans/docs/build/agents許可權/zh-Hant/docs/build/agents権限/ja/docs/build/agents권한/ko/docs/operate/observabilityOpenCC
s2twprenders 权限 as 許可權, which is why the zh-Hant probe uses that word.Browser check. I opened the search dialog in Chromium and typed a query, in zh-Hans (
权限), ja (権限), zh-Hant (許可權) and ko (권한). I did this onnext start, and again for zh-Hans and ja on the workerd preview. Each/api/searchrequest answered 200. The dialog listed results with the term highlighted inside Chinese, Japanese and Korean text. I looked at each screenshot.The test:
.github/scripts/check-search-locales.mjsThe route is dynamic, so the build output records nothing about it. Only a request finds this defect. The gate therefore loads the BUILT handler (
apps/docs/.next/server/app/api/search/route.js,routeModule.userland.GET) and calls it in-process for every localelib/i18n.tsdeclares. Its rules:threw/status/not-array: each locale must answer 200 with a JSON array. A throw is what Next serves as a 500.no-results:permissionsmust find something.own-title-missed: every page with a source file in that locale must be found by its own title. That is what proves the locale's script is tokenized, because English fallback pages makepermissionsmatch everywhere.negative-control-passed: a nonce query must find nothing, in the same run against the same handler.It is wired the same way as
Locale surfaceandPositioning:ci.ymlstep afterbuild, withshell: bashfor pipefail;--self-test(8 fake-handler cases, all 6 rules able to fire) listed intools/ci-scripts/run-self-tests.mjs.Proof that it can fail:
b754364)(threw) zh-Hans ?query=permissions: the handler threw LANGUAGE_NOT_SUPPORTED, and the same for zh-Hant, ja and ko. 4 findings.'english'ablation-replace.mjs: anchor 1 to 0, blob789cb3f5toacac90d6. Rebuilt. The bundle carries"zh-Hans":"english"and has noIntl.Segmenter. exit 1: 115own-title-missed(zh-Hans 40, zh-Hant 40, ja 19, ko 16) and nothrew, which is the predicted direction. Example:its title "审批流程" does not find /zh-Hans/docs/build/automation/approvals (0 hits).git diff HEADis empty. Rebuilt. The marker is gone andIntl.Segmenteris back. The gate is green again.koentry deletedtype-checkexit 2:error TS1360 ... Property 'ko' is missing. Restored, andgit diff HEADis empty.The ablations ran on commits
36560e6/329b437. The final route commit differs from those only in two comments; the code is the same.3. Quickstart anchor
quickstart.mdx:20now links#path-a--os-start-operator--first-time-evaluator, which is the id the heading generates in the built HTML.I crawled every internal href on
/LOCALE/docs/quickstartin all 8 locales: 224 hrefs, 96 of them with fragments, 0 broken. The crawler's negative control is theb754364English page, and it flagsno element with id "path-a--os-start-operator-first-time-evaluator".Verification
On the rebased head
dd17bd2(onto6b0e9a5; turboCached: 0 cached, 1 totalfor each task):pnpm turbo run type-check --continue --forceTasks: 1 successful, 1 totalNEXT_PRIVATE_STANDALONE=true pnpm turbo run build --forceTasks: 1 successful, 1 totalpnpm turbo run test --force✓ 10 self-test(s) passedcheck-positioning.mjs✓ positioning: 3 copies equal the constant; the brand is right in 659 pages and 2 llms bodies; no stale sentence in 79 English sources and the en entry of 2 legal pagescheck-search-locales.mjs✓ search locales: all 8 locales answer 200, find "permissions", find every own page by its title, and find nothing for a nonce(own pages: en 79/79, zh-Hans 53/53, zh-Hant 53/53, ja/de/es/fr/ko 29/29 each)check-locale-surface.mjs✓ every advertised URL has a source file and every source file is advertised; …gen-zh-hant.mjs --check✓ zh-Hant: 64 generated file(s) match the zh-Hans sources byte for byte.check-translations.mjs✓ translations gate passedcheck-translation-ownership.mjs, enforced (diff againstorigin/main)✓ 17 file(s) changed: 12 translation artifact(s) deleted, none added or modified.Before the rebase, on
d44440a(baseb754364), the full set:pnpm turbo run type-check --continue --forceTasks: 1 successful, 1 totalNEXT_PRIVATE_STANDALONE=true pnpm turbo run build --forceTasks: 1 successful, 1 totalpnpm turbo run test --force✓ 10 self-test(s) passedgen-zh-hant.mjs --check✓ zh-Hant: 64 generated file(s) match the zh-Hans sources byte for byte.check-locale-surface.mjs✓ every advertised URL has a source file and every source file is advertised; …check-positioning.mjs✓ positioning: 3 copies equal the constant; the brand is right in 659 pages and 2 llms bodies; no stale sentence in 79 English sourcescheck-search-locales.mjs✓ search locales: all 8 locales answer 200, find "permissions", find every own page by its title, and find nothing for a nonce(own pages: en 79/79, zh-Hans 53/53, zh-Hant 53/53, ja/de/es/fr/ko 29/29 each)check-translations.mjs✓ translations gate passedcheck-translation-output.mjs --files(PR diff)✓ translation output gate passed (100 pre-existing finding(s) reported)check-translation-ownership.mjs --actor … --files(git diff --name-status --no-renames), enforced✓ 17 file(s) changed: 12 translation artifact(s) deleted, none added or modified.TRANSLATION_BOT_LOGINunset⚠ TRANSLATION_BOT_LOGIN is not set — ownership is not enforced yet.(exit 0)check-node-floor.mjs(+--self-test)✅ Every declared floor clears what the dependency tree requires, and the declarations agree.scripts/pm/check-half-states.mjs --self-test✓ check-half-states self-test: 1551 cases pass.smoke-docs.mjs --base(local workerd preview)✓ smoke: 4 page(s) rendered against http://127.0.0.1:8796, negative control demonstrated redwrangler deploy --dry-runTotal Upload: 51033.71 KiB, under the 61440 KiB budgetRisk and cost
wrangler.jsoncsets no CPU limit, so the Workers paid default of 30 s CPU applies.Acceptance notes
route.tsand one test. Wiring that test the way this repo wires its tests also touches.github/workflows/ci.yml(one step) andtools/ci-scripts/run-self-tests.mjs(one list entry and one header paragraph). The runner fails on an unlisted--self-testscript./termslicence text: already corrected in docs(legal): correct the terms and privacy pages to ObjectOS's editions and licence facts (PR 2 of #171) #294. Before the rebase I found thatapps/docs/app/[lang]/terms/page.tsxsaidObjectOS is distributed under the Apache License 2.0.docs(legal): correct the terms and privacy pages to ObjectOS's editions and licence facts (PR 2 of #171) #294, which this branch is now rebased onto, corrected it toObjectOS is a commercial product with no open-source edition.That finding is withdrawn.next startanswers every unprefixed English route (/docs/...) with a 307 back to itself, cookie or not. This also happens onb754364. The workerd preview serves those routes, and CI smoke covers them. So the English pages in the crawl were read from the prerendered build.AGENTS.mdsays zh-Hant coverage is "62 of 79 pages". It was 54 onb754364and is 53 now. Carrier: the governedAGENTS.mdPR from [Decision] An English docs correction leaves its locale siblings asserting the corrected-away claim — #59 says delete them, the seat post says leave them, and #68 blocks the pass that would fix them #256's ruling (item 2), if it is open. Otherwise none.smoke-docs.mjsnever requests/api/search, so a search regression in production would not trip it.Generated by Claude Code