Skip to content

[#646] Add Career job constants and input validators - #658

Merged
DVidal1205 merged 2 commits into
mainfrom
validators/career-job-vocabulary
Oct 30, 2026
Merged

DVidal1205 merged 2 commits into
mainfrom
validators/career-job-vocabulary

Conversation

@Kevinli7673

Copy link
Copy Markdown
Contributor

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 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.

Kevinli7673 and others added 2 commits October 30, 2026 16:09
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- 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>
@Kevinli7673 Kevinli7673 added Feature New Feature or Request API Change modifies code in the global API/tRPC package labels Oct 30, 2026
@coderabbitai

coderabbitai Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Walkthrough

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: Passed 8
Check name Status Explanation
Title check Passed 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 Passed The description directly explains the shared constants, validators, tests, and scope of the changes.
Linked Issues check Passed #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 Passed 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 Passed 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 Passed 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 Passed 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 Passed 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Follow-up Comments

Minor follow-up Record this stage decision in `#633`.

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)

Open the source location


Review info
Run configuration
Commits

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.

@DVidal1205 DVidal1205 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

for a smaller slice, a bit less tests next time. but lgtm :)

@DVidal1205
DVidal1205 added this pull request to the merge queue Oct 30, 2026
Merged via the queue into main with commit b88d4de Oct 30, 2026
14 checks passed
@DVidal1205
DVidal1205 deleted the validators/career-job-vocabulary branch October 30, 2026 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

API Change modifies code in the global API/tRPC package Feature New Feature or Request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[SPRINT-04] Career: add job constants and input validators

2 participants