You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[#646] Add Career job constants and input validators - #658
The Career job board (#633) needs one shared set of values and input checks before anyone builds the tables (#647) or the API (#649 to #652). This PR adds them so every part of the feature uses the same lists.
This adds two files. There's no UI, database, or API code in this PR.
packages/consts/src/job-board.ts (exported as JOB_BOARD) has the fixed lists:
tracks: internship, new grad
9 job categories, with other for anything that doesn't fit
application stages and visibility (see below)
Discord delivery states and search limits
It's called job-board because CAREER is already used by Guild.
packages/validators/src/job-board.ts has the Zod schemas the API will use to check input:
Job search filters. They accept plain strings because Blade keeps filters in the URL. A cleared filter (?company=) counts as not set, and params the schema doesn't own (like utm_source) are ignored.
Saving and updating an application. A round number (1 to 10) is only allowed while the stage is interviewing. An update has to change at least one field.
Company and location alerts, with an "Other" option for custom values, plus digest opt-in and People in process filters.
The API needs to cover one case: if an update changes only the round, the schema can't see the stage that's already saved, so #649/#650 have to check it.
Stages and rounds
These are the stages an application can be in, in order:
saved, applied, online assessment, recruiter screen, interviewing, final round, offer.
An application can also end as rejected or withdrawn.
While an application is in interviewing, members can record which round they're on, as a number from 1 to 10. Numbers let People in process group and sort by round, and the record table in #633 already calls it "round number." Final round is its own stage, so it doesn't need a number.
New applications default to community visibility, which means other signed-in members can see them. Members can switch an application to private.
If anyone wants different stages or a different default, say so here before #647 builds the tables.
Test Plan
30 new tests in job-board.test.ts. The validators suite passes (380/380).
pnpm lint and pnpm typecheck pass from the repo root.
Prettier passes on the changed files.
Checklist
Database: No schema changes, OR I ran pnpm db:generate and committed the generated files in packages/db/drizzle/
Environment Variables: No environment variables changed, OR I have contacted the Development Lead to modify them on Coolify BEFORE merging.
- Cap interview rounds at 10
- Accept cleared and unrelated URL params in job search
- Reject application updates that change nothing
- Key alert kinds and the company key limit off shared constants
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The change adds shared job-board constants and types, then exports them from the constants package. It adds Zod schemas and inferred types for job search, applications, people-in-process queries, alert preferences, and digest opt-in. The validators package exports the new schemas. Tests cover constants, input normalization, defaults, constraints, and invalid inputs.
Merge Risk: Low · up to 459cd
The stage and round decision still needs to be recorded in #633 so follow-up implementations use the same contract. This is a bounded issue to address before closing the work.
Pre-merge checks: 8
Check name
Status
Explanation
Title check
The title starts with the required issue number format, is 52 characters long, and clearly describes the added Career job constants and input validators.
Description check
The description directly explains the shared constants, validators, tests, and scope of the changes.
Linked Issues check
#646 coding requirements are implemented. packages/consts/src/job-board.ts defines tracks, extensible categories, stages, visibility, delivery states, and location kinds. `packages/validators/src/jo…
Out of Scope Changes check
The changes are limited to shared job-board constants, validators, package exports, and validator tests. Work arrangements, sorting, posted-date filters, limits, and normalization support the shared j…
Docstring Coverage
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
No Hardcoded Secrets
No hardcoded secrets were introduced. The changed files contain job-board labels, validation messages, and dummy UUID test fixtures. Searches found no API-key, password, token, secret, bearer, credent…
Validated Env Access
No changed file adds direct process.env access. The PR changes only job-board constants, validators, exports, and tests. Existing repository-wide references are outside this PR.
No Typescript Escape Hatches
No changed TypeScript code uses any, @ts-ignore, @ts-expect-error, or non-null assertions (!.).
Full details: Linked Issues check
Explanation
#646 coding requirements are implemented. packages/consts/src/job-board.ts defines tracks, extensible categories, stages, visibility, delivery states, and location kinds. packages/validators/src/job-board.ts defines search, application, People in process, alert/ping, and digest schemas, including custom other company and location values. The schemas enforce numeric rounds from 1 to 10 only for interviewing, and the update schema leaves stored-stage checks to the API when stage is omitted. Both package indexes re-export the new modules, and job-board.test.ts covers the reported contracts. Recording the stage decision in #633 is a non-coding task and does not affect this assessment.
Full details: Out of Scope Changes check
Explanation
The changes are limited to shared job-board constants, validators, package exports, and validator tests. Work arrangements, sorting, posted-date filters, limits, and normalization support the shared job-board contracts. No unrelated UI, database, or API implementation is included.
Full details: Docstring Coverage
Explanation
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 5 files.
Full details: No Hardcoded Secrets
Explanation
No hardcoded secrets were introduced. The changed files contain job-board labels, validation messages, and dummy UUID test fixtures. Searches found no API-key, password, token, secret, bearer, credential, private-key, or known secret-prefix patterns.
Finishing Touches
📝 Generate docstrings
Commit to this branch
Create a new PR
🧪 Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
132-142: Minor · Data Integrity & Integration · Quick win
Record this stage decision in #633.
Issue #646 requires the chosen stages and round format to be recorded in #633. That issue still shows an open decision and an earlier proposal with different stages and round limits. Post the vocabulary and 1–10 interviewing-round rule from this PR so follow-up implementations use the same contract. (github.com)
Reviewing files that changed from the base of the PR and between 0fb0dc3 and 459cd44.
Files selected for processing: 5
packages/consts/src/index.ts
packages/consts/src/job-board.ts
packages/validators/src/index.ts
packages/validators/src/job-board.ts
packages/validators/src/tests/job-board.test.ts
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
APIChange modifies code in the global API/tRPC packageFeatureNew Feature or Request
2 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The Career job board (#633) needs one shared set of values and input checks before anyone builds the tables (#647) or the API (#649 to #652). This PR adds them so every part of the feature uses the same lists.
What
Closes: #646
This adds two files. There's no UI, database, or API code in this PR.
packages/consts/src/job-board.ts(exported asJOB_BOARD) has the fixed lists:otherfor anything that doesn't fitIt's called
job-boardbecauseCAREERis already used by Guild.packages/validators/src/job-board.tshas the Zod schemas the API will use to check input:?company=) counts as not set, and params the schema doesn't own (likeutm_source) are ignored.interviewing. An update has to change at least one field.The API needs to cover one case: if an update changes only the round, the schema can't see the stage that's already saved, so #649/#650 have to check it.
Stages and rounds
These are the stages an application can be in, in order:
saved, applied, online assessment, recruiter screen, interviewing, final round, offer.
An application can also end as rejected or withdrawn.
While an application is in
interviewing, members can record which round they're on, as a number from 1 to 10. Numbers let People in process group and sort by round, and the record table in #633 already calls it "round number." Final round is its own stage, so it doesn't need a number.New applications default to
communityvisibility, which means other signed-in members can see them. Members can switch an application toprivate.If anyone wants different stages or a different default, say so here before #647 builds the tables.
Test Plan
job-board.test.ts. The validators suite passes (380/380).pnpm lintandpnpm typecheckpass from the repo root.Checklist
pnpm db:generateand committed the generated files inpackages/db/drizzle/