Skip to content

Runtime super polish pass 2: runtime hardening and fixes#40

Merged
RtlZeroMemory merged 8 commits into
mainfrom
feat/runtime-super-polish-pass-2
Feb 12, 2026
Merged

Runtime super polish pass 2: runtime hardening and fixes#40
RtlZeroMemory merged 8 commits into
mainfrom
feat/runtime-super-polish-pass-2

Conversation

@RtlZeroMemory

@RtlZeroMemory RtlZeroMemory commented Feb 12, 2026

Copy link
Copy Markdown
Owner

Summary

Runtime hardening pass for Rezi runtime layers, with targeted bug fixes and regression coverage.

Scope explicitly excludes Ink compatibility implementation work (packages/ink-compat/* unchanged).

What Was Fixed

1) Unicode-safe truncation in layout text measurement

  • Fixed grapheme-splitting truncation in:
    • packages/core/src/layout/textMeasure.ts
  • truncateWithEllipsis and truncateMiddle now truncate on grapheme boundaries instead of raw UTF-16 offsets.
  • Added regression tests:
    • packages/core/src/layout/__tests__/textMeasure.truncate.unicode.test.ts

2) Focus-zone traversal correctness

  • Fixed TAB traversal to skip empty zones (instead of clearing focus):
    • packages/core/src/runtime/focus.ts
  • Fixed stale zone metadata after trap-driven focus reassignment (activeZoneId and zone memory now recomputed from final focus):
    • packages/core/src/runtime/focus.ts
  • Added regression coverage:
    • packages/core/src/runtime/__tests__/focusZones.golden.test.ts

3) Native FFI boundary hardening (Rust addon)

  • Added alignment validation for debug-query headers before casting to native header struct:
    • packages/native/src/lib.rs
  • Fixed engineDebugGetPayload record-id parsing to reject out-of-range BigInt values (>= 2^64) instead of truncating.
  • Added smoke regressions:
    • misaligned outHeaders rejection
    • oversized recordId rejection
    • in packages/native/scripts/smoke.mjs

4) CI coverage gap on Linux reduced e2e profile

  • Added Linux reduced-profile e2e execution in CI:
    • .github/workflows/ci.yml
  • Added workflow regression test:
    • scripts/__tests__/ci-workflow-linux-reduced-e2e.test.mjs

5) Bench dependency alignment

  • ink is retained for benchmark scenarios.
  • Benchmark package stays compatible with benchmark imports requiring ink.

Changed Files

  • packages/core/src/layout/textMeasure.ts
  • packages/core/src/layout/__tests__/textMeasure.truncate.unicode.test.ts
  • packages/core/src/runtime/focus.ts
  • packages/core/src/runtime/__tests__/focusZones.golden.test.ts
  • packages/native/src/lib.rs
  • packages/native/scripts/smoke.mjs
  • .github/workflows/ci.yml
  • scripts/__tests__/ci-workflow-linux-reduced-e2e.test.mjs
  • packages/bench/package.json
  • packages/bench/tsconfig.json
  • package-lock.json

Validation

  • npm run lint
  • npm run typecheck
  • npm run build
  • npm test
  • npm run test:e2e
  • npm run test:e2e:reduced
  • npm run test:native:smoke
  • npm -w @rezi-ui/native run build:native
  • cargo test (in packages/native) ✅
  • node --test --test-concurrency=1 packages/core/dist/layout/__tests__/textMeasure.truncate.unicode.test.js packages/core/dist/runtime/__tests__/focusZones.golden.test.js

Residual Notes

  • No backend transport behavior changes were included in this PR.
  • No Ink compatibility layer changes were included in this PR.

@RtlZeroMemory RtlZeroMemory changed the title Runtime super polish pass 2: hardening + consensus-reviewed fixes Runtime super polish pass 2: runtime hardening and fixes Feb 12, 2026
@RtlZeroMemory
RtlZeroMemory merged commit c1e2cda into main Feb 12, 2026
14 checks passed
@RtlZeroMemory
RtlZeroMemory deleted the feat/runtime-super-polish-pass-2 branch February 12, 2026 15:28
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.

1 participant