Skip to content

Enhance RunTag parsing with robust key-value tag splitting #1782

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Mar 20, 2025

Conversation

iFlyinq
Copy link
Contributor

@iFlyinq iFlyinq commented Mar 10, 2025

Here's a filled-out PR description based on the changes:


✅ Checklist


Testing

This PR includes unit tests for splitTag to ensure robust parsing of key-value tags. The tests verify:

  • Proper handling of tags with _ and : as delimiters.
  • Preservation of tags that don't fit the key-value pattern.
  • Edge cases, including long keys, multiple delimiters, and common ID formats.

Changelog

Enhancements

  • Improved splitTag function for more robust key-value splitting.
  • Added special handling to preserve common ID formats.
  • Introduced stricter validation to prevent incorrect splits.

Tests

  • Added comprehensive unit tests for splitTag in RunTag.test.ts.

💯

Summary by CodeRabbit

  • New Features
    • Enhanced tag processing to more accurately handle complex formatting and identifier patterns.
  • Tests
    • Introduced comprehensive tests to ensure consistent and robust handling of various tag scenarios.
  • Documentation
    • Added new documentation files outlining command execution, repository structure, testing guidelines, and a new example project for a Python web crawler.
  • Chores
    • Created a .cursorignore file to specify paths to be excluded from tracking.

Copy link

changeset-bot bot commented Mar 10, 2025

⚠️ No Changeset found

Latest commit: b13296f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

coderabbitai bot commented Mar 10, 2025

Walkthrough

This pull request refactors the splitTag function in the RunTag component by exporting it and enhancing its tag parsing logic. The function now uses an updated regex pattern to capture alphanumeric keys and their corresponding values, including additional checks for common ID formats. Furthermore, a new test suite has been introduced to validate the function's behavior under various conditions and edge cases. Additional documentation files have been created to guide users on executing commands, understanding the monorepo structure, and writing tests.

Changes

File Change Summary
apps/webapp/app/.../RunTag.tsx Refactored splitTag: now exported with an updated regex pattern, enhanced logic to detect ID formats, and conditional return of key-value pairs versus the original tag.
apps/webapp/test/.../RunTag.test.ts Added a comprehensive test suite for splitTag covering scenarios such as missing delimiters, mixed delimiters, special character handling, and various edge cases.
.cursor/rules/executing-commands.mdc New documentation on executing commands within the monorepo, including examples for running tests.
.cursor/rules/repo.mdc New documentation describing the structure of the monorepo with metadata and links.
.cursor/rules/webapp.mdc New configuration file detailing the webapp structure and components.
.cursor/rules/writing-tests.mdc New guidelines for writing tests in the monorepo.
.cursorignore New file specifying directories and files to be ignored by the cursor.
CONTRIBUTING.md Updated instructions for setting up the development environment and running the application, including new steps for Prisma setup.
ai/references/repo.md New overview of the repository structure and its components.
ai/references/tests.md New documentation outlining the testing framework and practices for the project.
docs/docs.json Reformatted "pages" arrays for improved readability; added new page for Python web crawler example.
docs/guides/examples/puppeteer.mdx Added requirement for permission before scraping content from websites.
docs/guides/introduction.mdx New entry for "Python web crawler" example project with a GitHub link.
docs/guides/python/python-crawl4ai.mdx New documentation for creating a headless browser web crawler using Python and Trigger.dev.
docs/snippets/python-learn-more.mdx New section on using Python with Trigger.dev, featuring a card component for the Python build extension.
references/v3-catalog/.env.example Added new environment variables for PostgreSQL connection strings.

Possibly related PRs

Poem

I'm a little rabbit, hopping through the code so bright,
Splitting tags with keen precision, in morning light.
Regex carrots crunching, logic dancing in the air,
With tests in tow, I scurry without a care.
Celebrating every change in a whimsical, joyful flight!


🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • 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 generate docstrings to generate docstrings for this 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 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 for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (2)
apps/webapp/app/components/runs/v3/RunTag.tsx (2)

