Skip to content

feat(metadata): add explicit missingness contract for metadata fields#46

Merged
saraeloop merged 1 commit intomainfrom
fix/missingness-contract
Apr 14, 2026
Merged

feat(metadata): add explicit missingness contract for metadata fields#46
saraeloop merged 1 commit intomainfrom
fix/missingness-contract

Conversation

@saraeloop
Copy link
Copy Markdown
Member

Summary

Introduces an explicit metadata missingness contract and aligns exported code with consistent TSDoc documentation.

Changes

Metadata semantics

  • add field-state model (observed_present, observed_absent, unavailable, not_applicable)
  • apply to dependents_count and has_advisories
  • replace ambiguous null / false interpretation with explicit semantics
  • update evaluation-readiness to consume field-state helpers

Documentation

  • add TSDoc across exported src surface (domain, application, adapters, interface, CLI)
  • integrate missingness contract into a consistent API surface

Tests

  • add coverage for metadata field-state behavior
  • update evaluation-readiness tests to validate contract usage

Behavior

  • no scoring changes
  • no scan output contract changes
  • no persistence changes

Verification

  • pnpm test
  • pnpm run build

Notes

  • TSDoc is now standardized but not yet enforced by CI
  • a follow-up can introduce strict TSDoc validation to prevent drift

- introduce metadata field state model (observed_present, observed_absent, unavailable, not_applicable)
- add node-level helpers for dependents_count and has_advisories
- interpret dependents_count:null as unavailable unless a real value is present
- interpret has_advisories:false as unavailable until advisory ingestion exists

- update evaluation-readiness to use field-state helpers instead of raw null/false checks
- tighten reliability guidance in field-reliability-policy to reflect missingness semantics

- add regression coverage for field-state behavior and evaluation-readiness integration

docs(tsdoc): standardize TSDoc across exported surface

- add TSDoc to domain contracts/entities/value objects, application use cases, adapters, interface renderers, and CLI entrypoints
- integrate metadata-field-state into a consistently documented API surface

verification:
- pnpm test
- pnpm run build
@saraeloop saraeloop self-assigned this Apr 14, 2026
@saraeloop saraeloop merged commit 0b128b3 into main Apr 14, 2026
1 check failed
@saraeloop saraeloop deleted the fix/missingness-contract branch April 14, 2026 02:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant