Skip to content

fix(cli): update traceability tests to use relationships instead of links#136

Merged
Looted merged 1 commit intodevelopfrom
copilot/fix-ci-failure-on-merge
Apr 6, 2026
Merged

fix(cli): update traceability tests to use relationships instead of links#136
Looted merged 1 commit intodevelopfrom
copilot/fix-ci-failure-on-merge

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 6, 2026

Summary

Fixes 2 failing CI tests introduced by the maindevelop merge.

Root Cause

The merge commit (0a58c1e) brought packages/cli/tests/traceability/traceability.test.ts from main. This test file was written against the older ManifestLookupEntry interface that used links?: string[]. However, the develop branch had independently evolved symbol-extract.ts to use a richer relationships?: TraceabilityRelationship[] interface instead.

This caused a runtime mismatch: the tests passed { id: "...", links: [...] } entries to the manifest lookup, but the source code looked for entry.relationships (which was undefined), resulting in empty reqLinks arrays.

Failing Tests Fixed

  • symbol-extract > uses manifest lookup ID when symbol matches sourceFile:title
  • symbol-extract > manifest lookup distinguishes symbols by sourceFile not just title

A third test (inline directive links take precedence over manifest links) was also using the wrong links format but happened to pass because the inline directive overrides manifest links anyway — it was also updated for correctness.

Changes

  • packages/cli/tests/traceability/traceability.test.ts: Replace links: string[] with relationships: TraceabilityRelationship[] ({ type: "implements", to: "..." }) in 3 test ManifestLookup fixtures to match the current ManifestLookupEntry interface.

Copilot AI requested a review from Looted April 6, 2026 10:37
@Looted Looted marked this pull request as ready for review April 6, 2026 10:37
Copilot AI review requested due to automatic review settings April 6, 2026 10:37
@Looted Looted merged commit 2123f58 into develop Apr 6, 2026
Copy link
Copy Markdown

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 updates CLI traceability tests to match the current ManifestLookupEntry shape on develop, replacing the legacy links: string[] fixtures with relationships: { type, to }[] so the manifest lookup data is consumed correctly by symbol-extract.

Changes:

  • Updated 3 ManifestLookup test fixtures to use relationships entries ({ type: "implements", to: "..." }) instead of links.
  • Aligns traceability tests with the develop branch’s ManifestLookupEntry.relationships behavior, fixing CI failures from the maindevelop merge.

@Looted Looted deleted the copilot/fix-ci-failure-on-merge branch April 24, 2026 12:44
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