Command reference
oko database check
Connects to the shared Oko database as this person, resolving the database afresh through Stado, and says what every row will carry: the REST endpoint, the user id, the email and the organization — or the step that refused.
Invocation#
oko database check [--json]Inputs and options#
- None; the signed-in session at ~/.oko/auth-session.json and, for a member of several organizations, OKO_ORGANIZATION_ID.
- The `database-schema` target requires `OKO_TEST_SOURCE_REVISION` and a signed-in dedicated database. It compares admission with direct reads of every declared column and RPC signature, argument names and execute privilege. It retains the committed candidate, binary digest, actual commands, request bodies, statuses and responses under `.build/database/<run>/schema-report.json`. Run against both compatible and genuinely incompatible dedicated schemas or roles; one compatible run does not cover missing capabilities. The journey is read-only and does not exercise the mutating functions themselves.
Output and state effect#
- Prints `database`, `rest`, `user_id`, `email`, `org_id` and `schema`; resolves afresh and tries to retain the result after finding the organization. A failed retention is reported on stderr. This can repair an unreadable or malformed ~/.oko/database.json that ordinary reads now refuse rather than silently resolving again. Schema admission checks every declared table column and RPC signature, argument names and execute privilege through the read-only `oko_schema_functions` catalog operation. It does not execute the mutating RPCs or claim their behavior passed qualification. Install canonical migrations `oko_record_message_reading` and `oko_schema_functions` before the corresponding client. The native database Check and installation admission use this same verifier.
Refusals and safe exits#
- `HOME is not set; the signed-in Wisent session cannot be located`; `cannot read the signed-in Wisent session at <path>: <error>`; `the signed-in Wisent session at <path> is unreadable: <error>`; `<email> belongs to no Wisent organization`; `<email> belongs to several organizations (<ids>); choose one with OKO_ORGANIZATION_ID`; `the Wisent session could not be refreshed: <refusal>` and the resolution refusals Stado answers. A missing session, malformed persisted state, organization refusal and provider refresh failure are distinct causes; the command does not label all of them as a missing login.
- A missing signature, missing execute privilege, different named arguments, duplicate or omitted capability observation, unavailable catalog RPC and unreadable response each refuse with the actual operation and cause. A successful read of one column does not establish that the full consumer schema is available.