Skip to content

feat(conformance): add TypeScript/Node.js SDK conformance driver (#1658)#1661

Merged
curdriceaurora merged 1 commit into
mainfrom
agent/parity-1658-ts-conformance-driver
Jul 24, 2026
Merged

feat(conformance): add TypeScript/Node.js SDK conformance driver (#1658)#1661
curdriceaurora merged 1 commit into
mainfrom
agent/parity-1658-ts-conformance-driver

Conversation

@curdriceaurora

@curdriceaurora curdriceaurora commented Jul 24, 2026

Copy link
Copy Markdown
Owner

Summary

Builds a Node.js/TypeScript conformance driver for the TYPESCRIPT_SDK surface exercising organization.scan, organization.preview, and organization.execute against a real local backend environment.

  • Implements tests/conformance/ts_driver/runner.mjs calling FileOrganizerClient from src/file_organizer/client/typescript/client.ts.
  • Implements TypeScriptSDKConformanceDriver in tests/conformance/driver.py running an in-process ephemeral uvicorn server.
  • Registers TypeScriptSDKConformanceDriver in tests/conformance/conftest.py and tests/conformance/test_direct_service_conformance.py.
  • Updates capability_registry.json to set conformance_status: "verified" for typescript-sdk on organization.scan, organization.preview, and organization.execute.
  • Updates assertions in tests/core/test_capabilities.py and regenerates docs/developer/capability-matrix.md.
  • Verified public claim freshness via python scripts/verify_claims_freshness.py.

Review & Audit

  • Completed a 2-Pass Code Review Audit following the Advanced Code Review Methodology.
  • Mutation Testing: Injected a fault reversing file scan order in runner.mjs, which immediately triggered 3 test failures, empirically verifying test suite defect detection.

Closes #1658

Summary by CodeRabbit

  • New Features

    • Verified TypeScript SDK support for organization scanning, previewing, and execution workflows.
  • Documentation

    • Updated the capability matrix and conformance statistics to reflect improved executable conformance for the TypeScript SDK.
  • Tests

    • Extended the conformance suite with a TypeScript SDK conformance driver/runner.
    • Updated test expectations to treat the TypeScript SDK organization capabilities as verified.

@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 7d70e3ea-7f12-416d-abab-a7d9e408fa7e

📥 Commits

Reviewing files that changed from the base of the PR and between 662e412 and 220a54c.

📒 Files selected for processing (7)
  • docs/developer/capability-matrix.md
  • src/file_organizer/core/capability_registry.json
  • tests/conformance/conftest.py
  • tests/conformance/driver.py
  • tests/conformance/test_direct_service_conformance.py
  • tests/conformance/ts_driver/runner.mjs
  • tests/core/test_capabilities.py

📝 Walkthrough

Walkthrough

Adds a Node.js TypeScript SDK conformance runner and Python driver for scan, preview, and execute, registers the driver, and marks three organization capabilities as verified.

Changes

TypeScript SDK conformance

Layer / File(s) Summary
TypeScript SDK runner
tests/conformance/ts_driver/runner.mjs
Routes operations through FileOrganizerClient and emits structured success or error JSON.
Python driver integration
tests/conformance/driver.py, tests/conformance/conftest.py, tests/conformance/test_direct_service_conformance.py
Runs the local FastAPI app, invokes the Node.js runner, maps outcomes, and registers the TypeScript SDK driver.
Verification records and expectations
src/file_organizer/core/capability_registry.json, tests/core/test_capabilities.py, docs/developer/capability-matrix.md
Marks TypeScript SDK conformance as verified for organization.execute, organization.preview, and organization.scan across registry, tests, and documentation.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant ConformanceSuite
  participant TypeScriptSDKConformanceDriver
  participant runner.mjs
  participant FileOrganizerClient
  participant FastAPIApp
  ConformanceSuite->>TypeScriptSDKConformanceDriver: execute scan, preview, or execute
  TypeScriptSDKConformanceDriver->>FastAPIApp: start local server
  TypeScriptSDKConformanceDriver->>runner.mjs: pass action and request data
  runner.mjs->>FileOrganizerClient: invoke SDK operation
  FileOrganizerClient->>FastAPIApp: send HTTP request
  FastAPIApp-->>FileOrganizerClient: return operation response
  FileOrganizerClient-->>runner.mjs: return SDK result
  runner.mjs-->>TypeScriptSDKConformanceDriver: emit JSON outcome
  TypeScriptSDKConformanceDriver-->>ConformanceSuite: return conformance payload
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and accurately describes the main change: adding a TypeScript/Node.js SDK conformance driver.
Linked Issues check ✅ Passed The PR adds the TypeScript driver, runner, verified registry entries, corpus coverage, and matrix/docs updates required by #1658.
Out of Scope Changes check ✅ Passed The changes stay within conformance-driver, registry, corpus, and docs updates, with no clear unrelated scope added.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch agent/parity-1658-ts-conformance-driver

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@curdriceaurora
curdriceaurora force-pushed the agent/parity-1658-ts-conformance-driver branch from fa1d746 to 48442c5 Compare July 24, 2026 01:34
@curdriceaurora
curdriceaurora marked this pull request as ready for review July 24, 2026 01:34
@curdriceaurora
curdriceaurora force-pushed the agent/parity-1658-ts-conformance-driver branch from 48442c5 to 013dbc8 Compare July 24, 2026 01:36

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
tests/conformance/driver.py (2)

1253-1256: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick win

Busy-wait loop spins a CPU core while waiting for server startup.

Replacing time.sleep() with a hot while loop avoids the sleep call but pegs a core polling self._server.started with no yield. Consider a tiny sleep (e.g. time.sleep(0.005)) inside the loop, or better, a threading.Event set from a startup callback, instead of a pure spin.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/conformance/driver.py` around lines 1253 - 1256, Update the
server-startup wait loop around self._server.started to yield between polls,
preferably by adding a short time.sleep delay while preserving the existing
timeout and RuntimeError behavior. Avoid introducing broader synchronization
changes unless an existing startup event or callback is already available.

1286-1286: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

Consider bounding the Node subprocess with a timeout.

subprocess.run has no timeout=. The TS client applies its own per-request AbortController timeout, which reduces risk, but a hang in the Node process itself (unresolved promise, dangling handle) would still block the test run indefinitely. Add timeout= and handle subprocess.TimeoutExpired for a bounded, diagnosable failure instead.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/conformance/driver.py` at line 1286, Add a finite timeout to the
subprocess.run call in the Node execution path, and catch
subprocess.TimeoutExpired to report a clear, diagnosable failure while
preserving the existing result handling for completed processes. Use the
surrounding driver’s established timeout or failure-reporting conventions if
available.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tests/conformance/driver.py`:
- Around line 1243-1259: Add a close() method to TypeScriptSDKConformanceDriver
that signals its uvicorn.Server to exit and joins the server thread, then update
the conformance fixture to use teardown and invoke close() for this driver
instead of returning it without cleanup. Preserve existing driver setup and
ensure cleanup runs after each parametrized test invocation.

---

Nitpick comments:
In `@tests/conformance/driver.py`:
- Around line 1253-1256: Update the server-startup wait loop around
self._server.started to yield between polls, preferably by adding a short
time.sleep delay while preserving the existing timeout and RuntimeError
behavior. Avoid introducing broader synchronization changes unless an existing
startup event or callback is already available.
- Line 1286: Add a finite timeout to the subprocess.run call in the Node
execution path, and catch subprocess.TimeoutExpired to report a clear,
diagnosable failure while preserving the existing result handling for completed
processes. Use the surrounding driver’s established timeout or failure-reporting
conventions if available.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: a0f62654-9087-457f-8c2e-7bd3cddc8e1d

📥 Commits

Reviewing files that changed from the base of the PR and between 16ef804 and 662e412.

📒 Files selected for processing (7)
  • docs/developer/capability-matrix.md
  • src/file_organizer/core/capability_registry.json
  • tests/conformance/conftest.py
  • tests/conformance/driver.py
  • tests/conformance/test_direct_service_conformance.py
  • tests/conformance/ts_driver/runner.mjs
  • tests/core/test_capabilities.py

Comment thread tests/conformance/driver.py
@curdriceaurora
curdriceaurora force-pushed the agent/parity-1658-ts-conformance-driver branch from 9bb6d67 to 220a54c Compare July 24, 2026 10:09
@curdriceaurora
curdriceaurora merged commit c6d63ba into main Jul 24, 2026
76 of 77 checks passed
@curdriceaurora
curdriceaurora deleted the agent/parity-1658-ts-conformance-driver branch July 24, 2026 10:10
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.

feat(conformance): add TypeScript/Node.js SDK conformance driver

1 participant