// library
Severity
Bucket
Use the 'comma, ok' idiom for type assertions to safely handle cases when the assertion fails. Only use a single-value type assertion (which panics on failure) if you are absolutely sure (by prior checks or program logic) that the interface holds the correct type.
In Express, use serve-static with setHeaders to apply "Cache-Control: public, max-age=31536000, immutable" for files matching /\.[0-9a-f]{8,}\./ and "Cache-Control: no-cache" for HTML. Also set correct Content-Type.
Emergency access to ePHI must go through a dedicated break_glass path that requires reason, approver, limited time window, and automatic post-incident review. The PR must include changes to the audit log schema and runbook.
If a PR changes an API route/controller signature (path, method, params, request/response schema), update the API specification in the same PR. To enable this check, reference the spec file path in the PR (e.g., `openapi.yaml`, `swagger.json`). If multiple specs exist, update the relevant one. Warn when code and spec drift (new params not documented, status codes changed, response shape changed).