The JSON files in schema/ disagree with the server #218

Open
opened 2026-10-27 14:21:59 +01:00 by clawbot · 0 comments
Collaborator

The JSON files in schema/ describe the protocol, and they disagree with the server on next. #214 lists the differences in schema/README.md under "Where the files differ from the server". Found so far:

  • a numeric reply's command holds the number, and there is no code field;
  • the 353 body;
  • MODE in params;
  • the JOIN body;
  • the PING token;
  • the TOPIC query;
  • PUBKEY, which the server answers with ERR_UNKNOWNCOMMAND (421);
  • KICK.json puts the kicked nick in params, but the server reads it from body;
  • message.json allows an object as body, but the server reads only arrays of strings;
  • NOTICE.json allows * as to, which the server answers with ERR_NOSUCHNICK (401);
  • TOPIC.json says an empty array clears the topic, but the server answers [] with ERR_NEEDMOREPARAMS (461) and [""] clears it.

Found by the rewrite for #190 and its review. The list in schema/README.md as merged is the one to work from.

By that issue's rule the code decides what is true, and nothing is described that is not built. Fix: change each schema file to match what the server sends and accepts, and delete schema/commands/PUBKEY.json, since there is no such command. Then remove the "Where the files differ from the server" section from schema/README.md and correct any sentence there that the change makes false, in short plain sentences. Change no server code.

Definition of done

  1. Every file in schema/ matches the server's behaviour on next, checked against the handler code for each command and numeric reply.
  2. No file describes a command the server does not have.
  3. schema/README.md has no section listing differences, and every sentence in it is true.
  4. One reviewed PR against next, cut after #214 has landed.

Model: opus-5-5

The JSON files in `schema/` describe the protocol, and they disagree with the server on `next`. https://git.eeqj.de/sneak/neoirc/pulls/214 lists the differences in `schema/README.md` under "Where the files differ from the server". Found so far: - a numeric reply's `command` holds the number, and there is no `code` field; - the `353` body; - `MODE` in `params`; - the `JOIN` body; - the `PING` token; - the `TOPIC` query; - `PUBKEY`, which the server answers with `ERR_UNKNOWNCOMMAND` (421); - `KICK.json` puts the kicked nick in `params`, but the server reads it from `body`; - `message.json` allows an object as `body`, but the server reads only arrays of strings; - `NOTICE.json` allows `*` as `to`, which the server answers with `ERR_NOSUCHNICK` (401); - `TOPIC.json` says an empty array clears the topic, but the server answers `[]` with `ERR_NEEDMOREPARAMS` (461) and `[""]` clears it. Found by the rewrite for https://git.eeqj.de/sneak/neoirc/issues/190 and its review. The list in `schema/README.md` as merged is the one to work from. By that issue's rule the code decides what is true, and nothing is described that is not built. Fix: change each schema file to match what the server sends and accepts, and delete `schema/commands/PUBKEY.json`, since there is no such command. Then remove the "Where the files differ from the server" section from `schema/README.md` and correct any sentence there that the change makes false, in short plain sentences. Change no server code. ## Definition of done 1. Every file in `schema/` matches the server's behaviour on `next`, checked against the handler code for each command and numeric reply. 2. No file describes a command the server does not have. 3. `schema/README.md` has no section listing differences, and every sentence in it is true. 4. One reviewed PR against `next`, cut after https://git.eeqj.de/sneak/neoirc/pulls/214 has landed. Model: opus-5-5
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/neoirc#218