Skip to content

test(tanstack-ai): add bounded React parity harness - #507

Closed
jonkwheeler wants to merge 19 commits into
octanejs:mainfrom
jonkwheeler:jon/tanstack-ai-react-parity-harness
Closed

jonkwheeler wants to merge 19 commits into
octanejs:mainfrom
jonkwheeler:jon/tanstack-ai-react-parity-harness

Conversation

@jonkwheeler

@jonkwheeler jonkwheeler commented Aug 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

TanStack AI now has a bounded React parity contract pinned to the official @tanstack/[email protected] release tag and commit. The manifest registers exact streamed-chat differential evidence, consumer-facing adaptation and SSR cases, the checked hook type contract, and a classification for every local runtime test.

The npm artifact omits the canonical upstream Vitest suite, so provenance remains truthfully recorded-unverified. The global audit now executes required lanes for that state and validates classification ledgers generically instead of allowing recorded bindings to remain metadata-only.

Validation

  • pnpm format:check
  • pnpm typecheck
  • pnpm test
  • targeted tests:
    • all four TanStack AI parity lanes
    • TanStack AI: 12 files, 146 tests
    • shared runner/classification controls: 6 tests
    • bounded type assertions for default and transformed useAudioRecorder results
    • global React parity audit: stable 5,345; canary 5,413
    • generated binding status and CLI data checks

Risk / follow-ups

The canonical tagged repository contains runtime tests, but the published package omits them. A future verified lane must vendor and authenticate that suite rather than promoting this manifest based only on adapted evidence.

Post-Deploy Monitoring & Validation

No operational monitoring is required because this changes repository audit/test infrastructure and a type-equivalent hook signature, not deployed runtime behavior. During the PR validation window, watch the React parity, TanStack AI, typecheck, and generated-output CI checks. Healthy signal: all declared lanes execute, 146 package tests pass, and stable/canary counts remain 5,345/5,413. Failure signal: any required lane is skipped, any evidence hash drifts, or the useAudioRecorder type assertions fail; mitigation is to revert or repair the manifest/evidence pair before merge. Owner: PR author.

Provenance

  • An agent produced this diff (agent-authored)

Compound Engineering


Note

Low Risk
Changes are test infrastructure, audit metadata, and a type-equivalent hook signature refactor; no production runtime or auth paths are modified.

Overview
Adds a bounded React parity contract for @octanejs/tanstack-ai pinned to @tanstack/[email protected], including react-parity.json, upstream inventory, per-test classifications, and UPSTREAM.md. Provenance stays recorded-unverified because the npm tarball omits the repo Vitest suite; the manifest still runs the required streamed-chat differential lane (tanstack-ai-differential Vitest project, react-parity group).

CI / audit behavior changes so parity jobs run required lanes whenever they exist, not only when provenance is verified (selectHarnessAction). Port test classification checks are generic per binding (not hook-form-only) and run for any package with audit/test-classifications.json.

Conformance tests for documented Octane divergences move under tests/conformance/parity/; differential setup compiles a single parity.tsrx fixture. useAudioRecorder is refactored to a single generic overload with default transform typing; typetests cover default vs transformed output. Docs, status.json, and CLI binding data reflect 145 runtime + 1 SSR tests and refreshed evidence hashes (vitest.config.js included in parity manifests).

Reviewed by Cursor Bugbot for commit ca4a825. Bugbot is set up for automated code reviews on this repo. Configure here.

@vercel

vercel Bot commented Aug 2, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
octane-website Ready Ready Preview Aug 7, 2026 3:57pm
octane-website-mcp Ready Ready Preview Aug 7, 2026 3:57pm

Request Review

@github-actions github-actions Bot added agent-authored Diff or issue body substantially produced by an AI agent test PR: tests only labels Aug 2, 2026
@jonkwheeler
jonkwheeler marked this pull request as ready for review August 2, 2026 20:41
@vercel
vercel Bot temporarily deployed to Preview – octane-website-mcp August 2, 2026 20:41 Inactive
@vercel
vercel Bot temporarily deployed to Preview – octane-website August 2, 2026 20:42 Inactive
@leonidaz
leonidaz marked this pull request as draft August 2, 2026 22:26
@vercel
vercel Bot temporarily deployed to Preview – octane-website-mcp August 3, 2026 06:29 Inactive
@vercel
vercel Bot temporarily deployed to Preview – octane-website August 3, 2026 06:30 Inactive
@jonkwheeler
jonkwheeler force-pushed the jon/tanstack-ai-react-parity-harness branch from a8eeb42 to 40f26fb Compare August 3, 2026 07:42
@vercel
vercel Bot temporarily deployed to Preview – octane-website-mcp August 3, 2026 07:43 Inactive
@vercel
vercel Bot temporarily deployed to Preview – octane-website August 3, 2026 07:44 Inactive
Comment thread scripts/react-parity/check.mjs Resolved
Follow the hook-form pattern: tag parity lanes with
testExecution group react-parity, move differential tests into a
dedicated project with globalSetup precompile, and drop per-file
beforeAll compile hooks.
@vercel
vercel Bot temporarily deployed to Preview – octane-website-mcp August 7, 2026 15:56 Inactive
@vercel
vercel Bot temporarily deployed to Preview – octane-website August 7, 2026 15:57 Inactive
Comment thread vitest.config.js Resolved
@jonkwheeler
jonkwheeler marked this pull request as ready for review August 7, 2026 17:43

