Final Exam — sunnypilot Architecture Tour

Answer every question, then click Submit at the bottom. Each question is worth equal weight.

Passing score: 70/100. No state is saved — you can retry as many times as you like.

1. [Module 0] In the pub/sub pattern sunnypilot's processes use, what does a publisher need to know about its subscribers?

2. [Module 0] What is msgq?

3. [Module 1] What actually decides whether a given enabled process should be running right now?

4. [Module 1] True or false: if a process has enabled=False on this hardware, its condition function still gets called every loop to double-check.

5. [Module 1] Which environment variable, read once in manager_thread, lets you name specific processes to hold back regardless of their own condition function?

6. [Module 2] In SubMaster, when is sm.updated['carState'] True?

7. [Module 2] True or false: two separate processes can both subscribe to carState at the same time and both see every message.

8. [Module 2] When you run tools/replay/replay --demo, what is actually producing the modelV2 messages you subscribe to?

9. [Module 3] When longitudinalPlan.longitudinalPlanSource reads e2e, what does aTarget actually contain?

10. [Module 3] Which process publishes radarState?

11. [Module 3] Which field tells you whether a lead car is currently being tracked at all?

12. [Module 4] Which cereal field would you subscribe to for sunnypilot's steering-only MADS paused state?

13. [Module 4] True or false: the engage/disengage state machine can go directly from disabled to overriding on the same cycle, without ever publishing plain enabled in between.

14. [Module 4] What causes a transition from overriding back to enabled?

15. [Module 5] panda's torque rate-limit check constrains a newly commanded value against which reference?

16. [Module 5] True or false: panda's safety firmware recomputes what it believes the correct steering torque should be, independent of what controlsd requests.

17. [Module 5] What does mads_heartbeat_engaged_check do after three consecutive mismatches between panda's controls_allowed_lateral and the Linux-side heartbeat?

18. [Module 1] Why do some imports in this codebase start with openpilot. while process_config.py's own process entries use bare names like selfdrive.controls.controlsd?

19. [Module 2] What does tools/replay/replay --demo require that a real car or comma account would otherwise provide?