mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-10-19 05:20:05 +00:00
Some checks failed
Release-Green (continuous) / Baseline headroom (push) Has been cancelled
opencode-plugin CI / Test v2 (Node 22) (push) Has been cancelled
opencode-plugin CI / Test v2 (Node 24) (push) Has been cancelled
Publish to Docker Hub / Resolve Docker release metadata (push) Has been cancelled
Publish to Docker Hub / omni-build runner offline alert (push) Has been cancelled
Release-Green (continuous) / Validate active release branch (push) Has been cancelled
Release-Green (continuous) / Validate main branch (push) Has been cancelled
Release-Green (continuous) / Bank ratchet shrinks (push) Has been cancelled
Quality Gates / Change Classification (push) Has been cancelled
opencode-plugin CI / Test (Node 24) (push) Has been cancelled
CI / Change Classification (push) Has been cancelled
CI / PR Test Policy (push) Has been cancelled
Lock released branch / lock-branch (push) Has been cancelled
Lock released branch / guard-no-push-after-release (push) Has been cancelled
opencode-plugin CI / Test (Node 22) (push) Has been cancelled
OpenSSF Scorecard / Scorecard analysis (push) Has been cancelled
Quality Gates / Merge integrity (changelog + generated skills) (push) Has been cancelled
Release acceptance / Release acceptance (push) Has been cancelled
CI / Protocol Clients E2E (live server, advisory) (push) Has been cancelled
opencode-plugin CI / Build (push) Has been cancelled
CI / Gate / CI (push) Has been cancelled
CI / CI Dashboard (push) Has been cancelled
Publish to Docker Hub / Preflight — amd64 runner availability (push) Has been cancelled
Publish to Docker Hub / Build Docker (linux/amd64) (push) Has been cancelled
Publish to Docker Hub / Build Docker (linux/arm64) (push) Has been cancelled
Publish to Docker Hub / Publish multi-arch manifests (push) Has been cancelled
Quality Gates / Docs Gates (fast-path) (push) Has been cancelled
Quality Gates / Fast Quality Gates (push) Has been cancelled
Quality Gates / Vitest (fast-path) (push) Has been cancelled
Quality Gates / No new ESLint warnings (push) Has been cancelled
CI / i18n Glossary (zh-CN, ko) (push) Has been cancelled
CI / i18n Validation (all languages) (push) Has been cancelled
CI / Security Tests (push) Has been cancelled
CI / Ecosystem E2E (live server) (push) Has been cancelled
CI / Lint (push) Has been cancelled
CI / Quality Ratchet (push) Has been cancelled
CI / Quality Gates (Extended) (push) Has been cancelled
CI / Docs Sync (Strict) (push) Has been cancelled
CI / Docs Lint (prose — advisory) (push) Has been cancelled
CI / i18n UI Coverage (push) Has been cancelled
CI / Build (push) Has been cancelled
CI / Package Artifact (push) Has been cancelled
CI / Electron Package Smoke (ubuntu-latest) (push) Has been cancelled
CI / Electron Package Smoke (windows-latest) (push) Has been cancelled
CI / Unit Tests (1/8) (push) Has been cancelled
CI / Unit Tests (2/8) (push) Has been cancelled
CI / Unit Tests (3/8) (push) Has been cancelled
CI / Unit Tests (4/8) (push) Has been cancelled
CI / Unit Tests (5/8) (push) Has been cancelled
CI / Unit Tests (6/8) (push) Has been cancelled
CI / Unit Tests (7/8) (push) Has been cancelled
CI / Unit Tests (8/8) (push) Has been cancelled
CI / Bun SQLite Compatibility (push) Has been cancelled
CI / Bun SQLite Compatibility-1 (push) Has been cancelled
CI / Vitest (MCP / autoCombo / UI components) (push) Has been cancelled
CI / Coverage (push) Has been cancelled
CI / SonarQube (push) Has been cancelled
CI / PR Coverage Comment (push) Has been cancelled
CI / E2E Tests (1/9) (push) Has been cancelled
CI / E2E Tests (2/9) (push) Has been cancelled
CI / E2E Tests (3/9) (push) Has been cancelled
CI / E2E Tests (4/9) (push) Has been cancelled
CI / E2E Tests (5/9) (push) Has been cancelled
CI / E2E Tests (6/9) (push) Has been cancelled
CI / E2E Tests (7/9) (push) Has been cancelled
CI / E2E Tests (8/9) (push) Has been cancelled
CI / E2E Tests (9/9) (push) Has been cancelled
CI / Integration Tests (1/2) (push) Has been cancelled
CI / Integration Tests (2/2) (push) Has been cancelled
Quality Gates / Unit Tests fast-path (1/4) (push) Has been cancelled
Quality Gates / Unit Tests fast-path (2/4) (push) Has been cancelled
Quality Gates / Unit Tests fast-path (3/4) (push) Has been cancelled
Quality Gates / Unit Tests fast-path (4/4) (push) Has been cancelled
Quality Gates / Gate / Quality (push) Has been cancelled
Thanks @Louayzouaoui1. Wave 27 boarded this pull request cleanly on release/v3.8.52 at f8d11c9326. The focused unit tests for the files it touches passed on that combined tree (116 passed in the second run, plus the auto-combo weight tests and the skills characterization tests). Changelog integrity passed. The only file-size finding is executeTargetAttempt.ts, already over its frozen ceiling on the release tip and unchanged by this diff.
⚠️ base-red inherited: #15306
Closes #16187
57 lines
2.1 KiB
TypeScript
57 lines
2.1 KiB
TypeScript
import test from "node:test";
|
|
import assert from "node:assert/strict";
|
|
import { randomUUID } from "node:crypto";
|
|
import "../_setup/isolateDataDir.ts";
|
|
|
|
process.env.DISABLE_SQLITE_AUTO_BACKUP ||= "true";
|
|
|
|
const core = await import("../../src/lib/db/core.ts");
|
|
const { skillRegistry } = await import("../../src/lib/skills/registry.ts");
|
|
const { skillExecutor } = await import("../../src/lib/skills/executor.ts");
|
|
const { SkillStatus } = await import("../../src/lib/skills/types.ts");
|
|
|
|
const SCHEMA = { input: {}, output: {} };
|
|
const API_KEY_ID = "executor-timeout";
|
|
|
|
skillExecutor.registerHandler("timeout-fast", async () => ({ ok: true }));
|
|
skillExecutor.registerHandler("timeout-slow", () => new Promise(() => {}));
|
|
|
|
test.after(() => {
|
|
core.resetDbInstance();
|
|
});
|
|
|
|
function pendingTimers(): number {
|
|
return process.getActiveResourcesInfo().filter((name) => name === "Timeout").length;
|
|
}
|
|
|
|
async function registerSkill(handler: string) {
|
|
const name = `${handler}-${randomUUID().slice(0, 8)}`;
|
|
await skillRegistry.register({ name, schema: SCHEMA, handler, apiKeyId: API_KEY_ID });
|
|
return name;
|
|
}
|
|
|
|
test("a skill that outlives the executor timeout is recorded as timeout and persisted that way", async () => {
|
|
skillExecutor.setTimeout(100);
|
|
const name = await registerSkill("timeout-slow");
|
|
const run = await skillExecutor.execute(name, {}, { apiKeyId: API_KEY_ID });
|
|
assert.equal(run.status, SkillStatus.TIMEOUT);
|
|
assert.equal(run.errorMessage, "Skill execution timed out");
|
|
|
|
const row = core
|
|
.getDbInstance()
|
|
.prepare("SELECT status FROM skill_executions WHERE id = ?")
|
|
.get(run.id) as { status: string };
|
|
assert.equal(row.status, "timeout");
|
|
});
|
|
|
|
test("a handler that settles in time leaves no pending timeout timer behind", async () => {
|
|
skillExecutor.setTimeout(30_000);
|
|
const name = await registerSkill("timeout-fast");
|
|
const before = pendingTimers();
|
|
const run = await skillExecutor.execute(name, {}, { apiKeyId: API_KEY_ID });
|
|
assert.equal(run.status, SkillStatus.SUCCESS);
|
|
assert.ok(
|
|
pendingTimers() <= before,
|
|
"the 30s race timer must be cleared once the handler settles"
|
|
);
|
|
});
|