37-38: Consider elaborating on the fallback logic in the doc comment.
The doc mentions "special handling for common ID formats," but you might want to clarify how multiple separators (colons/underscores) lead to either a split or falling back to the entire string. That extra detail would help maintainers quickly grasp the intention behind the conditions.


40-63: Consider extracting the ID detection into a dedicated helper function.
Overall, the splitting logic is concise and thoroughly tested. Still, the code checks multiple conditions for “likely IDs,” which can be slightly complex to parse at first glance. Extracting that part into a small helper (e.g., function isLikelyIDFormat(tag, key, value)) could improve readability and maintainability without changing functionality.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 6cf86d5 and 5fa361b.

📒 Files selected for processing (2)
  • apps/webapp/app/components/runs/v3/RunTag.tsx (1 hunks)
  • apps/webapp/test/components/runs/v3/RunTag.test.ts (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (5)
  • GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - pnpm)
  • GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - npm)
  • GitHub Check: e2e / 🧪 CLI v3 tests (ubuntu-latest - pnpm)
  • GitHub Check: typecheck / typecheck
  • GitHub Check: e2e / 🧪 CLI v3 tests (ubuntu-latest - npm)
🔇 Additional comments (3)
apps/webapp/test/components/runs/v3/RunTag.test.ts (3)

4-41: Add test coverage for empty key scenarios.
These tests for returning the original string or creating key-value pairs cover many separators. However, consider adding a test for an empty key, e.g. ":someValue" or "_someValue", to confirm the function correctly returns the entire tag. This ensures that every corner case is handled.


43-66: Thorough coverage of 12-character keys, empty values, and special characters.
All scenarios appear consistent with the intended parsing behavior. No concerns here.


68-77: Good coverage of numeric keys and complex mixed delimiters.
This suite of tests validates that numeric characters in the key and multi-delimiter scenarios behave properly. Looks good.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You haven't written the PR description perfectly like the issue number ..

@iFlyinq
Copy link
Contributor Author

iFlyinq commented Mar 11, 2025

You haven't written the PR description perfectly like the issue number ..

Hi, there was no issue linked to it so that's why it was left blank. I'll update it :)

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (14)
docs/guides/examples/puppeteer.mdx (1)

208-208: Improvement Suggestion: Refine Warning Message Grammar

The updated warning clearly emphasizes the need to proxy requests and obtain permission from the website owner. However, the sentence "If you don't you'll risk getting our IP address blocked and we will ban you from our service." could be improved for clarity. Consider adding a comma before "and" (i.e. "you'll risk getting our IP address blocked, and we will ban you…") to better separate the two independent clauses.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~208-~208: Use a comma before ‘and’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...u'll risk getting our IP address blocked and we will ban you from our service. You m...

(COMMA_COMPOUND_SENTENCE)

ai/references/repo.md (2)

18-27: Internal Packages Section: Minor Typographical Improvements

  • Line 20: Consider adding a comma after “usually” to improve readability. For example:
    "...not published, and usually, they have a tsc build step and are used in the webapp"
  • Line 22: Replace “it's lifecycle” with “its lifecycle” to correctly use the possessive form.
🧰 Tools
🪛 LanguageTool

[typographical] ~20-~20: Consider adding a comma after ‘usually’ for more clarity.
Context: ...sed internally only, not published, and usually they have a tsc build step and are used...

(RB_LY_COMMA)


[uncategorized] ~22-~22: Did you mean “its” (the possessive pronoun)?
Context: ...andles moving a run all the way through it's lifecycle - /internal-packages/re...

(ITS_PREMIUM)


23-23: Typo Correction in Internal Packages

There is a minor typographical error on this line: "sytem" should be corrected to "system".

ai/references/tests.md (3)

24-26: Rephrase 'almost NEVER' for Improved Clarity

The sentence in line 26 uses the phrase "almost NEVER," which can be simplified to enhance readability and professionalism.

