Repository navigation
fix(crawler): guard missing property.identifiers in adagents.json - #3434
Merged
Merged
Conversation
…json @adcp/client's PropertyIndex.addProperty iterates property.identifiers without guarding the field, and adagents.json files in the wild sometimes omit it — crashing the entire crawl. Patch the singleton at CrawlerService construction to coerce a missing/non-array value to [] so the property still lands in the agent index.
3 tasks
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
@adcp/client'sPropertyIndex.addPropertyiteratesproperty.identifiersand that field is missing — adagents.json files in the wild sometimes omit it.addPropertyatCrawlerServiceconstruction: missing/non-array values are coerced to[]so the property still lands in the agent index without aborting the whole crawl.Error trace this fixes
The proper long-term fix is to harden
@adcp/clientupstream; remove this monkey-patch once that ships.Test plan
npx vitest run server/tests/unit/property-index-guard.test.ts(new test, 2 passing)npx tsc --project server/tsconfig.json --noEmitproperty.identifiers is not iterableerrors, and any property-without-identifiers logs amodule=property-index-guardwarn line instead of aborting the crawl.