Repository navigation
Scope repository-relative knowledge ingestion to configured paths - #17256
Open
Jialin Huang (JialinHuang803) wants to merge 1 commit into
Open
Jialin Huang (JialinHuang803) wants to merge 1 commit into
Jialin Huang (JialinHuang803) wants to merge 1 commit into
Conversation
Preserve repository-relative blob identities while avoiding repeated shared-root scans. Add hermetic generic regressions and document global ingestion and cleanup migration impact. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Jialin Huang (JialinHuang803)
requested review from
Jiaqi Zhang (JiaqiZhang-Dev),
Crystal YU (chunyu3) and
Renhe Li (lirenhe)
as code owners
October 13, 2026 08:03
|
Azure Pipelines: Successfully started running 1 pipeline(s). 71 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Missing selections can trigger destructive cleanup, while selected-file filters and backslash paths are handled incorrectly.
3 open findings
What changed in this PR
Scopes repository-relative knowledge ingestion to configured paths while preserving repository-root citation identities.
Changes:
- Adds scoped directory/file processing and release-note guards.
- Adds regression coverage for path selection, metadata, filters, and collisions.
- Documents cleanup and migration implications.
| File | Description |
|---|---|
src/DailySyncKnowledge.ts |
Scopes ingestion and release-note discovery. |
src/services/ConfigurationLoader.ts |
Adds selected-path tracking. |
tests/sourcePathScoping.test.ts |
Adds path-scoping regressions. |
tests/configurationLoader.test.ts |
Tests source transformation. |
README.md |
Documents behavior and migration impact. |
🧠 Review effort: Balanced
Comment on lines
+107
to
110
| if (!fs.existsSync(scanPath)) { | ||
| console.warn(`Source path not found: ${scanPath}`); | ||
| continue; | ||
| } |
Comment on lines
430
to
+431
| if (isFile) { | ||
| processSingleFile(sourceDir, path.dirname(sourceDir)); | ||
| processSingleFile(scanPath, source.includePath ? sourceDir : path.dirname(sourceDir)); |
| for (const docPath of source.paths) { | ||
| sources.push({ | ||
| path: (docPath.relativeByRepoPath || docPath.path === undefined) ? `docs/${repoPath}` : `docs/${repoPath}/${docPath.path}`, | ||
| includePath: docPath.relativeByRepoPath ? docPath.path?.replace(/^[/\\]+/, '') : undefined, |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
Generic, independently main-based knowledge-sync fix; no .NET source configuration or agent additions. Companion #17253 must merge after this PR.
Previously,
relativeByRepoPath: trueused the configuredpathfor sparse checkout but discarded it during ingestion. Every entry scanned the entire shared sparse-checkout repository root. Entries sharing a destination folder could produce duplicate blob keys and overwrite each other's plane metadata.release-notesindex discovery to selections containing it; do not introduce nested release-note discovery.Intentional global ingestion and cleanup impact
This behavior change applies to all
relativeByRepoPathsources, not only the companion .NET sources. Root/ancestor Markdown incidentally fetched by sparse checkout but outside configured paths will no longer ingest. On a later authorized sync,cleanupExpiredBlobscan remove previously indexed incidental blobs absent from the scoped results. Review the complete configuration and migration impact before syncing. Selected paths sharing a destination folder must not overlap, especially with different metadata.No live sync, indexing, deployment, or cloud changes were performed. Never run sync against a partial source list: existing cleanup removes blobs absent from the full processing results. All existing configuration and dependency manifests/locks remain untouched.
Validation
npm run build: passed.Initial tests/build failed because dependencies were absent; restored existing locked dependencies with
npm ciwithout changing manifests/locks. Existing unrelated Windows long-path checkout omissions were left untouched and are not part of this PR.