-We use vitest for testing. We almost NEVER mock anything. Start with a top-level "describe", and have multiple "it" statements inside of it.
+We use Vitest for testing and rarely use mocks. Begin with a top-level "describe" block and include multiple "it" statements.
🧰 Tools
🪛 LanguageTool

[style] ~26-~26: ‘almost NEVER’ might be wordy. Consider a shorter alternative.
Context: ...ng Tests We use vitest for testing. We almost NEVER mock anything. Start with a top-level "...

(EN_WORDINESS_PREMIUM_ALMOST_NEVER)


28-29: Clarify Testcontainers Usage for Database-dependent Tests

The current wording could be made clearer. Consider rephrasing the sentence to better communicate that internal testcontainers automatically spin up local instances for Redis or PostgreSQL when needed.

-When writing anything that needs redis or postgresql, we have some internal "testcontainers" that are used to spin up a local instance, redis, or both.
+For tests requiring Redis or PostgreSQL, use our internal "testcontainers" to automatically provision local instances.

71-82: Enhance Diction in the Dos and Don'ts Section

The "Dos and Don'ts" guidelines provide comprehensive best practices; however, several bullet points start with the same phrasing, which could be varied for improved readability. Consider rewording to avoid repetitive language. For example:

- - Do not mock anything.
- - Do not use mocks in tests.
- - Do not use spies in tests.
- - Do not use stubs in tests.
- - Do not use fakes in tests.
- - Do not use sinon in tests.
- - Structure each test with a setup, action, and assertion style.
- - Feel free to write long test names.
- - If there is any randomness in the code under test, use `seedrandom` to make it deterministic by allowing the caller to provide a seed.
+ - Avoid mocking in tests.
+ - Refrain from using additional mocks.
+ - Avoid using spies.
+ - Avoid relying on stubs.
+ - Steer clear of fakes.
+ - Refrain from using sinon.
+ - Structure tests with clear setup, action, and assertion phases.
+ - Use descriptive test names.
+ - If randomness exists in the code under test, employ `seedrandom` to ensure deterministic behavior by allowing a seed to be provided.
🧰 Tools
🪛 LanguageTool

[style] ~75-~75: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...nything. - Do not use mocks in tests. - Do not use spies in tests. - Do not use st...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~76-~76: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...n tests. - Do not use spies in tests. - Do not use stubs in tests. - Do not use fa...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~77-~77: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...n tests. - Do not use stubs in tests. - Do not use fakes in tests. - Do not use si...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~78-~78: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...n tests. - Do not use fakes in tests. - Do not use sinon in tests. - Structure eac...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~80-~80: The phrase ‘feel free to’ is used quite frequently. Consider using a less frequent alternative to set your writing apart from others and make it sound more professional.
Context: ...a setup, action, and assertion style. - Feel free to write long test names. - If there is an...

(FEEL_FREE_TO_STYLE_ME)

CONTRIBUTING.md (3)

167-167: Minor phrasing improvement opportunity

The phrase "inside of" is redundant - consider simplifying to just "inside".

-6. If you make any changes in the CLI/Core/SDK, you'll need to `CTRL+C` to exit the `dev` command and restart it to pickup changes. Any changes to the files inside of the `v3-catalog/src/trigger` dir will automatically be rebuilt by the `dev` command.
+6. If you make any changes in the CLI/Core/SDK, you'll need to `CTRL+C` to exit the `dev` command and restart it to pickup changes. Any changes to the files inside the `v3-catalog/src/trigger` dir will automatically be rebuilt by the `dev` command.
🧰 Tools
🪛 LanguageTool

[style] ~167-~167: This phrase is redundant. Consider using “inside”.
Context: ...ickup changes. Any changes to the files inside of the v3-catalog/src/trigger dir will a...

(OUTSIDE_OF)


169-169: Missing comma in compound sentence

Consider adding a comma before "and" to improve readability in this compound sentence.

