Repository navigation
feat(core,cli,playwright,spec): resolve definitive engine, isolation, and schema defects - #170
Open
CodeinScrubs wants to merge 2 commits into
Open
CodeinScrubs wants to merge 2 commits into
CodeinScrubs wants to merge 2 commits into
Conversation
added 2 commits
October 2, 2026 15:24
… and schema defects
…umber isolation, extend confusable scanning, and harden playwright order assertions
This branch has not been deployed
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.
Summary
Resolves the remaining engine defects, schema synchronization discrepancies, isolation edge cases, and CLI/testing enhancements documented in
plan_bidilens_definitive_bugs_and_enhancements.md.Key Fixes & Enhancements
1. Core Engine & Analysis
analyzeBlock):securityScanner?: (text: string) => BidiSecurityReport | BidiSecurityFinding[]toAnalyzeBlockOptions.BidiSecurityReportobjects and directBidiSecurityFinding[]arrays, returned onresult.warnings.planInlineIsolation,analyzeBlock):options.inheritedDirectioninAnalyzeBlockOptionsintoplanInlineIsolation.options.inheritedDirection ?? blockDirection) is evaluated during intervention checks (needsBidiIntervention), avoiding redundant or missing isolation wrappers when embedding within opposing-direction DOM contexts.2. Technical Token & Boundary Detection
NUMBER_TOKEN,CURRENCY_PERCENT_TOKEN, andNUMBER_RANGE_TOKENregular expressions.?????????), Persian Momayyez decimal point (??????), Arabic percent sign (???,50%), currency prefixes/suffixes ($50), and number ranges (10-20,2020-2024,10?20,?????,?????).addMathRangesin@bidilens/coreto recognize multiline$$...$$and\[...\]math blocks while preserving single-pass linear timeC:\...), Windows/POSIX relative paths (.\...,..\...,./...,../...), and home paths (~/...,~\...) without misclassifying LaTeX escapes (\$x\$) or Unix root paths (/usr/local/bin).3. UAX #9 Character Classification
CharacterClassificationinterface andgetCharacterClassification(codePoint: number)in@bidilens/core.classifyCharacterto support bothcodePoint: number(returning detailedCharacterClassification) andcharacter: string(returningDirection), properly identifying:AN(Arabic Number,isWeak: true)EN(European Number,isWeak: true)NSM(Non-Spacing Mark,isWeak: true,isMark: true)BN(Boundary Neutral e.g. ZWNJ/ZWJ/SHY,isWeak: true)B(Paragraph Separator e.g. LF/CR/NEL/PS,isNeutral: true)S(Segment Separator e.g. TAB/US,isNeutral: true)WS(Whitespace,isNeutral: true)ON(Other Neutral,isNeutral: true)4. Security & Confusable Whitelist
?m,?s,?g,?L,?mol,?V,?A,?F,?W,?H) inscanBidiSecuritysupporting both Greek small letter mu (U+03BC?) and micro sign (U+00B5?).scanConfusables: true) with accurate code point source offsets.5. Specification Schema Synchronization
packages/spec/schemas/common.schema.json:bidiSourceRangetodirectionEvidence.bidiSourceRangeandexcludedtoinlineIsolation.6. CLI
.gitignoreSupport.gitignorediscovery and hierarchy traversal to@bidilens/cli(collectFilesandloadGitignore)..gitignorepatterns during recursive audits and security scans across target directories.7. Playwright Visual Coordinate Testing
expectTextOrder(target, selectorOrOrder, expectedOrder?, direction?)from@bidilens/playwright.getBoundingClientRect().Locatortargets andPagetargets with root/body fallback.8. Conformance Corpus Synchronization
scripts/generate-corpus.tspolicy overrides for Arabic and Persian percent (???,???) and large thousands-separated numbers (??????).corpus/cases.json,@bidilens/clipackaged cases, Kotlin Android fixtures, and Swift Apple fixtures.Verification Record
pnpm run build: All 12 packages compiled cleanly via tsc, tsup, vite, and esbuild.pnpm run typecheck: Passed cleanly with zero TypeScript errors across the entire monorepo (tsc --noEmit).pnpm run lint: ESLint flat config passed with zero warnings or errors.pnpm test: 24 test files, 652 tests passed, 0 failures (including 23 tests inpackages/core/src/hardening.test.ts, plus new tests in CLI and Playwright).pnpm run corpus:check: All 932 fixtures passed (0 failures), Android and Apple representations reproducible.pnpm run check: Full CI validation gate passed with exit code 0 (unicode:check,typecheck,lint,packages:depth,test:coverage,corpus:check,docs:check,build,action:check).pnpm run release:check: Validated distribution budgets, exports, tarballs, integration guides, and packed examples across all 12 packages on a clean worktree.