Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,4 @@ jobs:
- run: bun run build
- run: bun test
- run: bun run test:rust-timeline
- run: bun test test/readmeDiscovery.test.ts
- run: bun run benchmark:release-gate
- run: bun run benchmark:release-gate
26 changes: 0 additions & 26 deletions crates/video-reader-mcp-server/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,37 +84,11 @@ impl ServerHandler for VideoReaderMcp {
#[cfg(test)]
mod tests {
use super::VideoReaderMcp;
use std::fs;
use std::path::PathBuf;

#[test]
fn rmcp_server_sources_route_primary_tools_through_rust_core() {
let src_dir = PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("src");
let lib_rs = fs::read_to_string(src_dir.join("lib.rs")).expect("read lib.rs");
let production_lib = lib_rs.split("#[cfg(test)]").next().unwrap_or(&lib_rs);
assert!(production_lib.contains("read_video::read_video"));
assert!(production_lib.contains("video_evidence::video_evidence"));

let routes = fs::read_to_string(src_dir.join("tool_routes.rs")).expect("read tool_routes");
assert!(routes.contains("read_video"));
assert!(routes.contains("video_evidence"));
}

#[test]
fn exposes_primary_tool_surface() {
let tools = VideoReaderMcp::new().tool_router.list_all();
let names: Vec<_> = tools.iter().map(|tool| tool.name.to_string()).collect();
assert!(names.contains(&"read_video".to_string()));
assert!(names.contains(&"video_evidence".to_string()));
}

#[test]
fn rust_http_transport_module_is_wired_for_web_mcp() {
let src_dir = PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("src");
let main_rs = fs::read_to_string(src_dir.join("main.rs")).expect("read main.rs");
let http_rs = fs::read_to_string(src_dir.join("http_transport.rs")).expect("read http_transport.rs");
assert!(main_rs.contains("http_transport::serve_http"));
assert!(http_rs.contains("StreamableHttpService"));
assert!(http_rs.contains("/mcp/health"));
}
}
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@
"prepublishOnly": "bun run clean && bun run build && bun run build:rust",
"release": "bun run typecheck && bun run check && bun run build && bun test && changeset publish",
"doctor": "bun run src/doctor-cli.ts",
"benchmark:release-gate": "bun scripts/release-gate.ts",
"check:ts-adapter-deleted": "bash scripts/check-ts-adapter-deletion-ready.sh"
"benchmark:release-gate": "bun scripts/release-gate.ts"
},
"dependencies": {
"@sylphx/reader-evidence": "github:SylphxAI/reader-evidence",
Expand Down
72 changes: 0 additions & 72 deletions scripts/check-no-ts-http-backend.sh

This file was deleted.

63 changes: 0 additions & 63 deletions scripts/check-ts-adapter-deletion-ready.sh

This file was deleted.

27 changes: 1 addition & 26 deletions scripts/release-gate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -298,31 +298,6 @@ export async function buildReleaseGateReport(artifactDir: string): Promise<Relea
}
);

const binWrapper = readFileSync(path.join(repoRoot, 'bin/video-reader-mcp'), 'utf8');
addCheck(
checks,
'mcp:rust_adapter_default',
binWrapper.includes('video-reader-mcp-server') &&
binWrapper.includes('resolve_rust_bin') &&
!binWrapper.includes('use_ts_transport') &&
!binWrapper.includes('exec node'),
'Default npm bin launches the Rust rmcp MCP server exclusively; TypeScript stdio adapter is retired'
);

const httpTransportSource = readFileSync(
path.join(repoRoot, 'crates/video-reader-mcp-server/src/http_transport.rs'),
'utf8'
);
addCheck(
checks,
'mcp:rust_web_http_transport',
httpTransportSource.includes('StreamableHttpService') &&
httpTransportSource.includes('/mcp/health') &&
binWrapper.includes('resolve_transport') &&
binWrapper.includes('MCP_TRANSPORT=http'),
'Rust rmcp streamable HTTP Web MCP transport is wired; npm bin routes MCP_TRANSPORT=http to Rust'
);

const matrixProbe = spawnSync('bun', ['test', 'test/shippedPath.matrix.test.ts'], {
cwd: repoRoot,
encoding: 'utf8',
Expand Down Expand Up @@ -415,4 +390,4 @@ if (import.meta.main) {
console.error(error);
process.exit(1);
});
}
}
12 changes: 1 addition & 11 deletions test/asr.boundary.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { beforeAll, describe, expect, it } from 'bun:test';
import { execSync } from 'node:child_process';
import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
import { existsSync, mkdirSync, writeFileSync } from 'node:fs';
import path from 'node:path';
import {
isRustCliAvailable,
Expand Down Expand Up @@ -44,14 +44,4 @@ describe('rust asr engine boundary', () => {
expect(asr.transcript).toEqual([]);
expect(asr.warning).toContain('whisper');
});

it('keeps ASR orchestration out of the TypeScript adapter sources', () => {
const asrSrc = readFileSync(path.join(repoRoot, 'src/utils/asr.ts'), 'utf8');
const engineSrc = readFileSync(path.join(repoRoot, 'src/engine/rust-asr.ts'), 'utf8');

expect(engineSrc).toContain('spawnSync');
expect(engineSrc).toContain('transcribe_asr');
expect(asrSrc).toContain('transcribeViaRustEngine');
expect(asrSrc).not.toMatch(/ffmpeg|parse_whisper|Command::new/i);
});
});
46 changes: 0 additions & 46 deletions test/check-no-ts-http-backend.test.ts

This file was deleted.

10 changes: 0 additions & 10 deletions test/frames.boundary.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { afterAll, beforeAll, describe, expect, it } from 'bun:test';
import { execSync } from 'node:child_process';
import { readFileSync } from 'node:fs';
import path from 'node:path';
import {
extractKeyframesViaRustEngine,
Expand Down Expand Up @@ -96,13 +95,4 @@ describe('rust frames engine boundary', () => {
expect(document.keyframes[0]?.route).toBe('rust-keyframe-png');
expect(document.keyframes[0]?.frame_hash?.length).toBeGreaterThan(0);
});

it('keeps frame extraction logic out of the TypeScript adapter sources', () => {
const framesSrc = readFileSync(path.join(repoRoot, 'src/utils/frames.ts'), 'utf8');
const engineSrc = readFileSync(path.join(repoRoot, 'src/engine/rust-frames.ts'), 'utf8');

expect(engineSrc).toContain('extract_keyframes');
expect(framesSrc).toContain('extractKeyframesViaRustEngine');
expect(framesSrc).not.toMatch(/Sha256|image2pipe/i);
});
});
28 changes: 0 additions & 28 deletions test/httpTransport.matrix.test.ts

This file was deleted.

17 changes: 0 additions & 17 deletions test/integration/http-transport.test.ts

This file was deleted.

Loading
Loading