-7. Navigate to the `v3-catalog` project in your local dashboard at localhost:3030 and you should see the list of tasks.
+7. Navigate to the `v3-catalog` project in your local dashboard at localhost:3030, and you should see the list of tasks.
🧰 Tools
🪛 LanguageTool

[uncategorized] ~169-~169: Use a comma before ‘and’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...n your local dashboard at localhost:3030 and you should see the list of tasks. 8. G...

(COMMA_COMPOUND_SENTENCE)


242-245: Missing language specification in code block

The fenced code block is missing a language specifier, which would improve syntax highlighting. Also consider consolidating with the previous paragraph for better flow.

-4. Run the migration.
-
-```
-pnpm run db:migrate:deploy
-pnpm run generate
-```
-
-This executes the migrations against your database and applies changes to the database schema(s), and then regenerates the Prisma client.
+4. Run the migration.
+
+```sh
+pnpm run db:migrate:deploy
+pnpm run generate
+```
+
+This executes the migrations against your database and applies changes to the database schema(s), and then regenerates the Prisma client.
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

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

(MD040, fenced-code-language)

docs/guides/python/python-crawl4ai.mdx (5)

10-14: Prerequisites Section – Consider Punctuation Consistency

The list items under prerequisites are clear. For enhanced consistency in documentation style, consider ending list items with consistent punctuation (e.g., a period).

🧰 Tools
🪛 LanguageTool

[uncategorized] ~12-~12: A punctuation mark might be missing here.
Context: ... A project with Trigger.dev initialized - Python install...

(AI_EN_LECTOR_MISSING_PUNCTUATION)


19-24: Features List Enhancements

  • For the "Crawl4AI" item (line 23), consider hyphenating the compound modifier to “LLM‐friendly” for clarity.
  • In line 24, the phrase “headless chromium browser” should use a capital “C” for “Chromium” to reflect the proper noun.

A possible diff for line 24:

