Repository navigation
Description
Problem
discover_apps (pkgs/id/src/app_manifest.rs) enforces cross-app uniqueness for web paths in two separate namespaces: a new app's interfaces.web.route is compared only against already-registered apps' routes, and its socket only against their sockets. Route↔socket collisions are never checked — neither across two apps nor within a single manifest (route == socket).
Routes and sockets are the same namespace at the layer that binds them: pkgs/id/src/web/app_interface.rs treats them as one axum path space — it rejects a socket that collides with a host-registered route, and rejects a single section whose route and socket name the same path ("route and socket both bind {path}; they must differ", app_interface.rs:103-105, ~:410). Discovery is the only gate that sees the whole discovered set (the Phase 4 disposition table in app_manifest.rs assigns cross-app uniqueness to discovery: "unique across the discovered set; first folder in sort order wins, the loser is a named error"), and commands::serve only logs discovered apps today — no binding pass over the discovered set exists to catch what discovery misses. So two apps that would collide in one router both register cleanly, with no named error, and the collision surfaces only later as a bind failure (or an axum panic) in whatever step eventually binds the set.
Evidence (verified this run, laptop @ origin/main 50debbc)
Probe ~/git/fleet/probe-manifest-xcollision (real id crate, discover_apps over synthetic app folders):
- X1 route-vs-socket: app-a route
/shared, app-b route/b+ socket/shared→registered=["app-a", "app-b"] errors=[] - X2 socket-vs-route: app-a route
/a+ socket/shared, app-b route/shared→registered=["app-a", "app-b"] errors=[] - X3 self route==socket: one app, route
/same, socket/same→registered=["app-a"] errors=[](the binding layer rejects exactly this shape for a single section; discovery/parse do not) - C1 control route↔route duplicate → second app rejected with the named duplicate-route error
- C2 control socket↔socket duplicate → second app rejected with the named duplicate-socket error
- C3 control all-distinct route/socket pairs → both apps register, no errors
Code: app_manifest.rs discover_apps — the route check searches discovery.apps for an equal route only; the socket check searches for an equal socket only; parse_app_manifest validates each path's shape (is_safe_web_path) but never compares the two fields.
Why it matters
Discovery's contract (Phase 4 disposition, #4203) is that cross-app path collisions are deterministic named errors at scan time, first-folder-wins. The cross-kind hole means the discovered set can be internally inconsistent in exactly the dimension the binding layer treats as one namespace — and because serve currently only logs discovery results, nothing downstream re-checks the set as a set. When a bind step for discovered apps lands, this becomes a startup failure (or panic) caused by two individually "valid" apps, with no error naming either.
Acceptance criteria
-
discover_appsrejects (named per-app error, first folder in sort order wins, other apps unaffected) any app whose route equals an already-registered app's socket, and any app whose socket equals an already-registered app's route — in both folder orders. - A manifest whose own
route == socketis rejected at parse or discovery time with a named error (mirroring the binding layer's existing rule), instead of registering. - Same-kind duplicate behavior unchanged: route↔route and socket↔socket duplicates keep their current named errors; all-distinct sets register fully.
- Tests in app_manifest.rs cover: route-vs-socket, socket-vs-route, self route==socket, plus the existing same-kind and distinct controls.
- The Phase 4 disposition table rows for
interfaces.web.route/interfaces.web.socketare updated to state the cross-kind rule.
Dedup
Searched open + closed issues for app_manifest route/socket/discovery: #4060 (closed) covered same-kind duplicate routes and shape validation; #5427 (closed) covered dot-segment spellings evading uniqueness; #4779 (closed) added the route==socket and host-collision checks in the single-section binding layer (web_interface_from_app_toml), which discovered apps never pass through. None covers cross-app route↔socket uniqueness at discovery, or route==socket at parse/discovery.
Activity
developing-today commentedon Nov 6, 2026
CODE-1942
dezren39 commentedon Nov 6, 2026
🤖 Agent note · filed
dezren39 commentedon Nov 6, 2026
🤖 Agent note · triage verdict: CONFIRMED — task 10926
repo-worker-code)repo-health-code-pilot)gh pr list --search 6454returned none).dfe32779093f):pkgs/id/src/app_manifest.rs—parse_app_manifestvalidatesrouteandsocketshape separately (is_safe_web_pathonly, ~lines 265–273) and never compares the two fields, so a manifest's ownroute == socketpasses.discover_apps(~lines 375–410): the route check searches registered apps for an equalrouteonly; the socket check searches for an equalsocketonly. No cross-kind (route↔socket) comparison exists anywhere in the file.pkgs/id/src/web/app_interface.rs:345rejects a single section with "route and socket both bind {path}; they must differ" — the rule discovery/parse lack.route==socketall registered witherrors=[], while same-kind controls C1/C2 were correctly rejected.small_fix, deduperepo-health:v1:fix:developing-today/code:issue:6454, packethidden_files/packet-6454-fix.json, validatedrepo-task/v1) covering all five acceptance items in this issue, including the Phase 4 disposition-table update. The triage task itself does not implement the fix, per its packet scope.28 remaining items
id(app_manifest): cross-kind route/socket uniqueness + self route==so…
dezren39 commentedon Nov 6, 2026
🤖 Agent note · done
dezren39 commentedon Nov 9, 2026
Verified fixed on current main
1bec591d5d:pkgs/id/src/app_manifest.rsnow enforces the single route/socket namespace. Parse rejects a manifest whose own route equals its socket (:274-278, "route and socket both bind …; they must differ"); discovery rejects cross-kind collisions in both directions (:399-448, cases X1/X2) with first-folder-wins named errors. Regression coverage:parse_rejects_self_route_equal_socket(:726),discovery_rejects_route_colliding_with_registered_socket(:739),discovery_rejects_socket_colliding_with_registered_route(:765),discovery_rejects_self_route_equal_socket(:875), plus thediscovery_cross_kind_namespace_matches_first_wins_modelproptest (:798). The Phase 4 disposition rows in the module docs (:32-33) state the cross-kind rule. Merged via PR #6470 (49797dfd49da, 2026-11-06); the property test landed as PR #7372. Closing as fixed.