Week 9 of my Google Summer of Code journey with CircuitVerse (July 20th to July 26th) was a quieter week, but an important one.
After the excitement of passing midterms, I spent most of this week thinking about something my mentor Aboo had raised: how type-safe is the canonical pipeline actually?
🧠 Aboo's Concern: Type Safety
The canonical pipeline was already written in TypeScript, but there were still places where I was relying on dynamic structures such as:
[key: string]: unknown
CircuitVerse components are a little tricky here because different components expose different ports and properties at runtime.
At first, using unknown felt like the safest way to represent all of that. But after discussing it with Aboo, I realised the better approach was to keep unknown only for values whose types genuinely can't be known beforehand — and document those cases clearly.
🛠️ Rethinking the Type Structure
I spent time tracing where the loose types were actually entering canonical.ts and importCanonical.ts.
The direction we discussed was to keep the pipeline strongly typed for everything we know, move shared canonical interfaces into a dedicated types folder, and isolate the genuinely dynamic simulator boundary instead of allowing unknown to spread everywhere.
The shared definitions would live under:
v1/src/simulator/src/types/
This keeps the canonical data model separate from the implementation and makes the types reusable by both export and import.
🎒 Back to College
The coding side was a little slower this week because I also had to travel back to college for the new semester. 🚆🎒
Between travelling, settling back in and getting everything ready, I could not put in the same number of hours as the previous weeks.
Still, this week gave me a clear direction for the refactor instead of rushing into another patch.
🔮 What's Next
Once I am properly settled back at college, the plan is to start implementing the stricter type structure and clean up the weak points inside the canonical pipeline.
I will get back to coding next week! ⚡💻
Top comments (0)