#374 follow-up: the "never wipe a foreign DB" check is too weak — a DB with our five generic table names plus its own data is reset #383
Labels
No labels
code-review
correctness
dos
performance
security
severity/high
severity/low
severity/medium
tech-debt
Kind/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
h-dv/code-index#383
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found by the 2026-10-15 spec review; this one is mine, from #374.
--dbthat code-index did not create is refused and left untouched. It is never wiped."schema.rs~180 decides a database is ours when it has the five tablesschema_version,files,symbols,refsandimports, or one lone emptyschema_version.schema_version= 3) plus acustomer_datatable holding a row.code-index index --dbreset it, andcustomer_datawas gone.Direction
Ownership must be positive evidence:
schema.sql).Related
The newer-schema hint (
schema_newer_message, server.rs ~4160) tells users to delete.code-index/. That destroysworkspace-idand every durable handle. Useschema::recovery_hint, which deletesindex.dbonly.Released in v0.40.0 (https://git.h-dv.de/h-dv/code-index/releases/tag/v0.40.0, PR #388, merge
a48fb945): an index is reset only when every table, index, trigger and view in it is one code-index created (anything else is refused and left byte-identical); SQLite never trusts the opened database's schema;.code-index/must be a real directory owned by the user with no links inside; state files are written durably. The Windows CI round found one more race in the link walk (a delete-pending file reads as "access denied"); fixed in960f4704before the merge.