Repository navigation
fix(core): bound result bytes, keep MongoDB number types, hold FFI secrets in secrecy, keep long iOS query values whole and give each iOS connection one session owner - #4201
Merged
Conversation
…crets and own the iOS session per connection
… the limits exactly, wipe the read blob, close IO-10 gaps
…nd the byte limit
…core # Conflicts: # core/crates/core/src/document/document_write.rs # core/crates/drivers/mongodb/src/cursor_rows.rs # core/crates/drivers/mongodb/src/editor_run.rs # core/crates/drivers/mongodb/src/rows.rs # core/crates/drivers/mongodb/tests/integration/statements.rs # core/docs/decisions/README.md # linux/docs/drivers/mongodb.md # windows/src/TablePro.App/Views/TableTabView.xaml.cs # windows/src/TablePro.App/Views/WorkspaceView.xaml.cs
This was referenced Nov 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Audit wave 5 (2026-11-10 audit), iOS and the shared core, with the Linux and Windows parts they reach.
iOS long values (IO-06)
iOS session (IO-10)
ConnectionSessionModelper connection owns the session, catalog, pending loss and the one check, follow and catalog reload; its lifecycle is theConnectionSessionStateenum.ConnectionCoordinatoris the per-scene facade with the same API.Byte limit (CD-06)
RunOptions::byte_limit), throughByteLimitSinkaround every editor session the core opens. The crossing row stays whole; the statement is never cancelled for bytes. MongoDB stops collecting itself. Batches flush at 256 rows or 4 MiB.Truncation::ByteLimitandResultEvent::ByteLimitReachedreach the FFI, C#, the Linux banner and the Windows status. Table pages are exempt: both pagers read a short page as the last.PostgreSQL row limit (CD-03)
linux/docs/drivers/postgresql.md.MongoDB numbers (CD-07)
Value::Int32keeps an int32 apart from a long. An edited number saves in the type it was read as when the new value is one; otherwise, and for null, missing or new cells, the column's type. The save carries each cell's read value; Extended JSON and mongosh literals keep the width; the FFI keeps it privately. Core ADR 0020 amends Linux ADR 0014.FFI secrets (CE-09)
SecretStringoverString, so Rust holds each one insecrecyfrom the lift on. The Credential Manager path usesZeroizingand wipes the blobCredReadWreturns beforeCredFree. C#ConnectionSecrets,ParsedConnectionUrlandSecretAnswerprint[REDACTED].SecureString, per Microsoft). Listed incore/ARCHITECTURE.md, Bindings.Tests changed on purpose
DuckDBDriverTests.testStreamingMatchesMaterializedAcrossTypes;followCommitsPlacementWithItsTables,followYieldsToAnEditStartedDuringItsFetch,editArrivingDuringTheFetchPinsTheWindow,editPinsALostWindowAgainstAnotherDatabasegate the one shared read;followOvertakenBySecondSwitchFollowsTheNewestrenamedovertakenSwitchNeverLands.limit_title_for_server_stopped_without_totaland the editor banner test take the new wording;an_update_sets_only_the_moved_cell_and_keys_on_the_whole_primary_keyreads an int32.cells.rs,rows.rs,dialect.rs,json_cellsandstatements.rstests and conformancedocument.rsread int32 asInt32;the_drivers_row_limit_is_swallowed_for_a_set_already_cutkeepsServerStopped.Needs the maintainer
Docs: TableProApp/docs#200 (draft).
Test plan
Rust: clippy
-D warningson the workspace without the Linux app crate;cargo teston the same set: 4,153 passed, 8 failed, all macOS-only and untouched by this PR (Linux/procmemory peak, listen backlog,/private/varpath, ssh-agent check). The Linux app crate (glycin needs Linux), the Docker driver tests and the .NET build and tests run on CI only.iOS:
TableProCorepackage tests (125) and 381 iOS tests passed for IO-06 and the first IO-10 stage; the app and tests build after the shared model, but this machine lost its simulator runtime, so the iOS tests ran on CI only.C# bindings regenerated with uniffi-bindgen-cs 0.11.1.
New:
CellTests,ConnectionSessionStateTests, query-editor, row-detail, buffer and coordinator cases (D1 to D4 and each review fix);ByteLimitSink,RowBatch,retained_bytes, session wrap, conformancebyte_limit, FFIbyte_limit, C#ByteLimitTests,ConnectionUrlTests,RunResultsTests; Int32 identity, order, bind and parse tests, FFIcolumn_cells, the Docker testan_edited_number_keeps_its_own_bson_type.Reviewed in five rounds by a Claude agent that did not write the change, with the security lens on CE-09 and CD-03.
After merging main (feat(windows): edit table rows and move the tab lifecycle into models #4194 row edits, fix(linux-mongodb): seed-list login, field-safe writes and exports, UUID columns, drops that ask, stops on Atlas free tier #4202 MongoDB): the new row-edit, document and conformance tests carry the read value and
SecretString;a_cell_read_as_null_or_not_a_number_takes_the_columns_typedrops its null case, since a null edit is now$unset; the export test reads_idasInt32(1), since anIntexports asNumberLong. Workspace clippy,tablepro-core(1045),tablepro-driver-mongodb(70),tablepro-ffi,tablepro-session, the .NET solution and the iOS build-for-testing pass;resident_peakfails on macOS as on main.