Skip to content

sloppy-code-guard: replace the deleted raw-rpc-method-string check #965

Description

@chughtapan

scripts/check-rpc-method-strings.js was deleted in the scripts reorganization because it was a total no-op, not merely unwired.

It scanned:

  • packages/protocol/src/network/methods/
  • packages/protocol/src/task/methods/
  • packages/protocol/src/app/methods/

None exist. The loop guards each with if (!fs.existsSync(methodsDir)) continue;, so the body never executed. The directory named in its own failure message — packages/protocol/src/schema/methods/** — is also gone. There is no methods/ directory anywhere under packages/ or v2/ today; RPC definitions live flat in packages/protocol/src/rpc.ts and src/transport/definition.ts.

This mattered more once lint:sloppy-code-guard was wired into pnpm lint (#963): a no-op check inside a CI gate reads as coverage it never provided.

The invariant may still be worth enforcing: raw RPC method strings should reference an exported definition's .name so renames and registry drift fail at compile time instead of surviving as string literals. Rebuilding that against the current flat layout is a new check, so it is filed rather than smuggled into a cleanup PR.

Prior art: v2/inputs/debt-inventory-20260718.md:75 flagged the no-op on 2026-07-18.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions