Skip to content

Commit 4ebaaef

Browse files
V48 Gate 3 (implementation-only): fix typecheck for deposit synthesis schema and icons
- Align deposit synthesis Zod schema (optional measurements without .default) so factoryAgentWithPTRR accepts it under tsc - Wrap Forced Inclusion/Exclusions Lucide icons so title tooltips do not break LucideProps - Route and deposit page fixtures use formal absolute measurements, not placeholder kinds
1 parent 94acf54 commit 4ebaaef

4 files changed

Lines changed: 55 additions & 18 deletions

File tree

packages/pipelines/asset-pack/src/agents/implementation/deposit-asset-pack-synthesis-agent.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,10 @@ const candidateSchema = z.object({
7070
// Absolute measurements (quantity + quality material properties) are produced
7171
// by agent-measure-absolutes in Validation — NOT self-scored here. Optional
7272
// legacy record accepted for back-compat but ignored when absolutes attach.
73-
measurements: z.record(z.string(), z.coerce.number().min(0).max(1)).optional().default({}),
74-
measurementRationale: z.string().max(700).optional().default(''),
73+
// Keep input/output Zod types aligned (no .default that widens _input vs output)
74+
// so factoryAgentWithPTRR accepts the schema under tsc.
75+
measurements: z.record(z.string(), z.coerce.number().min(0).max(1)).optional(),
76+
measurementRationale: z.string().max(700).optional(),
7577
confidence: z.coerce.number().min(0).max(1),
7678
// Synthesized patch descriptor (path+op + summary) — Validation measures it.
7779
patch: patchSchema,

uapi/app/deposits/deposit-obfuscations-path-icons.tsx

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,14 @@ export function DepositIncludePathsIcon({
2121
className?: string;
2222
title?: string;
2323
}) {
24+
// Lucide icons do not accept `title`; wrap so hover tooltips still work.
2425
return (
25-
<FolderPlus
26-
className={className ?? `${ICON_CLASS} text-emerald-300/80`}
27-
aria-hidden="true"
28-
title={title}
29-
/>
26+
<span title={title} className="inline-flex shrink-0">
27+
<FolderPlus
28+
className={className ?? `${ICON_CLASS} text-emerald-300/80`}
29+
aria-hidden="true"
30+
/>
31+
</span>
3032
);
3133
}
3234

@@ -39,11 +41,12 @@ export function DepositExcludePathsIcon({
3941
title?: string;
4042
}) {
4143
return (
42-
<FolderMinus
43-
className={className ?? `${ICON_CLASS} text-rose-300/80`}
44-
aria-hidden="true"
45-
title={title}
46-
/>
44+
<span title={title} className="inline-flex shrink-0">
45+
<FolderMinus
46+
className={className ?? `${ICON_CLASS} text-rose-300/80`}
47+
aria-hidden="true"
48+
/>
49+
</span>
4750
);
4851
}
4952

uapi/tests/api/depositSynthesizeOptionsRoute.test.ts

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,26 @@ const RAW_OPTIONS = [
8989
summary:
9090
'A source-safe slice describing the demo application capability, its entry points, and operational behavior for future reading demand.',
9191
coveredSourcePaths: ['README.md', 'src/app.py'],
92-
measurements: { 'source-coverage': 0.6, 'demand-alignment': 0.7, 'reuse-likelihood': 0.5 },
92+
// Formal absolutes (Validation measure-agent) are required by product projection.
93+
absolutes: [
94+
{
95+
measurementKind: 'function-count',
96+
label: 'Functions',
97+
weight: 0.12,
98+
volume: 0.5,
99+
category: 'absolute',
100+
magnitude: 6,
101+
unit: 'functions',
102+
},
103+
{
104+
measurementKind: 'correctness-estimate',
105+
label: 'Correctness',
106+
weight: 0.18,
107+
volume: 0.72,
108+
category: 'absolute',
109+
unit: 'estimate',
110+
},
111+
],
93112
measurementRationale: 'Covers the primary application path and documentation.',
94113
confidence: 0.8,
95114
patch: {

uapi/tests/depositPageClient.test.tsx

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -567,13 +567,26 @@ describe("DepositPageClient", () => {
567567
},
568568
measurements: [
569569
{
570-
id: "deposit-option-real-1:source-coverage",
571-
label: "Source coverage",
572-
measurementKind: "source-coverage",
573-
weight: 0.36,
574-
volume: 0.62,
570+
id: "deposit-option-real-1:function-count",
571+
label: "Functions",
572+
measurementKind: "function-count",
573+
weight: 0.12,
574+
volume: 0.5,
575+
category: "absolute",
576+
magnitude: 8,
577+
unit: "functions",
575578
evidenceRoot: "deposit-option-measurement:22222222",
576579
},
580+
{
581+
id: "deposit-option-real-1:correctness-estimate",
582+
label: "Correctness",
583+
measurementKind: "correctness-estimate",
584+
weight: 0.18,
585+
volume: 0.72,
586+
category: "absolute",
587+
unit: "estimate",
588+
evidenceRoot: "deposit-option-measurement:22222223",
589+
},
577590
],
578591
reviewBoundary: {
579592
state: "reviewable-source-safe-option",

0 commit comments

Comments
 (0)