Skip to content

fix(lang-ts): share workspace links with dependency analysis - #771

Merged
avidianity merged 1 commit into
fix/issue-759from
fix/issue-760
Dec 2, 2026
Merged

avidianity merged 1 commit into
fix/issue-759from
fix/issue-760

Conversation

@avidianity

@avidianity avidianity commented Dec 2, 2026 •

Copy link
Copy Markdown
Owner

Summary

TypeScript dependency analysis uses the same workspace link selection as import resolution.
An unrelated nested manifest leaves external dependency declarations intact.
Malformed pnpm metadata preserves package.json workspace links.

Closes #760

Tier

Tier 2 from cargo xtask risk-tier. The default rule applies to the changed source and integration test files.

Task

  • Preserve a declared external dependency when a same-named fixture manifest sits outside the workspace.
  • Preserve links for genuine workspace members, including the package.json fallback after malformed pnpm metadata.

Fail-first test

  • Test: dependencies::unrelated_manifest_preserves_the_external_dependency_declaration
  • Main 2910ef78: ran one test and failed with left: ["dev-only", "lodash"], right: [].
  • Fixed revision: the test passed in the targeted CLI run.

Checks

Check Result
Targeted TypeScript dependency, workspace, and resolution unit tests 28 passed
Targeted CLI dependency, manifest, and Finding ID stability tests 24 passed
Git hooks Passed
Standards and Spec reviews PASS. Follow-up cycle fix passed static review.
Repository self-check Passed
Merged-result check cargo xtask merged-result passed on the stack

Safety proof

  • Safety fact: A linked workspace dependency remains local even when codeint skips malformed pnpm metadata.
  • Proof: dependencies::workspace_links::invalid_pnpm_manifest_preserves_package_json_workspace_links passed. It traced src/index.ts to packages/lib/index.ts and found no Dependency hygiene findings.
  • interrogate: None run for this Tier 2 diff.

Runtime evidence

Working-tree measurement Feature map. PASS at 0d8d5213 for the two CLI regressions. The tests use temporary Git repositories and remove them on exit.

Metric version follow-up

  • unused_dependencies: A same-named fixture manifest can no longer hide an unused external declaration or remove it from the declared count.
  • unlisted_dependencies: A listed external import no longer becomes unlisted when an unrelated fixture has the same package name.
  • dev_in_production_dependencies: A Production import of an external dev dependency retains its dev classification when names collide with unrelated fixtures.

The combined Metric version PR will update these versions after the review fixes land.

Gaps

  • Deferred coverage: None for the two reported scenarios.
  • Pre-existing failures: None in the targeted checks.
  • Environmental failures: An initial shared Cargo target run selected zero tests. All reported results use the isolated worktree target.

@avidianity
avidianity added this pull request to stack #772 December 2, 2026 15:57
@avidianity
avidianity force-pushed the fix/issue-760 branch 2 times, most recently from 07d497f to 0d8d521 Compare December 2, 2026 16:18
@avidianity avidianity closed this Dec 2, 2026
@avidianity avidianity reopened this Dec 2, 2026
@avidianity avidianity closed this Dec 2, 2026
@avidianity avidianity reopened this Dec 2, 2026
@avidianity avidianity closed this Dec 2, 2026
@avidianity avidianity reopened this Dec 2, 2026
@avidianity avidianity closed this Dec 2, 2026
@avidianity avidianity reopened this Dec 2, 2026
@avidianity
avidianity merged commit 2799549 into main Dec 2, 2026
30 of 38 checks passed
@avidianity
avidianity deleted the fix/issue-760 branch December 2, 2026 17:08
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.

Unrelated manifests outside workspaces cause false unlisted dependency findings

1 participant