feat(recruiting): Rust module + first command + migration 013 (FHR-71)#94
Merged
matthewod11-stack merged 1 commit intoMay 26, 2026
Conversation
Vertical slice for the Recruit module — the foundation S0.3+ build on. - migration 013_recruiting.sql: adds the recruiting_searches container with a seed_employee_id FK (ON DELETE SET NULL). The nullable FK seam supports the context-aware sourcing moat from day 1 (DECISIONS.md #5); ON DELETE SET NULL keeps HR and recruiting decoupled (architecture finding #1 — removing the module never breaks the HR side). - src-tauri/src/recruiting/: directory module with create_search + list_searches helpers + 2 tests (round-trip + FK SET NULL regression guard that locks in the HR/recruiting decoupling decision). - src-tauri/src/commands/recruiting.rs: Tauri bridge wrapping the two helpers. Registered in lib.rs generate_handler!. - src/lib/tauri-commands.ts + types.ts: createRecruitingSearch / listRecruitingSearches wrappers + RecruitingSearch type. Verification: - cargo test --manifest-path src-tauri/Cargo.toml: 480 passing (was 478, +2 new), 0 failing, 1 ignored. - npm run type-check: clean. - Dev DB at migration 12 confirmed; 013 will apply on next dev-app launch (verified via fresh-install + legacy-upgrade test paths). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds the first vertical slice of the new Recruiting (Sourcerer) module across DB schema, Rust domain + Tauri command bridge, and frontend TS types/command wrappers.
Changes:
- Introduces migration 013 to create
recruiting_searcheswithseed_employee_idFK (ON DELETE SET NULL) and supporting indexes. - Adds a new Rust
recruitingmodule withcreate_search/list_searcheshelpers plus two integration-style tests. - Exposes Tauri commands (
recruiting_create_search,recruiting_list_searches) and wires up TS types + invoke wrappers.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/lib/types.ts | Adds RecruitingSearch TS type matching Rust/DB shape (snake_case). |
| src/lib/tauri-commands.ts | Adds frontend invoke wrappers to create/list recruiting searches. |
| src-tauri/src/recruiting/mod.rs | Implements recruiting domain helpers + tests for round-trip and FK SET NULL behavior. |
| src-tauri/src/lib.rs | Registers the recruiting module + commands in the Tauri handler. |
| src-tauri/src/db.rs | Adds migration 013 to the embedded migration inventory. |
| src-tauri/src/commands/recruiting.rs | Adds Tauri command bridge for recruiting create/list. |
| src-tauri/src/commands/mod.rs | Exposes the new recruiting commands submodule. |
| src-tauri/migrations/013_recruiting.sql | Adds recruiting_searches table + indexes, including seed_employee_id FK with ON DELETE SET NULL. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
013_recruiting.sqlrecruiting_searches"run" container with aseed_employee_idFK that supports the context-aware sourcing moat from day 1 (perDECISIONS.md[PHASE-5.1] Replace distribution config placeholders before release #5)SET NULLregression guard); type-check cleanWhat's in the slice
src-tauri/migrations/013_recruiting.sql—recruiting_searchestable + 2 indexes.seed_employee_id REFERENCES employees(id) ON DELETE SET NULLkeeps HR and recruiting decoupled per architecture finding [Research] Freemium API model research for launch strategy #1: deleting an employee never destroys recruiting history.src-tauri/src/recruiting/mod.rs— directory module (anticipatingadapters/,intake/,scoring/submodules per spec).create_search+list_searcheshelpers + 2#[tokio::test]s.src-tauri/src/commands/recruiting.rs— Tauri bridge. Registered inlib.rs::generate_handler!(commands 150 + 151).src/lib/types.ts+src/lib/tauri-commands.ts—RecruitingSearchtype +createRecruitingSearch/listRecruitingSearcheswrappers.Test plan
cargo test --manifest-path src-tauri/Cargo.toml→ 480 / 0 / 1npm run type-check→ cleansqlite3 schema_migrations; ready to apply 13 on next dev-app launchnpm run tauri:devand confirm"Database initialized successfully"with no migration errorsLinear
Branching
Branched from
origin/main, not stacked on #91 (FHR-70). FHR-70 and FHR-71 are additive and onlyrelated(notblocked-by) in Linear. Both PRs can merge independently in either order.🤖 Generated with Claude Code