- - A custom [Playwright extension](https://playwright.dev/) to create a headless chromium browser
+ - A custom [Playwright extension](https://playwright.dev/) to create a headless Chromium browser
🧰 Tools
🪛 LanguageTool

[uncategorized] ~23-~23: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...ps://github.com/unclecode/crawl4ai), an open source LLM friendly web crawler - A custom [Pl...

(EN_COMPOUND_ADJECTIVE_INTERNAL)


[grammar] ~24-~24: The proper noun “Chromium” (= software from Google) needs to be capitalized.
Context: ...//playwright.dev/) to create a headless chromium browser ## GitHub...

(GOOGLE_PRODUCTS)


45-97: Build Configuration Code Snippet Review

The code snippet for the build configuration is clear and well-commented. A small nitpick: in the command on line 79, consider capitalizing “chromium” to “Chromium” for proper naming consistency. For example:

- `RUN PLAYWRIGHT_BROWSERS_PATH=/ms-playwright python -m playwright install --with-deps chromium`,
+ `RUN PLAYWRIGHT_BROWSERS_PATH=/ms-playwright python -m playwright install --with-deps Chromium`,

Review the official documentation to ensure that the change does not affect the command’s functionality.


136-157: Python Script Example – Import Style Consideration

The Python script demonstrates a clear asynchronous web crawl operation using Crawl4AI. A minor suggestion: avoid using wildcard imports (e.g., from crawl4ai import *) to prevent namespace pollution and enhance code clarity. For example, if only AsyncWebCrawler is required, consider:

- from crawl4ai import *
+ from crawl4ai import AsyncWebCrawler

159-166: Testing Instructions – Correcting Duplicate Wording

There are a couple of duplications in the testing instruction text:

  • In the step about copying the project ref, “and and” appears.
  • In the step regarding running the CLI command, “with with” is duplicated.

Proposed diffs:

- 4. If you haven't already, copy your project ref from your [Trigger.dev dashboard](https://cloud.trigger.dev) and and add it to the `trigger.config.ts` file.
+ 4. If you haven't already, copy your project ref from your [Trigger.dev dashboard](https://cloud.trigger.dev) and add it to the `trigger.config.ts` file.
- 5. Run the Trigger.dev dev CLI command with with `npx trigger dev@latest dev` (it may ask you to authorize the CLI if you haven't already).
+ 5. Run the Trigger.dev dev CLI command with `npx trigger dev@latest dev` (it may ask you to authorize the CLI if you haven't already).
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 5fa361b and d3ef119.

📒 Files selected for processing (14)
  • .cursor/rules/executing-commands.mdc (1 hunks)
  • .cursor/rules/repo.mdc (1 hunks)
  • .cursor/rules/webapp.mdc (1 hunks)
  • .cursor/rules/writing-tests.mdc (1 hunks)
  • .cursorignore (1 hunks)
  • CONTRIBUTING.md (3 hunks)
  • ai/references/repo.md (1 hunks)
  • ai/references/tests.md (1 hunks)
  • docs/docs.json (11 hunks)
  • docs/guides/examples/puppeteer.mdx (1 hunks)
  • docs/guides/introduction.mdx (1 hunks)
  • docs/guides/python/python-crawl4ai.mdx (1 hunks)
  • docs/snippets/python-learn-more.mdx (1 hunks)
  • references/v3-catalog/.env.example (1 hunks)
✅ Files skipped from review due to trivial changes (6)
  • .cursorignore
  • .cursor/rules/writing-tests.mdc
  • .cursor/rules/executing-commands.mdc
  • docs/snippets/python-learn-more.mdx
  • docs/docs.json
  • .cursor/rules/repo.mdc
🧰 Additional context used
🪛 LanguageTool
docs/guides/examples/puppeteer.mdx

[uncategorized] ~208-~208: Use a comma before ‘and’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...u'll risk getting our IP address blocked and we will ban you from our service. You m...

(COMMA_COMPOUND_SENTENCE)

CONTRIBUTING.md

[style] ~167-~167: This phrase is redundant. Consider using “inside”.
Context: ...ickup changes. Any changes to the files inside of the v3-catalog/src/trigger dir will a...

(OUTSIDE_OF)


[uncategorized] ~169-~169: Use a comma before ‘and’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...n your local dashboard at localhost:3030 and you should see the list of tasks. 8. G...

(COMMA_COMPOUND_SENTENCE)


[style] ~173-~173: The phrase ‘feel free to’ is used quite frequently. Consider using a less frequent alternative to set your writing apart from others and make it sound more professional.
Context: ...ny of them accept an empty payload. 9. Feel free to add additional files in `v3-catalog/src...

(FEEL_FREE_TO_STYLE_ME)

docs/guides/python/python-crawl4ai.mdx

[uncategorized] ~12-~12: A punctuation mark might be missing here.
Context: ... A project with Trigger.dev initialized - Python install...

(AI_EN_LECTOR_MISSING_PUNCTUATION)


[uncategorized] ~23-~23: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...ps://github.com/unclecode/crawl4ai), an open source LLM friendly web crawler - A custom [Pl...

(EN_COMPOUND_ADJECTIVE_INTERNAL)


[grammar] ~24-~24: The proper noun “Chromium” (= software from Google) needs to be capitalized.
Context: ...//playwright.dev/) to create a headless chromium browser ## GitHub...

(GOOGLE_PRODUCTS)


[duplication] ~167-~167: Possible typo: you repeated a word.
Context: ...v dashboard](https://cloud.trigger.dev) and and add it to the trigger.config.ts file....

(ENGLISH_WORD_REPEAT_RULE)


[duplication] ~168-~168: Possible typo: you repeated a word.
Context: ...ger.config.tsfile. 5. Run the Trigger.dev dev CLI command with withnpx trigger dev@...

(ENGLISH_WORD_REPEAT_RULE)


[duplication] ~168-~168: Possible typo: you repeated a word.
Context: ... 5. Run the Trigger.dev dev CLI command with with npx trigger dev@latest dev (it may as...

(ENGLISH_WORD_REPEAT_RULE)

ai/references/repo.md

[typographical] ~20-~20: Consider adding a comma after ‘usually’ for more clarity.
Context: ...sed internally only, not published, and usually they have a tsc build step and are used...

(RB_LY_COMMA)


[uncategorized] ~22-~22: Did you mean “its” (the possessive pronoun)?
Context: ...andles moving a run all the way through it's lifecycle - /internal-packages/re...

(ITS_PREMIUM)

ai/references/tests.md

[style] ~26-~26: ‘almost NEVER’ might be wordy. Consider a shorter alternative.
Context: ...ng Tests We use vitest for testing. We almost NEVER mock anything. Start with a top-level "...

(EN_WORDINESS_PREMIUM_ALMOST_NEVER)


[style] ~75-~75: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...nything. - Do not use mocks in tests. - Do not use spies in tests. - Do not use st...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~76-~76: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...n tests. - Do not use spies in tests. - Do not use stubs in tests. - Do not use fa...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~77-~77: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...n tests. - Do not use stubs in tests. - Do not use fakes in tests. - Do not use si...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~78-~78: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...n tests. - Do not use fakes in tests. - Do not use sinon in tests. - Structure eac...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~80-~80: The phrase ‘feel free to’ is used quite frequently. Consider using a less frequent alternative to set your writing apart from others and make it sound more professional.
Context: ...a setup, action, and assertion style. - Feel free to write long test names. - If there is an...

(FEEL_FREE_TO_STYLE_ME)

🪛 markdownlint-cli2 (0.17.2)
CONTRIBUTING.md

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

(MD040, fenced-code-language)

⏰ Context from checks skipped due to timeout of 90000ms (5)
  • GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - pnpm)
  • GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - npm)
  • GitHub Check: e2e / 🧪 CLI v3 tests (ubuntu-latest - pnpm)
  • GitHub Check: e2e / 🧪 CLI v3 tests (ubuntu-latest - npm)
  • GitHub Check: typecheck / typecheck
🔇 Additional comments (24)
ai/references/repo.md (5)

1-3: Overall Repo Overview Section is Clear

The introduction and overview provide a concise summary of the monorepo’s structure and tooling. It clearly informs readers about the package management and build system (pnpm and turborepo).


5-9: Apps Section Documentation Review

The "Apps" section effectively describes the two primary applications, including their purposes. The details help new contributors understand the role of each app within the repository.


10-17: Public Packages Section Provides Useful References

The documentation for public packages is well-organized and links to relevant external documentation. This provides a good guide for users exploring the SDK and CLI packages.


28-31: References Section is Well-Documented

This section clearly outlines the purpose of the test workspaces. The explanation is concise and beneficial for developers looking to understand testing setups within the repository.


32-38: Other Resources Section is Informative

The "Other" section provides valuable information about additional resources such as documentation sites, Docker configurations, and contribution guidelines. The reference to the local development command (pnpm run docker) is especially helpful.

ai/references/tests.md (7)

1-3: Clear Documentation for Running Tests

The introduction clearly explains that Vitest is exclusively used for testing. The formatting and hierarchy are appropriately used and help guide the reader.


5-7: Command Example for Executing Workspace Tests

The code snippet demonstrating how to run tests for a specific workspace is clear and correctly formatted.


9-14: Example for Running Tests on a Single File

The instructions for executing tests on a single file by changing directories and running a command are concise and easy to follow.


16-22: Building Dependencies Before Running Tests

This section effectively explains that building dependencies may be required before running tests, and the provided code block clearly illustrates the process.


30-45: Redis Test Example is Well-Structured

The Redis test example, including the import statements and test structure, is concise and follows best practices. This example effectively illustrates how to use the internal Redis test setup.


47-57: Postgres Test Example is Clear and Informative

The PostgreSQL test example is straightforward. The comment clarifying that prisma is an instance of PrismaClient adds necessary context for readers.


59-69: Container Test Example Demonstrates Combined Service Testing

The container test example clearly shows how to test scenarios that require both Prisma and Redis. This example is easy to understand and well-documented.

references/v3-catalog/.env.example (1)

6-7: Database configuration strings added appropriately

The addition of DATABASE_URL and DATABASE_URL_UNPOOLED environment variables provides necessary database connectivity configuration for the v3-catalog application, which aligns with the Prisma setup mentioned in the CONTRIBUTING.md changes.

CONTRIBUTING.md (2)

138-139: Improved build command to include packages

The build command now correctly includes both the CLI and all Trigger.dev packages using the filter pattern. This ensures that all necessary dependencies are built properly for the v3-catalog testing environment.


146-151: Added Prisma setup instructions

These new steps for Prisma setup and database migration are essential for developers to properly configure the database backend. The commands are clear and provide the necessary steps to deploy migrations and generate Prisma client files.

.cursor/rules/webapp.mdc (1)

1-37: Well-structured documentation for the webapp architecture

This new file provides excellent documentation about the webapp structure, subsystems, and development practices. It covers key aspects including:

  1. The tech stack (Remix 2.1.0, Express, TypeScript)
  2. Subsystems and dependencies
  3. Environment variable handling
  4. Testing practices
  5. Legacy vs. new Run Engine 2.0
  6. Code location references

This documentation will be valuable for onboarding new developers and understanding the codebase organization.

docs/guides/introduction.mdx (1)

48-48: New Python example project added appropriately

The addition of the Python web crawler example project is well-formatted and consistent with the existing table structure. It provides a valuable new example using Python, Crawl4AI, and Playwright, expanding the range of examples available to users.

docs/guides/python/python-crawl4ai.mdx (7)

1-5: Front Matter and Header Definition

The YAML header is clear and well-structured, providing a concise title, sidebar title, and description for the document.


7-8: Import Statements for MDX Components

The imports for ScrapingWarning and PythonLearnMore are correctly set up to include external MDX snippets.


15-18: Overview Section Clarity

The overview is concise and explains the demo’s purpose effectively. No changes are needed.


28-37: GitHub Repository Card Component

The GitHub repo section is implemented with a Card component that clearly links to the examples repository. The content is informative and encourages reuse.


101-125: Task Code Snippet Evaluation

The task code snippet using python.runScript is well-structured and demonstrates proper usage of the Trigger.dev SDK along with logging.


127-134: Requirements.txt File Content

The requirements.txt snippet correctly lists the necessary dependencies. This is clear and concise.


167-171: Deployment Instructions

The deployment instructions are straightforward, clearly detailing the CLI command for production deployment and referencing additional learning resources via <PythonLearnMore />.

🧰 Tools
🪛 LanguageTool

[duplication] ~167-~167: Possible typo: you repeated a word.
Context: ...v dashboard](https://cloud.trigger.dev) and and add it to the trigger.config.ts file....

(ENGLISH_WORD_REPEAT_RULE)


[duplication] ~168-~168: Possible typo: you repeated a word.
Context: ...ger.config.tsfile. 5. Run the Trigger.dev dev CLI command with withnpx trigger dev@...

(ENGLISH_WORD_REPEAT_RULE)


[duplication] ~168-~168: Possible typo: you repeated a word.
Context: ... 5. Run the Trigger.dev dev CLI command with with npx trigger dev@latest dev (it may as...

(ENGLISH_WORD_REPEAT_RULE)

Copy link
Contributor

@Rudra-Sankha-Sinhamahapatra Rudra-Sankha-Sinhamahapatra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@iFlyinq
If the PR is not related to an issue then create an issue then attach the issue into the PR, ask the maintainers about the issue

and secondly the ci checks are failing kindly resolve them

Copy link
Member

@matt-aitken matt-aitken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@iFlyinq brilliant!

It will be a couple of weeks before this gets deployed to cloud because we're in a final push for v4 so there's a freeze for anything that isn't a critical hotfix.

@matt-aitken matt-aitken merged commit 1eb3fb3 into triggerdotdev:main Mar 20, 2025
6 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants