Depth 6. Build output, dependencies and caches are skipped: build, .gradle, node_modules, Pods, DerivedData, and Unity's Library/Temp/Obj/Logs.
Android: a module's src/main/AndroidManifest.xml, or a Gradle file applying com.android.application/library. Every module is recorded as an android_module fact, so phone and tablet apps in one repository are both named.
React Native and Flutter: mobile apps with a framework fact; React Native is no longer a web app.
Unity (ProjectSettings/ProjectVersion.txt, at any depth):
with Android plugins in its Assets → Android app (0.8);
beside Android modules → Android app (0.8);
otherwise → desktop app (0.6).
Its generated .sln/.csproj no longer count.
.NET split per project file:
WPF/Windows Forms → Desktop. Recognised by UseWPF, UseWindowsForms, PresentationFramework, System.Windows.Forms, or the WPF type GUID 60dc8134….
ASP.NET → Backend. Recognised by Microsoft.NET.Sdk.Web, AspNetCore, System.Web.Mvc/Http, a Web.config beside the project, or the type GUID 349c5851….
WCF → Backend. Recognised by System.ServiceModel or .svc files.
Confidence is 0.55 plus 0.2 × the share of projects, so the majority wins and no .NET verdict beats a clear mobile signal (0.8).
Projects of no clear kind (libraries, tools) and native .vcxproj remain a weak desktop verdict (0.55).
Paths keep their original case; only the comparison ignores case. A lowercased path was unreadable on Linux, which a test caught.
Tests (6 new, 25 in total for classify)
Android repo: a phone and a tablet module plus a Unity subfolder with a generated .csproj → AndroidApp. Both modules are named, there is no desktop verdict, and Unity's Library/PackageCache manifest is ignored.
Unity with Assets/Plugins/Android → AndroidApp, with the unity fact.
React Native → AndroidApp, not WebApp.
Flutter → flutter fact.
.NET: a WPF + ASP.NET (Web.config) + WCF (.svc) + library solution → Backend first, Desktop second; a WPF + WinForms solution → Desktop.
Markers in node_modules/build are ignored.
Checks
fmt, plus clippy with the CI flags on the agent; agent lib tests pass.
Local nightly, all targets: no baseline changes from this PR. The only differences were one new OSV advisory (left out) and the semgrep staging race, now fixed in #448.
#436 (mobile detection), plus the .NET split, which was agreed with the platform session (#445 does not touch `classify/language.rs`).
## Why
Managed Git (#444) sets the **type of its new targets from this classification**. The old classifier looked only 2 levels deep:
- An Android Studio project (`app/src/main/AndroidManifest.xml`, 3 levels deep) was not recognised.
- A repository with an Android app plus a Unity project and its generated `.csproj`/`.sln` files therefore came out as a **desktop app**.
- React Native counted as a web app, because its `package.json` names `react`.
## Change (`compliance-agent/src/classify/language.rs`)
- **Depth 6.** Build output, dependencies and caches are skipped: `build`, `.gradle`, `node_modules`, `Pods`, `DerivedData`, and Unity's `Library`/`Temp`/`Obj`/`Logs`.
- **Android:** a module's `src/main/AndroidManifest.xml`, or a Gradle file applying `com.android.application`/`library`. Every module is recorded as an `android_module` fact, so phone and tablet apps in one repository are both named.
- **React Native and Flutter:** mobile apps with a `framework` fact; React Native is no longer a web app.
- **Unity** (`ProjectSettings/ProjectVersion.txt`, at any depth):
- with Android plugins in its `Assets` → Android app (0.8);
- beside Android modules → Android app (0.8);
- otherwise → desktop app (0.6).
- Its generated `.sln`/`.csproj` no longer count.
- **.NET split per project file:**
- **WPF/Windows Forms → Desktop.** Recognised by `UseWPF`, `UseWindowsForms`, `PresentationFramework`, `System.Windows.Forms`, or the WPF type GUID `60dc8134…`.
- **ASP.NET → Backend.** Recognised by `Microsoft.NET.Sdk.Web`, `AspNetCore`, `System.Web.Mvc/Http`, a `Web.config` beside the project, or the type GUID `349c5851…`.
- **WCF → Backend.** Recognised by `System.ServiceModel` or `.svc` files.
- Confidence is 0.55 plus 0.2 × the share of projects, so the majority wins and no .NET verdict beats a clear mobile signal (0.8).
- Projects of no clear kind (libraries, tools) and native `.vcxproj` remain a weak desktop verdict (0.55).
- Paths keep their original case; only the comparison ignores case. A lowercased path was unreadable on Linux, which a test caught.
## Tests (6 new, 25 in total for classify)
- **Android repo:** a phone and a tablet module plus a Unity subfolder with a generated `.csproj` → AndroidApp. Both modules are named, there is no desktop verdict, and Unity's `Library/PackageCache` manifest is ignored.
- **Unity with `Assets/Plugins/Android`** → AndroidApp, with the `unity` fact.
- **React Native** → AndroidApp, not WebApp.
- **Flutter** → `flutter` fact.
- **.NET:** a WPF + ASP.NET (Web.config) + WCF (.svc) + library solution → Backend first, Desktop second; a WPF + WinForms solution → Desktop.
- **Markers in `node_modules`/`build`** are ignored.
## Checks
- fmt, plus clippy with the CI flags on the agent; agent lib tests pass.
- **Local nightly, all targets:** no baseline changes from this PR. The only differences were one new OSV advisory (left out) and the semgrep staging race, now fixed in #448.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
The classifier looked two levels deep, so an Android Studio project
(app/src/main/AndroidManifest.xml) was not recognised, and a repository
with an Android app, a Unity project and their generated .csproj files
became a desktop app. Managed Git sets the type of its new targets from
this classification, so that mattered.
- Markers are collected to depth 6, skipping build output, dependencies
and caches (build, .gradle, node_modules, Pods, Unity Library/Temp/Obj).
- Android: a module's src/main/AndroidManifest.xml or a Gradle file
applying com.android.application/library; every module is a fact
(phone and tablet apps in one repository are both named).
- React Native (package.json names react-native) and Flutter (sdk:
flutter) are mobile apps, no longer web apps.
- Unity (ProjectSettings/ProjectVersion.txt): an Android app when it has
Android plugins or sits beside Android modules, otherwise a desktop app;
its generated .sln/.csproj no longer count.
- .NET projects are split: WPF/Windows Forms (UseWPF, UseWindowsForms,
PresentationFramework, System.Windows.Forms, the WPF project type GUID)
-> desktop; ASP.NET (Microsoft.NET.Sdk.Web, AspNetCore, System.Web,
Web.config beside the project, the web project type GUID) and WCF
(System.ServiceModel, .svc) -> backend. The kind with more projects
ranks higher, and no .NET verdict outranks a clear mobile one.
Refs #436.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
sharang
merged commit e92c395e50 into main2026-10-05 14:02:44 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
#436 (mobile detection), plus the .NET split, which was agreed with the platform session (#445 does not touch
classify/language.rs).Why
Managed Git (#444) sets the type of its new targets from this classification. The old classifier looked only 2 levels deep:
app/src/main/AndroidManifest.xml, 3 levels deep) was not recognised..csproj/.slnfiles therefore came out as a desktop app.package.jsonnamesreact.Change (
compliance-agent/src/classify/language.rs)build,.gradle,node_modules,Pods,DerivedData, and Unity'sLibrary/Temp/Obj/Logs.src/main/AndroidManifest.xml, or a Gradle file applyingcom.android.application/library. Every module is recorded as anandroid_modulefact, so phone and tablet apps in one repository are both named.frameworkfact; React Native is no longer a web app.ProjectSettings/ProjectVersion.txt, at any depth):Assets→ Android app (0.8);.sln/.csprojno longer count.UseWPF,UseWindowsForms,PresentationFramework,System.Windows.Forms, or the WPF type GUID60dc8134….Microsoft.NET.Sdk.Web,AspNetCore,System.Web.Mvc/Http, aWeb.configbeside the project, or the type GUID349c5851….System.ServiceModelor.svcfiles..vcxprojremain a weak desktop verdict (0.55).Tests (6 new, 25 in total for classify)
.csproj→ AndroidApp. Both modules are named, there is no desktop verdict, and Unity'sLibrary/PackageCachemanifest is ignored.Assets/Plugins/Android→ AndroidApp, with theunityfact.flutterfact.node_modules/buildare ignored.Checks
🤖 Generated with Claude Code
https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p