microsoft / microsoft/TypeAgent

Add feed materialize harness for installed-source update/prune coverage

Open
#2,614 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
740
Forks
106
Avg merge
1d 6h
Merged PRs (30d)
84

Description

## Summary
Add a hermetic feed-materialize test harness for the installed-agent source so update/prune behavior can be exercised through the real source path instead of path-record stand-ins.

## Background
During the install-source/update-coordination work, several coverage gaps were intentionally deferred because `createDefaultInstalledAgentSource` does not currently expose a feed dependency injection seam. Direct feed materialization is covered in `installSourcesFeed.spec.ts`, and update/prune behavior is covered through path-record stand-ins in `installSourcesInstalledProvider.spec.ts`, but the combined end-to-end feed-through-installed-source cases are not covered.

## Coverage To Add
- feed-driven prune-on-swap and prune-after-uninstall through `createDefaultInstalledAgentSource`
- rollback prune of a real distinct v2 install root, plus the commit mirror where v2 is kept and v1 is pruned
- feed `@package update NAME RANGE` re-resolution through the installed-source update path

## Possible Approach
Add a `feedDeps` / `npmInstall` injection seam to `createDefaultInstalledAgentSource`, or expose a narrower test hook that lets the installed-source tests drive a mocked feed materialize. Prefer one seam that covers all three cases rather than separate production-only hooks.

## Source
Deferred from PR #2611 review-log cleanup.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with createDefaultInstalledAgentSource and the existing coverage in installSourcesFeed.spec.ts and installSourcesInstalledProvider.spec.ts. Trace how the installed source reaches feed materialization, then add one shared test seam and cover feed-driven prune, rollback/commit mirror pruning, and package update re-resolution through the installed-source path.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.