Add scheduled, future-dated employee changes to an HR system's web API

Quick Overview

Design and implement scheduled, future-dated changes to employee records in an existing HR web application, such as a title becoming Director on January 1. Tests the data model, applying changes at write time versus read time, effective-date edge cases, API validation and test design in a short AI-assisted coding window.

Add scheduled, future-dated employee changes to an HR system's web API

Company: Rippling

Role: Software Engineer

Category: Software Engineering Fundamentals

Difficulty: hard

Interview Round: Onsite

You are working in an existing HR system: a web application whose backend stores employee records and serves a web API that the frontend uses to view and edit employees. Add a feature that lets an administrator schedule a change that takes effect on a future date, for example "starting next January 1, this employee's title becomes Director." The round allows an AI coding assistant. Before any code, the interviewer expects a long trade-off discussion that feels close to system design: how the data model should change, and whether scheduled changes should be applied when they are written or when the data is read. In the reported round about 20 minutes remained for coding, enough for the backend change and its tests; the frontend was not changed. Assume the backend currently keeps one row per employee with fields such as name, title, department and manager, and that `GET /employees/{id}` and `PATCH /employees/{id}` read and update that row immediately. ### Clarifying Questions - Which fields can be scheduled: only the title, or also department, manager and compensation? Can one scheduled change update several fields together? - Is the effective date a calendar date, and in whose time zone does "January 1" begin: the company's, the employee's work location's, or UTC? - Can an employee have several pending changes, including two for the same field on the same date? If so, which wins, or should the second be rejected? - Can a pending change be edited or canceled, and by whom? Are backdated changes, with an effective date already in the past, allowed? - If an administrator edits a field directly while a scheduled change to that field is pending, or has just become due, which value should the employee end up with? - Do other systems (payroll, access control, notifications, search) need to learn about a change at the moment it takes effect? - Should the API answer "what will this employee look like on date X", "what did they look like on date X", or both? ### Part 1: Data model and when changes take effect Propose how the data model changes to store scheduled changes. Compare applying them at write time (something updates the employee record when the date arrives) with applying them at read time (reads compute the record from the stored changes). Choose one, or a combination, and justify the choice. ```hint Midnight on the effective date For each approach, ask what a reader sees in the first minutes of the effective date, and what happens if whatever applies the change runs late or fails. ``` ```hint Who else reads the employee row List the code paths that read the current employee record today, not just the endpoint you are about to change, and check which approach keeps all of them correct. ``` #### What This Part Should Cover - A storage shape for pending changes that allows more than one per employee and keeps history - Write-time versus read-time application compared on correctness at the boundary, read cost, failure behavior and impact on existing readers - How a direct edit and a pending change to the same field interact - Time zones and the exact meaning of an effective date ### Part 2: Implement the backend Implement the backend change with the AI assistant: endpoints to schedule a change, list pending changes and cancel one, and reads that return the correct employee state on and after the effective date. Review the assistant's plan before it writes code. If time remains, describe or make the frontend change that lets an administrator schedule a change and see the pending ones. ```hint Make today an input Decide how the code learns the current date, so that effective-date behavior can be exercised in a test without waiting for a real date to arrive. ``` #### What This Part Should Cover - Endpoints with validation and clear errors: unknown employee, unknown field, dates that are not in the future, conflicting changes, canceling a change already in effect - Read logic that is correct at the boundary and deterministic when several changes are due - Safe concurrent writes and, if a background job applies changes, a job that can run twice without harm - A reviewed, coherent plan rather than unreviewed generated code ### Part 3: Tests Write the test cases for the feature and argue whether they are complete. Expect the interviewer to point at cases you have missed. ```hint Walk the calendar Order your cases along a timeline: before the effective date, on it, after it, and around any job run or direct edit that happens in between. ``` #### What This Part Should Cover - Before, on and after the effective date, with a controlled clock - Multiple changes, conflicts, cancellation and direct edits around a pending change - Validation failures and API status codes - Idempotence of anything that applies changes ### What a Strong Answer Covers - Trade-offs explained clearly before coding, ending in a decision the interviewer can follow - A data model that supports multiple pending changes, cancellation and history - Correct employee state at the effective-date boundary, independent of when any job runs - A working backend change with tests inside the short coding window, achieved by planning first and reviewing the AI assistant's output - Awareness of the frontend and of downstream systems even if they are not changed in the round ### Follow-up Questions - How would you answer "what was this employee's title on a past date", and what must you store for that? - A title change should update the employee's access permissions and payroll at the moment it takes effect. How do those systems learn about it exactly once? - An annual promotion cycle schedules thousands of changes for the same January 1. What could break, and how would you handle it? - A scheduled manager change would create a reporting loop once other pending changes take effect. Where and when would you detect it?

