Skip to content

JVNAUTOSCI-2592: Bound KR endpoint checks and evidence assignment - #304

Merged
witbrock merged 1 commit into
mainfrom
codex/JVNAUTOSCI-2592-bounded-endpoint-fetch
Jul 24, 2026
Merged

witbrock merged 1 commit into
mainfrom
codex/JVNAUTOSCI-2592-bounded-endpoint-fetch

Conversation

@witbrock

Copy link
Copy Markdown
Member

What changed

  • Bound KR relationship endpoint resolution to exact concept_exists / narrow fetch_concept reads and removed broad lexical-search fallback from that resolver.
  • Added deterministic, slot-owned description-evidence requirements to the generic KR materialisation guard, including exact-once, wrong-slot, duplicate, and overlap rejection before writes.
  • Compiled spreadsheet row evidence into the owning artefact slot rather than relying on model placement.
  • Added digest-gated, non-forced migration for the two changed represented prompts, KR seed 7 to 8, and spreadsheet authority seed 20 to 21.
  • Regenerated the dependent spreadsheet authority fingerprint and added focused migration, idempotency, and provenance-placement coverage.

Why

The exact-worker replay completed all concept and relationship writes but exposed two acceptance defects: a resolver existence check expanded incoming relationships and timed out after scanning Atlas, and the model placed all field-level evidence on the immutable record version instead of each owning typed artefact. The completion checker correctly refused to write a processing marker. This change removes the wasteful affordance and makes evidence ownership a deterministic pre-write contract while preserving model-driven planning.

Validation

  • 100 relevant tests passed.
  • Independent focused review: 75/75 passed before the final strengthened row-identity assertion.
  • Workflow purity: 23/23 passed.
  • Ruff and git diff --check passed.
  • Spreadsheet generated bundle matches its generator exactly.
  • KR seed validate-all passed (local Mongo availability warning only).

Live authority publication and exact-worker replay will follow this merge so the evidence remains bound to the merged commit.

Copilot AI review requested due to automatic review settings July 24, 2026 08:07
@witbrock
witbrock merged commit 5ebd69c into main Jul 24, 2026
5 checks passed
@witbrock
witbrock deleted the codex/JVNAUTOSCI-2592-bounded-endpoint-fetch branch July 24, 2026 08:12

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR tightens KR materialisation authority and evidence handling by (1) bounding relationship endpoint resolution to exact, low-cost reads and (2) making description-evidence ownership a deterministic, guard-enforced contract (with seed/versioned migrations and accompanying tests) so spreadsheet-row evidence is attached to the correct owning artefact slots before writes.

Changes:

  • Updated the KR workflow seed + prompt assets to use bounded concept_exists / narrow fetch_concept for endpoint resolution and to forbid lexical-search fallback.
  • Extended KR/spreadsheet materialisation guards to require slot-owned required_description_fragments and added tests for exact-once, wrong-slot, duplicate, and overlap rejection.
  • Added digest-gated, non-forced prompt migration and bumped KR seed (7→8) and spreadsheet authority seed (20→21) with regenerated fingerprints and coverage.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/backend/test_spreadsheet_record_ingestion_service.py Adds coverage ensuring spreadsheet row evidence statements are compiled into the correct artefact slot fragments.
tests/backend/test_spreadsheet_programme_workflow_vontology_service.py Updates seed-version assertions and validates legacy authority digest mapping for the spreadsheet programme seed.
tests/backend/test_spreadsheet_cross_record_entity_identity.py Updates synthetic fixtures to include guard-required description fragments in generated descriptions.
tests/backend/test_kr_materialisation_workflow_vontology_service.py Adds/updates tests for seed v8 policies, bounded endpoint resolution, and digest-gated prompt migration behaviour.
tests/backend/test_kr_materialisation_guard_service.py Adds focused tests for required-description-fragment ownership validation and overlap/duplication rejection.
src/backend/workflows/repo_seed_bundles/spreadsheet_programme_representation_workflow_seed_bundle.json Bumps seed to v21, updates KR dependency to seed v8, and records reviewed legacy authority digests + new fingerprint.
src/backend/workflows/repo_seed_bundles/prompt_kr_relationship_endpoint_resolution_seed.md Tightens resolver instructions to exact-ID bounded checks and blocks lexical-search fallback.
src/backend/workflows/repo_seed_bundles/prompt_kr_design_materialisation_plan_seed.md Requires verbatim, exact-once placement of required_description_fragments into the owning slot’s description_text.
src/backend/workflows/repo_seed_bundles/kr_materialisation_workflow_seed_bundle.json Bumps seed to v8 and updates resolve-relationship-specs tool policy defaults + context fields.
src/backend/services/spreadsheet_materialisation_guard_service.py Derives required_description_fragments from row field evidence statements and attaches them to generated artefact slots.
src/backend/services/kr_materialisation_workflow_vontology_service.py Implements digest-gated prompt migration/readback enforcement and blocks publication on unreviewed drift.
src/backend/services/kr_materialisation_guard_service.py Adds deterministic validation for fragment ownership (exact-once, wrong-slot, overlap/duplication) during plan validation.
scripts/generate_spreadsheet_programme_workflow_seed.py Bumps seed version to v21 and emits reviewed legacy authority digest mapping into generated bundle.

Comment on lines +371 to +372
for key, description in description_by_key.items():
for match in fragment_pattern.finditer(description):
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.

2 participants