Skip to content

fix(ar-fixture): one-word, non-leaking demo sentence#49

Merged
mergify[bot] merged 1 commit into
mainfrom
fix/ar-fixture-no-leak
Jul 4, 2026
Merged

fix(ar-fixture): one-word, non-leaking demo sentence#49
mergify[bot] merged 1 commit into
mainfrom
fix/ar-fixture-no-leak

Conversation

@julianken

Copy link
Copy Markdown
Owner

Summary

Operator feedback on the live /ar: the demo prose was leaking context — every clause was a disguised gloss ("before the stalls fill up" → market, "sip it slowly" → coffee, "the rest of the مدينة stirs" → city). That teaches the words through loaded context, which the reading-pedagogy law (DESIGN.md) forbids — the conversation must never hand you the meaning. The zh demo the operator preferred uses one word incidentally, no giveaway.

Change (pure fixture copy + test — no renderer/design/schema change)

  • ar-blend-intro.json — rewrote the English scaffold to one short, natural reply that eases in a single Arabic word with no meaning-leaking context:

    Sure — you can wait for me at the سُوق until I get back.
    سُوق keeps its verified annotations (diac/skeleton/vowelState/morphology/translit) — meaning + pronunciation reveal on click in the word-card, never inline.

  • ar-blend-intro-fixture.test.ts — relaxed arWords ≥ 3 to ≥ 1 with rationale: blend density was never the point (the zh demo is one word); mostly-English + no-leak is. Ratio-ceiling + per-word schema validation unchanged.

Testing

pnpm run build && pnpm run typecheck && pnpm run test — all green (ratio 1/5 = 0.2 ≤ 0.34; سُوق annotations validate against ArAnnotationsSchema).

Doc updates

No Figma update needed — this is fixture copy, not a design change (the reading model is unchanged: script inline, translation on click). tokens.json / DESIGN.md untouched.

The ar-blend-intro prose was 'leaking context' — every clause was a
disguised gloss ('before the stalls fill up' = market, 'sip it slowly'
= coffee, 'the rest of the مدينة stirs' = city), so the conversation
taught the words through loaded context, exactly what the reading-
pedagogy law forbids. Rewrote it to mirror the zh demo the operator
preferred: one Arabic word used incidentally in a short, natural reply
where nothing gives its meaning away —

  Sure — you can wait for me at the سُوق until I get back.

سُوق keeps its verified annotations (meaning/pronunciation revealed on
click). Relaxed the fixture test's ≥3-word assertion to ≥1 (density was
never the point — mostly-English + no leak is; the zh demo is one word
too). Pure fixture copy + test; no renderer/design/schema change.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@cursor

cursor Bot commented Jul 4, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

// single 可以 — density is not the point; a natural, non-leaking sentence
// is). The reading-pedagogy law forbids the prose from glossing the word,
// so a demo that eases in ONE Arabic word incidentally is fully valid.
expect(arWords.length).toBeGreaterThanOrEqual(1);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SUGGESTION (polish, non-blocking): the relaxed assertion + its new comment correctly reflect the single-word reality, but two prose spots in this file still describe the old fixture:

  1. File-level docstring (line 4): "with a few Arabic words eased in inline" - the fixture now has exactly one target word (سُوق).
  2. Third test title (line 69): "...a known word omits it" - the only status: "known" word (مَدِينَة) was dropped, so that branch is now dead (grep "\"status\": \"known\"" -> 0); the known-word translit-omission invariant is no longer exercised by this fixture.

Consider "one Arabic word" in the docstring and either dropping the known-word clause or keeping one known-status word in the fixture to preserve that assertion coverage. Nothing here blocks merge.

@mergify

mergify Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Queued — the merge queue status continues in this comment ↓.

@julianken-bot

Copy link
Copy Markdown
Collaborator

Review summary for my APPROVE (review #4629984943) — posted as a comment because the review-body attach hit a local arg-length truncation; the verdict (APPROVED) and the inline SUGGESTION on ar-blend-intro-fixture.test.ts:50 are on the review itself.

Verdict: APPROVE

Verification ledger (commands run this turn, at head fe42ac7 in an isolated detached worktree):

  • pnpm run build -> exit 0 (all 8 packages built)
  • vitest run ar-blend-intro-fixture.test.ts --reporter=verbose -> 4 passed (low-ratio 0.2 <= 0.34; every annotation satisfies ArAnnotationsSchema; translit present; diac->skeleton strip)
  • jq semantic diff of the t5 (سُوق) token base<->head -> IDENTICAL (diac/skeleton/vowelState/morphology/translit unchanged; the diff is whitespace reflow only)
  • Read DESIGN.md line 142 (reading-pedagogy binding law) to ground the leak check
  • grep '"status": "known"' on the fixture -> 0 (no known-status word remains)

Leak check (the core concern) — clean. New line: "Sure — you can wait for me at the سُوق until I get back." No English token romanizes or glosses سُوق (market/souk); at the … is a bare locative that fits any place noun. The only cue is "it is a place you can wait at," which is exactly the comprehensible-input mechanism DESIGN.md:142 endorses ("the surrounding context carries its sense"), not the inline gloss it forbids. Contrast the removed prose ("stalls fill up" / "order a small قهوة") which did disguise-gloss the adjacent words. The fix lands.

Data integrity — clean. The سُوق token + its annotations are byte-identical to base (gate-verified data preserved); only the English scaffold tokens changed and قهوة/مدينة were dropped, as claimed.

Test relaxation — legitimate. arWords >= 3 -> >= 1 is data-shape-appropriate (density is not a schema invariant). The load-bearing guards — ratio ceiling <= 0.34, per-word ArAnnotationsSchema.safeParse, translit-presence, diac->skeleton — are all UNCHANGED and still fire. This is not a guard weakened to hide a bug.

Doc-currency — correct. No Figma update needed + DESIGN.md/tokens.json untouched is the right call: fixture copy, reading model unchanged (script inline, meaning click-only).

Findings (1)

  • SUGGESTION ar-blend-intro-fixture.test.ts:50 — test prose still describes the old 3-word / known-word fixture (see inline). Non-blocking.

Bottom line: The one thing that would sink this — the new sentence leaking سُوق's meaning through context — does not happen. Build + fixture tests green at head. APPROVE.


@julianken-bot (opus) · fresh-context review
Same-tier note: implementer commit trailer is Claude Opus 4.8, reviewer is opus — extra R8 skepticism applied; the second pass yielded the single SUGGESTION above and nothing verdict-affecting.

@julianken

Copy link
Copy Markdown
Owner Author

@Mergifyio queue

@mergify

mergify Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • Entered queue2026-07-04 17:13 UTC · Rule: default · triggered by @julianken with the @mergifyio queue command
  • Checks skipped · PR is already up-to-date
  • Merged2026-07-04 17:13 UTC · at fe42ac704e56e42ac7c3afcd6092be7dc1a3d4df · squash

This pull request spent 8 seconds in the queue, including 1 second running CI.

Required conditions to merge
  • github-review-approved [🛡 GitHub repository ruleset rule main]
  • any of [🛡 GitHub repository ruleset rule main]:
    • check-success = validate
    • check-neutral = validate
    • check-skipped = validate
  • any of [🛡 GitHub repository ruleset rule main]:
    • check-success = build
    • check-neutral = build
    • check-skipped = build
  • any of [🛡 GitHub repository ruleset rule main]:
    • check-success = sidecar-ar
    • check-neutral = sidecar-ar
    • check-skipped = sidecar-ar
  • any of [🛡 GitHub repository ruleset rule main]:
    • check-success = sidecar-zh
    • check-neutral = sidecar-zh
    • check-skipped = sidecar-zh
  • any of [🛡 GitHub repository ruleset rule main]:
    • check-success = conformance (fake)
    • check-neutral = conformance (fake)
    • check-skipped = conformance (fake)
  • any of [🛡 GitHub repository ruleset rule main]:
    • check-success = e2e
    • check-neutral = e2e
    • check-skipped = e2e
  • any of [🛡 GitHub repository ruleset rule main]:
    • check-success = conformance (ar)
    • check-neutral = conformance (ar)
    • check-skipped = conformance (ar)
  • any of [🛡 GitHub repository ruleset rule main]:
    • check-success = conformance (zh)
    • check-neutral = conformance (zh)
    • check-skipped = conformance (zh)

@mergify mergify Bot added the queued label Jul 4, 2026
@mergify mergify Bot merged commit 95ffbbd into main Jul 4, 2026
17 checks passed
@mergify mergify Bot deleted the fix/ar-fixture-no-leak branch July 4, 2026 17:13
@mergify mergify Bot removed the queued label Jul 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants