Skip to content

feat(consolidation): protect closed vocabularies - #3889

Closed
PaleRoses wants to merge 1 commit into
vectorize-io:mainfrom
PaleRoses:upstream/protected-consolidation-vocabularies
Closed

feat(consolidation): protect closed vocabularies#3889
PaleRoses wants to merge 1 commit into
vectorize-io:mainfrom
PaleRoses:upstream/protected-consolidation-vocabularies

Conversation

@PaleRoses

Copy link
Copy Markdown

Problem

Consolidation can merge two textually similar facts even when each names a different member of a deployment-owned closed vocabulary: environments, products, regions, branches, tenants, or other mutually exclusive terms. Prompt instructions alone do not reliably prevent the same substitution during CREATE, UPDATE, or semantic dedup.

Proposed contract

Add an opt-in consolidation_protected_vocabularies setting:

[{"name":"environment","terms":["staging","production"]}]
  • registries are validated and NFKC/casefold canonicalized at server and bank-config boundaries
  • known terms within one vocabulary are mutually exclusive; unknown terms remain permissive
  • CREATE and UPDATE output is checked against source and existing-observation evidence
  • semantic-dedup candidates and model-produced merged text use the same matcher
  • conflicting targets are removed before retry; omitted displaced sources or exhausted retries fail the batch closed
  • an empty registry preserves the existing consolidation path

The name and fixtures are deliberately domain-neutral. This proposal contains no downstream project vocabulary.

Verification

  • pytest -q -n0 tests/test_consolidation_protected_vocabularies.py tests/test_hierarchical_config.py tests/test_bank_template_full_roundtrip.py tests/test_bank_template_configurable_fields.py — 82 passed
  • pytest -q -n0 tests/test_consolidation_dedup.py tests/test_consolidation_retry_budget.py tests/test_consolidation_failure_isolation.py tests/test_consolidation_temporal_merge.py — 74 passed
  • focused vocabulary suite after environment-loading coverage — 27 passed
  • Ruff check and format-check on every changed Python file
  • git diff --check

@PaleRoses PaleRoses closed this Aug 29, 2026
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