From 755baeca27c79f8d7881cd7410687d9e67233ff5 Mon Sep 17 00:00:00 2001 From: Dmitrii Vasilev Date: Mon, 5 Oct 2026 22:51:36 +0700 Subject: [PATCH] feat(i18n): blog-ru contract for the Russian blog posts; t27b post ID and checked-vs-checked growth specs/i18n/blog-ru.t27 declares the Russian bundle for specs/blog (trinity apps/website/i18n/blog.ru.json, keyed by ID, fields TITLE, SUMMARY, BODY, OPEN_QUESTIONS). specs/blog/t27b_progress.t27 gains its ID and the growth sentence now compares checked with checked (21 -> 380). README table lists docs-ru and blog-ru. Closes #6512 Refs #6460 Refs #6063 Co-Authored-By: Claude Opus 5.5 --- specs/blog/t27b_progress.t27 | 4 +++- specs/i18n/README.md | 2 ++ specs/i18n/blog-ru.t27 | 42 ++++++++++++++++++++++++++++++++++++ 3 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 specs/i18n/blog-ru.t27 diff --git a/specs/blog/t27b_progress.t27 b/specs/blog/t27b_progress.t27 index 53965a9dbc..26aefe8b51 100644 --- a/specs/blog/t27b_progress.t27 +++ b/specs/blog/t27b_progress.t27 @@ -83,6 +83,8 @@ pub struct PostBlock { text: str, } +; Key of this post in a specs/i18n bundle (specs/i18n/blog-ru.t27). +pub const ID: str = "blog/t27b-against-other-second-backends"; pub const SLUG: str = "t27b-against-other-second-backends"; pub const TITLE: str = "t27b against other second backends, and the road to 100%"; pub const SUMMARY: str = "[one lab run on one commit; the suites differ, so the percentages are not the same quantity; competitor figures are their own publications] t27b, the native AArch64 backend of t27, passes with runtime checks 380 of the 723 specs its reference path passes (52.6%), 661 with the vacuous ones (91.4%). By coverage it is third of three backends with published numbers, by speed of growth and by automation it is first, by depth of checking it is last. The post says what each issue fixes, and it is updated as the lab moves."; @@ -135,7 +137,7 @@ pub const body: [24]PostBlock = [ PostBlock { kind: "h", text: "Where we stand: four rankings" }, PostBlock { kind: "p", text: "The suites differ, so the percentages below are not the same quantity. Ours is 723 t27 specs; Zig's are its own behavior tests. Each number says where one backend is on its own road." }, PostBlock { kind: "p", text: "By coverage we are 3rd of 3 with published numbers. 1st: Zig's self-hosted x86_64 backend, about 100% (1987 tests passed against LLVM's 1980, of 2084, devlog 2025-06). 2nd: Zig's self-hosted aarch64 backend, 79% (1547 of 1960, devlog 2025-07). 3rd: t27b, 52.6% checked, 91.4% with the vacuous passes." }, - PostBlock { kind: "p", text: "By speed of growth we are 1st. t27b went from 47 lab passes to 380 checked in about a day; Zig's backends took years, from 41% and 64% in 0.10.0 (2022) to the 2025 numbers." }, + PostBlock { kind: "p", text: "By speed of growth we are 1st. t27b went from 21 to 380 checked specs in about a day; Zig's backends took years, from 41% and 64% in 0.10.0 (2022) to the 2025 numbers." }, PostBlock { kind: "p", text: "By automation we are 1st. tri t27b next picks the next lane from the lab's blocker grid with a rule written in t27, a steward loop merges green pull requests, and the lab's results are public JSON. We found no such loop published by Zig, rustc_codegen_cranelift, Go's SSA backend or QBE." }, PostBlock { kind: "p", text: "By depth of checking we are last. The others compare with their reference per test; Go hunted its SSA bugs with hash bisection, QBE and cg_clif fuzz the ABI. t27b compares per file, has no fuzzer and no reducer, and its CI runs under qemu, not on arm64." }, PostBlock { kind: "h", text: "What stands between t27b and 100%" }, diff --git a/specs/i18n/README.md b/specs/i18n/README.md index f398c64bd4..144b6b61a3 100644 --- a/specs/i18n/README.md +++ b/specs/i18n/README.md @@ -12,6 +12,8 @@ the contract, and a bundle file outside the spec corpus carries the text. | File | Module | Locale | Bundle | | --- | --- | --- | --- | | `agents-ru.t27` | `i18n_agents_ru` | `ru` | `trinity:apps/website/i18n/agents.ru.json` | +| `docs-ru.t27` | `i18n_docs_ru` | `ru` | `trinity:apps/website/i18n/docs.ru.json` | +| `blog-ru.t27` | `i18n_blog_ru` | `ru` | `trinity:apps/website/i18n/blog.ru.json` | Add a locale by copying `agents-ru.t27` to `agents-.t27`, renaming the module to `i18n_agents_` and changing `LOCALE` and `BUNDLE_PATH`. Nothing else knows diff --git a/specs/i18n/blog-ru.t27 b/specs/i18n/blog-ru.t27 new file mode 100644 index 0000000000..5a693412c2 --- /dev/null +++ b/specs/i18n/blog-ru.t27 @@ -0,0 +1,42 @@ +// SPDX-License-Identifier: Apache-2.0 +; specs/i18n/blog-ru.t27 -- translation contract, Russian, for the blog posts in specs/blog +; Specs are English-only (LANG-EN). This module carries no translated word: it +; declares WHICH fields of WHICH post specs a bundle may translate, WHERE that +; bundle lives and HOW it is keyed. The Russian text is in the bundle named below. +; Every t27.ai post has an English and a Russian version; the English is the post +; spec itself (for example specs/blog/t27b_progress.t27), the Russian is the bundle +; entry keyed by that spec's ID. +; phi^2 + 1/phi^2 = 3 | TRINITY + +module i18n_blog_ru; + +pub const KIND : str = "i18n"; +pub const LOCALE : str = "ru"; +pub const SOURCE_LOCALE : str = "en"; +; Spec directories whose modules this bundle may translate; an entry ID must +; resolve to a spec in one of them. +pub const SCOPE : [1]str = ["specs/blog"]; +; Spec fields a bundle entry may carry. TITLE maps to TITLE and SUMMARY to SUMMARY. +; BODY maps to the post's body array as one Markdown string: a block of kind "h" +; is a line starting with "## ", a block of kind "p" is a paragraph, and blocks are +; separated by one blank line. It must have the same number of blocks, of the same +; kinds, in the same order as the English body. +; OPEN_QUESTIONS maps to OPEN_QUESTIONS, one question per line, the same count. +pub const FIELDS : [4]str = ["TITLE", "SUMMARY", "BODY", "OPEN_QUESTIONS"]; +pub const BUNDLE_REPO : str = "trinity"; +pub const BUNDLE_PATH : str = "apps/website/i18n/blog.ru.json"; +pub const BUNDLE_FORMAT : str = "json"; +; Bundle entries are keyed by the post spec's ID constant. +pub const KEY : str = "ID"; +; What the site shows when an entry or a field has no translation. +pub const FALLBACK : str = "en"; +; true: every post has a Russian version, so a post spec with no entry fails the build. +pub const COVERAGE_REQUIRED : bool = true; +; false: a bundle entry whose ID matches no spec in SCOPE fails the build. +pub const ORPHANS_ALLOWED : bool = false; +pub const ENABLED : bool = true; + +test the_contract_has_one_scope_and_four_fields { + assert(SCOPE.len == 1); + assert(FIELDS.len == 4); +}