Skip to content

aft_inspect reports "authoritative" 0 errors for a file outside project_root that has a type error #559

Closed

Description

@iceteaSA

Summary

aft_inspect scoped to a file outside project_root reports FRESH and diagnostics: authoritative results for 1 of 1 scoped file with 0 errors, even when that file has a type error. The same file inside project_root reports the error. Per the reporting convention, an unexamined file should be named as a gap, not reported as clean.

Repro (aft 0.60.0, OpenCode 1 host, TypeScript repo)

The same one-line file, export const broken: number = "not a number";, in three places. project_root is the repo's main checkout.

  1. Inside project_root, aft_inspect({scope: "<root>/packages/x/src/probe.ts", sections: "diagnostics"}):

    FRESH
    scope: 1 root, 1 file
    diagnostics: authoritative results for 1 of 1 scoped file
    diagnostics: 1 errors, 0 warnings, 0 info, 0 hints
    - packages/x/src/probe.ts:1:14 error Type 'string' is not assignable to type 'number'. [typescript]
    
  2. In a linked git worktree of the same repository (outside project_root; node_modules installed, same tsconfig.json). Same call, run twice:

    FRESH
    scope: 1 root, 0 files (no analyzed files under this scope)
    diagnostics: authoritative results for 1 of 1 scoped file
    diagnostics: 0 errors, 0 warnings, 0 info, 0 hints
    
  3. In an unrelated git repository outside project_root with its own tsconfig.json (strict: true): the same output as 2, plus TypeScript: server-managed SDK resolution (version not reported by AFT).

Expected

The file is reported as not examined, for example complete: false with skipped_files: [{file, reason: "outside_project_root"}]. That reason already appears in the incomplete_analysis_reason tests in crates/aft/src/commands/inspect.rs. Alternatively, diagnose it and report the error. Either way, never authoritative with 0 errors.

Where

The line is rendered from diagnostics.coverage.authoritative in crates/aft/src/commands/inspect.rs:3496 on main. I have not traced which producer counts an outside-root file as authoritative.

Why it matters

Parallel agent lanes run in linked worktrees. An agent that runs aft_inspect after an edit batch there gets a FRESH, authoritative, clean result, and type errors surface only at the next full typecheck.

Activity

  1. aft-alfonso commented on Oct 19, 2026

    @aft-alfonso

    Thanks for the clear repro with all three placements.

    Confirmed. For a file outside the session's project folder, the TypeScript server for that file's own project does start and does report the error. AFT then dropped reports from outside the project folder but still counted the file as checked, which is how it ended up saying "authoritative" with 0 errors.

    We're fixing it so that a file you scope outside the project folder shows its real errors from its own project's language server. When no server can cover the file, it will be reported as not checked, never as clean. I'll update this issue when the fix ships in a release.

  2. aft-alfonso commented on Oct 20, 2026

    @aft-alfonso

    Fixed in v0.61.0. Scoped aft_inspect now reports errors in files outside the project root, or lists them as unchecked, instead of reporting a clean result. Thanks for the report, @iceteaSA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions