Skip to content

feat(ink-compat): fresh-start mainstream compatibility delivery#41

Closed
RtlZeroMemory wants to merge 3 commits into
mainfrom
feat/ink-compat-super-pass
Closed

feat(ink-compat): fresh-start mainstream compatibility delivery#41
RtlZeroMemory wants to merge 3 commits into
mainfrom
feat/ink-compat-super-pass

Conversation

@RtlZeroMemory

Copy link
Copy Markdown
Owner

Fresh-Start Ink-Compat Mainstream Delivery Pass

Baseline lock summary

  • Rezi baseline commit: b2f357aa981270a2ae3528c3224bdfc0d0569fca (fresh worktree from origin/main).
  • Locked Ink npm version: ink@6.7.0.
  • Locked Ink commit: 135cb23ae3b7ca94918b1cd913682f6356f12c5c.
  • Lock timestamp: 2026-02-12T16:03:32Z.
  • Source lock evidence: docs/ink-compat/source-lock.md.

Audit consensus per subsystem

  • Full consensus artifact: docs/ink-compat/audit-consensus.md.
  • Subsystems 1..11 audited by two independent auditors.
  • Consensus achieved: YES for 8/11 directly; 3/11 carry documented deferred/missing capability items with explicit issue stubs (not shipping blockers).

Master confirmed issue list (fixed in this pass)

  1. IKINV-005 input normalization determinism regression in harness setup.
  • Severity: High.
  • Evidence: packages/ink-compat/src/__tests__/input.normalization.test.tsx, packages/ink-compat/src/keyNormalization.ts.
  • Fix direction implemented: deterministic TTY stdin test harness + normalization hardening.
  • Regression tests: input.normalization.test.tsx.
  1. IKINV-001/007/008 lifecycle/non-TTY runtime failures from React node normalization mismatch.
  • Severity: High.
  • Evidence: packages/ink-compat/src/render.ts, packages/ink-compat/src/__tests__/lifecycle.behavior.test.tsx, packages/ink-compat/src/__tests__/non-tty-and-negative.test.tsx.
  • Fix direction implemented: render wrapper node normalization/dispatcher bridging + non-TTY-safe clear semantics.
  • Regression tests: lifecycle + non-TTY suites.
  1. IKINV-009 package integration/type surface gaps.
  • Severity: Medium.
  • Evidence: packages/ink-compat/package.json, packages/ink-compat/src/index.ts, root workspace refs.
  • Fix direction implemented: workspace/package wiring, package scripts, explicit export/type surface.
  • Regression tests: package build/test + root typecheck/build/test.

Implemented fix clusters

  • Cluster A: Fresh package + Tier-1/Tier-2 mainstream API surface (render, components, hooks, key normalization).
  • Cluster B: Deterministic parity test harness (golden/lifecycle/input/non-TTY/negative) with >=30 scenarios.
  • Cluster C: Validation/lint/type stabilization and package-level scriptable checks.
  • Cluster D: Required reporting docs + missing-capabilities matrix + out-of-scope issue stubs.

Reviewer outcomes

  • Architecture gate reviewers: PASS x2 before implementation.
  • Implementation cluster reviewers: PASS x2 after fix loops.
  • Runtime-failure follow-up cluster reviewers: PASS x2.

Validation command results

All required commands executed successfully on this branch:

  • 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 ✅ (command passes; smoke reports SKIP engineCreate() deep checks in current non-TTY CI context)
  • npm -w @rezi-ui/ink-compat run build
  • npm -w @rezi-ui/ink-compat run test

Added tests list

  • packages/ink-compat/src/__tests__/render.golden.test.tsx
  • packages/ink-compat/src/__tests__/lifecycle.behavior.test.tsx
  • packages/ink-compat/src/__tests__/input.normalization.test.tsx
  • packages/ink-compat/src/__tests__/non-tty-and-negative.test.tsx
  • packages/ink-compat/src/__tests__/helpers.ts

Parity coverage count

  • Deterministic Tier-1 parity scenarios: 34 (package suite), covering golden output, lifecycle behavior, input normalization, non-TTY behavior, and negative paths.

Residual risks

  • React key warnings in package tests (non-fatal) from wrapped node normalization path.
  • @rezi-ui/ink-compat/testing entrypoint is deferred and tracked as out-of-scope.
  • Rezi-native backend execution mode is deferred (current adapter intentionally delegates runtime to locked Ink baseline).

Top 5 missing capabilities by priority

(See docs/ink-compat/missing-capabilities.md for full details)

  1. MCAP-001 (P1, IN-SCOPE): deterministic useFocus/useFocusManager parity suite.
  2. MCAP-002 (P1, IN-SCOPE): extended non-mainstream input normalization vectors.
  3. MCAP-004 (P1, OUT-OF-SCOPE): @rezi-ui/ink-compat/testing compatibility entrypoint.
  4. MCAP-003 (P2, IN-SCOPE): explicit useStdout/useStderr stream contract coverage.
  5. MCAP-005 (P2, OUT-OF-SCOPE): Rezi-native backend execution mode.

Required docs

  • docs/ink-compat/source-lock.md
  • docs/ink-compat/invariants.md
  • docs/ink-compat/architecture.md
  • docs/ink-compat/design-plan.md
  • docs/ink-compat/parity-matrix.md
  • docs/ink-compat/missing-capabilities.md

…007,008,009 mainstream adapter + deterministic tests

Coordinator-approval: required workspace wiring outside allowed dirs for integration/build validation (package.json, tsconfig.json, packages/bench/tsconfig.json).

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d7dc844ade

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +213 to +217
const inkOptions: InkRenderOptions = {};

if (options.stdout) {
inkOptions.stdout = options.stdout as NodeJS.WriteStream;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve or reject internal backend render option

This option filtering drops any non-Ink fields, so render(..., {internal_backend: backend}) is treated like no backend was provided. I checked the benchmark paths that use this mode (packages/bench/src/scenarios/startup.ts:115, memory.ts:210, and other internal_backend call sites), and they all block on backend.waitForFrame(); with this adapter those frame callbacks are never triggered, so ink-compat benchmark runs can hang indefinitely or write to process stdout instead of the bench backend.

Useful? React with 👍 / 👎.


export function normalizeKey(key: InkCompatKeyInput | null | undefined): InkCompatKey {
const safe = key ?? {};
const isReturn = isTrue(safe.return);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Normalize legacy enter flag when return is absent

InkCompatKeyInput accepts a legacy enter field, but normalization only reads safe.return and then mirrors that into enter. That means normalizeKey({enter: true}) returns enter: false, dropping Enter presses for callers that provide legacy key payloads with only enter populated.

Useful? React with 👍 / 👎.

@RtlZeroMemory

Copy link
Copy Markdown
Owner Author

Second autonomous loop complete on same branch/PR.

New commit: 51bc552

Closed in-scope gaps from docs/ink-compat/missing-capabilities.md:

  • MCAP-001 (focus parity coverage) via packages/ink-compat/src/tests/focus.behavior.test.tsx
  • MCAP-002 (extended input normalization vectors) via packages/ink-compat/src/tests/input.normalization.test.tsx
  • MCAP-003 (stream hook contract coverage) via packages/ink-compat/src/tests/stream-hooks.contract.test.tsx

Validation rerun status:

  • package build/test for @rezi-ui/ink-compat: PASS (44/44)
  • repo lint/typecheck/build/test/e2e/e2e:reduced/native:smoke: PASS

Remaining items are out-of-scope backlog entries (MCAP-004/005/006).

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