403 lines
17 KiB
JSON
403 lines
17 KiB
JSON
[
|
|
{
|
|
"check": "01-kind-version",
|
|
"path": "packages/plugins/src/kinds.mjs",
|
|
"old": "kind: \"channel\", interfaceVersion: 1",
|
|
"new": "kind: \"channel\", interfaceVersion: 2",
|
|
"test": "packages/plugins/tests/channel.test.mjs",
|
|
"killer": "channel registry requires"
|
|
},
|
|
{
|
|
"check": "02-kind-switch",
|
|
"path": "packages/plugins/src/kinds.mjs",
|
|
"old": "exports: Object.freeze([\"dispatch\"]), switch: \"list\"",
|
|
"new": "exports: Object.freeze([\"dispatch\"]), switch: \"one\"",
|
|
"test": "packages/plugins/tests/channel.test.mjs",
|
|
"killer": "channel registry requires"
|
|
},
|
|
{
|
|
"check": "03-cli-forward-verb",
|
|
"path": "packages/plugins/channel/cli/index.mjs",
|
|
"old": "return call(verb, args);",
|
|
"new": "return call(\"thread.list\", args);",
|
|
"test": "packages/plugins/tests/channel.test.mjs",
|
|
"killer": "channel shipped modules load"
|
|
},
|
|
{
|
|
"check": "04-webui-forward-verb",
|
|
"path": "packages/plugins/channel/webui/index.mjs",
|
|
"old": "return call(verb, args);",
|
|
"new": "return call(\"thread.list\", args);",
|
|
"test": "packages/plugins/tests/channel.test.mjs",
|
|
"killer": "channel shipped modules load"
|
|
},
|
|
{
|
|
"check": "05-cli-forward-args",
|
|
"path": "packages/plugins/channel/cli/index.mjs",
|
|
"old": "return call(verb, args);",
|
|
"new": "return call(verb, { ...args, class: \"INFO\" });",
|
|
"test": "packages/plugins/tests/channel.test.mjs",
|
|
"killer": "channel shipped modules load"
|
|
},
|
|
{
|
|
"check": "06-webui-forward-args",
|
|
"path": "packages/plugins/channel/webui/index.mjs",
|
|
"old": "return call(verb, args);",
|
|
"new": "return call(verb, { ...args, class: \"INFO\" });",
|
|
"test": "packages/plugins/tests/channel.test.mjs",
|
|
"killer": "channel shipped modules load"
|
|
},
|
|
{
|
|
"check": "07-cli-filter",
|
|
"path": "packages/plugins/channel/cli/index.mjs",
|
|
"old": "if (!VERBS.has(verb))",
|
|
"new": "if (false)",
|
|
"test": "packages/plugins/tests/channel.test.mjs",
|
|
"killer": "channel shipped modules load"
|
|
},
|
|
{
|
|
"check": "08-webui-filter",
|
|
"path": "packages/plugins/channel/webui/index.mjs",
|
|
"old": "if (!VERBS.has(verb))",
|
|
"new": "if (false)",
|
|
"test": "packages/plugins/tests/channel.test.mjs",
|
|
"killer": "channel shipped modules load"
|
|
},
|
|
{
|
|
"check": "09-cli-result",
|
|
"path": "packages/plugins/channel/cli/index.mjs",
|
|
"old": "return call(verb, args);",
|
|
"new": "await call(verb, args); return null;",
|
|
"test": "packages/plugins/tests/channel.test.mjs",
|
|
"killer": "channel shipped modules load"
|
|
},
|
|
{
|
|
"check": "10-webui-refusal",
|
|
"path": "packages/plugins/channel/webui/index.mjs",
|
|
"old": "return call(verb, args);",
|
|
"new": "return call(verb, args).catch(() => null);",
|
|
"test": "packages/plugins/tests/channel.test.mjs",
|
|
"killer": "channel shipped modules load"
|
|
},
|
|
{
|
|
"check": "11-bad-name",
|
|
"path": "packages/plugins/src/kinds.mjs",
|
|
"old": "if (typeof name !== \"string\" || !NAME.test(name)) {",
|
|
"new": "if (false) {",
|
|
"test": "packages/plugins/tests/channel.test.mjs",
|
|
"killer": "channel guards refuse bad names"
|
|
},
|
|
{
|
|
"check": "12-directory-check",
|
|
"path": "packages/plugins/src/loader.mjs",
|
|
"old": " component(nameDir, true);",
|
|
"new": " // directory check omitted",
|
|
"test": "packages/plugins/tests/channel.test.mjs",
|
|
"killer": "channel guards refuse symlinked module, index and kind directories"
|
|
},
|
|
{
|
|
"check": "13-index-check",
|
|
"path": "packages/plugins/src/loader.mjs",
|
|
"old": " component(index, false);",
|
|
"new": " // index check omitted",
|
|
"test": "packages/plugins/tests/channel.test.mjs",
|
|
"killer": "channel guards refuse bad names"
|
|
},
|
|
{
|
|
"check": "14-symlink-check",
|
|
"path": "packages/plugins/src/loader.mjs",
|
|
"old": "if (st.isSymbolicLink())",
|
|
"new": "if (false)",
|
|
"test": "packages/plugins/tests/channel.test.mjs",
|
|
"killer": "channel guards refuse symlinked"
|
|
},
|
|
{
|
|
"check": "15-realpath-check",
|
|
"path": "packages/plugins/src/loader.mjs",
|
|
"old": "if (real !== expected)",
|
|
"new": "if (false)",
|
|
"test": "packages/plugins/tests/channel.test.mjs",
|
|
"killer": "channel last realpath check"
|
|
},
|
|
{
|
|
"check": "16-export-check",
|
|
"path": "packages/plugins/src/loader.mjs",
|
|
"old": "if (!Object.hasOwn(module, key))",
|
|
"new": "if (false)",
|
|
"test": "packages/plugins/tests/channel.test.mjs",
|
|
"killer": "channel guards refuse bad names"
|
|
},
|
|
{
|
|
"check": "17-function-check",
|
|
"path": "packages/plugins/src/loader.mjs",
|
|
"old": "if (typeof module[key] !== \"function\")",
|
|
"new": "if (false)",
|
|
"test": "packages/plugins/tests/channel.test.mjs",
|
|
"killer": "channel guards refuse bad names"
|
|
},
|
|
{
|
|
"check": "18-version-check",
|
|
"path": "packages/plugins/src/loader.mjs",
|
|
"old": "if (module.interfaceVersion !== spec.interfaceVersion)",
|
|
"new": "if (false)",
|
|
"test": "packages/plugins/tests/channel.test.mjs",
|
|
"killer": "channel guards refuse bad names"
|
|
},
|
|
{
|
|
"check": "19-snapshot-pair",
|
|
"path": "packages/plugins/src/loader.mjs",
|
|
"old": " return current.get(kind);",
|
|
"new": " return current.get(\"usage-source\");",
|
|
"test": "packages/plugins/tests/channel.test.mjs",
|
|
"killer": "channel snapshot is"
|
|
},
|
|
{
|
|
"check": "20-snapshot-array-freeze",
|
|
"path": "packages/plugins/src/loader.mjs",
|
|
"old": " return current.get(kind);",
|
|
"new": " return [...current.get(kind)];",
|
|
"test": "packages/plugins/tests/channel.test.mjs",
|
|
"killer": "channel snapshot is"
|
|
},
|
|
{
|
|
"check": "21-snapshot-entry-freeze",
|
|
"path": "packages/plugins/src/loader.mjs",
|
|
"old": " return current.get(kind);",
|
|
"new": " return Object.freeze(current.get(kind).map(entry => ({ ...entry })));",
|
|
"test": "packages/plugins/tests/channel.test.mjs",
|
|
"killer": "channel snapshot is"
|
|
},
|
|
{
|
|
"check": "22-snapshot-unknown",
|
|
"path": "packages/plugins/src/loader.mjs",
|
|
"old": " function snapshot(kind) {\n if (!current.has(kind)) refuse(\"unknown-kind\", `unknown kind ${JSON.stringify(kind)}`);",
|
|
"new": " function snapshot(kind) {",
|
|
"test": "packages/plugins/tests/channel.test.mjs",
|
|
"killer": "channel snapshot is"
|
|
},
|
|
{
|
|
"check": "23-constructor-name",
|
|
"path": "packages/plugins/src/channel.mjs",
|
|
"old": "if (typeof name !== \"string\" || !NAME.test(name))",
|
|
"new": "if (false)",
|
|
"test": "packages/plugins/tests/channel.test.mjs",
|
|
"killer": "channel caller refuses invalid core"
|
|
},
|
|
{
|
|
"check": "24-constructor-call",
|
|
"path": "packages/plugins/src/channel.mjs",
|
|
"old": "if (typeof call !== \"function\")",
|
|
"new": "if (false)",
|
|
"test": "packages/plugins/tests/channel.test.mjs",
|
|
"killer": "channel caller refuses invalid core"
|
|
},
|
|
{
|
|
"check": "25-settings-verb",
|
|
"path": "packages/plugins/src/channel.mjs",
|
|
"old": "await call(\"plugins\", {})",
|
|
"new": "await call(\"thread.list\", {})",
|
|
"test": "packages/plugins/tests/channel.test.mjs",
|
|
"killer": "channel caller re-reads settings"
|
|
},
|
|
{
|
|
"check": "26-settings-shape",
|
|
"path": "packages/plugins/src/channel.mjs",
|
|
"old": "if (!record(settings) || !record(settings.plugins))",
|
|
"new": "if (false)",
|
|
"test": "packages/plugins/tests/channel.test.mjs",
|
|
"killer": "channel caller malformed settings"
|
|
},
|
|
{
|
|
"check": "27-kind-isolation",
|
|
"path": "packages/plugins/src/channel.mjs",
|
|
"old": "await loader.load(selection);",
|
|
"new": "await loader.load(settings.plugins);",
|
|
"test": "packages/plugins/tests/channel.test.mjs",
|
|
"killer": "channel caller malformed settings"
|
|
},
|
|
{
|
|
"check": "28-named-selection",
|
|
"path": "packages/plugins/src/channel.mjs",
|
|
"old": "snapshot.find(item => item.name === name)",
|
|
"new": "snapshot[0]",
|
|
"test": "packages/plugins/tests/channel.test.mjs",
|
|
"killer": "channel caller re-reads settings"
|
|
},
|
|
{
|
|
"check": "29-absent-is-off",
|
|
"path": "packages/plugins/src/channel.mjs",
|
|
"old": "Object.hasOwn(settings.plugins, \"channel\") ? { channel: settings.plugins.channel } : {}",
|
|
"new": "Object.hasOwn(settings.plugins, \"channel\") ? { channel: settings.plugins.channel } : { channel: [\"cli\", \"webui\"] }",
|
|
"test": "packages/plugins/tests/channel.test.mjs",
|
|
"killer": "channel caller re-reads settings"
|
|
},
|
|
{
|
|
"check": "30-empty-is-off",
|
|
"path": "packages/plugins/src/channel.mjs",
|
|
"old": "{ channel: settings.plugins.channel }",
|
|
"new": "{ channel: settings.plugins.channel.length === 0 ? [\"cli\", \"webui\"] : settings.plugins.channel }",
|
|
"test": "packages/plugins/tests/channel.test.mjs",
|
|
"killer": "channel caller re-reads settings"
|
|
},
|
|
{
|
|
"check": "31-settings-reread",
|
|
"path": "packages/plugins/src/channel.mjs",
|
|
"old": "await loader.load(selection);",
|
|
"new": "if (loader.snapshot(\"channel\").length === 0) await loader.load(selection);",
|
|
"test": "packages/plugins/tests/channel.test.mjs",
|
|
"killer": "channel caller re-reads settings"
|
|
},
|
|
{
|
|
"check": "32-last-good",
|
|
"path": "packages/plugins/src/channel.mjs",
|
|
"old": " const loader = createLoader({ log });\n return async (verb, args = {}) => {",
|
|
"new": " return async (verb, args = {}) => {\n const loader = createLoader({ log });",
|
|
"test": "packages/plugins/tests/channel.test.mjs",
|
|
"killer": "channel caller uses last good"
|
|
},
|
|
{
|
|
"check": "33-dispatch-bypass",
|
|
"path": "packages/plugins/src/channel.mjs",
|
|
"old": "return entry.module.dispatch({ verb, args }, { call });",
|
|
"new": "return call(verb, args);",
|
|
"test": "packages/plugins/tests/channel.test.mjs",
|
|
"killer": "channel caller invokes the selected loaded module"
|
|
},
|
|
{
|
|
"check": "34-module-operation-filter",
|
|
"path": "packages/plugins/src/channel.mjs",
|
|
"old": "return entry.module.dispatch({ verb, args }, { call });",
|
|
"new": "return call(verb, args);",
|
|
"test": "packages/plugins/tests/channel.test.mjs",
|
|
"killer": "channel caller keeps the selected module operation filter"
|
|
},
|
|
{
|
|
"check": "35-cli-project",
|
|
"path": "packages/cli/src/cli.mjs",
|
|
"old": "projectBusCommand(rest, io, (p) => channelCallFor(p, io, deps))",
|
|
"new": "projectBusCommand(rest, io, (p) => callFor(p, io, deps))",
|
|
"test": "packages/cli/tests/channel-cli.test.mjs",
|
|
"killer": "CLI off, absent"
|
|
},
|
|
{
|
|
"check": "36-cli-threads",
|
|
"path": "packages/cli/src/cli.mjs",
|
|
"old": "threadsCommand(rest, io, (p) => channelCallFor(p, io, deps))",
|
|
"new": "threadsCommand(rest, io, (p) => callFor(p, io, deps))",
|
|
"test": "packages/cli/tests/channel-cli.test.mjs",
|
|
"killer": "CLI off, absent"
|
|
},
|
|
{
|
|
"check": "37-cli-thread",
|
|
"path": "packages/cli/src/cli.mjs",
|
|
"old": "threadCommand(rest, io, (p) => channelCallFor(p, io, deps), formatMessage)",
|
|
"new": "threadCommand(rest, io, (p) => callFor(p, io, deps), formatMessage)",
|
|
"test": "packages/cli/tests/channel-cli.test.mjs",
|
|
"killer": "CLI off, absent"
|
|
},
|
|
{
|
|
"check": "38-cli-talk",
|
|
"path": "packages/cli/src/cli.mjs",
|
|
"old": "const call = threadRef === undefined ? callFor(parsed, io, deps) : channelCallFor(parsed, io, deps);",
|
|
"new": "const call = callFor(parsed, io, deps);",
|
|
"test": "packages/cli/tests/channel-cli.test.mjs",
|
|
"killer": "CLI off, absent"
|
|
},
|
|
{
|
|
"check": "39-core-recovery",
|
|
"path": "packages/cli/src/cli.mjs",
|
|
"old": "pluginsCommand(rest, io, (p) => callFor(p, io, deps))",
|
|
"new": "pluginsCommand(rest, io, (p) => channelCallFor(p, io, deps))",
|
|
"test": "packages/cli/tests/channel-recovery.test.mjs",
|
|
"killer": "both channels off recover"
|
|
},
|
|
{
|
|
"check": "40-cli-exit",
|
|
"path": "packages/cli/src/cli.mjs",
|
|
"old": "[\"channel-disabled\", \"channel-config\"].includes(error.code) ? 3 : 2",
|
|
"new": "[\"channel-disabled\", \"channel-config\"].includes(error.code) ? 2 : 2",
|
|
"test": "packages/cli/tests/channel-cli.test.mjs",
|
|
"killer": "CLI off, absent"
|
|
},
|
|
{
|
|
"check": "41-webui-bypass",
|
|
"path": "packages/webui/src/chat.mjs",
|
|
"old": "const dispatch = createChannelCaller({ name: 'webui', call });",
|
|
"new": "const dispatch = call;",
|
|
"test": "packages/webui/tests/channel-chat.test.mjs",
|
|
"killer": "WebUI channel off returns"
|
|
},
|
|
{
|
|
"check": "42-webui-error-envelope",
|
|
"path": "packages/webui/src/chat.mjs",
|
|
"old": "if (err instanceof PluginError) throw new BusReadError(err.code, err.message);",
|
|
"new": "if (false) throw new BusReadError(err.code, err.message);",
|
|
"test": "packages/webui/tests/channel-chat.test.mjs",
|
|
"killer": "WebUI channel off returns"
|
|
},
|
|
{
|
|
"check": "43-webui-status",
|
|
"path": "packages/webui/src/chat-http.mjs",
|
|
"old": "'channel-disabled': 503",
|
|
"new": "'channel-disabled': 502",
|
|
"test": "packages/webui/tests/channel-chat.test.mjs",
|
|
"killer": "WebUI channel off returns"
|
|
},
|
|
{
|
|
"check": "44-webui-reflection",
|
|
"path": "packages/webui/src/chat-http.mjs",
|
|
"old": "return refuse(STATUS[code] ?? 502, code, outcome.sent);",
|
|
"new": "if (code === 'channel-disabled') return json(res, 503, { error: code, message: err.message });\n return refuse(STATUS[code] ?? 502, code, outcome.sent);",
|
|
"test": "packages/webui/tests/channel-chat.test.mjs",
|
|
"killer": "WebUI channel-disabled recovery text"
|
|
},
|
|
{
|
|
"check": "45-proof-admission",
|
|
"path": "packages/bus/src/server.mjs",
|
|
"old": "transient = cap = authenticateHuman(r.human);",
|
|
"new": "transient = cap = broker.bindHuman({ business: r.human.business, human: 'jason', via: 'cli', outsideAgent: true });",
|
|
"test": "packages/bus/tests/channel-proof.test.mjs",
|
|
"killer": "channel recovery still requires"
|
|
},
|
|
{
|
|
"check": "46-proof-path",
|
|
"path": "packages/bus/src/human.mjs",
|
|
"old": "p.argv[1] !== resolve(cliPath)",
|
|
"new": "false",
|
|
"test": "packages/bus/tests/channel-proof.test.mjs",
|
|
"killer": "channel recovery still requires"
|
|
},
|
|
{
|
|
"check": "47-proof-bytes",
|
|
"path": "packages/bus/src/human-cli.mjs",
|
|
"old": "// Transport shim used by S4,",
|
|
"new": "// Changed transport shim used by S4,",
|
|
"test": "packages/bus/tests/channel-proof.test.mjs",
|
|
"killer": "channel conversion preserves the four"
|
|
},
|
|
{
|
|
"check": "48-dispatch-lock",
|
|
"path": "packages/plugins/src/channel.mjs",
|
|
"old": " return async (verb, args = {}) => {\n const settings = await call(\"plugins\", {});\n if (!record(settings) || !record(settings.plugins)) {\n throw new PluginError(\"channel-config\", \"invalid channel settings response\");\n }\n const selection = Object.hasOwn(settings.plugins, \"channel\") ? { channel: settings.plugins.channel } : {};\n await loader.load(selection);\n const snapshot = loader.snapshot(\"channel\");\n const entry = snapshot.find(item => item.name === name);\n if (!entry) throw new PluginError(\"channel-disabled\", CHANNEL_RECOVERY, name);\n // No lock spans dispatch. Concurrent reads can proceed while a send awaits.\n return entry.module.dispatch({ verb, args }, { call });\n };",
|
|
"new": " let queue = Promise.resolve();\n return (verb, args = {}) => {\n const next = queue.then(async () => {\n const settings = await call(\"plugins\", {});\n if (!record(settings) || !record(settings.plugins)) {\n throw new PluginError(\"channel-config\", \"invalid channel settings response\");\n }\n const selection = Object.hasOwn(settings.plugins, \"channel\") ? { channel: settings.plugins.channel } : {};\n await loader.load(selection);\n const snapshot = loader.snapshot(\"channel\");\n const entry = snapshot.find(item => item.name === name);\n if (!entry) throw new PluginError(\"channel-disabled\", CHANNEL_RECOVERY, name);\n // No lock spans dispatch. Concurrent reads can proceed while a send awaits.\n return entry.module.dispatch({ verb, args }, { call });\n });\n queue = next.catch(() => {});\n return next;\n };",
|
|
"test": "packages/plugins/tests/channel.test.mjs",
|
|
"killer": "channel dispatch holds no selection lock"
|
|
},
|
|
{
|
|
"check": "49-cli-recovery-text",
|
|
"path": "packages/plugins/src/channel.mjs",
|
|
"old": "export const CHANNEL_RECOVERY = 'Run mosaic plugins to read the revision, then mosaic plugins set --file PATCH with plugins.channel set to [\"cli\",\"webui\"].';",
|
|
"new": "export const CHANNEL_RECOVERY = \"channel disabled\";",
|
|
"test": "packages/cli/tests/channel-cli.test.mjs",
|
|
"killer": "CLI off, absent"
|
|
},
|
|
{
|
|
"check": "50-webui-recovery-text",
|
|
"path": "packages/webui/src/chat-http.mjs",
|
|
"old": " if (code === 'channel-disabled') return 'Run mosaic plugins to read the revision, then mosaic plugins set --file PATCH with plugins.channel set to [\"cli\",\"webui\"].';",
|
|
"new": " if (code === 'channel-disabled') return 'channel disabled';",
|
|
"test": "packages/webui/tests/channel-chat.test.mjs",
|
|
"killer": "WebUI channel off returns"
|
|
}
|
|
]
|