Skip to content

Conversation

@stevebio
Copy link
Collaborator

Add transitive closure function to node client. Function body generated by Optic Code generator. Manual changes to base, and creation of tests. Increase timeout on an SSL v1.2 test, passes most of the time now Skip a broken test, will fix later.

Add transitive closure function to node client. Function body generated by Optic Code generator. Manual changes to base, and creation of tests.
Increase timeout on an SSL v1.2 test, passes most of the time now
Skip a broken test, will fix later.
Copilot AI review requested due to automatic review settings December 19, 2025 06:32
@github-actions
Copy link

Copyright Validation Results
Total: 8 | Passed: 5 | Failed: 0 | Skipped: 3 | at: 2025-12-19 06:33:10 UTC | commit: 29764ce

⏭️ Skipped (Excluded) Files

  • test-app/src/main/ml-data/optic/transitive-closure/collections.properties
  • test-app/src/main/ml-data/optic/transitive-closure/permissions.properties
  • test-app/src/main/ml-data/optic/transitive-closure/transClosureTripleSet.xml

✅ Valid Files

  • lib/plan-builder-base.js
  • lib/plan-builder-generated.js
  • test-basic/service-caller.js
  • test-basic/ssl-min-allow-tls-test.js
  • test-basic/transitive-closure.js

✅ All files have valid copyright headers!

Copy link

Copilot AI left a comment

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 adds transitive closure functionality to the Node.js client library. The implementation includes the generated function code, test cases, and supporting test data files. Two minor test adjustments were also made: increasing a timeout for an SSL test and skipping a failing test.

Key changes:

  • Added transitiveClosure() method to the plan builder API with options for configuring path length constraints
  • Created comprehensive test suite covering various transitive closure scenarios including basic patterns, min/max length constraints, and joins
  • Added test data files with semantic triples representing parent-child relationships for testing

Reviewed changes

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

Show a summary per file
File Description
test-basic/transitive-closure.js New test file with 5 test cases covering different transitive closure scenarios
test-basic/ssl-min-allow-tls-test.js Increased timeout from 10000ms to 12000ms
test-basic/service-caller.js Skipped failing test with explanatory comment
test-app/src/main/ml-data/optic/transitive-closure/transClosureTripleSet.xml Test data defining semantic triples for parent-child relationships
test-app/src/main/ml-data/optic/transitive-closure/permissions.properties Permissions configuration for test data
test-app/src/main/ml-data/optic/transitive-closure/collections.properties Collections configuration for test data
lib/plan-builder-generated.js Generated code adding PlanTransitiveClosureOptions class and transitiveClosure method
lib/plan-builder-base.js Validation logic for transitive closure options

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

}
return true;
case 'PlanTransitiveClosureOptions':
const planTransitiveClosureOptionsSet = new Set(['minLength', 'min-length', 'maxLength', 'max-length']);
Copy link

Copilot AI Dec 19, 2025

Choose a reason for hiding this comment

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

The options set includes both camelCase and kebab-case versions of the same options. This dual naming convention could cause confusion for API consumers. Consider documenting which format is preferred or standardizing on one naming convention.

Copilot uses AI. Check for mistakes.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is consistent with previous impl

Copy link
Contributor

@rjrudin rjrudin left a comment

Choose a reason for hiding this comment

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

About to test locally, will respond back.

});

it('postOfUrlencodedForDocumentArray1 endpoint', function(done) {
// errors all the time now, should fix.
Copy link
Contributor

Choose a reason for hiding this comment

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

This is passing consistently on Jenkins - https://ml-clt-jenkins.progress.com/job/devexp/job/Node-Client/job/Node-client-api/job/develop/160/ - so maybe just a local issue? Does it fail when you run all of "test-basic"?


describe('document write and read using min tls', function () {
this.timeout(10000);
this.timeout(12000);
Copy link
Contributor

Choose a reason for hiding this comment

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

Was this failing for you locally too? It's another test that I don't think has failed on Jenkins in quite a while. Of course, 10s is already totally arbitrary, so changing it to 12s doesn't really hurt.

Copy link
Collaborator Author

@stevebio stevebio Dec 19, 2025

Choose a reason for hiding this comment

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

Yes the timing for the error ssl v1.2 error test was like 11000ms for me. so 120000 timeout fixed locally. But totally environmental and not even close to a good solution. I could bump to 200000.


it('with simple pattern full transitive closure', function (done) {
execPlan(
p.fromTriples([
Copy link
Contributor

Choose a reason for hiding this comment

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

This is great, just getting a test case in place is like 98% of the value of the PRs for these new Optic functions, as now we have a way to test / demo it. I'll try it out locally.

@@ -0,0 +1,141 @@
/*
Copy link
Contributor

Choose a reason for hiding this comment

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

A few of the imports in here are flagged by VS Code as unused (I guess the nom run lint doesn't complain on unused imports yet) - should, assert, and restWriterConnection. Remove those and then merge away!

@stevebio stevebio merged commit b393695 into develop Dec 22, 2025
3 checks passed
@stevebio stevebio deleted the feature/25586-add-trans-closure branch December 22, 2025 16:56
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.

3 participants