Skip to content

Reject blank document fields before persistence and indexing #45

Closed

Description

@johnnyhuy

Part of #5.

Add request validation to POST /api/documents so empty or whitespace-only title, content and source return 422 before database writes or vector indexing. Normalise title and source, but preserve valid content formatting, including leading indentation and trailing newlines.

Cover rejected fields and successful creation with offline tests. Provide a curl transcript against a local fixture backend showing invalid input leaves the document list unchanged. No schema change, dashboard change or live Slack connection is needed.

Activity

  1. johnnyhuy commented on Nov 14, 2026

    @johnnyhuy
    ContributorAuthor

    agent claim: agent/issue-45-document-validation @ a6eac10

  2. johnnyhuy commented on Nov 14, 2026

    @johnnyhuy
    ContributorAuthor

    Implemented and pushed in #46. Offline gates passed with 172 backend and 15 frontend tests. The local curl capture proves invalid requests leave storage and retrieval unchanged and valid code content retains its formatting. Proof at #46 (comment). The child remains open until the PR merges; #5 remains open for remaining slices.

  3. johnnyhuy commented on Nov 14, 2026

    @johnnyhuy
    ContributorAuthor

    agent claim: agent/issue-45-document-validation @ 16d58bd. Resuming the existing slice for offline verification and the merge sweep; no new slice is being started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agentclaimed by the Wingman work loop

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions