Skip to content

test(styled-components): add bounded React parity harness - #505

Closed
jonkwheeler wants to merge 24 commits into
octanejs:mainfrom
jonkwheeler:jon/styled-components-react-parity-harness
Closed

jonkwheeler wants to merge 24 commits into
octanejs:mainfrom
jonkwheeler:jon/styled-components-react-parity-harness

Conversation

@jonkwheeler

@jonkwheeler jonkwheeler commented Aug 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Styled Components now has a fail-closed React parity contract instead of relying on package-local tests that could pass without proving the pinned React behavior. Six exact differential fixtures, adapted DOM/SSR/type lanes, immutable upstream provenance, and one-to-one evidence for all eight documented divergences make missing or renamed cases fail the repository audit.

The global audit now executes required lanes for recorded-unverified bindings and validates classification ledgers generically, so this binding cannot silently opt out of its declared evidence.

Validation

  • pnpm format:check
  • pnpm typecheck
  • pnpm test
  • targeted tests:
    • all four Styled Components parity lanes
    • Styled Components: 15 files, 73 tests
    • React parity harness: 79 tests
    • post-review classification/runner checks: 6 tests
    • global React parity audit: stable 5,345; canary 5,413

Risk / follow-ups

The canonical upstream repository contains runtime and type suites, but the published npm artifact omits them, so provenance remains recorded-unverified. A future verified lane must vendor and authenticate those canonical suites before claiming pristine execution.

Post-Deploy Monitoring & Validation

No additional operational monitoring is required because this changes repository audit/test infrastructure only. During the PR validation window, watch the React parity and Styled Components CI checks for missing-case, hash-drift, classification, or exact-selection errors. Healthy signal: all declared lanes execute and stable/canary counts remain 5,345/5,413. Failure signal: any required lane is skipped, any manifest hash drifts, or inventory counts change unexpectedly; 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
CI/audit and test infrastructure only; no production styled-components runtime behavior change beyond test fixture and comment edits.

Overview
Adds a bounded React parity contract for @octanejs/styled-components: audit/react-parity.json, UPSTREAM.md, test-classifications.json, and status/docs updates (verified 2026-08-02, provenance recorded-unverified). Six same-fixture differential cases run in a dedicated Vitest project (styled-components-differential, react-parity group) via mountStyledDifferential—comparing normalized DOM and per-engine isolated stylesheet output; the keyframes fixture shifts dynamic styling off createGlobalStyle so the oracle stays meaningful.

Test layout: documented adaptations move into tests/adapted/ and tests/ssr/adapted-divergences.test.ts; differential setup precompiles a fixed fixture list and fails on compile errors. Source comments reframe Octane divergences as ordinary package contracts.

Global audit: selectHarnessAction runs required lanes whenever any exist—not gated on provenance.verification === 'verified'—so recorded-unverified bindings still execute CI. Port test classification checks generalize to binding-classifications-lib.mjs for every binding with a ledger (including hook-form typetests). Other packages only refresh vitest.config.js hashes in parity manifests.

Reviewed by Cursor Bugbot for commit 8a0233f. 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

@jonkwheeler
jonkwheeler marked this pull request as ready for review August 2, 2026 20:04
@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
@vercel
vercel Bot temporarily deployed to Preview – octane-website-mcp August 2, 2026 20:04 Inactive
@vercel
vercel Bot temporarily deployed to Preview – octane-website August 2, 2026 20:05 Inactive
@leonidaz
leonidaz marked this pull request as draft August 2, 2026 22:28
@jonkwheeler
jonkwheeler force-pushed the jon/styled-components-react-parity-harness branch from 81bba9e to caa9644 Compare August 3, 2026 07:40
@vercel
vercel Bot temporarily deployed to Preview – octane-website-mcp August 3, 2026 07:42 Inactive
@vercel
vercel Bot temporarily deployed to Preview – octane-website August 3, 2026 07:43 Inactive
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
Resolve merge conflicts preserving PR intent and the react-parity vitest
differential split; refresh lockfile and vitest integrity hashes.

Co-authored-by: Cursor <[email protected]>
Comment thread scripts/react-parity/check.mjs Resolved
Comment thread vitest.config.js Resolved
@jonkwheeler

Copy link
Copy Markdown
Contributor Author

READY FOR REVIEW

@jonkwheeler

Copy link
Copy Markdown
Contributor Author

Branch is conflicting with main; withdrawing readiness until currency is restored.

REVIEW WITHDRAWN

Resolve react-parity check and audit hash conflicts: keep generalized
binding classifications, retain livestore verifiers from main, and refresh
vitest.config.js integrity digests.
@jonkwheeler

Copy link
Copy Markdown
Contributor Author

Ownership feedback addressed (dedicated adapted files + mixed testExecution.include), branch merged with origin/main, Bugbot clean on 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/styled-components/UPSTREAM.md Resolved
jonkwheeler and others added 2 commits August 9, 2026 12:11
Address leonidaz feedback by routing required lanes through run-required
regardless of provenance verification, owning only the differential project
under react-parity, and leaving Octane-only DOM/SSR/type contracts as ordinary
package tests until pristine and adapted upstream suites land.

Co-authored-by: Cursor <[email protected]>
Resolve parity manifest conflicts, keep selectHarnessAction routing, and
refresh lockfile/vitest evidence digests after the main merge.

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

Copy link
Copy Markdown
Contributor Author

Addressed leonidaz React-parity review (differential-only evidence + run-required routing), merged origin/main, refreshed lockfile digest, and Bugbot is clean on the current head.

READY FOR REVIEW

jonkwheeler and others added 3 commits August 9, 2026 15:49
…ness

Isolate each engine's StyleSheet and compare sheet CSS after every step so
parity evidence covers consumer-visible rules, not only container HTML.
Narrow the keyframes case onto a styled dynamic prop so both DOM and sheet
change on update.

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

# Conflicts:
#	packages/hook-form/audit/react-parity.json
#	packages/react-map-gl/audit/react-parity.json
#	packages/solana-react/audit/react-parity.json
Comment thread vitest.config.js Resolved
Keep sibling binding manifests pinned to the live shared Vitest config hash after the styled-components differential project landed.

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

Copy link
Copy Markdown
Contributor Author

Addressed leonidaz stylesheet-oracle feedback (isolated StyleSheetManager differential rig + narrowed keyframes case), refreshed shared vitest.config.js digests across sibling parity manifests, merged origin/main, and 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 conformance re-review only; tests were not run.

forward-ref, hook, JSX, and server-sheet boundaries are adapted to Octane.

The canonical pinned repository contains runtime and type suites, but the
published npm artifact does not contain them. This repository therefore records

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.

This remains nonconformant with the documented binding workflow. Missing tests from the npm archive are specifically not an exemption: the canonical tagged repository must supply the complete runtime/type suites, which must be vendored/pinned, run pristine, adapted one-for-one or dispositioned with reasons, and protected by the required structural inventories/negative controls. Describing that work as follow-up while registering bounded differential evidence does not satisfy the upstream-suite deliverable.

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.

Missing tests from the npm archive are specifically not an exemption: the canonical tagged repository must supply the complete runtime/type suites, which must be vendored/pinned, run pristine, adapted one-for-one or dispositioned with reasons...

Need a call on scope before I expand this PR. This branch was intentionally the bounded differential harness; vendoring the full styled-components runtime/type suites from the tagged repo (pristine + one-for-one adapted/dispositioned inventories) is a separate upstream-suite deliverable. Options: (a) keep this PR as differential-only evidence and open a follow-up for the full suite, or (b) expand this PR to vendor/pin and classify the complete suites now. Leaning (a) unless you want the full suite in #505.

Comment thread packages/styled-components/UPSTREAM.md Resolved
jonkwheeler and others added 2 commits August 9, 2026 18:05
…anejs#505)

Record React/ReactDOM oracle pins, classify typetest roots in the shared
verifier, and harden differential stylesheet observation with empty-sheet
and update-step negative controls.

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

@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 7986812. Configure here.

jonkwheeler and others added 2 commits August 9, 2026 18:10
…octanejs#505)

Exercise assertSheetParity with empty and altered React sheets so the
oracle path is proven to reject, instead of a tautological string compare.

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 37dd9e5a8136 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