Skip to content

feat(recruiting): Rust module + first command + migration 013 (FHR-71)#94

Merged
matthewod11-stack merged 1 commit into
mainfrom
matthew/fhr-71-recruit-s02-rust-recruiting-module-first-command-migration
May 26, 2026
Merged

feat(recruiting): Rust module + first command + migration 013 (FHR-71)#94
matthewod11-stack merged 1 commit into
mainfrom
matthew/fhr-71-recruit-s02-rust-recruiting-module-first-command-migration

Conversation

@matthewod11-stack
Copy link
Copy Markdown
Owner

Summary

  • Vertical slice for the Recruit module (Sourcerer): directory module + first Tauri command + migration 013_recruiting.sql
  • Adds the recruiting_searches "run" container with a seed_employee_id FK that supports the context-aware sourcing moat from day 1 (per DECISIONS.md [PHASE-5.1] Replace distribution config placeholders before release #5)
  • Tests: 480 passing (was 478, +2 new — round-trip + FK SET NULL regression guard); type-check clean

What's in the slice

  • src-tauri/migrations/013_recruiting.sqlrecruiting_searches table + 2 indexes. seed_employee_id REFERENCES employees(id) ON DELETE SET NULL keeps 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 (anticipating adapters/, intake/, scoring/ submodules per spec). create_search + list_searches helpers + 2 #[tokio::test]s.
  • src-tauri/src/commands/recruiting.rs — Tauri bridge. Registered in lib.rs::generate_handler! (commands 150 + 151).
  • src/lib/types.ts + src/lib/tauri-commands.tsRecruitingSearch type + createRecruitingSearch / listRecruitingSearches wrappers.

Test plan

  • cargo test --manifest-path src-tauri/Cargo.toml480 / 0 / 1
  • npm run type-checkclean
  • Dev DB at migration 12 confirmed via sqlite3 schema_migrations; ready to apply 13 on next dev-app launch
  • (manual, optional) npm run tauri:dev and confirm "Database initialized successfully" with no migration errors
  • Once merged: FHR-72 (S0.3) builds the live Exa round-trip on top of this command

Linear

  • Closes FHR-71
  • Unblocks FHR-72 (S0.3 — round-trip one live Exa search to the UI)

Branching

Branched from origin/main, not stacked on #91 (FHR-70). FHR-70 and FHR-71 are additive and only related (not blocked-by) in Linear. Both PRs can merge independently in either order.

🤖 Generated with Claude Code

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>
Copilot AI review requested due to automatic review settings May 26, 2026 15:10
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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_searches with seed_employee_id FK (ON DELETE SET NULL) and supporting indexes.
  • Adds a new Rust recruiting module with create_search / list_searches helpers 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.

@matthewod11-stack matthewod11-stack merged commit e8243b1 into main May 26, 2026
7 checks passed
@matthewod11-stack matthewod11-stack deleted the matthew/fhr-71-recruit-s02-rust-recruiting-module-first-command-migration branch May 26, 2026 15:29
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.

2 participants