Repository navigation
Conversation
albert20260301
left a comment
There was a problem hiding this comment.
The registry needs one consistent snapshot for both execution modes. On 98c6202, defineOperations() freezes a copy for the returned registry, but its browser client closes over the caller's original operations object. I reproduced this through public exports:
- Create
definitions = { answer: originalOperation }andregistry = app.defineOperations(definitions). - Replace
definitions.answerwith a different operation of the same input/output type. - Create a browser client from
registry, and a server handler from that sameregistry.
The browser returns the replacement result; the server returns the original result, despite Object.isFrozen(registry) === true. Derived server filters are also captured before that replacement.
Please snapshot once and use that same operation snapshot for filter derivation, browser execution and server registration; cover mutation of the input map before a client is created. Local build and the existing 12 operation tests pass, but they do not cover this divergence.
This finding does not decide the draft's shorthand-inference or hosting-build questions. Backend operation registration and browser-safe contract generation remain explicitly unimplemented, as documented.
|
On I reproduced this through the public The earlier registry-snapshot finding also remains reproducible under the new API: an installed public iframe transport in Chromium plus Local static checks and 42 focused operation/message/authoring/preview tests pass. Required CI job 133269041779 fails |
albert20260301
left a comment
There was a problem hiding this comment.
Both reported defects are fixed at 1fd7008. The independent Chromium registry-mutation probe now returns original from both browser and server clients. Through public serveAppFile(), declared ready reaches the injected backend with SQL; missing, constructor, and toString return 404 with zero backend calls. The new row-limit bound is also covered by the regression tests.
Reviewed the full delta from the previously reviewed dc44e0a; local static checks and all 40 operation/message/preview tests pass, and required CI is green. This supersedes my earlier changes request for those defects.
This reviews the SDK change, not deployment readiness: the companion frontend #3005/backend #5056 drafts remain prerequisites, and their integration is unverified here.
albert20260301
left a comment
There was a problem hiding this comment.
Reviewed the additional 21-file delta through ce22907: query SQL stays literal, unsupported SDK shorthand is rejected, and the date-bound helper and finding starters use explicit parameters. Local static checks, 186 focused tests and all three starter gates pass; required CI is now green.
The earlier registry-snapshot and inherited-query-ID fixes remain intact. This approval covers the updated SDK head; companion frontend #3005/backend #5056 integration and deployment remain unverified.
What changed
Hosted apps use
operations.createDataClient(). Local directory apps keep the operations import type-only and create an HTTP client with shared, browser-safe filter declarations. Both callclient.query()with the same operation name and input. In a hosted iframe,client.query()runs the operation'srun()function, and each named SQL query crosses the bridge asdata:querywith a registered query ID and parameter values. Locally, Bun executes the operation through/api/data/:operation. The single-file Bun preview resolvesdata:queryIDs against the extracteddefineDataAppmanifest. Thedata:sqlroute, SQL handler, explicitexecutionoption, and defaultdata:operationiframe route are removed.API for discussion
For the hosted path, the last call runs
salesByRegionin the iframe. Its inner query sendsdata:querywith{ queryId: 'salesSql', params: { region: 'EU' }, limit: 100 }. The host passessalesSqlto the existingrunDataAppQuerymutation; the backend already stores this ID and SQL fromdefineDataApp({ queries }). The operation name stays inside the app.run()receives the SQL rows and returns the operation result.For a local directory app, the server imports the same
operationsregistry. Browser code imports only its type and the shared filter declarations:Companion drafts: product frontend router and MCP render-tool query metadata. Both are needed before deploying this SDK. The existing
runDataAppQuerymutation needs no change.Verification
bun run checkwith Bun 1.4.4 covers static checks, 1,201 tests, package archives, and starter builds. All of those checks passed locally (the starter gate was rerun after removing an overbroad assertion). GitHub static, package, and three test shards passed. Test shard 4 fails inapps-dates.test.ts:61on a heading color assertion; the latest main run fails on the identical assertion with the same colors. The dependent final CI gate consequently remains red.