Skip to content

LOW: html_excerpt in ScannerDomainSchema has no .max() — Zod allows any length, mismatch with Python 6000-char cap #89

Description

@walidboulanouar

Problem

packages/jobs/src/scanner.ts line 50: html_excerpt: z.string().default('') — no .max() constraint. The Python scanner caps at _HTML_EXCERPT_LIMIT = 6000 chars but the Zod schema accepts any length. If the Python cap is ever relaxed or another caller posts to the job, multi-megabyte blobs reach domain_events.metadata (jsonb column).

Fix

html_excerpt: z.string().max(8000).default(''),

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions