You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
id(app_manifest): discovery registers apps whose program.source does not exist — manifest is never checked against its folder #4064
discover_apps (pkgs/id/src/app_manifest.rs:152-200, main @ df3f836) validates the manifest's text but never checks it against the folder it describes: a [program].source path that does not exist inside the app folder is accepted, and the app is returned in apps with no error. parse_app_manifest checks the source path's shape (relative, Component::Normal only, app_manifest.rs:124-133) — shape is all that is ever checked; nothing stats the path, in either the parser or discovery.
Verified this run with a probe crate on the laptop compiling a sha256-identical copy of app_manifest.rs from main df3f836 (probe: ~/git/fleet/probe-appmanifest-20261101, probe2 binary): an app folder ghost-app/ whose app.toml declares
with no program/ directory on disk at all → discover_apps returns apps=1, errors=0 — the ghost app is fully "discovered", and cmd_serve (src/commands/serve.rs:786-788) logs it as a discovered app.
Why it matters
Discovery is the host's registration gate (#2324: "validates … and registers the app"; design §3 same). Its per-app error isolation exists so a broken app folder disables itself with a named error instead of failing mysteriously later. A moved/renamed program directory — the exact accident that just happened in-repo when tic-tac-toe moved from examples/ to apps/tic-tac-toe/program/ in #3926 — currently produces a successfully-discovered app that will only fail at launch time, in a different code path, with no pointer back to the manifest.
Acceptance criteria
Discovery (or a validation step it calls) checks that a declared program.source exists inside the app folder (file or directory — the checked-in manifest uses the program/ directory) and records a named per-app error, excluding the app from apps, when it does not.
A unit test covers the ghost-source case: app excluded, one error naming the missing source path.
The checked-in tic-tac-toe app (source program/, a directory) still discovers cleanly, and module_hash-only manifests (no source) are unaffected.
Serve's discovered-app logging therefore never reports an app whose declared program is absent.
Session / ID: new-issue-creator-code-a run 2026-11-01 17:05 CST
Found via: filed this run
Task: Filed this issue — discover_apps registers an app whose program.source does not exist on disk, verified by a laptop probe crate (probe2) against a sha256-identical copy of app_manifest.rs @ df3f836: ghost app discovered with apps=1, errors=0
Expectation: effort/s — triage confirms on current main, then routes the fix per the acceptance criteria
Links: queue packet enqueued this run (repo-health-code-pilot)
Expectation: effort class s; done = behavior confirmed or refuted against current main with evidence, and a fix task enqueued (or the issue routed otherwise) with findings posted here.
Links: packet evidence cites the probe2 laptop probe against app_manifest.rs at df3f836; this triage re-checks current main.
Expectation: effort class s; done = branch queue/5972-4064-ghost-source-discovery with the fix and tests, targeted app_manifest tests passing, PR opened.
Links: branch queue/5972-4064-ghost-source-discovery, worktree ~/git/fleet/task-5972 on the laptop, base main 070f0d9.
discover_apps now checks folder.join(program.source) with Path::exists (file or directory both valid) and, when absent, pushes a named per-app error (program.source <source> does not exist in app folder <folder>) and excludes the app. module_hash-only manifests unaffected.
Tests: new discovery_rejects_app_whose_program_source_is_missing; existing discovery_reports_bad_app_and_keeps_valid_app fixture now creates the valid app's program/ directory. Laptop run cargo test -p id --lib app_manifest (CARGO_BUILD_JOBS=4): 5 passed, 0 failed — full log tail verified from /tmp/task5972-test.log on the laptop.
Codex review on head f2a1cfd: completed, zero findings (has_any_findings=false). CodeRabbit was rate-limited and produced no findings.
Activity
dezren39 commentedon Nov 1, 2026
🤖 Agent note · filed
dezren39 commentedon Nov 1, 2026
🤖 Agent note · picked up
1 remaining item
dezren39 commentedon Nov 1, 2026
🤖 Agent note · picked up
queue/5972-4064-ghost-source-discovery, worktree ~/git/fleet/task-5972 on the laptop, base main 070f0d9.Merge pull request #4075 from developing-today/queue/5972-4064-ghost-…
dezren39 commentedon Nov 1, 2026
🤖 Agent note · done
discover_appsnow checksfolder.join(program.source)withPath::exists(file or directory both valid) and, when absent, pushes a named per-app error (program.source <source> does not exist in app folder <folder>) and excludes the app.module_hash-only manifests unaffected.discovery_rejects_app_whose_program_source_is_missing; existingdiscovery_reports_bad_app_and_keeps_valid_appfixture now creates the valid app'sprogram/directory. Laptop runcargo test -p id --lib app_manifest(CARGO_BUILD_JOBS=4): 5 passed, 0 failed — full log tail verified from /tmp/task5972-test.log on the laptop.