Skip to content

Conversation

@FAIZ1409
Copy link

@FAIZ1409 FAIZ1409 commented Jan 23, 2026

This PR updates the “Adding a New Worker” documentation by documenting additional required update locations such as worker registration and CI deployment configuration, as referenced in the repository guide.

Closes #582

Copy link
Contributor

@bajtos bajtos left a comment

Choose a reason for hiding this comment

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

Thank you @FAIZ1409 for the pull request.

I am confused about your goal here. The current instructions worked well enough for Claude Code the last time I tried. What is the scenario or use case you are trying to improve?

Also, you are linking to the pull request #374 with the "close" keyword, which does not make sense - the pull request was already merged. Did you perhaps mean to link to a different issue?

Comment on lines +56 to +64
## Worker Registration

After creating the worker directory, the worker must be registered in the repository so it is discoverable by tooling and CI.

Update the worker registry file to include the new worker name:

- `workers.ts` (or equivalent registry file)

Add the worker name to the exported list/map following the existing pattern.
Copy link
Contributor

Choose a reason for hiding this comment

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

This does make sense to me. What worker registry file do you have in mind?

Copy link
Author

Choose a reason for hiding this comment

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

You’re right — there is no explicit worker registry file. That was an assumption on my part. I will remove this section.

Copy link
Author

Choose a reason for hiding this comment

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

Thanks @bajtos for the feedback — my goal is to help contributors who add a new worker manually (not via Claude) avoid missing required updates that caused issues in #375. I’ll narrow the scope of this PR to only document steps that are not already covered and remove anything speculative

Comment on lines +67 to +70
4. **`.github/workflows/ci.yml`**
- Add the worker name to the deploy matrix
- Ensure calibration and mainnet deployments include the new worker
- Follow the existing worker entries as a template
Copy link
Contributor

Choose a reason for hiding this comment

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

This is already covered by item 4 in Files to Update, see above.

Copy link
Author

Choose a reason for hiding this comment

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

Acknowledged — I’ll remove the duplicate CI section.

Comment on lines +73 to +79
## Recommended Approach

It is strongly recommended to copy an existing worker directory and modify it rather than creating files from scratch. This helps ensure:

- Correct Wrangler configuration
- Consistent scripts
- Proper CI integration
Copy link
Contributor

Choose a reason for hiding this comment

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

This advice is wrong. We are moving from JS-based to TS-based workers; we don't want to copy old JS-based workers when creating a new one.

Copy link
Author

Choose a reason for hiding this comment

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

Understood — thank you for clarifying. I’ll remove the recommendation about copying existing workers and adjust the wording to align with the TS-based workflow.

Comment on lines +130 to +135
## Common Pitfalls

- Forgetting to register the worker in the worker registry
- Missing CI deploy configuration
- Including local-only changes (e.g. package-lock.json)
- Forgetting to run `update-ts-project`
Copy link
Contributor

Choose a reason for hiding this comment

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

What is this section needed for?

Copy link
Author

Choose a reason for hiding this comment

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

Makes sense — I’ll remove the Common Pitfalls section to keep the document focused.

…worker-doc

git reset --hard HEAD# Lines starting with '#' will be ignored, and an empty message aborts
@pyropy
Copy link
Contributor

pyropy commented Jan 26, 2026

While we appreciate your contribution @FAIZ1409 I think you would be better off trying to pick up some of the existing open issues.

I propose to you to check out an issue in the issue tab and pick something you'd like, ideally something marked with "good first issue". If the issue is unclear feel free to tag us there with additional questions.

If you'd like to propose an enhancement to the repository, feel free to open up a ticket and discuss your improvements before coding a solution.

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