Users report two problems with the notes service. Notes saved before the service reconnects are gone afterwards, even though it is given the same SQLite database path. And when two tenants use the same note key, each can read and overwrite the other's note. Review the service/repository boundary and implement durable, tenant-scoped storage.
Keep Notes(path).create(tenant, key, text), read(tenant, key), and close(). Creating an existing tenant/key replaces its text; return None from create and None for missing reads. Use the supplied SQLite path, commit before create returns, and make independently connected services see committed notes. Identical keys in different tenants must remain separate.
Flag the statement in repository.py and the statement in service.py behind these reports, explain the missing guarantees, then fix both files.