Skip to main content

Swift First Verification

Run the shared School SQLite example from a checkout of teaql-io-site:

npm run verify:school -- --language swift

The complete Swift application uses the same School model as the other six runtimes. The runner generates and builds the workspace, checks root/constant bootstrap twice, saves a school with an audit reason, then starts a new process to read it back. An independent SQLite checker verifies persisted fields and relationships after every phase. Logs, exit codes and row snapshots are retained under artifacts/school/.

The Swift application installs GeneratedRuntimeModule.module, constructs the SQLite provider and trusted context, and explicitly calls try await context.ensureSchema(GeneratedRuntimeModule.module). It uses the complete module so bootstrap includes roots and constants.

Close and reopen the provider, then assert that the saved entity is still returned. Also test missing/blank comment, purpose and audit reasons, uninitialized context, and stale-version saves. Comment and purpose may appear in either order and need not be adjacent. Provider errors must propagate to the test. Record exact versions, commands, discovered test counts, and results; compilation or an unexecuted sketch is not evidence of a SQLite round trip.