Repository: codecrafters-io/build-your-own-kafka
Pull request #31: Add TS support
Author: login: Arpan-206
Created: 2025-04-17T21:35:48Z | Merged: 2025-04-19T08:51:08Z



<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **New Features**
  - Introduced TypeScript starter templates and solution scaffolding for a Kafka challenge, including initial project structure, configuration files, and starter code for a Bun-based server application.
  - Added scripts to facilitate running and testing the application locally and on the CodeCrafters platform.
  - Provided Dockerfile support for Bun-based environments.

- **Documentation**
  - Added comprehensive README files with challenge descriptions, setup instructions, and usage guidance.
  - Included an explanation guide for initial implementation steps.

- **Chores**
  - Included configuration files for Git, TypeScript, and project metadata to streamline development and ensure consistency.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->


Diff:
diff --git a/compiled_starters/typescript/.codecrafters/compile.sh b/compiled_starters/typescript/.codecrafters/compile.sh
new file mode 100755
index 0000000..d8b7a95
--- /dev/null
+++ b/compiled_starters/typescript/.codecrafters/compile.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+#
+# This script is used to compile your program on CodeCrafters
+#
+# This runs before .codecrafters/run.sh
+#
+# Learn more: https://codecrafters.io/program-interface
+
+set -e # Exit on failure
+
+# (This file is empty since TypeScript programs don't use a compile step)
diff --git a/compiled_starters/typescript/.codecrafters/run.sh b/compiled_starters/typescript/.codecrafters/run.sh
new file mode 100755
index 0000000..f41df1f
--- /dev/null
+++ b/compiled_starters/typescript/.codecrafters/run.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+#
+# This script is used to run your program on CodeCrafters
+#
+# This runs after .codecrafters/compile.sh
+#
+# Learn more: https://codecrafters.io/program-interface
+
+set -e # Exit on failure
+
+exec bun run $(dirname $0)/app/main.ts "$@"
diff --git a/compiled_starters/typescript/.gitattributes b/compiled_starters/typescript/.gitattributes
new file mode 100644
index 0000000..176a458
--- /dev/null
+++ b/compiled_starters/typescript/.gitattributes
@@ -0,0 +1 @@
+* text=auto
diff --git a/compiled_starters/typescript/.gitignore b/compiled_starters/typescript/.gitignore
new file mode 100644
index 0000000..c2658d7
--- /dev/null
+++ b/compiled_starters/typescript/.gitignore
@@ -0,0 +1 @@
+node_modules/
diff --git a/compiled_starters/typescript/README.md b/compiled_starters/typescript/README.md
new file mode 100644
index 0000000..2a3172a
--- /dev/null
+++ b/compiled_starters/typescript/README.md
@@ -0,0 +1,34 @@
+![progress-banner](https://codecrafters.io/landing/images/default_progress_banners/kafka.png)
+
+This is a starting point for TypeScript solutions to the
+["Build Your Own Kafka" Challenge](https://codecrafters.io/challenges/kafka).
+
+In this challenge, you'll build a toy Kafka clone that's capable of accepting
+and responding to APIVersions & Fetch API requests. You'll also learn about
+encoding and decoding messages using the Kafka wire protocol. You'll also learn
+about handling the network protocol, event loops, TCP sockets and more.
+
+**Note**: If you're viewing this repo on GitHub, head over to
+[codecrafters.io](https://codecrafters.io) to try the challenge.
+
+# Passing the first stage
+
+The entry point for your Kafka implementation is in `app/main.ts`. Study and
+uncomment the relevant code, and push your changes to pass the first stage:
+
+```sh
+git commit -am "pass 1st stage" # any msg
+git push origin master
+```
+
+That's all!
+
+# Stage 2 & beyond
+
+Note: This section is for stages 2 and beyond.
+
+1. Ensure you have `bun (1.1)` installed locally
+1. Run `./your_program.sh` to run your Kafka broker, which is implemented in
+   `app/main.ts`.
+1. Commit your changes and run `git push origin master` to submit your solution
+   to CodeCrafters. Test output will be streamed to your terminal.
diff --git a/compiled_starters/typescript/app/main.ts b/compiled_starters/typescript/app/main.ts
new file mode 100644
index 0000000..b30e804
--- /dev/null
+++ b/compiled_starters/typescript/app/main.ts
@@ -0,0 +1,11 @@
+import net from "net";
+
+// You can use print statements as follows for debugging, they'll be visible when running tests.
+console.log("Logs from your program will appear here!");
+
+// Uncomment this block to pass the first stage
+// const server: net.Server = net.createServer((connection: net.Socket) => {
+//   // Handle connection
+// });
+//
+// server.listen(9092, "127.0.0.1");
diff --git a/compiled_starters/typescript/codecrafters.yml b/compiled_starters/typescript/codecrafters.yml
new file mode 100644
index 0000000..a263216
--- /dev/null
+++ b/compiled_starters/typescript/codecrafters.yml
@@ -0,0 +1,11 @@
+# Set this to true if you want debug logs.
+#
+# These can be VERY verbose, so we suggest turning them off
+# unless you really need them.
+debug: false
+
+# Use this to change the TypeScript version used to run your code
+# on Codecrafters.
+#
+# Available versions: bun-1.1
+language_pack: bun-1.1
diff --git a/compiled_starters/typescript/package.json b/compiled_starters/typescript/package.json
new file mode 100644
index 0000000..6c8c3e2
--- /dev/null
+++ b/compiled_starters/typescript/package.json
@@ -0,0 +1,11 @@
+{
+  "name": "@codecrafters/kafka",
+  "description": "Build your own Kafka challenge, from CodeCrafters",
+  "type": "module",
+  "scripts": {
+    "dev": "bun run app/main.ts"
+  },
+  "devDependencies": {
+    "@types/bun": "latest"
+  }
+}
diff --git a/compiled_starters/typescript/tsconfig.json b/compiled_starters/typescript/tsconfig.json
new file mode 100644
index 0000000..238655f
--- /dev/null
+++ b/compiled_starters/typescript/tsconfig.json
@@ -0,0 +1,27 @@
+{
+  "compilerOptions": {
+    // Enable latest features
+    "lib": ["ESNext", "DOM"],
+    "target": "ESNext",
+    "module": "ESNext",
+    "moduleDetection": "force",
+    "jsx": "react-jsx",
+    "allowJs": true,
+
+    // Bundler mode
+    "moduleResolution": "bundler",
+    "allowImportingTsExtensions": true,
+    "verbatimModuleSyntax": true,
+    "noEmit": true,
+
+    // Best practices
+    "strict": true,
+    "skipLibCheck": true,
+    "noFallthroughCasesInSwitch": true,
+
+    // Some stricter flags (disabled by default)
+    "noUnusedLocals": false,
+    "noUnusedParameters": false,
+    "noPropertyAccessFromIndexSignature": false
+  }
+}
diff --git a/compiled_starters/typescript/your_program.sh b/compiled_starters/typescript/your_program.sh
new file mode 100755
index 0000000..fcc2fd5
--- /dev/null
+++ b/compiled_starters/typescript/your_program.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+#
+# Use this script to run your program LOCALLY.
+#
+# Note: Changing this script WILL NOT affect how CodeCrafters runs your program.
+#
+# Learn more: https://codecrafters.io/program-interface
+
+set -e # Exit early if any commands fail
+
+# Copied from .codecrafters/run.sh
+#
+# - Edit this to change how your program runs locally
+# - Edit .codecrafters/run.sh to change how your program runs remotely
+exec bun run $(dirname $0)/app/main.ts "$@"
diff --git a/dockerfiles/bun-1.1.Dockerfile b/dockerfiles/bun-1.1.Dockerfile
new file mode 100644
index 0000000..e118d6f
--- /dev/null
+++ b/dockerfiles/bun-1.1.Dockerfile
@@ -0,0 +1,18 @@
+# syntax=docker/dockerfile:1.7-labs
+FROM oven/bun:1.1-alpine
+
+ENV CODECRAFTERS_DEPENDENCY_FILE_PATHS="package.json,bun.lockb"
+
+WORKDIR /app
+
+# .git & README.md are unique per-repository. We ignore them on first copy to prevent cache misses
+COPY --exclude=.git --exclude=README.md . /app
+
+# For reproducible builds.
+# This will install the exact versions of each package specified in the lockfile.
+# If package.json disagrees with bun.lockb, Bun will exit with an error. The lockfile will not be updated.
+RUN bun install --frozen-lockfile
+
+# If the node_modules directory exists, move it to /app-cached
+RUN mkdir -p /app-cached
+RUN if [ -d "/app/node_modules" ]; then mv /app/node_modules /app-cached; fi
diff --git a/solutions/typescript/01-vi6/code/.codecrafters/compile.sh b/solutions/typescript/01-vi6/code/.codecrafters/compile.sh
new file mode 100755
index 0000000..d8b7a95
--- /dev/null
+++ b/solutions/typescript/01-vi6/code/.codecrafters/compile.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+#
+# This script is used to compile your program on CodeCrafters
+#
+# This runs before .codecrafters/run.sh
+#
+# Learn more: https://codecrafters.io/program-interface
+
+set -e # Exit on failure
+
+# (This file is empty since TypeScript programs don't use a compile step)
diff --git a/solutions/typescript/01-vi6/code/.codecrafters/run.sh b/solutions/typescript/01-vi6/code/.codecrafters/run.sh
new file mode 100755
index 0000000..f41df1f
--- /dev/null
+++ b/solutions/typescript/01-vi6/code/.codecrafters/run.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+#
+# This script is used to run your program on CodeCrafters
+#
+# This runs after .codecrafters/compile.sh
+#
+# Learn more: https://codecrafters.io/program-interface
+
+set -e # Exit on failure
+
+exec bun run $(dirname $0)/app/main.ts "$@"
diff --git a/solutions/typescript/01-vi6/code/.gitattributes b/solutions/typescript/01-vi6/code/.gitattributes
new file mode 100644
index 0000000..176a458
--- /dev/null
+++ b/solutions/typescript/01-vi6/code/.gitattributes
@@ -0,0 +1 @@
+* text=auto
diff --git a/solutions/typescript/01-vi6/code/.gitignore b/solutions/typescript/01-vi6/code/.gitignore
new file mode 100644
index 0000000..c2658d7
--- /dev/null
+++ b/solutions/typescript/01-vi6/code/.gitignore
@@ -0,0 +1 @@
+node_modules/
diff --git a/solutions/typescript/01-vi6/code/README.md b/solutions/typescript/01-vi6/code/README.md
new file mode 100644
index 0000000..2a3172a
--- /dev/null
+++ b/solutions/typescript/01-vi6/code/README.md
@@ -0,0 +1,34 @@
+![progress-banner](https://codecrafters.io/landing/images/default_progress_banners/kafka.png)
+
+This is a starting point for TypeScript solutions to the
+["Build Your Own Kafka" Challenge](https://codecrafters.io/challenges/kafka).
+
+In this challenge, you'll build a toy Kafka clone that's capable of accepting
+and responding to APIVersions & Fetch API requests. You'll also learn about
+encoding and decoding messages using the Kafka wire protocol. You'll also learn
+about handling the network protocol, event loops, TCP sockets and more.
+
+**Note**: If you're viewing this repo on GitHub, head over to
+[codecrafters.io](https://codecrafters.io) to try the challenge.
+
+# Passing the first stage
+
+The entry point for your Kafka implementation is in `app/main.ts`. Study and
+uncomment the relevant code, and push your changes to pass the first stage:
+
+```sh
+git commit -am "pass 1st stage" # any msg
+git push origin master
+```
+
+That's all!
+
+# Stage 2 & beyond
+
+Note: This section is for stages 2 and beyond.
+
+1. Ensure you have `bun (1.1)` installed locally
+1. Run `./your_program.sh` to run your Kafka broker, which is implemented in
+   `app/main.ts`.
+1. Commit your changes and run `git push origin master` to submit your solution
+   to CodeCrafters. Test output will be streamed to your terminal.
diff --git a/solutions/typescript/01-vi6/code/app/main.ts b/solutions/typescript/01-vi6/code/app/main.ts
new file mode 100644
index 0000000..c9f0eb5
--- /dev/null
+++ b/solutions/typescript/01-vi6/code/app/main.ts
@@ -0,0 +1,7 @@
+import net from "net";
+
+const server: net.Server = net.createServer((connection: net.Socket) => {
+  // Handle connection
+});
+
+server.listen(9092, "127.0.0.1");
diff --git a/solutions/typescript/01-vi6/code/codecrafters.yml b/solutions/typescript/01-vi6/code/codecrafters.yml
new file mode 100644
index 0000000..a263216
--- /dev/null
+++ b/solutions/typescript/01-vi6/code/codecrafters.yml
@@ -0,0 +1,11 @@
+# Set this to true if you want debug logs.
+#
+# These can be VERY verbose, so we suggest turning them off
+# unless you really need them.
+debug: false
+
+# Use this to change the TypeScript version used to run your code
+# on Codecrafters.
+#
+# Available versions: bun-1.1
+language_pack: bun-1.1
diff --git a/solutions/typescript/01-vi6/code/package.json b/solutions/typescript/01-vi6/code/package.json
new file mode 100644
index 0000000..6c8c3e2
--- /dev/null
+++ b/solutions/typescript/01-vi6/code/package.json
@@ -0,0 +1,11 @@
+{
+  "name": "@codecrafters/kafka",
+  "description": "Build your own Kafka challenge, from CodeCrafters",
+  "type": "module",
+  "scripts": {
+    "dev": "bun run app/main.ts"
+  },
+  "devDependencies": {
+    "@types/bun": "latest"
+  }
+}
diff --git a/solutions/typescript/01-vi6/code/tsconfig.json b/solutions/typescript/01-vi6/code/tsconfig.json
new file mode 100644
index 0000000..238655f
--- /dev/null
+++ b/solutions/typescript/01-vi6/code/tsconfig.json
@@ -0,0 +1,27 @@
+{
+  "compilerOptions": {
+    // Enable latest features
+    "lib": ["ESNext", "DOM"],
+    "target": "ESNext",
+    "module": "ESNext",
+    "moduleDetection": "force",
+    "jsx": "react-jsx",
+    "allowJs": true,
+
+    // Bundler mode
+    "moduleResolution": "bundler",
+    "allowImportingTsExtensions": true,
+    "verbatimModuleSyntax": true,
+    "noEmit": true,
+
+    // Best practices
+    "strict": true,
+    "skipLibCheck": true,
+    "noFallthroughCasesInSwitch": true,
+
+    // Some stricter flags (disabled by default)
+    "noUnusedLocals": false,
+    "noUnusedParameters": false,
+    "noPropertyAccessFromIndexSignature": false
+  }
+}
diff --git a/solutions/typescript/01-vi6/code/your_program.sh b/solutions/typescript/01-vi6/code/your_program.sh
new file mode 100755
index 0000000..fcc2fd5
--- /dev/null
+++ b/solutions/typescript/01-vi6/code/your_program.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+#
+# Use this script to run your program LOCALLY.
+#
+# Note: Changing this script WILL NOT affect how CodeCrafters runs your program.
+#
+# Learn more: https://codecrafters.io/program-interface
+
+set -e # Exit early if any commands fail
+
+# Copied from .codecrafters/run.sh
+#
+# - Edit this to change how your program runs locally
+# - Edit .codecrafters/run.sh to change how your program runs remotely
+exec bun run $(dirname $0)/app/main.ts "$@"
diff --git a/solutions/typescript/01-vi6/diff/app/main.ts.diff b/solutions/typescript/01-vi6/diff/app/main.ts.diff
new file mode 100644
index 0000000..6c2aba1
--- /dev/null
+++ b/solutions/typescript/01-vi6/diff/app/main.ts.diff
@@ -0,0 +1,16 @@
+@@ -1,11 +1,7 @@
+ import net from "net";
+
+-// You can use print statements as follows for debugging, they'll be visible when running tests.
+-console.log("Logs from your program will appear here!");
++const server: net.Server = net.createServer((connection: net.Socket) => {
++  // Handle connection
++});
+
+-// Uncomment this block to pass the first stage
+-// const server: net.Server = net.createServer((connection: net.Socket) => {
+-//   // Handle connection
+-// });
+-//
+-// server.listen(9092, "127.0.0.1");
++server.listen(9092, "127.0.0.1");
diff --git a/solutions/typescript/01-vi6/explanation.md b/solutions/typescript/01-vi6/explanation.md
new file mode 100644
index 0000000..1ce14d1
--- /dev/null
+++ b/solutions/typescript/01-vi6/explanation.md
@@ -0,0 +1,20 @@
+The entry point for your Kafka implementation is in `app/main.ts`.
+
+Study and uncomment the relevant code: 
+
+```typescript
+// Uncomment this block to pass the first stage
+const server: net.Server = net.createServer((connection: net.Socket) => {
+  // Handle connection
+});
+
+server.listen(9092, "127.0.0.1");
+```
+
+Push your changes to pass the first stage:
+
+```
+git add .
+git commit -m "pass 1st stage" # any msg
+git push origin master
+```
diff --git a/starter_templates/typescript/code/.codecrafters/compile.sh b/starter_templates/typescript/code/.codecrafters/compile.sh
new file mode 100755
index 0000000..d8b7a95
--- /dev/null
+++ b/starter_templates/typescript/code/.codecrafters/compile.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+#
+# This script is used to compile your program on CodeCrafters
+#
+# This runs before .codecrafters/run.sh
+#
+# Learn more: https://codecrafters.io/program-interface
+
+set -e # Exit on failure
+
+# (This file is empty since TypeScript programs don't use a compile step)
diff --git a/starter_templates/typescript/code/.codecrafters/run.sh b/starter_templates/typescript/code/.codecrafters/run.sh
new file mode 100755
index 0000000..f41df1f
--- /dev/null
+++ b/starter_templates/typescript/code/.codecrafters/run.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+#
+# This script is used to run your program on CodeCrafters
+#
+# This runs after .codecrafters/compile.sh
+#
+# Learn more: https://codecrafters.io/program-interface
+
+set -e # Exit on failure
+
+exec bun run $(dirname $0)/app/main.ts "$@"
diff --git a/starter_templates/typescript/code/.gitignore b/starter_templates/typescript/code/.gitignore
new file mode 100644
index 0000000..c2658d7
--- /dev/null
+++ b/starter_templates/typescript/code/.gitignore
@@ -0,0 +1 @@
+node_modules/
diff --git a/starter_templates/typescript/code/app/main.ts b/starter_templates/typescript/code/app/main.ts
new file mode 100644
index 0000000..b30e804
--- /dev/null
+++ b/starter_templates/typescript/code/app/main.ts
@@ -0,0 +1,11 @@
+import net from "net";
+
+// You can use print statements as follows for debugging, they'll be visible when running tests.
+console.log("Logs from your program will appear here!");
+
+// Uncomment this block to pass the first stage
+// const server: net.Server = net.createServer((connection: net.Socket) => {
+//   // Handle connection
+// });
+//
+// server.listen(9092, "127.0.0.1");
diff --git a/starter_templates/typescript/code/package.json b/starter_templates/typescript/code/package.json
new file mode 100644
index 0000000..6c8c3e2
--- /dev/null
+++ b/starter_templates/typescript/code/package.json
@@ -0,0 +1,11 @@
+{
+  "name": "@codecrafters/kafka",
+  "description": "Build your own Kafka challenge, from CodeCrafters",
+  "type": "module",
+  "scripts": {
+    "dev": "bun run app/main.ts"
+  },
+  "devDependencies": {
+    "@types/bun": "latest"
+  }
+}
diff --git a/starter_templates/typescript/code/tsconfig.json b/starter_templates/typescript/code/tsconfig.json
new file mode 100644
index 0000000..238655f
--- /dev/null
+++ b/starter_templates/typescript/code/tsconfig.json
@@ -0,0 +1,27 @@
+{
+  "compilerOptions": {
+    // Enable latest features
+    "lib": ["ESNext", "DOM"],
+    "target": "ESNext",
+    "module": "ESNext",
+    "moduleDetection": "force",
+    "jsx": "react-jsx",
+    "allowJs": true,
+
+    // Bundler mode
+    "moduleResolution": "bundler",
+    "allowImportingTsExtensions": true,
+    "verbatimModuleSyntax": true,
+    "noEmit": true,
+
+    // Best practices
+    "strict": true,
+    "skipLibCheck": true,
+    "noFallthroughCasesInSwitch": true,
+
+    // Some stricter flags (disabled by default)
+    "noUnusedLocals": false,
+    "noUnusedParameters": false,
+    "noPropertyAccessFromIndexSignature": false
+  }
+}
diff --git a/starter_templates/typescript/config.yml b/starter_templates/typescript/config.yml
new file mode 100644
index 0000000..9abb315
--- /dev/null
+++ b/starter_templates/typescript/config.yml
@@ -0,0 +1,3 @@
+attributes:
+  required_executable: bun (1.1)
+  user_editable_file: app/main.ts


Reviews:
user: login: coderabbitai[bot]
body: **Actionable comments posted: 3**

<details>
<summary>🧹 Nitpick comments (19)</summary><blockquote>

<details>
<summary>starter_templates/typescript/code/tsconfig.json (1)</summary><blockquote>

`23-25`: **Recommend enabling additional strictness flags.**

Currently disabling `noUnusedLocals`, `noUnusedParameters`, and `noPropertyAccessFromIndexSignature` may hide dead code or unintended API usage. Consider setting these to `true` for cleaner, more maintainable code.

</blockquote></details>
<details>
<summary>starter_templates/typescript/code/package.json (2)</summary><blockquote>

`1-7`: **Add standard metadata fields**  
While the `name`, `description`, and `type` fields are set correctly, consider adding at least a `version` (e.g., `"0.0.1"`) and a `license` field to align with standard `package.json` conventions and improve clarity.

---

`8-11`: **Pin devDependency versions for reproducibility**  
Using `"latest"` for `@types/bun` may introduce untested breaking changes. Pin to a specific version or use caret notation (e.g., `"@types/bun": "^1.0.0"`) to ensure consistent installs.

</blockquote></details>
<details>
<summary>starter_templates/typescript/code/.codecrafters/run.sh (1)</summary><blockquote>

`11-11`: **Quote the script path to prevent word splitting.**

Shellcheck SC2046 warns about unquoted command substitutions which may break if the script path contains spaces. Update the exec command to:

```diff
-exec bun run $(dirname $0)/app/main.ts "$@"
+exec bun run "$(dirname "$0")/app/main.ts" "$@"
```

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 Shellcheck (0.10.0)</summary>

[warning] 11-11: Quote this to prevent word splitting.

(SC2046)

</details>

</details>

</blockquote></details>
<details>
<summary>compiled_starters/typescript/.codecrafters/run.sh (1)</summary><blockquote>

`11-11`: **Quote the script path to prevent word splitting.**

Shellcheck SC2046: wrap the command substitution in quotes to avoid issues if the directory path contains spaces:

```diff
-exec bun run $(dirname $0)/app/main.ts "$@"
+exec bun run "$(dirname "$0")/app/main.ts" "$@"
```

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 Shellcheck (0.10.0)</summary>

[warning] 11-11: Quote this to prevent word splitting.

(SC2046)

</details>

</details>

</blockquote></details>
<details>
<summary>solutions/typescript/01-vi6/code/your_program.sh (1)</summary><blockquote>

`15-15`: **Fix command substitution quoting to prevent word splitting**

The `dirname $0` command substitution should be quoted to prevent issues with paths containing spaces.

```diff
-exec bun run $(dirname $0)/app/main.ts "$@"
+exec bun run "$(dirname $0)/app/main.ts" "$@"
```

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 Shellcheck (0.10.0)</summary>

[warning] 15-15: Quote this to prevent word splitting.

(SC2046)

</details>

</details>

</blockquote></details>
<details>
<summary>compiled_starters/typescript/your_program.sh (1)</summary><blockquote>

`15-15`: **Fix command substitution quoting to prevent word splitting**

The `dirname $0` command substitution should be quoted to prevent issues with paths containing spaces.

```diff
-exec bun run $(dirname $0)/app/main.ts "$@"
+exec bun run "$(dirname $0)/app/main.ts" "$@"
```

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 Shellcheck (0.10.0)</summary>

[warning] 15-15: Quote this to prevent word splitting.

(SC2046)

</details>

</details>

</blockquote></details>
<details>
<summary>solutions/typescript/01-vi6/code/.codecrafters/run.sh (1)</summary><blockquote>

`11-11`: **Fix command substitution quoting to prevent word splitting**

The `dirname $0` command substitution should be quoted to prevent issues with paths containing spaces.

```diff
-exec bun run $(dirname $0)/app/main.ts "$@"
+exec bun run "$(dirname $0)/app/main.ts" "$@"
```

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 Shellcheck (0.10.0)</summary>

[warning] 11-11: Quote this to prevent word splitting.

(SC2046)

</details>

</details>

</blockquote></details>
<details>
<summary>solutions/typescript/01-vi6/code/package.json (1)</summary><blockquote>

`9-9`: **Consider pinning the dependency version**

Using "latest" for `@types/bun` might lead to inconsistent builds if breaking changes are introduced. Consider pinning to a specific version for better reproducibility.

```diff
-    "@types/bun": "latest"
+    "@types/bun": "^1.0.0"  # Replace with the latest stable version
```

</blockquote></details>
<details>
<summary>compiled_starters/typescript/README.md (2)</summary><blockquote>

`30-34`: **Fix numbered list formatting and add Bun installation instructions.**

The numbered list in the "Stage 2 & beyond" section uses "1." for all items instead of sequential numbering. Additionally, users may need guidance on installing Bun.


```diff
-1. Ensure you have `bun (1.1)` installed locally
-1. Run `./your_program.sh` to run your Kafka broker, which is implemented in
+1. Ensure you have `bun (1.1)` installed locally. [Installation instructions](https://bun.sh/docs/installation)
+2. Run `./your_program.sh` to run your Kafka broker, which is implemented in
    `app/main.ts`.
-1. Commit your changes and run `git push origin master` to submit your solution
+3. Commit your changes and run `git push origin master` to submit your solution
    to CodeCrafters. Test output will be streamed to your terminal.
```

---

`1-35`: **Ensure consistency between duplicate README files.**

This README is identical to `solutions/typescript/01-vi6/code/README.md`. Consider implementing a process to maintain consistency between these files when either one is updated.


You might want to:
1. Use a templating system to generate both files from a single source
2. Add a note in both files indicating they should be kept in sync
3. Create a CI check to verify that duplicate README files remain consistent

</blockquote></details>
<details>
<summary>compiled_starters/typescript/tsconfig.json (1)</summary><blockquote>

`4-9`: **React JSX support included but potentially unused**

The configuration includes React JSX support (`"jsx": "react-jsx"` and DOM library), but based on the main.ts template which appears to be a simple Bun server, React might not be needed. Consider removing React-specific configurations if not used to simplify the setup.

</blockquote></details>
<details>
<summary>starter_templates/typescript/code/app/main.ts (2)</summary><blockquote>

`20-26`: **Duplicate event handling approaches**

There are two different approaches for handling client connections:
1. Using the socket's `open` method in the Bun.listen configuration
2. Using the server's `connection` event listener

This might confuse users about which approach to implement. Consider standardizing on one approach or adding comments explaining when to use each.

---

`4-6`: **Inconsistent starter code comments**

Line 4 says "Uncomment this block to pass the first stage" but the block only contains a console.log statement that mentions implementing starter code rather than actual implementation code. This might confuse users about what exactly they need to uncomment.

```diff
- // Uncomment this block to pass the first stage
- console.log("TODO: Implement starter code");
+ // TODO: Implement starter code below
+ console.log("Implement your Kafka server here!");
```

</blockquote></details>
<details>
<summary>dockerfiles/bun-1.1.Dockerfile (1)</summary><blockquote>

`17-18`: **Consider simplifying node_modules caching logic**

The current approach creates a directory and conditionally moves `node_modules`. This could be simplified.


```diff
- RUN mkdir -p /app-cached
- RUN if [ -d "/app/node_modules" ]; then mv /app/node_modules /app-cached; fi
+ # Create directory and move node_modules in one command (only if it exists)
+ RUN mkdir -p /app-cached && [ -d "/app/node_modules" ] && mv /app/node_modules /app-cached || true
```

</blockquote></details>
<details>
<summary>solutions/typescript/01-vi6/code/tsconfig.json (2)</summary><blockquote>

`1-27`: **Consider using a shared TypeScript configuration**

This tsconfig.json is identical to the one in `compiled_starters/typescript/tsconfig.json`. Consider using a shared base configuration that both files can extend to reduce duplication and ensure consistency.


You could create a base `tsconfig.base.json` file and have both configurations extend it:

```json
// tsconfig.base.json
{
  "compilerOptions": {
    // All your common settings here
  }
}

// In each tsconfig.json
{
  "extends": "../../tsconfig.base.json", // Adjust path as needed
  "compilerOptions": {
    // Any overrides or additions specific to this context
  }
}
```

---

`8-8`: **React JSX support included but potentially unused**

Same as in the starter configuration - the React JSX support might be unnecessary for this Kafka challenge which appears to use Bun's server capabilities rather than React.

</blockquote></details>
<details>
<summary>solutions/typescript/01-vi6/code/app/main.ts (1)</summary><blockquote>

`1-2`: **Add condition to TODO message**

The current TODO message will be printed even when users uncomment the server code, which could be confusing. Consider wrapping it in a condition that only runs when the server code is commented out.


```diff
// Uncomment this block to pass the first stage
-console.log("TODO: Implement starter code");
+// Remove this line after implementing the server
+if (typeof server === 'undefined') {
+  console.log("TODO: Implement starter code");
+}
```

</blockquote></details>
<details>
<summary>solutions/typescript/01-vi6/code/README.md (1)</summary><blockquote>

`30-32`: **Add Bun installation instructions**

While you mention that Bun 1.1 is required, it would be helpful to provide brief installation instructions or a link to the official installation guide for users who may not be familiar with Bun.


```diff
-1. Ensure you have `bun (1.1)` installed locally
+1. Ensure you have `bun (1.1)` installed locally
+   ```sh
+   # Install Bun using the official installer
+   curl -fsSL https://bun.sh/install | bash
+   # Verify installation and version
+   bun --version
+   ```
+   For more details, visit [bun.sh](https://bun.sh)
 1. Run `./your_program.sh` to run your Kafka broker, which is implemented in
    `app/main.ts`.
```

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

**Configuration used: CodeRabbit UI**
**Review profile: CHILL**
**Plan: Pro**

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 0dfcaa80c3403cf9ab88c5b9170ed03e7658fb4a and d85282a1415371cc917fae4c2972fabd5720af27.

</details>

<details>
<summary>📒 Files selected for processing (28)</summary>

* `compiled_starters/typescript/.codecrafters/compile.sh` (1 hunks)
* `compiled_starters/typescript/.codecrafters/run.sh` (1 hunks)
* `compiled_starters/typescript/.gitattributes` (1 hunks)
* `compiled_starters/typescript/.gitignore` (1 hunks)
* `compiled_starters/typescript/README.md` (1 hunks)
* `compiled_starters/typescript/app/main.ts` (1 hunks)
* `compiled_starters/typescript/codecrafters.yml` (1 hunks)
* `compiled_starters/typescript/package.json` (1 hunks)
* `compiled_starters/typescript/tsconfig.json` (1 hunks)
* `compiled_starters/typescript/your_program.sh` (1 hunks)
* `dockerfiles/bun-1.1.Dockerfile` (1 hunks)
* `solutions/typescript/01-vi6/code/.codecrafters/compile.sh` (1 hunks)
* `solutions/typescript/01-vi6/code/.codecrafters/run.sh` (1 hunks)
* `solutions/typescript/01-vi6/code/.gitattributes` (1 hunks)
* `solutions/typescript/01-vi6/code/.gitignore` (1 hunks)
* `solutions/typescript/01-vi6/code/README.md` (1 hunks)
* `solutions/typescript/01-vi6/code/app/main.ts` (1 hunks)
* `solutions/typescript/01-vi6/code/codecrafters.yml` (1 hunks)
* `solutions/typescript/01-vi6/code/package.json` (1 hunks)
* `solutions/typescript/01-vi6/code/tsconfig.json` (1 hunks)
* `solutions/typescript/01-vi6/code/your_program.sh` (1 hunks)
* `starter_templates/typescript/code/.codecrafters/compile.sh` (1 hunks)
* `starter_templates/typescript/code/.codecrafters/run.sh` (1 hunks)
* `starter_templates/typescript/code/.gitignore` (1 hunks)
* `starter_templates/typescript/code/app/main.ts` (1 hunks)
* `starter_templates/typescript/code/package.json` (1 hunks)
* `starter_templates/typescript/code/tsconfig.json` (1 hunks)
* `starter_templates/typescript/config.yml` (1 hunks)

</details>

<details>
<summary>🧰 Additional context used</summary>

<details>
<summary>🪛 GitHub Actions: Test</summary>

<details>
<summary>solutions/typescript/01-vi6/code/.codecrafters/compile.sh</summary>

[error] 1-1: The operation was canceled during execution of the compile.sh script.

</details>
<details>
<summary>starter_templates/typescript/code/.codecrafters/compile.sh</summary>

[error] 1-1: The operation was canceled during execution of the compile.sh script.

</details>
<details>
<summary>compiled_starters/typescript/.codecrafters/compile.sh</summary>

[error] 1-1: The operation was canceled during execution of the compile.sh script.

</details>

</details>
<details>
<summary>🪛 Shellcheck (0.10.0)</summary>

<details>
<summary>starter_templates/typescript/code/.codecrafters/run.sh</summary>

[warning] 11-11: Quote this to prevent word splitting.

(SC2046)

</details>
<details>
<summary>compiled_starters/typescript/your_program.sh</summary>

[warning] 15-15: Quote this to prevent word splitting.

(SC2046)

</details>
<details>
<summary>solutions/typescript/01-vi6/code/your_program.sh</summary>

[warning] 15-15: Quote this to prevent word splitting.

(SC2046)

</details>
<details>
<summary>compiled_starters/typescript/.codecrafters/run.sh</summary>

[warning] 11-11: Quote this to prevent word splitting.

(SC2046)

</details>
<details>
<summary>solutions/typescript/01-vi6/code/.codecrafters/run.sh</summary>

[warning] 11-11: Quote this to prevent word splitting.

(SC2046)

</details>

</details>
<details>
<summary>🪛 Hadolint (2.12.0)</summary>

<details>
<summary>dockerfiles/bun-1.1.Dockerfile</summary>

[error] 9-9: invalid flag: --exclude

(DL1000)

</details>

</details>

</details>

<details>
<summary>🔇 Additional comments (19)</summary><blockquote>

<details>
<summary>solutions/typescript/01-vi6/code/.gitattributes (1)</summary>

`1-1`: **Enable consistent line endings across platforms.**

The `* text=auto` setting ensures Git normalizes line endings automatically, which is important for cross-platform collaboration.

</details>
<details>
<summary>starter_templates/typescript/code/.gitignore (1)</summary>

`1-1`: **Ignore `node_modules` directory.**

Including `node_modules/` in `.gitignore` prevents committing dependency artifacts and keeps the repository clean.

</details>
<details>
<summary>compiled_starters/typescript/.gitattributes (1)</summary>

`1-1`: **Normalize line endings for compiled starter files.**

Using `* text=auto` ensures the compiled starter inherits consistent line-ending behavior.

</details>
<details>
<summary>starter_templates/typescript/code/tsconfig.json (3)</summary>

`3-9`: **Modern ECMAScript and React JSX settings are correct.**

Leveraging `"lib": ["ESNext", "DOM"]`, `"target": "ESNext"`, and React’s new JSX transform aligns with current best practices and the Bun runtime environment.

---

`12-15`: **Bundler-focused module resolution and no-emit configuration.**

Configuring `"moduleResolution": "bundler"`, enabling TS extensions, and `"noEmit": true` matches the Bun workflow by deferring build handling to runtime.

---

`18-20`: **Strict type-checking enforced.**

Enabling `"strict": true` along with `"skipLibCheck": true` and `"noFallthroughCasesInSwitch": true` provides robust type safety while avoiding unnecessary library checks.

</details>
<details>
<summary>starter_templates/typescript/config.yml (1)</summary>

`1-3`: **Define required executable and user-editable file.**

Specifying `bun (1.1)` as the required runtime and `app/main.ts` as the entry point aligns with the CodeCrafters platform configuration.

</details>
<details>
<summary>compiled_starters/typescript/.gitignore (1)</summary>

`1-1`: **Correctly ignoring dependencies folder**  
The `.gitignore` appropriately excludes `node_modules/`, preventing committed dependency files in the compiled starter.

</details>
<details>
<summary>solutions/typescript/01-vi6/code/.gitignore (1)</summary>

`1-1`: **Correctly ignoring dependencies folder**  
The `.gitignore` appropriately excludes `node_modules/`, preventing committed dependency files in the solution code.

</details>
<details>
<summary>solutions/typescript/01-vi6/code/codecrafters.yml (1)</summary>

`5-11`: **Configuration options are clear and aligned**  
The `codecrafters.yml` correctly sets `debug: false` and `language_pack: bun-1.1` with helpful comments—this will produce a predictable, non-verbose run on the specified Bun version.

</details>
<details>
<summary>compiled_starters/typescript/codecrafters.yml (1)</summary>

`5-11`: **Consistent runtime configuration**  
This file mirrors the starter settings by defining `debug: false` and `language_pack: bun-1.1`, ensuring the compiled starter uses the same environment.

</details>
<details>
<summary>starter_templates/typescript/code/.codecrafters/run.sh (1)</summary>

`1-12`: <details>
<summary>✅ Verification successful</summary>

**Ensure the run script is executable.**

This `run.sh` must have the executable bit set (`chmod +x`) so that CodeCrafters and CI can invoke it. Without it, the run step may be skipped or canceled.

---

🏁 Script executed:

```shell
#!/bin/bash
# Verify executable bit on run.sh
git ls-tree HEAD starter_templates/typescript/code/.codecrafters/run.sh
```

Length of output: 181

---



</details>

**Executable Bit Already Set**

The `run.sh` script at `starter_templates/typescript/code/.codecrafters/run.sh` is already marked as executable (`100755` in Git). No further action is needed.

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 Shellcheck (0.10.0)</summary>

[warning] 11-11: Quote this to prevent word splitting.

(SC2046)

</details>

</details>

</details>
<details>
<summary>starter_templates/typescript/code/.codecrafters/compile.sh (1)</summary>

`1-12`: <details>
<summary>✅ Verification successful</summary>

**Ensure the compile script is executable.**

The no-op `compile.sh` is valid for TypeScript, but it must be marked executable so CodeCrafters and CI can run it. Otherwise, the compile step may be canceled or error out.

---

🏁 Script executed:

```shell
#!/bin/bash
# Verify executable bit on compile.sh
git ls-tree HEAD starter_templates/typescript/code/.codecrafters/compile.sh
```

Length of output: 189

---



</details>

**Executable bit is already set on `compile.sh`.**

- `starter_templates/typescript/code/.codecrafters/compile.sh` is mode `100755` (executable), so no changes are needed.

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 GitHub Actions: Test</summary>

[error] 1-1: The operation was canceled during execution of the compile.sh script.

</details>

</details>

</details>
<details>
<summary>compiled_starters/typescript/.codecrafters/compile.sh (1)</summary>

`1-12`: <details>
<summary>✅ Verification successful</summary>

**Ensure the compile script is executable.**

Make sure `compile.sh` here has the executable permission (`chmod +x`). Without it, the CI or CodeCrafters interface may cancel or skip the compile step.

---

🏁 Script executed:

```shell
#!/bin/bash
# Verify executable bit on compile.sh
git ls-tree HEAD compiled_starters/typescript/.codecrafters/compile.sh
```

Length of output: 179

---



</details>

**compile.sh executable permission verified**

The file `compiled_starters/typescript/.codecrafters/compile.sh` is already set to mode 755, so it’s executable by CI/CodeCrafters. No further action required.

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 GitHub Actions: Test</summary>

[error] 1-1: The operation was canceled during execution of the compile.sh script.

</details>

</details>

</details>
<details>
<summary>solutions/typescript/01-vi6/code/.codecrafters/compile.sh (1)</summary>

`1-12`: <details>
<summary>✅ Verification successful</summary>

**Ensure the compile script is executable.**

The empty `compile.sh` must be committed with executable permissions so that the build pipeline doesn’t cancel or fail the compile step.

---

🏁 Script executed:

```shell
#!/bin/bash
# Verify executable bit on compile.sh
git ls-tree HEAD solutions/typescript/01-vi6/code/.codecrafters/compile.sh
```

Length of output: 187

---



</details>

**No action needed: `compile.sh` is already executable**  
The file `solutions/typescript/01-vi6/code/.codecrafters/compile.sh` is committed with mode `100755`, confirming it has the executable bit set.

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 GitHub Actions: Test</summary>

[error] 1-1: The operation was canceled during execution of the compile.sh script.

</details>

</details>

</details>
<details>
<summary>compiled_starters/typescript/.codecrafters/run.sh (1)</summary>

`1-12`: <details>
<summary>✅ Verification successful</summary>

**Ensure the run script is executable.**

Verify that `run.sh` has the executable bit set so that CodeCrafters and CI can execute it without errors.

---

🏁 Script executed:

```shell
#!/bin/bash
# Verify executable bit on run.sh
git ls-tree HEAD compiled_starters/typescript/.codecrafters/run.sh
```

Length of output: 171

---



</details>

**Confirmed executable permission on run.sh**

The `git ls-tree` output shows `100755` for `compiled_starters/typescript/.codecrafters/run.sh`, so the executable bit is already set. No changes required.

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 Shellcheck (0.10.0)</summary>

[warning] 11-11: Quote this to prevent word splitting.

(SC2046)

</details>

</details>

</details>
<details>
<summary>compiled_starters/typescript/app/main.ts (1)</summary>

`1-26`: **LGTM - Appropriate starter template for TypeScript**

The template provides helpful commented-out code and instructions for implementing a Kafka server using Bun's TCP server capabilities. The code structure is clean and provides a good starting point for the challenge.

</details>
<details>
<summary>compiled_starters/typescript/tsconfig.json (1)</summary>

`1-27`: **LGTM: Comprehensive TypeScript configuration**

The TypeScript configuration is well-structured with modern settings targeting ESNext, appropriate module resolution for bundlers, and good defaults for type safety with the `strict` flag enabled.

</details>
<details>
<summary>starter_templates/typescript/code/app/main.ts (1)</summary>

`1-26`: **LGTM: Well-structured starter template**

The starter template provides clear commented-out code that guides users on implementing a basic Bun server for the Kafka challenge, with helpful debugging statements included.

</details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->
state: COMMENTED
author_association: NONE
submitted_at: 2025-04-17T21:40:21Z
user: login: coderabbitai[bot]
body: **Actionable comments posted: 1**

<details>
<summary>♻️ Duplicate comments (3)</summary><blockquote>

<details>
<summary>dockerfiles/bun-1.1.Dockerfile (1)</summary><blockquote>

`9-9`: **Fix invalid `--exclude` flag in COPY command**

The `--exclude` flag in the COPY command is flagged by Hadolint as invalid. This syntax is specific to BuildKit's newer syntax but may not work with all Docker versions.

For broader compatibility, consider one of these alternatives:

```diff
- COPY --exclude=.git --exclude=README.md . /app
+ # Option 1: Use .dockerignore file instead
+ COPY . /app
```

```diff
- COPY --exclude=.git --exclude=README.md . /app
+ # Option 2: Copy specific directories/files
+ COPY package.json bun.lockb app/ tsconfig.json /app/
```

Note: While you're using `# syntax=docker/dockerfile:1.7-labs` which supports this feature, it's still worth considering more standard approaches for compatibility reasons.

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 Hadolint (2.12.0)</summary>

[error] 9-9: invalid flag: --exclude

(DL1000)

</details>

</details>

</blockquote></details>
<details>
<summary>compiled_starters/typescript/your_program.sh (1)</summary><blockquote>

`15-15`: **Duplicate: Quote the `dirname` substitution to prevent word splitting**  
Same issue as in the solution runner—quote the path:

```diff
-exec bun run $(dirname $0)/app/main.ts "$@"
+exec bun run "$(dirname "$0")/app/main.ts" "$@"
```

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 Shellcheck (0.10.0)</summary>

[warning] 15-15: Quote this to prevent word splitting.

(SC2046)

</details>

</details>

</blockquote></details>
<details>
<summary>solutions/typescript/01-vi6/code/.codecrafters/run.sh (1)</summary><blockquote>

`11-11`: **Duplicate: Quote the `dirname` substitution to prevent word splitting**  
As with the local runner, wrap the substitution in quotes:

```diff
-exec bun run $(dirname $0)/app/main.ts "$@"
+exec bun run "$(dirname "$0")/app/main.ts" "$@"
```

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 Shellcheck (0.10.0)</summary>

[warning] 11-11: Quote this to prevent word splitting.

(SC2046)

</details>

</details>

</blockquote></details>

</blockquote></details>

<details>
<summary>🧹 Nitpick comments (3)</summary><blockquote>

<details>
<summary>starter_templates/typescript/code/.codecrafters/run.sh (1)</summary><blockquote>

`11-11`: **Quote the dirname command to prevent word splitting**

The `$(dirname $0)` command should be quoted to prevent word splitting, especially if the path contains spaces.

```diff
- exec bun run $(dirname $0)/app/main.ts "$@"
+ exec bun run "$(dirname "$0")"/app/main.ts "$@"
```

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 Shellcheck (0.10.0)</summary>

[warning] 11-11: Quote this to prevent word splitting.

(SC2046)

</details>

</details>

</blockquote></details>
<details>
<summary>compiled_starters/typescript/.codecrafters/run.sh (1)</summary><blockquote>

`11-11`: **Quote the dirname command to prevent word splitting**

The `$(dirname $0)` command should be quoted to prevent word splitting, especially if the path contains spaces.

```diff
- exec bun run $(dirname $0)/app/main.ts "$@"
+ exec bun run "$(dirname "$0")"/app/main.ts "$@"
```

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 Shellcheck (0.10.0)</summary>

[warning] 11-11: Quote this to prevent word splitting.

(SC2046)

</details>

</details>

</blockquote></details>
<details>
<summary>solutions/typescript/01-vi6/explanation.md (1)</summary><blockquote>

`12-16`: **Specify language for fenced code block**

Add a language identifier to the fenced code block to enable proper syntax highlighting and improve readability.

```diff
-```
+```bash
 git add .
 git commit -m "pass 1st stage" # any msg
 git push origin master
```

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 markdownlint-cli2 (0.17.2)</summary>

12-12: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)

</details>

</details>

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

**Configuration used: CodeRabbit UI**
**Review profile: CHILL**
**Plan: Pro (Legacy)**

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between d85282a1415371cc917fae4c2972fabd5720af27 and 09af81f57ac1e1190cd0501d2d5c5419ccf8c56e.

</details>

<details>
<summary>📒 Files selected for processing (30)</summary>

* `compiled_starters/typescript/.codecrafters/compile.sh` (1 hunks)
* `compiled_starters/typescript/.codecrafters/run.sh` (1 hunks)
* `compiled_starters/typescript/.gitattributes` (1 hunks)
* `compiled_starters/typescript/.gitignore` (1 hunks)
* `compiled_starters/typescript/README.md` (1 hunks)
* `compiled_starters/typescript/app/main.ts` (1 hunks)
* `compiled_starters/typescript/codecrafters.yml` (1 hunks)
* `compiled_starters/typescript/package.json` (1 hunks)
* `compiled_starters/typescript/tsconfig.json` (1 hunks)
* `compiled_starters/typescript/your_program.sh` (1 hunks)
* `dockerfiles/bun-1.1.Dockerfile` (1 hunks)
* `solutions/typescript/01-vi6/code/.codecrafters/compile.sh` (1 hunks)
* `solutions/typescript/01-vi6/code/.codecrafters/run.sh` (1 hunks)
* `solutions/typescript/01-vi6/code/.gitattributes` (1 hunks)
* `solutions/typescript/01-vi6/code/.gitignore` (1 hunks)
* `solutions/typescript/01-vi6/code/README.md` (1 hunks)
* `solutions/typescript/01-vi6/code/app/main.ts` (1 hunks)
* `solutions/typescript/01-vi6/code/codecrafters.yml` (1 hunks)
* `solutions/typescript/01-vi6/code/package.json` (1 hunks)
* `solutions/typescript/01-vi6/code/tsconfig.json` (1 hunks)
* `solutions/typescript/01-vi6/code/your_program.sh` (1 hunks)
* `solutions/typescript/01-vi6/diff/app/main.ts.diff` (1 hunks)
* `solutions/typescript/01-vi6/explanation.md` (1 hunks)
* `starter_templates/typescript/code/.codecrafters/compile.sh` (1 hunks)
* `starter_templates/typescript/code/.codecrafters/run.sh` (1 hunks)
* `starter_templates/typescript/code/.gitignore` (1 hunks)
* `starter_templates/typescript/code/app/main.ts` (1 hunks)
* `starter_templates/typescript/code/package.json` (1 hunks)
* `starter_templates/typescript/code/tsconfig.json` (1 hunks)
* `starter_templates/typescript/config.yml` (1 hunks)

</details>

<details>
<summary>✅ Files skipped from review due to trivial changes (4)</summary>

* solutions/typescript/01-vi6/diff/app/main.ts.diff
* compiled_starters/typescript/app/main.ts
* starter_templates/typescript/code/.codecrafters/compile.sh
* solutions/typescript/01-vi6/code/codecrafters.yml

</details>

<details>
<summary>🚧 Files skipped from review as they are similar to previous changes (18)</summary>

* solutions/typescript/01-vi6/code/.gitattributes
* compiled_starters/typescript/.gitignore
* starter_templates/typescript/code/.gitignore
* starter_templates/typescript/config.yml
* compiled_starters/typescript/.gitattributes
* solutions/typescript/01-vi6/code/.gitignore
* compiled_starters/typescript/.codecrafters/compile.sh
* solutions/typescript/01-vi6/code/app/main.ts
* compiled_starters/typescript/tsconfig.json
* solutions/typescript/01-vi6/code/.codecrafters/compile.sh
* solutions/typescript/01-vi6/code/package.json
* compiled_starters/typescript/package.json
* compiled_starters/typescript/README.md
* starter_templates/typescript/code/tsconfig.json
* solutions/typescript/01-vi6/code/README.md
* starter_templates/typescript/code/package.json
* compiled_starters/typescript/codecrafters.yml
* solutions/typescript/01-vi6/code/tsconfig.json

</details>

<details>
<summary>🧰 Additional context used</summary>

<details>
<summary>🪛 Shellcheck (0.10.0)</summary>

<details>
<summary>compiled_starters/typescript/.codecrafters/run.sh</summary>

[warning] 11-11: Quote this to prevent word splitting.

(SC2046)

</details>
<details>
<summary>compiled_starters/typescript/your_program.sh</summary>

[warning] 15-15: Quote this to prevent word splitting.

(SC2046)

</details>
<details>
<summary>solutions/typescript/01-vi6/code/.codecrafters/run.sh</summary>

[warning] 11-11: Quote this to prevent word splitting.

(SC2046)

</details>
<details>
<summary>solutions/typescript/01-vi6/code/your_program.sh</summary>

[warning] 15-15: Quote this to prevent word splitting.

(SC2046)

</details>
<details>
<summary>starter_templates/typescript/code/.codecrafters/run.sh</summary>

[warning] 11-11: Quote this to prevent word splitting.

(SC2046)

</details>

</details>
<details>
<summary>🪛 GitHub Actions: Test</summary>

<details>
<summary>compiled_starters/typescript/your_program.sh</summary>

[error] 1-1: Test failed: The program terminated unexpectedly. A Kafka server is expected to be a long-running process.

</details>
<details>
<summary>solutions/typescript/01-vi6/code/your_program.sh</summary>

[error] 1-1: Test failed: The program terminated unexpectedly. A Kafka server is expected to be a long-running process.

</details>

</details>
<details>
<summary>🪛 Hadolint (2.12.0)</summary>

<details>
<summary>dockerfiles/bun-1.1.Dockerfile</summary>

[error] 9-9: invalid flag: --exclude

(DL1000)

</details>

</details>
<details>
<summary>🪛 markdownlint-cli2 (0.17.2)</summary>

<details>
<summary>solutions/typescript/01-vi6/explanation.md</summary>

12-12: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)

</details>

</details>

</details>

<details>
<summary>🔇 Additional comments (3)</summary><blockquote>

<details>
<summary>starter_templates/typescript/code/app/main.ts (1)</summary>

`1-6`: **LGTM! Simple and well-structured starter template**

This starter template is clean and provides clear instructions for users. The commented-out code section with implementation instructions makes it easy for users to understand what they need to do to pass the first stage.

</details>
<details>
<summary>solutions/typescript/01-vi6/code/your_program.sh (1)</summary>

`1-16`: **Ensure the program remains running as a Kafka server**  
The pipeline error indicates: “Test failed: The program terminated unexpectedly. A Kafka server is expected to be a long-running process.” Verify that `app/main.ts` implements a persistent event loop or server that does not exit immediately when invoked by this script.

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 Shellcheck (0.10.0)</summary>

[warning] 15-15: Quote this to prevent word splitting.

(SC2046)

</details>
<details>
<summary>🪛 GitHub Actions: Test</summary>

[error] 1-1: Test failed: The program terminated unexpectedly. A Kafka server is expected to be a long-running process.

</details>

</details>

</details>
<details>
<summary>solutions/typescript/01-vi6/code/.codecrafters/run.sh (1)</summary>

`1-12`: **Verify long-lived server behavior**  
The failed tests expect your solution to act as a continuously running Kafka server. Ensure `app/main.ts` does not exit after startup and instead listens indefinitely (e.g., via a message loop or network listener).

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 Shellcheck (0.10.0)</summary>

[warning] 11-11: Quote this to prevent word splitting.

(SC2046)

</details>

</details>

</details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->
state: COMMENTED
author_association: NONE
submitted_at: 2025-04-17T21:53:50Z
user: login: coderabbitai[bot]
body: **Actionable comments posted: 0**

<details>
<summary>🔭 Outside diff range comments (1)</summary><blockquote>

<details>
<summary>solutions/typescript/01-vi6/code/app/main.ts (1)</summary><blockquote>

`1-8`: _🛠️ Refactor suggestion_

**Add error handling and server startup message.**

The TCP server setup is correctly implemented with proper TypeScript type annotations. However, it's missing error handling and a server startup message, which are important for debugging and robustness.


```diff
import net from "net";

const server: net.Server = net.createServer((connection: net.Socket) => {
  // Handle connection
});

+server.on("error", (err) => {
+  console.error("Server error:", err);
+});

server.listen(9092, "127.0.0.1");
+console.log("Kafka server listening on 127.0.0.1:9092");
```

</blockquote></details>

</blockquote></details>

<details>
<summary>🧹 Nitpick comments (2)</summary><blockquote>

<details>
<summary>solutions/typescript/01-vi6/explanation.md (2)</summary><blockquote>

`5-12`: **Update code example to match actual implementation.**

The code example properly shows the server implementation. However, the comment "Uncomment this block to pass the first stage" should be removed since the code is already uncommented in the actual implementation file.


```diff
```typescript
-// Uncomment this block to pass the first stage
const server: net.Server = net.createServer((connection: net.Socket) => {
  // Handle connection
});

server.listen(9092, "127.0.0.1");
```
```

---

`16-20`: **Add language specification to code block.**

The code block with git commands is missing a language specification, which violates markdown linting rules (MD040).


```diff
-```
+```bash
git add .
git commit -m "pass 1st stage" # any msg
git push origin master
```
```

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 markdownlint-cli2 (0.17.2)</summary>

16-16: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)

</details>

</details>

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

**Configuration used: CodeRabbit UI**
**Review profile: CHILL**
**Plan: Pro (Legacy)**

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 09af81f57ac1e1190cd0501d2d5c5419ccf8c56e and 0a1b58b2c3e273739a61fee5aa566a6911fbce95.

</details>

<details>
<summary>📒 Files selected for processing (5)</summary>

* `compiled_starters/typescript/app/main.ts` (1 hunks)
* `solutions/typescript/01-vi6/code/app/main.ts` (1 hunks)
* `solutions/typescript/01-vi6/diff/app/main.ts.diff` (1 hunks)
* `solutions/typescript/01-vi6/explanation.md` (1 hunks)
* `starter_templates/typescript/code/app/main.ts` (1 hunks)

</details>

<details>
<summary>✅ Files skipped from review due to trivial changes (1)</summary>

* compiled_starters/typescript/app/main.ts

</details>

<details>
<summary>🚧 Files skipped from review as they are similar to previous changes (1)</summary>

* starter_templates/typescript/code/app/main.ts

</details>

<details>
<summary>🧰 Additional context used</summary>

<details>
<summary>🧬 Code Graph Analysis (1)</summary>

<details>
<summary>solutions/typescript/01-vi6/code/app/main.ts (1)</summary><blockquote>

<details>
<summary>solutions/javascript/01-vi6/code/app/main.js (1)</summary>

* `server` (3-5)

</details>

</blockquote></details>

</details><details>
<summary>🪛 markdownlint-cli2 (0.17.2)</summary>

<details>
<summary>solutions/typescript/01-vi6/explanation.md</summary>

16-16: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)

</details>

</details>

</details>

<details>
<summary>🔇 Additional comments (1)</summary><blockquote>

<details>
<summary>solutions/typescript/01-vi6/diff/app/main.ts.diff (1)</summary>

`1-17`: **Clean code transformation approved.**

The diff shows a good transformation from commented-out starter code to an active implementation. You've successfully:
1. Removed debugging logs
2. Uncommented and cleaned up the server implementation
3. Maintained proper TypeScript type annotations

</details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->
state: COMMENTED
author_association: NONE
submitted_at: 2025-04-17T21:55:54Z
user: login: rohitpaulk
state: APPROVED
author_association: MEMBER
submitted_at: 2025-04-19T03:09:34Z

Review comments:
diff_hunk: @@ -0,0 +1,18 @@
+# syntax=docker/dockerfile:1.7-labs
+FROM oven/bun:1.1-alpine
+
+ENV CODECRAFTERS_DEPENDENCY_FILE_PATHS="package.json,bun.lockb"
+
+WORKDIR /app
+
+# .git & README.md are unique per-repository. We ignore them on first copy to prevent cache misses
+COPY --exclude=.git --exclude=README.md . /app
path: dockerfiles/bun-1.1.Dockerfile
user: login: coderabbitai[bot]
body: _⚠️ Potential issue_

**Fix invalid `--exclude` flag in COPY command**

The static analysis tool flagged an invalid `--exclude` flag in the COPY command. This syntax is specific to BuildKit's newer syntax but may not work with all Docker versions.


For broader compatibility, consider one of these alternatives:

```diff
- COPY --exclude=.git --exclude=README.md . /app
+ # Option 1: Use .dockerignore file instead
+ COPY . /app
```

```diff
- COPY --exclude=.git --exclude=README.md . /app
+ # Option 2: Copy specific directories/files
+ COPY package.json bun.lockb app/ tsconfig.json /app/
```

Note: If you're specifically using BuildKit features, ensure the syntax version is correctly specified (as you've done with `# syntax=docker/dockerfile:1.7-labs`).

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 Hadolint (2.12.0)</summary>

[error] 9-9: invalid flag: --exclude

(DL1000)

</details>

</details>

<!-- This is an auto-generated comment by CodeRabbit -->

✅ Addressed in commits 361a137 to 85bb4e0
created_at: 2025-04-17T21:40:19Z
author_association: NONE
diff_hunk: @@ -0,0 +1,11 @@
+{
+  "name": "@codecrafters/kafka",
+  "description": "Build your own Kafka challenge, from CodeCrafters",
+  "type": "module",
+  "scripts": {
+    "dev": "bun run app/main.ts"
+  },
+  "devDependencies": {
+    "@types/bun": "latest"
+  }
+}
path: compiled_starters/typescript/package.json
user: login: coderabbitai[bot]
body: _🛠️ Refactor suggestion_

**Add missing version field and pin dependency version**

The package.json file is missing the required "version" field according to npm standards. Additionally, using "latest" for dependencies can lead to unexpected behavior if the Bun types API changes.


```diff
{
  "name": "@codecrafters/kafka",
  "description": "Build your own Kafka challenge, from CodeCrafters",
+ "version": "1.0.0",
  "type": "module",
  "scripts": {
    "dev": "bun run app/main.ts"
  },
  "devDependencies": {
-   "@types/bun": "latest"
+   "@types/bun": "^1.0.0"
  }
}
```


<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

`````suggestion
{
  "name": "@codecrafters/kafka",
  "description": "Build your own Kafka challenge, from CodeCrafters",
  "version": "1.0.0",
  "type": "module",
  "scripts": {
    "dev": "bun run app/main.ts"
  },
  "devDependencies": {
    "@types/bun": "^1.0.0"
  }
}
`````

</details>

<!-- suggestion_end -->

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-04-17T21:40:20Z
author_association: NONE
diff_hunk: @@ -0,0 +1,23 @@
+// Uncomment this block to pass the first stage
+console.log("TODO: Implement starter code");
+
+// Uncomment this block to pass the first stage
+// const server = Bun.listen({
+//     hostname: "localhost",
+//     port: 9092,
+//     socket: {
+//         open() {
+//             console.log("New client connected!");
+//         }
+//     }
+// });
+
+// console.log("Server is running on localhost:9092");
+
+// server.on("connection", (socket) => {
+//     console.log("New client connected!");
+// });
+
+// server.on("data", (data) => {
+//     console.log("Received:", data);
+// });
path: solutions/typescript/01-vi6/code/app/main.ts
user: login: coderabbitai[bot]
body: _🛠️ Refactor suggestion_

**Fix duplicate connection handler and data event placement**

There are two issues with the commented server code:

1. Connection handling is duplicated - once in `socket.open()` and again with `server.on("connection")`.
2. The data event should be attached to each socket, not to the server.

Additionally, as this is TypeScript, type annotations would be beneficial.


```diff
// Uncomment this block to pass the first stage
// const server = Bun.listen({
//     hostname: "localhost",
//     port: 9092,
//     socket: {
//         open() {
//             console.log("New client connected!");
//         }
//     }
// });

// console.log("Server is running on localhost:9092");

// server.on("connection", (socket) => {
//     console.log("New client connected!");
+//     
+//     socket.on("data", (data) => {
+//         console.log("Received:", data);
+//     });
// });

-// server.on("data", (data) => {
-//     console.log("Received:", data);
-// });
```

For better TypeScript integration, consider adding type annotations:

```typescript
// Uncomment this block to pass the first stage
// const server = Bun.listen({
//     hostname: "localhost",
//     port: 9092,
//     socket: {
//         open() {
//             console.log("New client connected!");
//         }
//     }
// });

// console.log("Server is running on localhost:9092");

// server.on("connection", (socket: Bun.Socket) => {
//     console.log("New client connected!");
//     
//     socket.on("data", (data: Buffer) => {
//         console.log("Received:", data);
//     });
// });
```

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-04-17T21:40:20Z
author_association: NONE
diff_hunk: @@ -0,0 +1,15 @@
+#!/bin/sh
+#
+# Use this script to run your program LOCALLY.
+#
+# Note: Changing this script WILL NOT affect how CodeCrafters runs your program.
+#
+# Learn more: https://codecrafters.io/program-interface
+
+set -e # Exit early if any commands fail
+
+# Copied from .codecrafters/run.sh
+#
+# - Edit this to change how your program runs locally
+# - Edit .codecrafters/run.sh to change how your program runs remotely
+exec bun run $(dirname $0)/app/main.ts "$@"
path: solutions/typescript/01-vi6/code/your_program.sh
user: login: coderabbitai[bot]
body: _⚠️ Potential issue_

**Quote the `dirname` substitution to prevent word splitting**  
Shellcheck SC2046 warns that unquoted command substitution can cause word splitting if the path contains spaces. Wrap both `dirname` and the resulting path in quotes:

```diff
-exec bun run $(dirname $0)/app/main.ts "$@"
+exec bun run "$(dirname "$0")/app/main.ts" "$@"
```



<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

`````suggestion
exec bun run "$(dirname "$0")/app/main.ts" "$@"
`````

</details>

<!-- suggestion_end -->

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 Shellcheck (0.10.0)</summary>

[warning] 15-15: Quote this to prevent word splitting.

(SC2046)

</details>

</details>

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-04-17T21:53:49Z
author_association: NONE

PR comments:
user: login: linear[bot]
created_at: 2025-04-17T21:35:50Z
body: <p><a href="https://linear.app/codecrafters/issue/CC-1705/expand-typescript-support-to-kafka-and-interpreter">CC-1705 Expand typescript support to Kafka &amp; Interpreter</a></p>
author_association: NONE
user: login: coderabbitai[bot]
created_at: 2025-04-17T21:35:54Z
body: <!-- This is an auto-generated comment: summarize by coderabbit.ai -->
<!-- walkthrough_start -->

## Walkthrough

This update introduces a comprehensive TypeScript starter and solution setup for the "Build Your Own Kafka" challenge. New directories and files are added for starter templates, compiled starters, and a sample solution, each including configuration files (`package.json`, `tsconfig.json`, `.gitignore`, `.gitattributes`), shell scripts for compiling and running the project, and initial TypeScript entry points (`main.ts`) with minimal debugging output or placeholder code. Documentation files (`README.md` and `explanation.md`) provide instructions for challenge participation and implementation guidance. A Dockerfile for the Bun runtime is also introduced, and configuration YAML files specify runtime and debug settings. Local run scripts are added to facilitate development outside the CodeCrafters platform.

## Changes

| File(s)                                                                                      | Change Summary                                                                                                                      |
|----------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|
| compiled_starters/typescript/.codecrafters/compile.sh,<br>solutions/typescript/01-vi6/code/.codecrafters/compile.sh,<br>starter_templates/typescript/code/.codecrafters/compile.sh | Added shell scripts for pre-run compilation step; scripts are empty as no compilation is required for TypeScript in this context.   |
| compiled_starters/typescript/.codecrafters/run.sh,<br>solutions/typescript/01-vi6/code/.codecrafters/run.sh,<br>starter_templates/typescript/code/.codecrafters/run.sh | Added shell scripts to run the TypeScript program using Bun, passing through any command-line arguments.                            |
| compiled_starters/typescript/.gitattributes,<br>solutions/typescript/01-vi6/code/.gitattributes | Added `.gitattributes` files to enforce automatic line ending normalization in Git.                                                 |
| compiled_starters/typescript/.gitignore,<br>solutions/typescript/01-vi6/code/.gitignore,<br>starter_templates/typescript/code/.gitignore | Added `.gitignore` files to exclude `node_modules/` from version control.                                                           |
| compiled_starters/typescript/README.md,<br>solutions/typescript/01-vi6/code/README.md         | Added README documentation for the Kafka TypeScript challenge, including instructions and challenge overview.                        |
| compiled_starters/typescript/app/main.ts,<br>solutions/typescript/01-vi6/code/app/main.ts,<br>starter_templates/typescript/code/app/main.ts | Added initial TypeScript entry point files with minimal debugging output or placeholder console logs for incremental implementation. |
| compiled_starters/typescript/codecrafters.yml,<br>solutions/typescript/01-vi6/code/codecrafters.yml | Added YAML configuration files specifying debug and language pack settings for the CodeCrafters platform.                            |
| compiled_starters/typescript/package.json,<br>solutions/typescript/01-vi6/code/package.json,<br>starter_templates/typescript/code/package.json | Added `package.json` files with project metadata, Bun runtime scripts, and `@types/bun` as a dev dependency.                        |
| compiled_starters/typescript/tsconfig.json,<br>solutions/typescript/01-vi6/code/tsconfig.json,<br>starter_templates/typescript/code/tsconfig.json | Added TypeScript configuration files targeting ESNext, with strict type-checking and bundler module resolution.                     |
| compiled_starters/typescript/your_program.sh,<br>solutions/typescript/01-vi6/code/your_program.sh | Added shell scripts for running the program locally with Bun, passing through arguments, and clarifying local-only effect.           |
| dockerfiles/bun-1.1.Dockerfile                                                                | Added Dockerfile for Bun 1.1 on Alpine Linux, installing dependencies and preparing for caching.                                     |
| starter_templates/typescript/config.yml                                                       | Added template configuration specifying required executable and user-editable file.                                                  |
| solutions/typescript/01-vi6/explanation.md                                                    | Added explanation file with instructions for implementing and submitting the first stage of the Kafka challenge solution.           |

## Sequence Diagram(s)

```mermaid
sequenceDiagram
    participant User
    participant ShellScript
    participant BunRuntime
    participant TypeScriptApp

    User->>ShellScript: ./your_program.sh [args]
    ShellScript->>BunRuntime: bun run app/main.ts [args]
    BunRuntime->>TypeScriptApp: Execute main.ts
    TypeScriptApp-->>BunRuntime: (Logs, server setup, etc.)
    BunRuntime-->>ShellScript: Exit status
    ShellScript-->>User: Program output
```

## Poem

> 🐇  
> New scripts and configs, a starter’s delight,  
> TypeScript and Bun now ready to ignite!  
> With Docker and docs, the challenge is clear,  
> A Kafka clone journey, the goal is near.  
> So hop to your code, let the learning begin—  
> With each little push, you’re closer to win!  
>

<!-- walkthrough_end -->
<!-- internal state start -->


<!-- DwQgtGAEAqAWCWBnSTIEMB26CuAXA9mAOYCmGJATmriQCaQDG+Ats2bgFyQAOFk+AIwBWJBrngA3EsgEBPRvlqU0AgfFwA6NPEgQAfACgjoCEejqANiS4BhWKIDWMAMqRE2bt3wVcBgHLYzAKUXADMAIwGAKqIIZAAghTcmGAATAAMAGxG+sbgUGT0+ABmOATEZMo09Eys7Fy8/MKi4lIy8kxKVKrqWjq5JlBwqKiYZYSk5FTVCnUYnJBUAO5ugcxoFPJyCl0qapraumCGeaYGtdzwVrQA+oi4GzQUiAD0uLLc0gwU8Ny4LxpOqIqMUnq8LlcSBpELAOAYA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VMw90GQNcVkNUw/YMggDxB0DRvKP1+4NVjmXeYFv3lh0oAIaDYL9FwLO7lQI/SQxQC4BbCNAOwxnK7nLHXMc9s3WWWWg/D37TV3IK/c9v8NDDAjxozAPdAp6PyCBVqsSTCpKgxGzMMk7CWkbiNIMymSIr5ikl8O+tOJ2Ixbndz3hb1W+ihXiDSpc3ZiGJLYHQnOtxjpJBDum/dprDo7o0z1Z7cjZAGUJwZ19pOO8PcEbAJZF86a4zjMuMRdVZDTgHkgXxvRWhi+D6C0ajEaOmK2NioDvnoTs28ZOQzgkbIgBLAO0WQxw2MOaxbVyhv1WCENSIbnBC4lDOuzlCmHNw8HvqFYVUtiX0OxdpivJU7qXKibzwxwDyYKgphHL95r26wJSHwF7J1gWcPoC4FYEuoZgi+96OIhbvgnI9rdcAyw7eusOOFflqAk4IMFwR5QXOEwSFemq4DLBkN+/XYD0AOD9BjgBgEkw8huCwZEANwa0DBn7hIpC4RwYk/kBEgAAOAAKypBhTqQNAOEAAAs4QUU6EDCHhB8ZCucIGEP/AkAZTDAVIArjCGpB/wEsUU3qfSAmhwhAplk0KeVwmhhT4QYoEaYIjhASA4QcIErgYC0B0gopoZrQFSC0BRTDAUU3KYVz4zigwp/05kFDADBLT0pgQKKeFMCBUgDAUICQHCGKnQgCuNAJkFtNihRTaANAKKcyCZAMzqp20wIBagK5RT5pi0xACRzqB2TwjLk0hGchWUbghQAU0AA== -->

<!-- internal state end -->
<!-- tips_start -->

---



<details>
<summary>🪧 Tips</summary>

### Chat

There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=codecrafters-io/build-your-own-kafka&utm_content=31):

- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
  - `I pushed a fix in commit <commit_id>, please review it.`
  - `Generate unit testing code for this file.`
  - `Open a follow-up GitHub issue for this discussion.`
- Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples:
  - `@coderabbitai generate unit testing code for this file.`
  -	`@coderabbitai modularize this function.`
- PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
  - `@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.`
  - `@coderabbitai read src/utils.ts and generate unit testing code.`
  - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.`
  - `@coderabbitai help me debug CodeRabbit configuration file.`

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

### CodeRabbit Commands (Invoked using PR comments)

- `@coderabbitai pause` to pause the reviews on a PR.
- `@coderabbitai resume` to resume the paused reviews.
- `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
- `@coderabbitai full review` to do a full review from scratch and review all the files again.
- `@coderabbitai summary` to regenerate the summary of the PR.
- `@coderabbitai resolve` resolve all the CodeRabbit review comments.
- `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository.
- `@coderabbitai help` to get help.

### Other keywords and placeholders

- Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed.
- Add `@coderabbitai summary` to generate the high-level summary at a specific location in the PR description.
- Add `@coderabbitai` anywhere in the PR title to generate the title automatically.

### CodeRabbit Configuration File (`.coderabbit.yaml`)

- You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository.
- Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json`

### Documentation and Community

- Visit our [Documentation](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit.
- Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback.
- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.

</details>

<!-- tips_end -->
author_association: NONE