Skip to content

fix(ai): count one-item deletes as writes, keep Edit off service topics and ScyllaDB's audit log, pin dashboard tiles, and read MATCH_RECOGNIZE at Read-Only - #4262

Merged
datlechin merged 2 commits into
mainfrom
fix/d-safety3
Nov 13, 2026
Merged

datlechin merged 2 commits into
mainfrom
fix/d-safety3

Conversation

@datlechin

@datlechin datlechin commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

Summary

Leftovers of #4260 from the 2026-11-12 audit (SF-1, SF-2, SF-3).

  • SF-1, ScyllaDB: AI Edit mode refuses row changes in the audit keyspace, where ScyllaDB 2026.1's table audit backend writes audit.audit_log. On Cassandra audit stays a user keyspace, and the sidebar still lists it.
  • SF-1, Kafka: Edit refuses PRODUCE into a topic another service keeps its state in: a name starting with _ (Schema Registry's _schemas, Confluent's internal topics) or ., MirrorMaker 2's .internal topics, Kafka Connect's connect-configs, connect-offsets and connect-status (the names Kafka ships in connect-distributed.properties), and Kafka Streams' -changelog and -repartition topics. Neither the broker nor Schema Registry says which topics a worker or a registry was configured with, so only these names are read.
  • SF-1, one-item deletes: deleting one document, row, key or record by its ID tiers as a write, as DELETE ... WHERE id = 1, DynamoDB DeleteItem and MongoDB deleteOne already do, so Edit runs it. Covers Elasticsearch _doc, Typesense, a Qdrant delete of one point ID, Weaviate's class route, Firestore, Realtime Database nodes below a table, Bigtable, Memcached delete, etcd del without --prefix, and SurrealDB DELETE table:id. An index, a collection, a batch, a range, a prefix or a query stays destructive.
  • Realtime Database: a PUT or PATCH that replaces a top-level node now counts as destructive, since it drops every record under it.
  • Memcached: the gate reads text with the driver's parser, so an escaped "flush\x5fall" counts as the flush_all it runs.
  • etcd: del with a range end or --from-key is refused; the driver used to drop them and delete only the first key.
  • Weaviate: the grid's row update and delete use /v1/objects/{class}/{id}. The class-less route deletes that UUID in every collection (Weaviate 1.40 usecases/objects/delete.go).
  • SF-2: a Server Dashboard tile runs in the session's turn, the lease a query tab takes, pinned to the database and schema the Read-Only check was asked about. A tab can no longer move the schema between the check and the run, a tile no longer shares the connection with a tab's running statement, and a cancelled tile stops on the server. The check itself stays before the turn, as a query tab's does: the turn is not reentrant and the Oracle catalog read can need it.
  • SF-3: at Read-Only on Oracle, MATCH_RECOGNIZE runs. In its MEASURES and DEFINE, PREV, NEXT, FIRST, LAST, CLASSIFIER and MATCH_NUMBER are the clause's own, RUNNING and FINAL are keywords, and the row pattern (PERMUTE included) is syntax. Elsewhere, a nested query included, those names are user functions. A measure's alias and a DEFINE variable are no longer read as bare function names. A clause that does not read in Oracle's section order is read as before. DM8 has no MATCH_RECOGNIZE.
  • Widened on purpose: a one-item delete no longer asks as a destructive statement in a query tab at Silent, and MCP runs it through execute_query instead of confirm_destructive_operation. An etcd plugin from before this change still refuses del k in Edit until it updates with the next release.

Tests changed on purpose:

  • EditModeDataCommandsRequestTests/dataDeleteIsListedButDestructive, now oneItemDeleteRunsInEdit.
  • EditModeDataCommandsCommandTests/memcachedDeleteIsData, now memcachedDeleteRunsInEdit; etcdKeepsEarlierRefusals and etcdRunsDataWork move del app/a to the commands Edit runs.
  • EtcdCommandParserStatementPolicyTests: del /a moves from the delete lines to the write lines.
  • QueryClassifierNonSqlTests: etcdTiers, etcdDestructiveSubcommands, memcachedTiers, typesenseTiers, bigtableTiers, firebaseTiers, firebaseWritesThatDelete, firebaseMetadataOnlyWritesDelete, firebasePathStartingWithMark and requestTextTiersWhatTheDriverReceives follow the one-item rule and the Realtime Database table rule.

Docs: TableProApp/docs#233

Test plan

  • package TableProCore: TableProSQLGrammarTests (531, new SurrealRecordDeleteTests, MATCH_RECOGNIZE cases in SQLReadOnlyFunctionCallsTests and SQLBareNameCallsTests, ScyllaDB audit in SQLDataStatementTests), WeaviateStatementGeneratorTests, and the Kafka, Bigtable, Firebase, Qdrant and Memcached core targets pass.
  • test with the Edit mode suites, ExternalStatementGateTests, QueryClassifierNonSqlTests, QueryClassifierOneItemDeleteTests, EtcdCommandParser suites, DashboardTileBoardTests, DashboardTileSessionTurnTests (a tile waits for a held session turn and runs pinned to the checked schema; a cancelled tile reaches the driver's cancel), ReadOnlySafeModeEntryPointTests and ExecutionGateTests: 435 pass. plugins passes.
  • apple/scripts/probes/check-match-recognize-calls.sh on Oracle 23.26.3 (gvenzl/oracle-free) agrees with the reading; on DM8 (2023-04 build) MATCH_RECOGNIZE is a syntax error.

…cs and ScyllaDB's audit log, pin dashboard tiles, and read MATCH_RECOGNIZE at Read-Only
@datlechin
datlechin enabled auto-merge (squash) November 13, 2026 08:14
@datlechin
datlechin merged commit 12ba6d1 into main Nov 13, 2026
11 checks passed
@datlechin
datlechin deleted the fix/d-safety3 branch November 14, 2026 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant