惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Y
Y Combinator Blog
宝玉的分享
宝玉的分享
月光博客
月光博客
小众软件
小众软件
Jina AI
Jina AI
WordPress大学
WordPress大学
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
T
Tailwind CSS Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 【当耐特】
博客园 - 三生石上(FineUI控件)
博客园 - 司徒正美
大猫的无限游戏
大猫的无限游戏
The Cloudflare Blog
G
Google Developers Blog
M
MIT News - Artificial intelligence
N
Netflix TechBlog - Medium
云风的 BLOG
云风的 BLOG
MyScale Blog
MyScale Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
爱范儿
爱范儿
U
Unit 42
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Blog — PlanetScale
Blog — PlanetScale

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(test): avoid walking plugin sdk subpath scans · openc...
vincentkoc · 2026-05-16 · via Recent Commits to openclaw:main

@@ -1,5 +1,6 @@

1-

import { readFileSync, readdirSync } from "node:fs";

2-

import { dirname, resolve } from "node:path";

1+

import { spawnSync } from "node:child_process";

2+

import fs, { readFileSync } from "node:fs";

3+

import { dirname, relative, resolve } from "node:path";

34

import { fileURLToPath } from "node:url";

45

import type {

56

BaseProbeResult as ContractBaseProbeResult,

@@ -22,7 +23,7 @@ import type {

2223

} from "openclaw/plugin-sdk/core";

2324

import * as providerEntrySdk from "openclaw/plugin-sdk/provider-entry";

2425

import ts from "typescript";

25-

import { describe, expect, expectTypeOf, it } from "vitest";

26+

import { describe, expect, expectTypeOf, it, vi } from "vitest";

2627

import type { ChannelMessageActionContext } from "../../channels/plugins/types.js";

2728

import type {

2829

BaseProbeResult,

@@ -325,12 +326,44 @@ function expectNamedExportParity(params: BrowserHelperExportParityContract) {

325326

]);

326327

}

327328329+

function listTrackedRepoTsFiles(dir: string): string[] | null {

330+

const relativeDir = relative(REPO_ROOT, dir).split(/[\\/]+/u).join("/");

331+

if (!relativeDir || relativeDir.startsWith("..")) {

332+

return null;

333+

}

334+

const result = spawnSync("git", ["ls-files", "--", relativeDir], {

335+

cwd: REPO_ROOT,

336+

encoding: "utf8",

337+

stdio: ["ignore", "pipe", "ignore"],

338+

});

339+

if (result.status !== 0) {

340+

return null;

341+

}

342+

return result.stdout

343+

.split("\n")

344+

.map((line) => line.trim().replaceAll("\\", "/"))

345+

.filter(

346+

(line) =>

347+

line.endsWith(".ts") &&

348+

!line.includes("/dist/") &&

349+

!line.includes("/node_modules/"),

350+

)

351+

.map((line) => resolve(REPO_ROOT, ...line.split("/")))

352+

.toSorted();

353+

}

354+328355

function listRepoTsFiles(dir: string): string[] {

329356

const cached = repoTsFilesCache.get(dir);

330-

if (cached) {

357+

if (cached !== undefined) {

331358

return cached;

332359

}

333-

const entries = readdirSync(dir, { withFileTypes: true });

360+

const trackedFiles = listTrackedRepoTsFiles(dir);

361+

if (trackedFiles) {

362+

repoTsFilesCache.set(dir, trackedFiles);

363+

return trackedFiles;

364+

}

365+366+

const entries = fs.readdirSync(dir, { withFileTypes: true });

334367

const files = entries.flatMap((entry) => {

335368

const absolute = resolve(dir, entry.name);

336369

if (entry.isDirectory()) {

@@ -791,6 +824,21 @@ describe("plugin-sdk subpath exports", () => {

791824

expect(violations).toStrictEqual([]);

792825

});

793826827+

it("lists repo source candidates from git without walking SDK boundary roots", () => {

828+

const readDir = vi.spyOn(fs, "readdirSync");

829+

try {

830+

repoTsFilesCache.clear();

831+

const files = listRepoTsFiles(resolve(REPO_ROOT, "src"));

832+833+

expect(files.length).toBeGreaterThan(0);

834+

expect(files.every((file) => file.endsWith(".ts"))).toBe(true);

835+

expect(readDir).not.toHaveBeenCalled();

836+

} finally {

837+

readDir.mockRestore();

838+

repoTsFilesCache.clear();

839+

}

840+

});

841+794842

it("keeps the deprecated channel-runtime shim unused in repo imports", () => {

795843

const matches = findRepoFilesContaining({

796844

roots: [