Skip to main content

What should a PI do in the first two weeks after inheriting a grad student's undocumented codebase?

Secure access and write down what exists before anyone changes a line of code. A 10-working-day audit takes about 20–30 hours of an engineer’s time and ends with one document: who owns each account, where the data lives, how to deploy, and what stops working if one person leaves.

The rule for the first two weeks: change nothing, record everything

An undocumented research codebase usually works because of things nobody wrote down: a key in a config file, a database on a personal account, a manual step before each deploy. Refactoring or adding features now tends to break one of those without anyone noticing until a pilot session fails.

So the two weeks have one goal: make the system survivable without its author. Tests and cleanup come after. If the student is still reachable, schedule the most important work for the days they can answer questions.

The 20–30 hour figure is a general estimate for a single web app with one database and one deployment target. Two or more apps, a mobile client, or data spread across several cloud accounts push it toward 40 hours or more.

The day-by-day audit checklist

Day Task Done when
1 Repo access: list every repository, move each into a lab or university organization, add a second admin You can grant and revoke access without the student
2 Accounts: list every cloud, domain, email and API service (AWS, Firebase, Google Cloud, model APIs) and transfer ownership Every bill goes to a lab or grant account
3 Secrets: search the code and its history for keys, passwords and tokens, rotate any you find, move them out of code No live credential sits in the repository
4 Dependencies: record language and package versions, confirm lock files exist, try a clean install It installs on a fresh machine
5 Run it locally from scratch and write down each step A second person repeats the steps
6 Deployment: trace how code reaches production, who can push, and any manual steps Deploy steps are written and tried once on a staging copy
7 Data stores: list every database, bucket, spreadsheet and export, with what each holds A data map marks identifiable student data and backup status
8 Backups: take a backup of each store and restore it somewhere else One restore has succeeded
9 Bus factor: record a walkthrough with the student and list what only they know Recording saved, gaps listed
10 Risk list: rank findings by threat to the pilot and the data A one-page plan for the next phase

What to look for in each area

Repo access and accounts (days 1–2)

The most common finding is that the code, the Firebase project or the AWS account belongs to the student’s personal email. When that address is deactivated at graduation, the lab can lose the app and its data. Transfer ownership while the student can still click accept.

Secrets (day 3)

Look in config files, .env files committed by mistake, notebooks and old commits. A key deleted from the current code is still in the history, so rotate it rather than just removing it. Store replacements in the hosting platform’s environment settings or a secrets manager.

Dependencies and local setup (days 4–5)

Research code often runs only on the laptop it was written on, against package versions that no longer install cleanly. Pin what works today. If a clean install fails, record the error; that is a finding, not a task to fix this week.

Deployment (day 6)

Find out whether deploys come from a pipeline or from someone running commands by hand. Hand deploys are where distributed research groups end up running different versions of the same app, which makes their data hard to compare.

Data stores and backups (days 7–8)

For each store, record what it holds, whether it contains identifiable student information, who can read it, and whether a backup exists. Compare that against the IRB protocol and any data use agreement with a school or district. Where they disagree, your institution’s compliance office or counsel decides what changes; the audit only surfaces the gap.

A backup you have never restored is a guess. One restore to a scratch environment is enough for now.

Bus factor (day 9)

Bus factor is the number of people who would have to leave before nobody can run the system. For most inherited research code it is one. A 60–90 minute screen recording of the student deploying, resetting a user and pulling data usually captures more than a written handover.

What a worked audit costs

If you bring in outside engineering at $85 an hour, a 24-hour audit of a typical single-app study platform comes to $2,040. A larger system at 40 hours comes to $3,400. Either way, the output is the same document: the account map, the data map, written setup and deploy steps, and a ranked risk list.

Doing it in house costs the same hours from whoever on the team is most technical. The checklist above is written so a postdoc or research staff member can run days 1, 2, 7 and 9 without an engineer.

After day 10: who keeps building

The risk list tells you which path you are on. Use it to decide, not habit.

  • Another student can keep building when the app installs cleanly, deploys from one pipeline, and the next milestone is a research change rather than a reliability one.
  • Bring in an engineering team when a pilot with real teachers or students is less than a semester away, the data map shows identifiable data without clear controls, or a funder expects production software in a Phase II.
  • Do both when the research logic belongs with the lab and the hosting, logging and deployment do not.

Reliability matters to the funder because it is research validity. If sessions fail to save, the efficacy data has holes. On an NSF-funded React/Firebase research platform used across several universities, we fixed state-driven audio lag, made saving and loading student work 100% reliable, and gave the distributed research groups one deployment pipeline. That work began with the same inventory described above.

Frequently asked questions

What should I ask the grad student before they leave?
Ask them to transfer every account and repository to lab ownership, record a walkthrough of deploying and pulling data, and list anything they do by hand. Ask which parts they would not trust in a live study. Their answers to that last question often shape the risk list.

Should we write tests during the first two weeks?
No, not yet. Tests are worth writing once you know how the system installs and deploys and which parts the pilot depends on. After the audit, start with tests around saving data and logging, because those failures cost you study data.

How do I know whether student data in the codebase is a FERPA problem?
The audit’s data map shows where identifiable student information sits and who can read it. Compare that with your IRB protocol and any data use agreement. Your institution’s counsel or compliance office decides whether anything has to change; an engineer can describe the setup but should not make that call.

Who actually does the work if we hire Smplfy?
Charlie scopes every project and makes the architecture calls, and Smplfy’s own engineers build it. The first project has a fixed scope, and you read a written scope before committing. A retainer starts only if you choose one.

Can we rebuild from scratch instead of auditing?
Sometimes a rebuild is right, but you still need the audit first. Without it, you lose the accounts, data and undocumented behavior the study already depends on. The risk list is what tells you whether rebuilding is cheaper than repairing.

Just inherited a codebase with a pilot coming up?

We offer a free 30-minute review of your pilot plan or the technical section of your proposal. Bring the repository or a demo, the pilot timeline and the funder’s requirements. Start a conversation.