Skip to content

fix(properties): enforce reference expectation authority - #608

Merged
aviggiano merged 8 commits into
mainfrom
fix/285-reference-expectation-authority
Aug 15, 2026
Merged

aviggiano merged 8 commits into
mainfrom
fix/285-reference-expectation-authority

Conversation

@aviggiano

@aviggiano aviggiano commented Aug 15, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • make structured ultrafuzz/reference-expectations@2 catalogs the sole lens authority
  • require lens and fan-in artifacts to omit reference_expectations when no authorized IDs exist
  • preserve the canonical-subset-of-lens semantic gate and add regression coverage for fabricated fan-in IDs

Validation

  • prompt semantic-anchor tests
  • focused runtime artifact-gate tests
  • package and repository validation
  • independent review
  • required GitHub checks

Closes #285

Greptile Summary

The PR makes structured reference-expectation catalogs authoritative and completes the previously requested empty-array omission enforcement.

  • Lens artifacts must omit reference_expectations when no identifiers are authorized.
  • Fan-in artifacts preserve only identifiers carried by source lenses and must omit empty expectation fields.
  • Runtime and semantic regression tests cover omission and fabricated fan-in identifiers.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
packages/runtime/src/artifact-gates.ts Enforces true omission for empty lens and fan-in expectation fields while preserving source-to-canonical subset validation.
packages/runtime/test/artifact-gates.test.ts Adds regression coverage for empty fields, absent catalogs, and fabricated fan-in expectation identifiers.
packages/runtime/test/fixtures/reference-expectation-authority.ts Provides minimized treatment and control fixtures for fabricated expectation provenance.
packages/prompts/test/semantic-anchors.test.ts Verifies that shipped prompts consistently describe structured-catalog authority and omission semantics.
.ultrafuzz/prompts/properties/property-specification-fanin.md Restricts fan-in expectation IDs to identifiers already authorized and carried by contributing lens rows.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Structured reference-expectations catalog] --> B[Lens prompt and authority gate]
  B --> C[Authorized lens reference IDs]
  C --> D[Fan-in prompt and preservation gate]
  D --> E[Canonical property reference IDs]
  A -. absent .-> F[Lens must omit field]
  C -. no IDs .-> G[Fan-in must omit field]
Loading

Reviews (4): Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." | Re-trigger Greptile

Context used (3)

@aviggiano
aviggiano marked this pull request as ready for review August 15, 2026 11:20
Comment thread packages/runtime/src/artifact-gates.ts
Comment thread packages/runtime/test/fixtures/issue-531-reference-expectations.ts Outdated
Comment thread packages/runtime/test/fixtures/issue-531-reference-expectations.ts Outdated
Comment thread packages/runtime/src/artifact-gates.ts
@aviggiano
aviggiano merged commit 873de2c into main Aug 15, 2026
13 checks passed
@aviggiano
aviggiano deleted the fix/285-reference-expectation-authority branch August 15, 2026 14:38
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.

Lens reference-expectation authority: the prompt and the gate disagree about what "supplied" means

1 participant