@cursor cursor 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.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is ON, but it could not run because the branch was deleted or merged before autofix could start.

Reviewed by Cursor Bugbot for commit 5500717. Configure here.

Comment thread vitest.config.js Resolved
@jonkwheeler
jonkwheeler marked this pull request as draft August 7, 2026 19:49
@jonkwheeler

Copy link
Copy Markdown
Contributor Author

READY FOR REVIEW

@jonkwheeler

Copy link
Copy Markdown
Contributor Author

REVIEW WITHDRAWN

Branch is DIRTY vs main; resolving merge conflicts before re-signaling ready.

jonkwheeler and others added 2 commits August 8, 2026 21:23
Resolve react-parity audit conflicts by keeping the generalized binding
classifications path, preserving livestore-specific verifiers, and refreshing
vitest.config.js support hashes.

Co-authored-by: Cursor <[email protected]>
Keep the React parity harness environment hash aligned with the merged
pnpm-lock.yaml.

Co-authored-by: Cursor <[email protected]>
@jonkwheeler

Copy link
Copy Markdown
Contributor Author

READY FOR REVIEW

Comment thread packages/tanstack-ai/UPSTREAM.md Resolved
Comment thread vitest.config.js Resolved
Comment thread vitest.config.js Resolved
jonkwheeler and others added 2 commits August 9, 2026 02:00
…ership

Move declared React-parity cases into dedicated conformance/parity files with
testExecution.include, and keep differential cases only on the dedicated
tanstack-ai-differential project so ordinary shards keep the rest.

Co-authored-by: Cursor <[email protected]>
@jonkwheeler

Copy link
Copy Markdown
Contributor Author

Addressed ownership/differential feedback and merged main; Bugbot is clean on the current head.

READY FOR REVIEW

@leonidaz leonidaz left a comment

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.

React-parity/Vitest setup review only; tests were not run.

Comment thread packages/tanstack-ai/UPSTREAM.md Outdated
published npm artifact contains source and declarations but omits tests. The
binding therefore records provenance as unverified rather than claiming a
pristine-upstream run. Required evidence executes a same-fixture differential
chat scenario against the pinned React package, exact Octane adaptation and SSR

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.

Existing upstream suite is not executable evidence: UPSTREAM.md acknowledges the canonical Vitest suite but only says provenance is unverified; there is no complete artifact disposition, pristine lane, or one-for-one adapted lane. The binding parity rules require the pinned suite to run unchanged and its React-facing cases to be ported/crosswalked. Add that evidence rather than substituting one bounded local differential plus Octane contracts.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Add that evidence rather than substituting one bounded local differential plus Octane contracts.

Agreed — inventory alone is not executable evidence. I inventoried every packages/ai-react/tests artifact at the pin in audit/upstream-suite-artifacts.json and demoted the Octane-only substituted lanes, but closing this thread still requires vendoring the pinned suite and registering pristine / one-for-one adapted lanes (or specific per-case incompatibility reasons).

Needs a call before I expand scope on this PR:

  1. Keep this PR as differential-only + inventory (recorded-unverified), and open a follow-up for pristine/adapted upstream execution.
  2. Expand this PR now to vendor packages/ai-react/tests at 9ca37065… and land executable pristine + adapted lanes.

Lean: (1) — the false-oracle demotions and run-required routing are already landed; pristine/adapted is a distinct porting effort.

jonkwheeler and others added 4 commits August 9, 2026 12:12
Address leonidaz feedback by routing the generic harness on required
executable lanes, keeping only the differential project under react-parity,
and moving Octane-only adaptation/SSR/type contracts back to ordinary shards.
Inventory the pinned upstream suite disposition without claiming pristine
execution yet.

Co-authored-by: Cursor <[email protected]>
Resolve react-parity conflicts by keeping selectHarnessAction routing and
refreshing vitest.config.js evidence hashes.

Co-authored-by: Cursor <[email protected]>
Keep selectHarnessAction and Solana type verification together, and refresh
vitest evidence hashes left conflicted in the merge commit.

Co-authored-by: Cursor <[email protected]>
@leonidaz

Copy link
Copy Markdown
Collaborator

Thank you for your contribution! This pull request was incorporated into main as commit 12f005f7c4e6 through consolidated PR #699.

@leonidaz leonidaz closed this Aug 12, 2026
kotarotaniguchi0523 pushed a commit to kotarotaniguchi0523/octane that referenced this pull request Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-authored Diff or issue body substantially produced by an AI agent test PR: tests only

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants