refactor(tools): remove remaining arbitrary workflow caps

This commit is contained in:
morluto
2026-09-29 17:00:06 +08:00
parent 4ad937c6ca
commit ecf3ed8bdb
43 changed files with 230 additions and 393 deletions
-1
View File
@@ -37,7 +37,6 @@ const normalizationRuleSchema = z.strictObject({
artifacts: z
.array(normalizableArtifactKindSchema)
.min(1)
.max(7)
.describe("Artifact families whose durable string fields use this rule."),
match: z
.string()
+1 -2
View File
@@ -76,10 +76,9 @@ interface HopperStartupDiagnosticContext {
readonly strategy: HopperPrivateDisplayStrategy;
readonly fallback_reason: string | null;
readonly xvfb_stderr_bytes: number;
readonly xvfb_stderr_truncated: boolean;
}
/** Bounded, non-secret facts emitted by the Linux private-display adapter. */
/** Non-secret facts emitted by the Linux private-display adapter. */
export type HopperStartupDiagnostic = HopperStartupDiagnosticContext &
(
| {
+19 -11
View File
@@ -164,22 +164,30 @@ const propertyFields = (
prefix: string,
): CandidateField[] => {
const output: CandidateField[] = [];
const visit = (current: JsonValue, path: string, depth: number): void => {
if (output.length >= 512 || depth > 6) return;
const pending: { readonly current: JsonValue; readonly path: string }[] = [
{ current: value, path: prefix },
];
while (pending.length > 0) {
const next = pending.pop();
if (next === undefined) continue;
const { current, path } = next;
if (typeof current === "string") {
output.push({ basis: "property", field: path, value: current });
return;
continue;
}
if (Array.isArray(current)) {
for (const [index, item] of current.entries())
visit(item, `${path}[${String(index)}]`, depth + 1);
return;
for (let index = current.length - 1; index >= 0; index -= 1) {
const item = current[index];
if (item !== undefined)
pending.push({ current: item, path: `${path}[${String(index)}]` });
}
continue;
}
if (current !== null && typeof current === "object")
for (const key of Object.keys(current).sort(compareCodePoints))
visit(current[key] ?? null, `${path}.${key}`, depth + 1);
};
visit(value, prefix, 0);
if (current !== null && typeof current === "object") {
for (const key of Object.keys(current).sort(compareCodePoints).reverse())
pending.push({ current: current[key] ?? null, path: `${path}.${key}` });
}
}
return output;
};
+1 -1
View File
@@ -146,7 +146,7 @@ export const nativeApiInspectionResultSchema = z
})
.strict(),
boundary: nativeApiBoundarySchema,
substeps: z.array(nativeApiInspectionSubstepSchema).min(3).max(3),
substeps: z.array(nativeApiInspectionSubstepSchema).length(3),
unsupported_branches: z.array(z.string().min(1)),
residual_unknowns: z.array(z.string().min(1)),
})
@@ -43,7 +43,7 @@ const sourceToBundleSignalSchema = z.strictObject({
const sourceToBundleCandidateSchema = z.strictObject({
current_node_id: nodeIdSchema,
current_node_kind: z.enum(JAVASCRIPT_APPLICATION_NODE_KINDS),
score: z.number().int().min(1).max(300),
score: z.number().int().min(1),
confidence: z.enum(["exact", "high", "medium", "low"]),
signals: z.array(sourceToBundleSignalSchema).min(1),
});
@@ -114,7 +114,7 @@ export const sourceToBundleComparisonResultSchema = z.strictObject({
retained_application_nodes: z.number().int().min(0),
candidate_evaluations: z.number().int().min(0),
}),
evidence_links: z.array(evidenceIdSchema).min(1).max(1),
evidence_links: z.array(evidenceIdSchema).length(1),
limitations: z.array(textSchema),
});