Overview: Design and implement scheduled, future-dated changes to employee records in an existing HR web application, such as a title becoming Director on January 1. Tests the data model, applying changes at write time versus read time, effective-date edge cases, API validation and test design in a short AI-assisted coding window.

Read the full Rippling Software Engineer interview experience this question came from

Rippling logo
Rippling
Nov 4, 2026
hardSoftware EngineerOnsiteSoftware Engineering Fundamentals
0
0

You are working in an existing HR system: a web application whose backend stores employee records and serves a web API that the frontend uses to view and edit employees. Add a feature that lets an administrator schedule a change that takes effect on a future date, for example "starting next January 1, this employee's title becomes Director."

The round allows an AI coding assistant. Before any code, the interviewer expects a long trade-off discussion that feels close to system design: how the data model should change, and whether scheduled changes should be applied when they are written or when the data is read. In the reported round about 20 minutes remained for coding, enough for the backend change and its tests; the frontend was not changed.

Assume the backend currently keeps one row per employee with fields such as name, title, department and manager, and that GET /employees/{id} and PATCH /employees/{id} read and update that row immediately.

Clarifying Questions Guidance

  • Which fields can be scheduled: only the title, or also department, manager and compensation? Can one scheduled change update several fields together?
  • Is the effective date a calendar date, and in whose time zone does "January 1" begin: the company's, the employee's work location's, or UTC?
  • Can an employee have several pending changes, including two for the same field on the same date? If so, which wins, or should the second be rejected?
  • Can a pending change be edited or canceled, and by whom? Are backdated changes, with an effective date already in the past, allowed?
  • If an administrator edits a field directly while a scheduled change to that field is pending, or has just become due, which value should the employee end up with?
  • Do other systems (payroll, access control, notifications, search) need to learn about a change at the moment it takes effect?
  • Should the API answer "what will this employee look like on date X", "what did they look like on date X", or both?

Part 1: Data model and when changes take effect

Propose how the data model changes to store scheduled changes. Compare applying them at write time (something updates the employee record when the date arrives) with applying them at read time (reads compute the record from the stored changes). Choose one, or a combination, and justify the choice.

What This Part Should Cover Guidance

  • A storage shape for pending changes that allows more than one per employee and keeps history
  • Write-time versus read-time application compared on correctness at the boundary, read cost, failure behavior and impact on existing readers
  • How a direct edit and a pending change to the same field interact
  • Time zones and the exact meaning of an effective date

Part 2: Implement the backend

Implement the backend change with the AI assistant: endpoints to schedule a change, list pending changes and cancel one, and reads that return the correct employee state on and after the effective date. Review the assistant's plan before it writes code. If time remains, describe or make the frontend change that lets an administrator schedule a change and see the pending ones.

What This Part Should Cover Guidance

  • Endpoints with validation and clear errors: unknown employee, unknown field, dates that are not in the future, conflicting changes, canceling a change already in effect
  • Read logic that is correct at the boundary and deterministic when several changes are due
  • Safe concurrent writes and, if a background job applies changes, a job that can run twice without harm
  • A reviewed, coherent plan rather than unreviewed generated code

Part 3: Tests

Write the test cases for the feature and argue whether they are complete. Expect the interviewer to point at cases you have missed.

What This Part Should Cover Guidance

  • Before, on and after the effective date, with a controlled clock
  • Multiple changes, conflicts, cancellation and direct edits around a pending change
  • Validation failures and API status codes
  • Idempotence of anything that applies changes

What a Strong Answer Covers Guidance

  • Trade-offs explained clearly before coding, ending in a decision the interviewer can follow
  • A data model that supports multiple pending changes, cancellation and history
  • Correct employee state at the effective-date boundary, independent of when any job runs
  • A working backend change with tests inside the short coding window, achieved by planning first and reviewing the AI assistant's output
  • Awareness of the frontend and of downstream systems even if they are not changed in the round

Follow-up Questions Guidance

  • How would you answer "what was this employee's title on a past date", and what must you store for that?
  • A title change should update the employee's access permissions and payroll at the moment it takes effect. How do those systems learn about it exactly once?
  • An annual promotion cycle schedules thousands of changes for the same January 1. What could break, and how would you handle it?
  • A scheduled manager change would create a reporting loop once other pending changes take effect. Where and when would you detect it?