Skip to content

Fixes 35501: Report which reasoning operations a store implements, and add NOT_IMPLEMENTED - #35502

Merged
harshach merged 2 commits into
mainfrom
feat/rdf-reasoning-protocol-gaps
Oct 22, 2026
Merged

harshach merged 2 commits into
mainfrom
feat/rdf-reasoning-protocol-gaps

Conversation

@harshach

Copy link
Copy Markdown
Collaborator

Describe your changes:

Fixes #35501

Follow-up to #34975 and #35199 (phase 2 of docs/plans/2026-10-07-fuseki-native-reasoning.md), found while building open-metadata/jena#2. Capabilities now say which operations a store implements, a new problem code says "this build cannot do that", and limits become mandatory per operation instead of per readiness.

Type of change:

  • Improvement

High-level design:

  1. operations in rdfReasoningCapabilities.json: at most one {operation, availability, reason} per REFRESH/CHECK/EXPLAIN/RESULTS/QUERY (contains/maxContains: 1), availability AVAILABLE or NOT_IMPLEMENTED. Unlisted or absent means NOT_IMPLEMENTED. The field is optional, so an older store still validates; protocolVersion stays 1.
  2. NOT_IMPLEMENTED problem code in rdfReasoningJob.json: permanent for a build, next to NOT_READY (temporary, retry when READY). Chosen over UNSUPPORTED_OPERATION because it matches the HTTP 501 the store sends and OpenMetadata's own NOT_IMPLEMENTED error type, and is not confused with unsupported OWL constructs (PROFILE_VIOLATION, coverage).
  3. Limits per operation: limits lists only what the store enforces; allOf/if/then rejects an AVAILABLE operation without the limits it needs (every job operation: maxQueuedJobs, maxJobSeconds, maxDiskBytes, maxClosureAxioms, maxIndividuals, maxExpressionDepth, maxImports; REFRESH adds maxDerivedTriples, maxRulePasses; RESULTS/QUERY add maxResultRows; QUERY adds maxQuerySeconds). Readiness depends only on admission. The plan's resource contract and phase 7 negotiation text are updated.
  4. Records: docs/decisions/2026-10-14-rdf-reasoning-capabilities-list-each-operation-and-the-limits-it-enforces.md; the 2026-10-11 request record gets a v2 amendment (a new operation is also added to the capabilities enum and its limit rules).
  5. Generated code: Java gains RdfReasoningCapabilityOperation, RdfReasoningOperationAvailability, RdfReasoningOperationSupport and one enum value; TS regenerated with the json2ts process (quicktype 20.0.27), which reproduces main's output byte for byte; rdfReasoningSnapshot.ts and rdfReasoningJobRequest.ts are unchanged.

Tests:

Use cases covered

  • A store lists each operation once with its availability; an unknown availability or a duplicate operation is rejected.
  • An AVAILABLE operation without its required limits (closure, rule passes, query deadline, row limit, job deadline) is rejected; a store lists only the limits it enforces; an operation needs only its own limits.
  • A job that failed at capture with NOT_IMPLEMENTED validates.

Unit tests

  • RdfReasoningContractTest: 56 run, 0 failures (43 before): new examples operations-not-implemented-capabilities and not-implemented-job, 7 rejection cases and 2 acceptance cases.

Backend integration tests

  • Not applicable: nothing in production reads these models yet. In open-metadata/jena, JobServiceTest checks the store's capabilities and jobs against these schemas.

UI screen recording:

Not applicable — schema/backend only.

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • My PR is linked to a GitHub issue via Fixes #<issue-number> above.
  • For JSON Schema changes: additive fields and one enum value; generated code changes listed above.
  • I have added tests (unit / integration as applicable) and listed them above.
  • I have added a test that covers the exact scenario we are fixing.

…EMENTED

Capabilities gain an operations list (REFRESH, CHECK, EXPLAIN, RESULTS,
QUERY, each AVAILABLE or NOT_IMPLEMENTED), so OpenMetadata can tell a
store that cannot yet perform an operation from one that failed. The
problem codes gain NOT_IMPLEMENTED, permanent for a store build, beside
the transient NOT_READY.

Limits become mandatory per operation instead of for readiness: limits
lists what the store enforces, and the schema rejects an AVAILABLE
operation without the limits it needs. Readiness stays the memory-budget
and admission answer.

Generated Java and TypeScript gain only the new list, its two enums and
the new problem code.
Missing required limits now leave an operation NOT_IMPLEMENTED instead of
failing readiness, and OM negotiates operations through capabilities.
@harshach
harshach requested a review from a team as a code owner October 15, 2026 06:29
@harshach
harshach requested a review from IceS2 October 15, 2026 06:29
@github-actions

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically.

Maintainers can bypass this check by adding the skip-pr-checks label.

@github-actions github-actions Bot added backend safe to test Add this label to run secure Github workflows on PRs labels Oct 15, 2026
@gitar-bot

gitar-bot Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Code Review ✅ Approved

🟡 Medium risk · Adding optional operation declarations changes RDF reasoning negotiation; clients may treat legacy stores without the field as unable to run operations and disable features.

Adds per-operation availability reporting to RDF reasoning capabilities, so a store lists which of REFRESH, CHECK, EXPLAIN, RESULTS and QUERY it implements, plus a permanent NOT_IMPLEMENTED problem code and per-operation mandatory limits in the job schemas. No issues found.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

For more verification details, comment gitar display:verbose.

Options

Display: compact → Showing compact verification results.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@github-actions

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 77%
77.66% (125652/161782) 64.31% (79286/123281) 65.52% (26467/40393)

@sonarqubecloud

Copy link
Copy Markdown

@sonarqubecloud

Copy link
Copy Markdown

@harshach
harshach merged commit 6966734 into main Oct 22, 2026
78 of 79 checks passed
@harshach
harshach deleted the feat/rdf-reasoning-protocol-gaps branch October 22, 2026 05:14

This branch was previously deployed

1 inactive deployment
test — 5b285caa Deployed Oct 15, 2026 by harshach via RDF Playwright execution #32510
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend safe to test Add this label to run secure Github workflows on PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RDF reasoning capabilities cannot say which operations a store implements, and have no not-implemented problem code

1 participant