Skip to content

Conversation

@anu3990
Copy link
Contributor

@anu3990 anu3990 commented Jul 29, 2025

No description provided.

anu3990 and others added 30 commits February 5, 2025 11:17
Should make it easier to write tests that test SSL with the Node Client.
This commit includes fixes for -
- Inflight Vulnerable to Denial-of-Service (DoS) via Memory Leak
- 'brace-expansion' Package Vulnerable to Regular Expression Denial-of-Service (ReDoS)
-  GHSA-8cj5-5rvv-wf4v
Resolves dependabot alert - see marklogic#942
Copilot AI review requested due to automatic review settings July 29, 2025 18:04
@anu3990 anu3990 closed this Jul 29, 2025
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 pull request updates copyright headers across the codebase, replacing MarkLogic Corporation copyright notices with Progress Software Corporation copyright notices. This reflects an ownership or licensing change from MarkLogic to Progress Software. The PR also includes some minor code improvements and test adjustments.

Key Changes:

  • Updated copyright notices from "MarkLogic Corporation" to "Progress Software Corporation and/or its subsidiaries or affiliates"
  • Changed copyright year range to "2015-2025"
  • Added new test files for enhanced functionality (vector utilities, SSL/TLS configurations, shortest path algorithms)

Reviewed Changes

Copilot reviewed 298 out of 363 changed files in this pull request and generated 5 comments.

File Description
test-complete/*.js Copyright header updates across all test files
test-complete-proxy/*.js Copyright header updates for proxy test files
test-basic/*.js Copyright header updates and addition of new test files
test-complete/data/*.js Copyright header updates for test data files
Comments suppressed due to low confidence (1)

test-basic/plan-search.js:19

  • There is a typo in the describe block. 'fucntions' should be 'functions'.
  before(function (done) {

db.graphs.read(graphUri, 'text/n3').stream('chunked').
on('data', function (data) {
//console.log(data.toString());
(!valcheck.isNullOrUndefined(data)).should.equal(true);
Copy link

Copilot AI Jul 29, 2025

Choose a reason for hiding this comment

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

[nitpick] The validation check has been moved to occur before using the data, which is better practice. However, consider extracting this validation into a helper function if this pattern is used frequently across tests.

Suggested change
(!valcheck.isNullOrUndefined(data)).should.equal(true);
isValidData(data).should.equal(true);

Copilot uses AI. Check for mistakes.
//console.log(JSON.stringify(response, null, 2));
response.should.containEql('<title>SPARQL results</title>');
response.should.containEql('<a href=\"/v1/graphs/things?iri=http%3a//marklogicsparql.com/id%231111\">http://marklogicsparql.com/id#1111</a>');
response.toString().includes('<a href=\"/v1/graphs/things?iri=http%3a//marklogicsparql.com/id%231111\">http://marklogicsparql.com/id#1111</a>');
Copy link

Copilot AI Jul 29, 2025

Choose a reason for hiding this comment

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

This line appears to be checking for a condition but the result is not being asserted or used. The previous line used should.containEql() but this line just calls includes() without any assertion.

Suggested change
response.toString().includes('<a href=\"/v1/graphs/things?iri=http%3a//marklogicsparql.com/id%231111\">http://marklogicsparql.com/id#1111</a>');
response.toString().includes('<a href=\"/v1/graphs/things?iri=http%3a//marklogicsparql.com/id%231111\">http://marklogicsparql.com/id#1111</a>').should.be.true();

Copilot uses AI. Check for mistakes.
//console.log(strData);
strData.should.containEql('"name":"correlation","_value":"0.263822426505543"');
strData.should.containEql[('"name":"covariance","_value":"0.35"') || ('"name":"covariance","_value":"0.349999999999998"')];
strData.should.containEql(('"name":"covariance","_value":"0.35"') || ('"name":"covariance","_value":"0.349999999999998"'));
Copy link

Copilot AI Jul 29, 2025

Choose a reason for hiding this comment

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

The logical OR operator is being used incorrectly here. The containEql method will always receive the first string since JavaScript evaluates the OR expression and returns the first truthy value. This should use a proper assertion that checks for either value.

Suggested change
strData.should.containEql(('"name":"covariance","_value":"0.35"') || ('"name":"covariance","_value":"0.349999999999998"'));
(strData.should.containEql('"name":"covariance","_value":"0.35"') ||
strData.should.containEql('"name":"covariance","_value":"0.349999999999998"')).should.be.true();

Copilot uses AI. Check for mistakes.
const testPlan = pbb.testPlan;

describe('tests for new vector fucntions.', function() {
describe('tests for new vector functions.', function() {
Copy link

Copilot AI Jul 29, 2025

Choose a reason for hiding this comment

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

The describe block description has been corrected from 'fucntions' to 'functions'.

Copilot uses AI. Check for mistakes.
.then(function(output) {
(output === void 0).should.equal(false);
input.length.should.equal(output.length);
if(output){
Copy link

Copilot AI Jul 29, 2025

Choose a reason for hiding this comment

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

[nitpick] The addition of a null check for output before accessing its length property is good defensive programming, but consider using more explicit null/undefined checking like if(output != null) for clarity.

Suggested change
if(output){
if(output != null){

Copilot uses AI. Check for mistakes.
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