Skip to content

Lab: new-diagnostics hook skips law files and stale hits #92

Done

Description

@mareklangiewicz

Lab issue (neospector myaihook new-diagnostics hook). Part of #17.

What happened

The new-diagnostics hook reported hits in law files (must-flag tests, --> lines, which are expected to flag) and stale hits from an emmylua_ls that had not caught up with the edit. Both were noise, and each had to be checked by hand (2026-11-24).

Proposed (unprobed)

Leave out law files, by the same rule gndx gate uses to exempt them. Ask the server again (or check the file's mtime against the diagnostics' version) before reporting a hit on a line the edit did not touch.

Activity

  1. mareklangiewicz commented on Nov 24, 2026

    @mareklangiewicz
    OwnerAuthor

    Done in neospector myvi 6a7be17 (unpushed). The plugin is regenerated by gndx ai lsp sync (emmylua-lsp 0.1.13) and takes effect after a Claude Code restart.

    The premise was wrong. The <new-diagnostics> reports come from Claude Code's own LSP integration (the emmylua-lsp@marek-local-plugins plugin, its .lsp.json generated by myemmylua.lsp_json), not from neospector's myaihook.

    • Law files: fixed. **/spec/typelaws.lua is in myemmylua.CLAUDE_IGNORE_GLOBS, the one deliberate difference from the editor's settings, so Claude's server no longer reports their on-purpose hits. ai lsp check mirrors that config, so it drops its laws list. That list came in with 8257d40 only so the law findings would not read as new problems in the joint scan. The laws are still held by luagnd dev check emmylua and config-nvim nvim dev check. gndx gate all PASS.
    • "Stale" hits: mostly a real bug, filed as emmylua_ls keeps a stale unpacked std: resources are re-dumped only when the crate version changes #93. emmylua_ls reads std from a copy unpacked on 2026-11-06 and never refreshed (re-dumped only on a crate-version change, and every build says 0.30.0). That accounts for the missing-parameter on h:seek 'set', the redundant-parameter on a 3-capture gsub callback, and the like.
    • Not fixed. The rest were cross-file lag: Undefined field X right after X was added in another file, before the server reindexed it. That is server/harness timing, with no lever on our side. The gate is the authority, as memory already says.
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

    needs-triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions