Discovering work that may have required a permit does not mean you should guess at a fix. The next step is to identify the actual scope, determine what the city requires now and understand what can still be inspected or documented.
Building departments use their own terminology, deadlines and procedures. Treat this as a practical orientation and verify the current rule with the jurisdiction that issued — or would issue — the permit.
Some jurisdictions have an after-the-fact or legalization path, but the required steps depend on the work and what can be verified.
Sometimes concealed work must be exposed or otherwise documented so an inspector can verify it. The city determines what is necessary.