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
[#651] Add member alert settings to the Career job router - #677
Members can list, add, edit, and remove their own company and location alert rules.
Members can read both digest settings and change either track independently. If Discord role sync fails, Blade gets the saved choice and roleSynced: false.
All six procedures use the member profile from the signed-in session.
Test plan
42 targeted API tests passed, including disposable PostgreSQL tests for access, ownership, and digest settings. The API surface snapshot gained six procedures.
Root lint passed with warnings. Root typecheck passed.
The job-board router adds protected procedures for alert preferences and digest subscriptions. Integration tests cover access checks, owner-scoped preference changes, independent digest tracks, role-sync failure, and member isolation. Feature documentation updates the scope, procedure details, status, and test coverage.
Merge Risk: Low · up to 25356 · assessed changes only
Path filters excluded changed files. This rating applies only to the assessed changes.
Pre-merge checks: 6 · 1
Failed checks: 1 inconclusive
Check name
Status
Explanation
Resolution
Linked Issues check
[#651] The PR implements one #651 scope item: ping preferences and digest opt-ins. In packages/api/src/routers/job-board.ts, six protected procedures list, add, update, and remove alert preferences,…
Confirm that the remaining #651 scope items exist at the reviewed head, with tests for member access and private-application and note privacy. Cite the files and tests that provide them. If they do not exist, add them or split #651 so this …
Passed checks: 6 passed
Check name
Status
Explanation
Title check
Title starts with the issue number in brackets, [#651], and describes the main change (member alert settings in the Career job router). It is 57 characters, under the 72-character limit.
Description check
Description explains the purpose (members choose job alerts, finishing settings from #670 using #673), lists the behavior added (rule CRUD, independent digest tracks, roleSynced handling, session-base…
Out of Scope Changes check
All changed code relates to the alert and digest objective. job-board.ts adds the six procedures and delegates to the alert and digest utilities. job-board.test.ts adds access, ownership, and dige…
No Hardcoded Secrets
No hardcoded secrets in the PR diff. I read every added line across the 8 changed files and scanned them for key, password, token, and secret patterns (api_key, secret, password, token, sk-, ghp_, xox…
Validated Env Access
The PR diff adds no process.env usage. A search of added lines in the PR range found no matches. The six changed source and test files contain one process.env reference, `packages/api/src/tests/in…
No Typescript Escape Hatches
No added line in the changed TypeScript files uses any, @ts-ignore, @ts-expect-error, or a non-null assertion (!.). I checked the added lines in packages/api/src/routers/job-board.ts, `packa…
Full details: Description check
Explanation
Description explains the purpose (members choose job alerts, finishing settings from #670 using #673), lists the behavior added (rule CRUD, independent digest tracks, roleSynced handling, session-based member profile), and gives test and checklist results. It is directly related to the changeset.
Full details: Out of Scope Changes check
Explanation
All changed code relates to the alert and digest objective. job-board.ts adds the six procedures and delegates to the alert and digest utilities. job-board.test.ts adds access, ownership, and digest tests, and changes callerFor to support unauthenticated callers. router-contract.test.ts expects the six new procedures. The .forge/features/career-job-router spec, SRD, status, and test-case files document the same scope. These support the implementation and do not add unrelated behavior. The excluded api-surface.test.ts.snap file cannot be inspected under its exclusion rule, so its contents are not assessed.
Full details: No Hardcoded Secrets
Explanation
No hardcoded secrets in the PR diff. I read every added line across the 8 changed files and scanned them for key, password, token, and secret patterns (api_key, secret, password, token, sk-, ghp_, xox, AKIA, bearer, private key). The scan found no matches. The new code in packages/api/src/routers/job-board.ts only delegates to helpers and reads the member ID from the session. The test changes use fixture identifiers such as NO_PROFILE_USER and ALEX.memberId, which are not credentials. The .forge markdown changes are documentation and contain no credential values.
Full details: Validated Env Access
Explanation
The PR diff adds no process.env usage. A search of added lines in the PR range found no matches. The six changed source and test files contain one process.env reference, packages/api/src/tests/integration/job-board.test.ts line 113 (process.env.DATABASE_URL = disposable.url;). The same statement exists at line 111 of the base revision. The PR only shifts its line number by adding lines above it. It is pre-existing, not introduced by this PR. The line also carries an eslint-disable-next-line no-restricted-properties comment. The PR does not activate, expose, or worsen it.
Resolution
None required for this PR. Optional follow-up: replace the pre-existing process.env.DATABASE_URL assignment in the job-board integration test with the validated env path, in a separate change.
Full details: No Typescript Escape Hatches
Explanation
No added line in the changed TypeScript files uses any, @ts-ignore, @ts-expect-error, or a non-null assertion (!.). I checked the added lines in packages/api/src/routers/job-board.ts, packages/api/src/tests/integration/job-board.test.ts, and packages/api/src/tests/job-board/router-contract.test.ts, plus a whole-diff pattern search over *.ts and *.tsx. The only type assertion added is as Session in the test helper callerFor, and as const in test fixtures. The check does not list type assertions, so they do not trigger a failure.
Full details: Linked Issues check
Explanation
[#651] The PR implements one #651 scope item: ping preferences and digest opt-ins. In packages/api/src/routers/job-board.ts, six protected procedures list, add, update, and remove alert preferences, and list and set digest subscriptions. The digest mutation returns the saved choice with roleSynced: false when Discord role sync fails. Tests cover UNAUTHORIZED and FORBIDDEN access, caller-scoped ownership, independent digest tracks, and subscription isolation. The other #651 scope items are not shown in this PR: job search and sort, job and company views, saving applications and stages, people in process, officer Discord settings, and privacy checks for private applications and notes. The PR description says it does not claim the full router scope. The summary does not show whether these items already exist at head from #670 or #673. The linked issue also cites packages/api/src/routers/career.ts, but the changes are in job-board.ts. Also, the API surface snapshot is excluded under !**/*.snap, so its content cannot be checked.
Resolution
Confirm that the remaining #651 scope items exist at the reviewed head, with tests for member access and private-application and note privacy. Cite the files and tests that provide them. If they do not exist, add them or split #651 so this PR does not close it. Confirm the router file path that the issue requirements apply to.
Finishing Touches
Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Warning
Some tools did not complete. Review the errors below.
ESLint
If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.
packages/api/src/routers/job-board.ts
ESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox.
Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.
removeAlertPreference deletes data without calling createAdminAuditEvent. Pass the session actor to the workflow and write the audit event in the same transaction as the deletion.
As per coding guidelines, “any protectedProcedure mutation that deletes data or moves money, writes an event via createAdminAuditEvent.”
Source: Coding guidelines
Note
Quiet mode is enabled, so only the most important comments were posted inline. Other review comments are grouped below.
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
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
Blade needs a way for members to choose which job alerts they receive. This finishes the settings left out of #670 and uses the services from #673.
Closes #651
What
roleSynced: false.Test plan
Checklist