Repository navigation
feat(maintenance): typed-target confirmation, a per-row preview and the engine principal - #1246
Merged
Merged
Conversation
cevheri
force-pushed
the
feat/maintenance-preview
branch
from
October 3, 2026 12:22
c213435 to
e8475d0
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
…ipal on the provider contract
…target and preview
The table and its count missed the two account-administration routes, and the preview route was added on top of that stale base. Seven handler sites call auditRoleDenial, plus the proxy; a unit test now derives the set from src/app and holds the table and the numerals to it. Fixes review findings SC-1 and R1.
The preview route served a preview for a spec declaring preview: true with both placements false, which no surface draws. It now answers the no-preview 400 unless the per-row placement is offered, and the capability test holds every shipped spec that declares a preview to perEntity: true and a provider that implements previewMaintenance. Fixes review finding B1.
Facts were keyed by label alone, and a preview that names each vector field under one label logged a duplicate-key warning. Each fact is now keyed by its label and how many facts before it share that label. Fixes review finding B2.
Both maintenance routes destructured the parsed body directly, so null answered 500 with the raw TypeError message and text that is not JSON answered 500 as well. A body that is not a JSON object now answers 400 "Invalid request body" before any provider is opened, on the existing route and on the preview route that copies its checks. Fixes review finding B3.
The comment said seventeen direct call sites while its own grep already answered twenty-one on main, and the preview route made it twenty-two. It now names all twenty-two files, the two that hold two call sites each, and the thirty-two route files in total. Fixes review findings B4 and R2.
The docblock described a tarball type check as if the repository ran it. It was a one-off pre-merge measurement in a gitignored folder, so the docblock now says what this file covers and what it does not. Addresses review findings SC-2 and R3; a tracked tarball check in CI is deferred.
Split two sentences that shared a line, and call the engine_user rows completed, failed (success: false) and thrown, since "refused" read as the route's own 400 refusals, which write no maintenance row. Fixes review findings R4 and R5.
The new route test copied the five-key auth stub that BACKLOG D85 records as debt, which also missed two of the module's seven exports. It now spreads the real module and replaces getSession alone, the form D85 prefers, and D85 is re-measured: 40 files mock the module, eight of them by spreading it.
The census holds one row per shipped type-id, so rebasing onto main with the Neo4j provider (#1239) made the record miss a member: a type error and two failing cases. Neo4j offers no per-row maintenance control and declares no extension of spec 3.11, so its row is the empty one.
The census holds one row per shipped type-id, so rebasing onto main with the Db2 provider (#1238) made the record miss a member. Db2 offers analyze and optimize per row, on both tabs and both row menus, and declares no operation outside MaintenanceType: 11 of 22 type-ids now offer per-row controls on the tabs and 10 on the row menus.
…spec names Main gained MaintenanceOperationSpec.kinds with the Db2 provider (#786): a per-row control is offered only on the object kinds its operation names. The two row menus pass the row kind for analyze and vacuum, and now pass it for the declared operations outside MaintenanceType as well, so a declared operation that names its kinds is not offered on a view. The Operations and Tables tabs list tables and name no kind, as before.
cevheri
force-pushed
the
feat/maintenance-preview
branch
from
October 3, 2026 13:20
e8475d0 to
26a96e9
Compare
|
cevheri
added a commit
that referenced
this pull request
Oct 3, 2026
…n found (#1249) D152: a SQLite BLOB reaches the standalone grid as an object keyed by byte index, so no binary reader recognises it (measured in #1248's browser pass on the branch and on main before it). D153: the etcd connection-options test makes eight RSA keys in a beforeAll bounded by bun's default 5 s hook timeout, which ran out once on #1246's CI. U74: the packaged StudioWorkspace reads process.env unguarded and throws on mount in a host that defines no process (measured in #1247's browser pass).
cevheri
added a commit
that referenced
this pull request
Oct 3, 2026
…und (#1284) D159, D160 and X24 come from the browser pass of the maintenance extensions (#1246); D161, X25, X26 and X27 from the final acceptance pass of the vector-family work. Each predates that work. X23 no longer says no shipped engine declares vector columns, and the Chinese README's seed type list gains db2.
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.



Lets a provider declare per-row maintenance that asks for more than a confirm click, and record who ran it on the engine.
No shipped provider declares either new form, so every engine's Operations, Tables, tree and mobile controls are unchanged;
tests/unit/db/maintenance-surface-census.test.tspins each shipped provider's per-row controls.MaintenanceOperationSpec.confirmationgains"typed-target": the admin types the target's name to confirm. It is accepted only on a per-row control (perEntity: true,global: false), so a whole-database card can never run on one click.MaintenanceOperationSpec.previewand the publishedMaintenancePreview: a read-only per-row preview the dialog shows first, with its facts and an optional refusal that offers no confirm button. It is served byPOST /api/db/maintenance/preview, admin-only, under the same rate-limit bucket and request checks as the maintenance route, and it calls only the provider'spreviewMaintenance.DatabaseProvidermethodspreviewMaintenanceandengineUser; the maintenance route writes the engine principal asengine_useron every audit row, never a secret.Published type changes, for the release note:
MaintenanceOperationSpec.confirmationwidened,MaintenanceOperationSpec.preview,MaintenancePreview(fromsrc/exports/types.ts), andpreviewMaintenanceandengineUseronDatabaseProvider.