Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 8 additions & 2 deletions packages/concerto-cto/lib/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -1202,8 +1202,14 @@ function peg$parse(input, options) {
return `${ns}@${version}`;
};
var peg$f104 = function(ns) {
return ns;
};
if (ns.version) {
return {
name: ns.name,
namespace: ns.namespace
};
}
Comment on lines +1205 to +1210

Copilot AI Mar 1, 2026

Copy link

Choose a reason for hiding this comment

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

This generated action (peg$f104) checks ns.version, but QualifiedNamespaceDeclaration returns a string in the current grammar, so this condition will never be true and the intended normalization won’t run. After fixing the grammar, please re-run the peggy generation step so lib/parser.js reflects the actual (working) logic.

Suggested change
if (ns.version) {
return {
name: ns.name,
namespace: ns.namespace
};
}

Copilot uses AI. Check for mistakes.
return ns;
};
var peg$f105 = function(u) {
return u;
};
Expand Down
10 changes: 8 additions & 2 deletions packages/concerto-cto/lib/parser.pegjs
Original file line number Diff line number Diff line change
Expand Up @@ -1699,8 +1699,14 @@ QualifiedNamespaceDeclaration

Namespace
= NamespaceToken __ ns:QualifiedNamespaceDeclaration __ {
return ns;
}
if (ns.version) {
return {
name: ns.name,
namespace: ns.namespace
};
}
Comment on lines +1702 to +1707

Copilot AI Mar 1, 2026

Copy link

Choose a reason for hiding this comment

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

QualifiedNamespaceDeclaration (both versioned and unversioned) currently returns a string (see QualifiedName / VersionedQualifiedNamespace). Because of that, ns.version is always undefined here, so the new normalization branch is unreachable and the rule behavior is effectively unchanged. If the goal is to normalize versioned vs unversioned namespaces, the change likely needs to happen in the VersionedQualifiedNamespace / QualifiedNamespaceDeclaration rules (or normalize the returned string explicitly), rather than checking ns.version on a string.

Suggested change
if (ns.version) {
return {
name: ns.name,
namespace: ns.namespace
};
}

Copilot uses AI. Check for mistakes.
return ns;
}
Comment on lines 1701 to +1709

Copilot AI Mar 1, 2026

Copy link

Choose a reason for hiding this comment

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

The PR description calls out adding a regression test for versioned namespaces, but this PR’s changed files don’t include any test updates/additions. Please add/adjust a test case that would have failed before this fix (e.g., a CTO file using namespace org.example@1.0.0 in the scenario that broke cicero archive) so the behavior is locked in.

Copilot generated this review using guidance from repository custom instructions.

FromUri
= FromToken __ u:$URI __ {
Expand Down
Loading