Skip to content

Match Rules from successful LSP observations #56

Closed

Description

@frap129

Parent

#38

What to build

Allow Rules to match raw successful path-associated LSP results while binding every result exclusively to the file that was queried.

Acceptance criteria

  • Every supported LSP operation returning path-associated text contributes its raw successful result for the queried path, including no-results responses.
  • Paths and URIs mentioned within an LSP result remain content and never create unrelated File observations.
  • Combined path and content conditions are satisfied only by the queried file observation.
  • Failed LSP operations contribute no File observation.
  • Acceptance coverage exercises every host-supported LSP operation category through the server hook surface.

Blocked by

Activity

  1. frap129 commented on Aug 30, 2026

    @frap129
    OwnerAuthor

    Implemented in 1d4504d.

    • Every supported operation (goToDefinition, findReferences, hover, documentSymbol, workspaceSymbol, goToImplementation, prepareCallHierarchy, incomingCalls, outgoingCalls) contributes its raw successful result for the queried path, including no-results responses: parameterized hook-level coverage in src/file-observation-lsp.integration.test.ts
    • Paths/URIs inside a result stay content and never create unrelated observations; combined path+content conditions are satisfied only by the queried file: src/file-observation-lsp.integration.test.ts (queried-path correlation test)
    • Failed LSP operations contribute nothing (OpenCode invokes tool.execute.after only after a successful execute, verified against v1.18.23 packages/opencode/src/session/tools.ts)
    • Acceptance coverage exercises every host-supported operation category through the real server hook surface with a mocked OpenCode client.
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

    ready-for-agentFully specified, ready for an AFK agent

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions