Pre-conf work 2025

This commit is contained in:
2025-09-02 08:25:41 -04:00
parent 550021a18e
commit 4acbec6288
75 changed files with 8047 additions and 5228 deletions

View File

@@ -70,8 +70,8 @@ function canonicalize(value: unknown): CanonicalValue {
function bufferToHex(buffer: ArrayBuffer): string {
const bytes = new Uint8Array(buffer);
let hex = "";
for (let i = 0; i < bytes.length; i++) {
const b = bytes[i]?.toString(16).padStart(2, "0");
for (const byte of bytes) {
const b = byte.toString(16).padStart(2, "0");
hex += b;
}
return hex;
@@ -90,8 +90,9 @@ async function hashString(input: string): Promise<string> {
// Fallback to Node (should not execute in Edge runtime)
try {
// eslint-disable-next-line @typescript-eslint/no-var-requires
const nodeCrypto: typeof import("crypto") = require("crypto");
// eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-unsafe-assignment
const nodeCrypto = require("crypto");
// eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access
return nodeCrypto.createHash("sha256").update(input).digest("hex");
} catch {
throw new Error("No suitable crypto implementation available for hashing.");

View File

@@ -434,7 +434,7 @@ export function validateParameters(
// Unknown parameter type
issues.push({
severity: "warning",
message: `Unknown parameter type '${paramDef.type}' for '${paramDef.name}'`,
message: `Unknown parameter type '${String(paramDef.type)}' for '${paramDef.name}'`,
category: "parameter",
field,
stepId,
@@ -723,9 +723,7 @@ export function groupIssuesByEntity(
issues.forEach((issue) => {
const entityId = issue.actionId ?? issue.stepId ?? "experiment";
if (!grouped[entityId]) {
grouped[entityId] = [];
}
grouped[entityId] ??= [];
grouped[entityId].push(issue);
});