Merge pull request #1361 from PR0M3TH3AN/ai/ci-health-20260119-9572894936557379291

chore(ai): CI health fixes (flaky tests)
This commit is contained in:
thePR0M3TH3AN authored and GitHub committed 2026-01-18 22:09:16 -05:00
commit 7f7642baec
4 files changed
+16 -8

No files matched your search

+1 -1
View File
@@ -12,7 +12,7 @@ import { LRUCache } from "../utils/lruCache.js";
import { CACHE_POLICIES } from "./cachePolicies.js";
import { isSessionActor } from "./sessionActor.js";
import { queueSignEvent } from "./signRequestQueue.js";
import { getActiveSigner } from "../nostrClientFacade.js";
import { getActiveSigner } from "../nostrClientRegistry.js";
const COMMENT_EVENT_SCHEMA = getNostrEventSchema(NOTE_TYPES.VIDEO_COMMENT);
const CACHE_POLICY = CACHE_POLICIES[NOTE_TYPES.VIDEO_COMMENT];
+3 -1
View File
@@ -505,10 +505,12 @@ export class ModerationService {
userBlocks: userBlockManager = null,
accessControl: accessControlService = null,
userLogger: userChannel = null,
requestExtensionPermissions: permissionRequester = null,
} = {}) {
this.nostrClient = client;
this.log = normalizeLogger(log);
this.userLogger = normalizeUserLogger(userChannel);
this.requestExtensionPermissions = permissionRequester || requestDefaultExtensionPermissions;
this.viewerPubkey = "";
this.viewerIsSessionActor = false;
@@ -1561,7 +1563,7 @@ export class ModerationService {
}
if (signer?.type === "extension") {
const permissionResult = await requestDefaultExtensionPermissions([
const permissionResult = await this.requestExtensionPermissions([
"sign_event",
"get_public_key",
]);
+6 -6
View File
@@ -2024,9 +2024,9 @@
}
},
"node_modules/glob": {
"version": "10.4.5",
"resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz",
"integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==",
"version": "10.5.0",
"resolved": "https://registry.npmjs.org/glob/-/glob-10.5.0.tgz",
"integrity": "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==",
"dev": true,
"license": "ISC",
"dependencies": {
@@ -2479,9 +2479,9 @@
"license": "MIT"
},
"node_modules/js-yaml": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
"integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz",
"integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==",
"dev": true,
"license": "MIT",
"dependencies": {
+6
View File
@@ -387,12 +387,18 @@ test("viewer mute list publishes and updates aggregation", async (t) => {
relays: ["wss://relay.example"],
ensurePool: async () => {},
ensureExtensionPermissions: async () => ({ ok: true }),
ensureActiveSignerForPubkey: async (pubkey) => ({
type: "extension",
signEvent: async (e) => ({ ...e, id: "0".repeat(64), pubkey }),
canSign: () => true,
}),
};
const service = new ModerationService({
logger: () => {},
nostrClient,
userLogger: noopUserLogger,
requestExtensionPermissions: async () => ({ ok: true }),
});
const previousNostr = globalThis.window.nostr;