Skip to content

The line draft never discards a supplied field silently #4

Description

@jbagsik

Part of

Field fidelity and validation of parsed e-invoices — restoring facts the parser reads but the model cannot hold, and making the readiness figure agree with the conformance verdict.

What to build

A value handed to the persistence layer either lands in the model or surfaces as an error. Today extra line fields are dropped without a trace when the target model does not accept them, which is how certificate prices ended up stored nowhere.

Acceptance criteria

  • Passing a field the target model cannot accept fails loudly instead of being ignored
  • The failure names the field and the model it was rejected by
  • Existing callers that pass only accepted fields are unaffected
  • A test covers both the accepted and the rejected case
  • A rejected field leaves no partially written invoice behind: the whole persistence rolls back, including an invoice header already written and any earlier lines

Blocked by

  • None — can start immediately

Activity

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

    ready-for-agentSpec is ready for an agent to implement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions