{"record":{"id":"700ff9d8e3bb8622","repo":"kovidgoyal/kitty","slug":"unknown-test-type-s","errorCode":null,"errorMessage":"Unknown test type: %s","messagePattern":"Unknown test type: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"tools/cmd/pytest/main.go","lineNumber":20,"sourceCode":"\npackage pytest\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\n\t\"github.com/kovidgoyal/go-shm\"\n\t\"github.com/kovidgoyal/kitty/kittens/ssh\"\n\t\"github.com/kovidgoyal/kitty/tools/cli\"\n)\n\nvar _ = fmt.Print\n\nfunc test_integration_with_python(args []string) (rc int, err error) {\n\tswitch args[0] {\n\tdefault:\n\t\treturn 1, fmt.Errorf(\"Unknown test type: %s\", args[0])\n\tcase \"read\":\n\t\tdata, err := shm.ReadWithSizeAndUnlink(args[1])\n\t\tif err != nil {\n\t\t\treturn 1, err\n\t\t}\n\t\t_, err = os.Stdout.Write(data)\n\t\tif err != nil {\n\t\t\treturn 1, err\n\t\t}\n\tcase \"write\":\n\t\tdata, err := io.ReadAll(os.Stdin)\n\t\tif err != nil {\n\t\t\treturn 1, err\n\t\t}\n\t\tmmap, err := shm.CreateTemp(\"shmtest-\", uint64(len(data)+shm.NUM_BYTES_FOR_SIZE))\n\t\tif err != nil {\n\t\t\treturn 1, err\n\t\t}","sourceCodeStart":2,"sourceCodeEnd":38,"githubUrl":"https://github.com/kovidgoyal/kitty/blob/6d5d0c440603ad9bdf6dcd599f73f6dde21acb44/tools/cmd/pytest/main.go#L2-L38","documentation":"kitten's internal pytest helper dispatches on args[0] and only recognizes specific test types (read, etc.). Any other first argument yields this error with exit code 1.","triggerScenarios":"Invoking the hidden pytest integration command with an unrecognized subcommand token, e.g. `kitten pytest foo ...` where foo is not in the switch.","commonSituations":"This is an internal testing shim for kitty's Python integration tests; end users normally never call it — hitting it means an internal test harness was invoked with a wrong or outdated test type name.","solutions":["Do not invoke this internal command directly; it exists for kitty's own test suite","If writing kitty integration tests, use only the documented test types in the switch (e.g. read)","Update to a matching kitty source tree if test harness and binary versions diverged"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"known := map[string]bool{\"read\": true}\nif !known[args[0]] { return 1, fmt.Errorf(\"unsupported test type %q\", args[0]) }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Treat this command as kitty-internal; don't call it from user code","Keep test harness and kitty binary from the same source tree"],"tags":["internal","testing","kitty"],"backgroundTag":"unknown-subcommand","analyzedSha":"6d5d0c440603ad9bdf6dcd599f73f6dde21acb44","analyzedAt":"2026-08-27T14:20:20.142Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}