Skip to content

Adds Robots.txt engine to dotnet device detection#720

Open
jwrosewell wants to merge 11 commits intomainfrom
feature/robots-txt
Open

Adds Robots.txt engine to dotnet device detection#720
jwrosewell wants to merge 11 commits intomainfrom
feature/robots-txt

Conversation

@jwrosewell
Copy link
Copy Markdown
Contributor

@jwrosewell jwrosewell commented Mar 29, 2026

Changes

  1. Adds a new engine called RobotsTxtEngine with associated builder to create robots.txt plan and annotated text files in responses when query.robotstxt.[usage] is provided in the evidence. Valid values are provided in the RobotsTxtEngine public static methods. Callers can use this engine to obtain a robots.txt entry ready to add to form a response. See tests for more details of parameters. Note: The engine only processes when there is evidence available. As such there can be situations where there is not RobotsTxtData instance available in the results.

  2. Refactored the PropertyKeyedDeviceEngine and classes to make more flexible so that it can support the RobotsTxt requirement. Split out the TAC and Native engines from the single engine so that both can be used clearly in the same pipeline. Closes Remove TAC and Native code from base PropertyKeyedEngine #718

  3. Upgraded packages and fixed some tests and removed unused code.

…n be shared with different types of engine implementation.
…concering the explicit setting of parallel for tests.
…lit out a) the query of the source engine, b) the construction of the data set, and c) the engine. The TAC and Native engines have been created separately to address #718

FEAT/MAJOR: Added robots.txt engine and tests to generate results only when query.robotstxt.[CrawlerUsage] is provided as evidence. Added model and services for generation of robots.txt to device detection package.
…xed issue with Framework tests not passing due to version dependencies in version 8.
@jwrosewell
Copy link
Copy Markdown
Contributor Author

Note to reviewers: I'd like to re-read the submission before merging and following your review.

Copy link
Copy Markdown
Contributor

@YaroslavVlasenko YaroslavVlasenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed. Made minor fixes and pushed directly:

  • Duplicate copyright line in TacEngine.cs
  • Empty summary on PropertyKeyedDeviceEngineBaseBuilder constructor
  • Pattern match variable not used in DataSetService.ConvertValues
  • RobotsTxtData namespace mismatch (was PropertyKeyed.Data, now RobotsTxt.Data)
  • Stale test names referencing old ConfigureForTac/ConfigureForNativeModel API

Closing #719 in favor of this PR.

Copy link
Copy Markdown
Contributor

@justadreamer justadreamer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

left some review comments, @jwrosewell please let us know if you have time to address - I can also ask @YaroslavVlasenko to fix and finalize the PR.

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.

Remove TAC and Native code from base PropertyKeyedEngine

3 participants