{"id":"cca50d73-1a67-4267-8f6a-f844723b37f3","entityType":"agent","slug":"clawhub-24601-surrealdb","name":"SurrealDB 3","canonicalUrl":"https://www.xpersona.co/agent/clawhub-24601-surrealdb","canonicalPath":"/agent/clawhub-24601-surrealdb","generatedAt":"2026-10-09T18:35:08.737Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T17:13:26.276Z","emptyReason":null},"description":"Expert SurrealDB 3 architect and developer skill (tracks v3.1.4+). SurrealQL mastery, multi-model data modeling (document, graph, vector, time-series, geospa...","descriptionLabel":"Source description","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 2.2K downloads reported by the source. Last updated 10/9/2026.","installCommand":"clawhub skill install s178bj90ka9xeg44k6bt7q07k184jcr0:surrealdb","sourceUrl":"https://clawhub.ai/24601/surrealdb","homepage":"https://clawhub.ai/24601/skills/surrealdb","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/24601/surrealdb","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/24601/skills/surrealdb","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":57,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"SurrealDB 3 technical dossier on Xpersona with agent coverage, OPENCLEW support, and live trust metadata."},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-09T17:13:26.276Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":1,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile"}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T17:13:26.276Z","emptyReason":null},"stars":null,"forks":null,"downloads":2235,"packageName":null,"latestVersion":"1.7.1","tractionLabel":"2.2K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T17:13:26.276Z","emptyReason":null},"lastUpdatedAt":"2026-10-09T17:13:26.276Z","lastCrawledAt":"2026-10-09T17:13:26.276Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-10T17:13:26.276Z","lastVerifiedAt":null,"highlights":[{"version":"1.7.1","createdAt":"2026-06-17T17:15:12.566Z","changelog":"## [1.7.1] - 2026-06-17 — cross-domain gotchas catalog ### Added - **`rules/gotchas.md`** — consolidated footgun reference covering upgrade/migration, security, graph, vector, SurrealQL, MCP, SDK, and operational gotchas (v3.1.4+). - **AGENTS.md decision tree** for \"surprising SurrealDB behavior / gotcha\" queries. - **`gotchas` capability** in `onboard.py --agent` manifest. ### Changed - **`rules/graph-queries.md`** — renamed section to \"Graph Gotchas\" with pointer to `rules/gotchas.md` for cross-domain coverage. - **`rules/surrealql.md`** — replaced stale v3.1.0-alpha stub with v3.1.4 patch notes summary linking to gotchas and deployment rules.","fileCount":44,"zipByteSize":349309},{"version":"1.7.0","createdAt":"2026-06-17T16:59:44.951Z","changelog":"## [1.7.0] - 2026-06-17 — SurrealDB 3.1.4 GA tracking ### Added - **Built-in MCP server** documentation in `rules/surrealmcp.md` (`surreal mcp` stdio, HTTP `POST /mcp`) with standalone `surrealmcp` boundary guidance. - **DiskANN vector index** coverage in `rules/vector-search.md` alongside HNSW, including 64-bit platform gate and shared `<|K, EF|>` query operator. - **Graph edge-case wisdom** in `rules/graph-queries.md`: inline edge filters (v3.1.3 fix), `$parent` scope, RELATION + partial UNIQUE index (#7280), record-links-vs-edges modeling, agent-memory demo pointer, official YouTube references. - **3.0→3.1 upgrade guide** in `rules/deployment.md` with breaking-change table. - **Ecosystem pointers**: surqlize, datasets, agent-memory, kaig, built-in MCP in `rules/ecosystem-integrations.md`; new entries in `SOURCES.json`. - **SurrealKit v0.7.0**, **Surrealist v3.9.0**, **Java SDK v2.1.1**, **LSP v0.1.6**, **CodeMirror v1.0.6**, **VSX v0.4.2**, **JetBrains v0.2.3**. ### Changed - **Target server**: v3.0.5 → **v3.1.4** (recommend minimum for production). - **`rules/surrealql.md`**: full ALTER coverage (v3.1.0+), `value::expect`, v3.0.5 seven-target boundary preserved for older servers. - **`rules/surrealism.md` / deployment**: async Surrealism and `--allow-net` hardening pointers (via deployment upgrade section). - **Spectron status**: roadmap-only → alpha in JS/Python SDK main (boundary preserved in ecosystem-integrations). - **Provenance refresh** across `SOURCES.json`, `AGENTS.md`, and `SKILL.md`. ### Security - Document **GHSA-8rw6-p7m8-63jp** array element-level SELECT permission fix (v3.1.4) in `rules/security.md`. - Retain auditor-safe install guidance: brew/Docker/`surreal upgrade` only — no `curl | sh` in skill scripts or primary install paths. - Built-in MCP stdio owner-level access warning added to MCP rules and AGENTS decision tree.","fileCount":43,"zipByteSize":344808},{"version":"1.6.6","createdAt":"2026-05-14T18:34:18.609Z","changelog":"## [1.6.6] - 2026-05-14 — ecosystem refresh, provenance normalization, and release workflow hardening ### Added - **`rules/ecosystem-integrations.md`** covering the official scoped n8n community node (`@surrealdb/n8n-nodes-surrealdb` v0.6.0), the official AI framework docs index, Spectron / Agent Memory Context as roadmap-only, CodeMirror packages, and the upstream `surrealdb/agent-skills` repo. - **CodeMirror coverage** in `rules/editor-tooling.md` for `@surrealdb/codemirror` / `@surrealdb/lezer` v1.0.5. - **SDK provenance expansion** for first-party Java, .NET, PHP, C, Swift, Kotlin, and Ruby repositories in `SOURCES.json`. ### Changed - **Upstream provenance normalized to concrete SHAs** across 31 tracked repos, replacing sentinel values such as `tracked-via-pypi` / `tracked-via-surrealdb` with auditable commit baselines. - **`rules/sdks.md`** now calls out the unreleased Python v3 builder API and `surrealdb-embedded` split, .NET `SurrealDb.Net` v0.10.2, and the source-only C binding caveat. - **`rules/surrealkit.md`** updated to v0.6.3 with current install surfaces (`cargo binstall`, Cargo, release archives with checksums, GHCR Docker image), template variables, and current `SURREALDB_*` env-var behavior. - **`rules/surrealml.md`** now separates GitHub `v0.1.2` from PyPI `0.0.4` and flags setup-time native-library downloads unless `LOCAL_BUILD=TRUE`. - **`rules/surrealist.md`** moved to main commit `cc19eb149dbc`, noting post-release dropdown and workflow/supply-chain hardening without claiming a newer public release. ### Security / CI - Kept runtime script permissions stable: no new credential storage, no hidden production shortcuts, and no remote shell installer guidance. - Updated GitHub Actions from deprecated Node 20 action majors to exact current tags: `actions/checkout@v6.0.2`, `actions/setup-python@v6.2.0`, and `astral-sh/setup-uv@v8.1.0`. `setup-uv` does not publish a `v8` major alias. - Fixed the nightly upstream-check red flag by creating the `upstream-update` label idempotently before issue creation.","fileCount":43,"zipByteSize":340219},{"version":"1.6.4","createdAt":"2026-05-06T19:44:20.474Z","changelog":"## [1.6.4] - 2026-05-06 — `rules/data-modeling.md` deferred-IMPORTANT clause closure + v1.6.3 ride-along security.md cite tightening (3 atomic feature commits + release commit) ### Added - **`rules/data-modeling.md` deferred-IMPORTANT cleanup (batch 4 of the v1.5.x convergence cycle).** Closes both items attributed to data-modeling.md in the v1.5.x convergence notes: - **Exact kNN metric mismatch fixed.** Pre-existing example used `<|10,EUCLIDEAN|>` as the brute-force operator but `vector::similarity::cosine()` as the projected score — top-10 by Euclidean re-ordered by an unrelated cosine score, almost never the intended semantic. Rewrote with two correctly-paired examples (Cosine path: `<|k,COSINE|>` + `vector::similarity::cosine()` + ORDER BY similarity DESC; Euclidean path: `<|k,EUCLIDEAN|>` + `vector::distance::euclidean()` + ORDER BY distance ASC). Documents all three NearestNeighbor variants (`K` / `KTree` / `Approximate` per `core/src/sql/operator.rs:393-398`) so consumers know which form to use for which case. - **Illustrative-edge consistency.** Three edge tables (`knows`, `reviewed`, `parent_of`) used in the doc's traversal + recursive-query examples lacked `DEFINE TABLE` statements. Added explicit definitions with `TYPE RELATION ... IN ... OUT ... ENFORCED` matching the doc's broader 'define edges first' pattern used for `wrote` / `purchased` / `follows` / `likes` / `ships_to` / `enrolled_in` / etc. Inline comment explains that v3 SCHEMALESS still creates RELATE rows on undefined edge tables (so the original examples worked at runtime), but the explicit definition documents the expected shape and lets ENFORCED reject malformed RELATEs at write time. ### Changed - **`rules/security.md`** — v1.6.3 Cursor pass-1 M3 ride-along: tightened ROUTING-CLAIM REQUIREMENT block's `:288-297` cite to `:292-297` (the actual claims-match arm) + `:824-825` to `:825` (the entire `_ => Err(InvalidAuth)` arm sits on :825; :826 is the surrounding match's closing brace). Cosmetic precision improvement; no semantic change. ### Process notes 3 atomic commits (kNN metric fix; illustrative-edge consistency; release-with-bundled-security-cite) + 1 rev-2 review-fix commit closing pass-1 findings. Pass-1 4-WAY review: - Cursor: CONDITIONAL GO (0 CRITs / 1 IMP / 3 minors) - Codex: NO-GO (1 CRIT / 2 IMPs / 1 minor) - Gemini: GO (0 findings) - Pi: pending at rev-2 dispatch Rev-2 closes: - **Codex C1**: rev-1 doc described `<|k|>` (NearestNeighbor::KTree) as \"requires a defined index\" — but per `core/src/exec/planner/util.rs:391` + `analysis.rs:1001-1005` + `select.rs:1421-1425`, KTree is parser-accepted but NOT handled at the planner level in v3.0.5 (legacy v2 m-tree remnant). Rewrote to clarify only `<|k,dist|>` and `<|k,ef|>` are implemented; `<|k|>` is grammar-accepted with no active planner path. - **Cursor I1**: security.md still had two stale `verify.rs:288-297` + one `:824-825` ref at lines 548 + 1659-1661 that the rev-1 ride-along missed. Replace-all fixed. - **Codex I1**: CHANGELOG commit-count drift. Now accurately reflects 3 atomic + 1 rev-2 review-fix commit shape. - **Codex M1 + Pi I1 (CONVERGENT)**: `:826` is the surrounding match's closing brace, not the body line — the entire `_ => Err(InvalidAuth)` arm sits on `:825`. Reworded rule + CHANGELOG to cite `:825` only.","fileCount":39,"zipByteSize":313400},{"version":"1.6.3","createdAt":"2026-05-06T19:26:46.182Z","changelog":"## [1.6.3] - 2026-05-06 — `rules/security.md` v1.6.2 pass-7 deferred-IMP polish (1 atomic doc commit + release commit + rev-2 review-fix commit) ### Changed - **`rules/security.md` v1.6.2 pass-7 deferred-IMPORTANT cleanup.** Closes the five documentation-polish items that v1.6.2 pass-7 ratified as deferrable, plus a CHANGELOG housekeeping label. None affect runtime correctness — all source-citation tightening, cross-reference consistency, and example consolidation: - **`auth0_jwt` TYPE JWT example** (JWKS-Backed JWT section) now mentions the NS/DB/AC routing-claim requirement inline, matching the per-example consistency of `external_idp` and `jwks_inbound` (the redundant `account` JWKS example is removed in this same release per item 3 below). The preamble's ROUTING-CLAIM REQUIREMENT block already covers TYPE JWT (the `fn token` entry point decodes ALL inbound JWTs through `decode_claims_unverified` before dispatching to access-type-specific verifiers), but the per-example note improves discoverability for readers who jump straight to JWKS examples. - **`jwks_inbound`'s DURATION-omission comment** now uses the `:282` / `:457` dual-pointer that `external_jwt_auth` uses (split between the no-id claims arm where AUTHENTICATE runs and the with-id claims arm). Cross-example citation consistency. - **`account` + `jwks_inbound` consolidation.** After rev-7's `account` rewrite, the two examples were functionally identical (TYPE RECORD WITH JWT URL + AUTHENTICATE for `$token.sub`). Removed the redundant `account` example and reworded the surrounding prose to point readers at `jwks_inbound` as the canonical Pattern A. - **`verify.rs:155+` cite tightened to `:158-159`** in the ROUTING-CLAIM REQUIREMENT block. The actual `decode_claims_unverified(token)?` call is on lines 158-159; `:155` is the `fn token` signature. - **`Cumulative trajectory after pass-5` table** in the [1.6.2] CHANGELOG entry labeled as historical / superseded by the pass-6 + pass-7 tables below it. ### Process notes 1 atomic doc commit (5 polish items combined per v1.6.0 single-commit fix pattern) + release commit + 1 rev-2 review-fix commit (after pass-1 4-WAY review surfaced convergent CHANGELOG-hygiene minors). Pass-1 4-WAY adversarial review: - Cursor: GO (0 CRITs / 0 IMPs / 3 minors) - Codex: CONDITIONAL GO (0 CRITs / 0 IMPs / 2 minors) - Gemini: GO (clean — 0 findings) - Pi: GO (0 CRITs / 0 IMPs / 1 minor) Convergent minors (closed in rev-2): - Pi M1 + Cursor M1 + Codex implicit: `:158-159` line range for `decode_claims_unverified` was a 2-line span where only `:159` is the actual call (`:158` is the describing comment). Tightened to `:159 (with a describing comment at :158)`. - Cursor M2 + Codex M2: CHANGELOG `[1.6.3]` `auth0_jwt` bullet said the per-example consistency restored alignment with `account` / `external_idp` — but `account` was removed in the same release. Reworded to `external_idp` and `jwks_inbound` (the actual remaining peers). - Codex M1: CHANGELOG header said \"4 atomic doc commits\" while process notes said \"5 atomic doc commits\"; live branch had 2. Header now says \"1 atomic doc commit (5 polish items combined) + release commit + rev-2 review-fix commit\" — accurate. Cursor M3 (routing arm cite `verify.rs:288-297` vs `292-297` boundary) deferred — the cited block is correct in intent (`Claims { ns: Some, db: Some, ac: Some, .. }` arm), and the range covers the surrounding match-arm comments + the body; tightening to `:292-297` would lose context. Tracked as a v1.6.4 hygiene candidate if a future deeper audit reaches the v1.6.x backlog tail. No re-dispatch for rev-2 — convergent CHANGELOG-only minors that are mechanical fixes against the same source the pass-1 reviewers cited; rev-2 risk profile is near-zero (no security.md surface change beyond the one line tightening).","fileCount":39,"zipByteSize":310802},{"version":"1.6.2","createdAt":"2026-05-06T19:14:13.948Z","changelog":"## [1.6.2] - 2026-05-06 — `rules/security.md` deferred-IMPORTANT clause closure (4 atomic feature commits + release commit) ### Added - **`rules/security.md` Access-and-user clause catalog (batch 3 of the v1.5.x deferred-IMPORTANT cleanup).** Closes the five deferred bullets attributed to `rules/security.md` in the v1.5.x convergence notes, all verified against the v3.0.5 source tree at `/tmp/surrealdb-v3.0.5/surrealdb/core/src/{syn,sql,iam}/` rather than against the docs site (which still lags v3.0.5). - **`WITH REFRESH` on `TYPE RECORD`** — bearer-grant-backed refresh-token flow with single-use rotation; coexists with `WITH JWT` in either order; `DURATION FOR GRANT` controls refresh-token lifetime, `FOR TOKEN` controls access-token lifetime, `FOR SESSION` controls session ceiling. Verified against `core/src/syn/parser/stmt/define.rs:492-500`, `core/src/iam/signin.rs:279-355`, `core/src/iam/access.rs:107-170`, plus parser test fixtures `core/src/syn/parser/test/stmt.rs:911 / :1108 / :1163`. Includes a JS-SDK client renewal example showing the `{access, refresh}` token shape. - **`WITH JWT URL '<jwks-uri>'` (JWKS endpoint)** — alternative to inline `ALGORITHM <alg> KEY <key>` for both `TYPE JWT` and nested `WITH JWT` inside `TYPE RECORD`. Standard pattern for integrating with external IdPs (Auth0, Okta, Cognito, Google, Azure AD) that publish a JWKS document and rotate signing keys on their own schedule. Documents the cache-TTL environment variables (`SURREAL_JWKS_CACHE_EXPIRATION_SECONDS`, `SURREAL_JWKS_CACHE_COOLDOWN_SECONDS`, `SURREAL_JWKS_REMOTE_TIMEOUT_MILLISECONDS`), and the capabilities requirement to permit network access to the JWKS host. After the rev-4/rev-5 anti-pattern correction, the JWKS section also documents `jwks_inbound` (TYPE RECORD WITH JWT URL + AUTHENTICATE for federated IdP integration) and `credential_mint` (TYPE RECORD WITH JWT inline-KEY + SIGNIN + WITH ISSUER for round-trippable SurrealDB-side minting) as TWO separate access definitions; combining JWKS-verify with WITH ISSUER inline-key in a single TYPE RECORD definition is documented as an anti-pattern (kid round-trip + sub-vs-ID claim mismatch). Verified against `core/src/syn/parser/stmt/define.rs:1716-1722` and `core/src/iam/jwks.rs`, plus parser test fixtures `core/src/syn/parser/test/stmt.rs:703 / :731 / :762 / :792 / :823`. - **`ACCESS GRANT / SHOW / REVOKE / PURGE` statements** — the four top-level subcommands that manage bearer-grant lifecycle against a `DEFINE ACCESS … TYPE BEARER` access method. Documents the issue-once / hash-stored / no-recovery semantics for `GRANT`, the auditing surface of `SHOW { ALL | GRANT <id> | WHERE <cond> }`, the soft-revocation semantics of `REVOKE` (revoked grants stop authenticating immediately but remain visible until purged), and the `PURGE { EXPIRED | REVOKED | EXPIRED, REVOKED } [ FOR <duration> ]` physical deletion path with optional grace-period clause. Includes an end-to-end credential-rotation playbook combining all four subcommands. Verified against `core/src/syn/parser/stmt/mod.rs:108-271` and parser test fixtures `core/src/syn/parser/test/stmt.rs:2604 / :2621 / :2645-2683 / :2703-2741 / :2761-2853` (every subcommand and its parameter variants). - **`DEFINE USER PASSHASH` clause** — accept a pre-hashed [argon2 PHC string](https://en.wikipedia.org/wiki/PHC_string_format) instead of a plaintext `PASSWORD`; mutually exclusive with `PASSWORD` per parser bail at `core/src/syn/parser/stmt/define.rs:349 / :356`. Documents the migration-from-external-IdP use case (re-hashing an already-hashed string locks legacy users out) and the `crypto::argon2::generate($plaintext)` `RETURN`-trick for on-the-fly hashing on the SurrealDB side. - **`DEFINE USER DURATION FOR { TOKEN | SESSION } <expr>` clause** — per-user override of the token (default 1h per `define.rs:336`) and session (default unbounded per `core/src/sql/statements/define/user.rs:43`) expiry; both accepted in either order, comma-separated; either alone valid; `NONE` opts out of expiry on the corresponding axis (the v3.0.5 test suite has `DURATION FOR TOKEN NONE` anti-fixtures across three commented regions at `stmt.rs:398-407` (one DEFINE USER block), `:623-631` (one DEFINE ACCESS TYPE JWT block), and `:1250-1276` (three DEFINE ACCESS TYPE RECORD blocks at DB / ROOT / NS) — five anti-fixtures total, all gated by /* */ wrappers and calling `unwrap_err()`, so direct positive-fixture provenance does not exist; consumers should validate via round-trip signin/authenticate tests rather than parse-only confirmation). Application path verified at `core/src/iam/signin.rs:481 / :502` and `core/src/iam/verify.rs:106`. Includes a combined `PASSHASH + ROLES + DURATION + COMMENT` example showing the full v3 `DEFINE USER` clause set. ### Process notes Five clauses landed across four atomic feature commits in rev-1 (one for each of `WITH REFRESH`, `WITH JWT URL`, `ACCESS subcommands`, and the combined `PASSHASH + DURATION` subsection — the latter two clauses naturally compose on the same statement and share a verification path, so they ship as one atomic edit per the v1.6.0 / v1.6.1 atomic-protocol pattern). #### Rev-2 disposition (4-WAY adversarial pass-1) Pass-1 verdicts: Cursor NO-GO (2 CRITs / 5 IMPs / 3 minors), Codex NO-GO (1 CRIT / 4 IMPs / 2 minors), Gemini NO-GO (3 CRITs / 2 IMPs), Pi CONDITIONAL GO (0 CRITs / 2 IMPs / 3 minors). Five atomic rev-2 commits closed every accepted finding: - **R1** — TYPE JWT issuance correction. Cursor C2 (CRIT, source- cited at signin.rs:449/:550/:686 — pure TYPE JWT has no signin branch) and Cursor I3 (token_duration unused on JWT authenticate path) both pre-existing v1.5.x latent bugs. Reframed the JWT FOR TOKEN/WITH ISSUER callout as \"verification-only\" with explicit pointers at the `at.jwt.issue` consumers (only signin.rs:275-318 inside the Record branch + signin_bearer at :737). Replaced the fictional `hybrid_jwt` mint example with the correct `hybrid_record TYPE RECORD WITH JWT URL + WITH ISSUER` pattern. Fixed the `parser/tests/stmt.rs` typo (Cursor I2). - **R2** — JWKS Cargo feature gate (CONVERGENT CRIT, Cursor C1 + Codex C1). Parser accepts `URL` unconditionally, but every runtime arm at `verify.rs:228-240/:340-352/:412-424/:573-585/:725-737` is `#[cfg(feature = \"jwks\")]`. Default `surrealdb-server` features at `server/Cargo.toml:19-30` lack `jwks`. Added a callout citing every gated arm + the Cargo wiring + a `cargo build --features jwks` recipe. Also removed the unsupported \"allow redirect targets\" wording (Codex M2 — `jwks.rs:268-313` only checks the original URL host) and added a \"test-fixture gap for `TYPE RECORD WITH JWT URL`\" acknowledgement (Pi I1). - **R3** — refresh-rotation citation + token-shape fix. Convergent IMP (Cursor I1 + Codex I2): the prior single-range `signin.rs:279-355` citation conflated dispatch (279-295) + initial issuance (352-364) with rotation (893-917 inside `signin_bearer`'s `BearerAccessType::Refresh` arm). Split the citation. Codex I2 unique catch on token shape: runtime returns the full bearer key (id + secret), not just the grant id; fixed JS-SDK example and added a \"persist verbatim, do not split\" note. - **R4** — ACCESS section narrowings. Codex M1: PURGE grace is strict greater-than (`> stmt.grace.secs()`), not \"at least\"; tightened to \"older than\". CONVERGENT IMP (Codex I1 + Cursor I4): GRANT FOR RECORD is database-only at runtime (`expr/statements/access.rs:226-234, :353-355`); replaced the blanket \"ON NAMESPACE / ON ROOT also accepted\" paragraph with an explicit base-scoping rubric that distinguishes parse-acceptance from runtime-acceptance. Cursor I5: ON is optional on every ACCESS subcommand; rubric flags this so examples-with-explicit-ON are not read as required syntax. - **R5** — PASSHASH validation timing + DURATION fixture cleanup. 3-WAY CONVERGENT (Codex I4 + Gemini C2 + Pi M1): PASSHASH validation runs at signin (`verify.rs:945-952` — `PasswordHash::new(hash)`), not at define (`define.rs:353-358` stores verbatim). Added \"store as-is, validate-on-use\" callout. Codex I3: prior `stmt.rs:402` test- fixture citation pointed at a commented-out block; replaced with an explicit \"public-test provenance is indirect\" acknowledgement. REJECTED findings (with rationale): - **Gemini C1** (ACCESS ON ROOT invalid). REJECT — `parse_base()` at `parts.rs:445` accepts `Base::Root` and `parse_define_access` has no Root restriction for `TYPE BEARER FOR USER` / `TYPE JWT`. Convergent rebuttal: Cursor I5 confirms `parse_access` reads any base. - **Gemini C3** (URL on TYPE RECORD WITH JWT invalid). REJECT — `parse_jwt()` at `define.rs:1716-1722` is the same function invoked from both `t!(\"JWT\")` (line 454, standalone) and the `WITH JWT` arm of TYPE RECORD (line 484); URL works in both call sites. Convergent rebuttal: Codex residual-risk #2 confirms support is structurally real; Pi I1 acknowledges the parser path. Both REJECTs match the v1.6.1-pass-1 pattern of Gemini producing wrong-direction CRITs without source access. #### Rev-3 disposition (4-WAY adversarial pass-2) Pass-2 verdicts: Cursor CONDITIONAL GO (0 CRITs / 2 IMPs / 2 minors), Codex CONDITIONAL GO (0 CRITs / 2 IMPs / 2 minors), Gemini GO (0 CRITs / 0 IMPs / 1 minor), Pi NO-GO (1 CRIT / 2 IMPs / 2 minors — but Pi's CRIT was source-checked and rejected; see below). Five atomic rev-3 commits closed every accepted finding: - **R1** — JWT-Based Authentication: issuer-default rubric. Codex pass-2 I2 caught that the prior rev-2 'WITH ISSUER KEY omitted defaults to HS512 with random key' prose was incomplete. Source chain (define.rs:1696-1708 + :1716-1722 + sql/access_type.rs:181-191): inline ALGORITHM verifier sets iss.alg = <verifier-alg> at line 1697 BEFORE the WITH ISSUER block runs (so bare WITH ISSUER KEY inherits the verifier alg for asymmetric pairs); symmetric inline verifiers also auto-pop iss.key (line 1707); URL/JWKS verifiers do NOT touch iss.alg (URL arm at 1716-1722 has no iss.alg = ... line) so iss.alg stays at JwtAccessIssue::default() = Hs512, REQUIRING explicit WITH ISSUER ALGORITHM <alg> for asymmetric minting; missing WITH ISSUER + missing symmetric auto-pop = AccessMethodMismatch at signin.rs:275-278. Replaced the single-line stale comment with a four-bullet rubric mapping every verifier shape to its resulting iss.alg / iss.key / mint behaviour. Pi pass-2 I4 (signin_bearer fallthrough at :739) and Gemini pass-2 M1 (WITH ISSUER ALGORITHM prose tighten) folded into the same commit since they touch the same prose region. - **R2** — JWKS section. Codex pass-2 I1: rev-2's 'no fixture covers TYPE RECORD WITH JWT URL' was scoped to dedicated parser fixtures; runtime verifier exercises the shape via `#[cfg(feature = \"jwks\")]` test at verify.rs:1495-1497 (definition :1560-1564, end-to-end :1607-1623). Narrowed. Pi pass-2 I3: hybrid TYPE RECORD WITH JWT URL + WITH ISSUER inline-key still hits the JWKS feature gate on the verification half; added 'gate applies even to hybrid setups' paragraph. Pi pass-2 M3: hybrid_record DURATION FOR TOKEN 10s was unrealistic; bumped to 15m / 12h. - **R3** — refresh-token shape. Codex pass-2 M1 + Cursor pass-2 M2: rev-2 omitted the literal 'surreal-refresh-' prefix on the refresh-token value. Source: expr/statements/access.rs:121-126 + :133-134 + signin.rs:1042-1056 + :1582-1584. Doc now cites the prefix explicitly in prose + JS-SDK example, and warns against stripping or splitting client-side. - **R4** — citation tightening. Codex pass-2 M2: stmt.rs:758 was wrong (close-bracket of prior no-duration case); :558 is the inline-key TYPE JWT DURATION FOR TOKEN fixture. Fixed. Cursor pass-2 I2: verify.rs PASSHASH PHC parse span tightened from 945-952 to :947-948 specifically inside verify_pass. Pi pass-2 M2: stmt.rs:402 commented-out block scope clarified to DEFINE USER specifically, with explicit pointers at active DEFINE ACCESS DURATION FOR TOKEN NONE fixtures at :627 / :1256 / :1264 / :1272. Cursor pass-2 M1: stmt.rs:2620 / :2621 disambiguated (harness vs SQL string). - **R5** — release/disposition commit (this one). Cursor pass-2 I1: this CHANGELOG entry's 'DEFINE USER DURATION' bullet itself still cited stmt.rs:402 as a positive 'exercises' fixture; updated to match the rev-2/rev-3 corrected narrative (commented-out for DEFINE USER + active DEFINE ACCESS fixtures). REJECTED finding (Pi pass-2 C1): - **Pi pass-2 C1** ('iss.alg defaults to Hs512 when WITH ISSUER ALGORITHM omitted; external_auth example produces a broken HS512-claiming token over RSA verifier'). REJECT — Pi missed define.rs:1697 inside the verifier ALGORITHM arm, which sets `iss.alg = alg` (the verifier alg) BEFORE the WITH ISSUER block runs at :1726+. The algorithm-mismatch check at :1739-1747 that Pi cited only governs WITH ISSUER ALGORITHM <X> overrides; it does not gate the initial inheritance from the verifier. For the external_auth example (`WITH JWT ALGORITHM RS256 KEY '<pub>' WITH ISSUER KEY '<priv>'`), iss.alg resolves to RS256 from the verifier line 1697, then WITH ISSUER's KEY arm sets iss.key = '<priv>'. iss.alg STAYS at RS256. The minted token correctly claims RS256 + signs with the RSA private key. Pi's claim WOULD be correct for `WITH JWT URL '<jwks>' WITH ISSUER KEY '<priv>'` (the URL arm at :1716-1722 has no `iss.alg = ...` line), in which case iss.alg stays at Hs512 default. This case is now explicitly documented in rev-3 R1's issuer-defaults rubric and was previously implicit. Pi caught a real semantic gap there but mis-attributed the bug to the wrong example. R1's issuer-defaults rubric absorbs Pi's underlying concern by enumerating exactly when explicit WITH ISSUER ALGORITHM is required. The external_auth example is correct as-shipped; the hybrid_record example already uses explicit WITH ISSUER ALGORITHM PS256 (correct). Convergent reviewer signal supports the REJECT: Cursor pass-2 ('No contradiction found: TYPE RECORD WITH JWT … WITH ISSUER … still documents minting via signin.rs:275-318'), Codex pass-2 residual-risk ('TYPE JWT verification-only is correct'), and Gemini pass-2 GO all cleared the JWT section without flagging the alleged bug. Three reviewers reading the same source reached the opposite conclusion from Pi. This is the v1.5.x-pass-3 Pi-misreads-call-path pattern recurring (Pi-pass-3 wrongly thought db.transaction API didn't exist; here Pi wrongly thought iss.alg defaulted to Hs512 in the verifier-set case). Pattern memory: `feedback_pi_unique_crit_verify_against_source.md` (this pattern is also covered in the v1.5.x convergence notes \"fix-drift\" section). #### Rev-4 disposition (4-WAY adversarial pass-3) Pass-3 verdicts: Cursor CONDITIONAL GO (0 CRITs / 1 IMP / 2 minors), Codex NO-GO (2 CRITs / 3 IMPs), Gemini GO (0 findings), Pi NO-GO (1 CRIT / 2 IMPs / 2 minors). Three real CRITs landed in this pass — two from Codex, one from Pi. All survived 8 prior reviewer passes (4 pass-1 + 4 pass-2) before pass-3 caught them. Five atomic rev-4 commits closed every accepted finding: - **R1-R2 combined** — JWT/JWKS section overhaul: - **CRIT (Pi C1)**: `$token` in SIGNIN was wrong. SIGNIN runs against signin variables (`$email`, `$pass`, `$id`); `$token` is only set in AUTHENTICATE (`sess.tk = Some(claims)` at `signin.rs:340-345` between SIGNIN evaluation and AUTHENTICATE execution). Canonical fixture at `verify.rs:2034` confirms AUTHENTICATE is the right clause for `$token.*` lookups. Both v1.6.2-introduced examples (`external_auth` + `hybrid_record`) corrected to use AUTHENTICATE for token-claim binding + SIGNIN for credential-based password auth. Pre-existing v1.6.2 R1 bug. Pi I2 (the prose comment that said \"Without a SIGNIN clause, ... `$auth.id` stays unset\") fixed to \"Without an AUTHENTICATE clause\" in same edit. - **CRIT (Codex C1)**: hybrid `TYPE RECORD WITH JWT URL + WITH ISSUER` mints tokens via SIGNIN, but those tokens cannot be re-validated through the same access method's JWKS verifier — SurrealDB encodes minted JWTs with bare `Header::new(...)` at `signin.rs:369 / :938` and `signup.rs:268`, omitting the `kid` claim that JWKS verification requires (`verify.rs:230-237` etc., bails \"Missing token header 'kid'\"). Added explicit \"JWKS round-trip limitation\" callout in the JWKS feature-gate block + inline NOTE in the hybrid_record example. Recommends `TYPE RECORD WITH JWT ALGORITHM <alg> KEY '<pub>'` (inline KEY, not URL) for round-trippable tokens. - **CRIT (Codex C2)**: JWKS section bullet still abbreviated to bare `WITH ISSUER KEY` which contradicts the rev-3 R1 issuer-defaults rubric. URL/JWKS verifiers don't set `iss.alg` (URL arm at define.rs:1716-1722 has no `iss.alg = ...` line); bare `WITH ISSUER KEY` would treat asymmetric private keys as HMAC secrets at issue.rs:10-28. Rewrote the bullet to explicitly require `WITH ISSUER ALGORITHM <alg> KEY '<priv>'` for URL+ISSUER hybrids with parser-source rationale. - **CONVERGENT IMP (Cursor I1 + Pi I1)**: rev-3 R2's \"access definition stops authenticating entirely\" overstated the JWKS gate scope. For `TYPE RECORD WITH JWT URL + SIGNIN/SIGNUP`, credential signin still works through `db_access` at `signin.rs:245-410` (which never invokes the JWKS verifier arms); only the verification path (incoming third-party JWTs) fails without `--features jwks`. Tightened to \"gate scopes to incoming-JWT verification, not all signin paths\" with code-path citations. - **R3** — DURATION FOR TOKEN NONE fixture-citation cleanup. Codex pass-3 I1: rev-3 R4 cited stmt.rs:627/:1256/:1264/:1272 as \"active fixtures\" but all four are inside `/* */` commented-out blocks at stmt.rs:623-631 and :1250-1276 (with a `// TODO: Parameterization broke the guarantee that token duration is not none.` note explaining the suppression). Doc now acknowledges no positive-fixture provenance exists for DURATION FOR TOKEN NONE in v3.0.5; recommends round-trip validation rather than parse-only confirmation. - **R4** — refresh-token citation chain labels. Codex pass-3 I2 + Cursor pass-3 M1+M2: access.rs:121-126 was labeled 'create_grant dispatch' but it's actually `new_grant_bearer` (the `format!(\"{prefix}-{id}-{secret}\")` construction). `create_grant` begins at :181, record-refresh invocation is at :237-242. signin.rs:1582-1584 was labeled 'runtime regex' but is an integration-test assertion; production validation is `validate_grant_bearer` at signin.rs:1042-1056. Rewrote the citation chain with correct labels. - **R5** — ES512 algorithm runtime caveat + line-citation tightening. Codex pass-3 I3: ES512 maps to ES384 at runtime (verify.rs:47-48 + mod.rs:46-47); split ES256/ES384 from ES512 in the algorithms table + added an explicit caveat. Pi pass-3 M1: SYMMETRIC bullet cited line 1707 but the `iss.key = key` assignment is on :1703; tightened to cite both lines. - **R6** (this commit) — CHANGELOG pass-3 disposition + the pre-existing CHANGELOG `stmt.rs:402` citation drift first flagged in Cursor pass-2 I1; the previous rev-2 commit fixed it via \"or :627 / :1256 / :1264 / :1272\" alternates which themselves turned out to be commented-out (Codex pass-3 I1). Final CHANGELOG narrative now matches the rev-4 R3 rule-file correction: no positive-fixture provenance, gated blocks only. NO REJECTIONS this pass — all four pass-3 CRIT/IMP-level findings traced to real source; Pi pass-2's rejected C1 still holds (Cursor pass-3 cross-check appendix B + Codex pass-3 residual risk + Gemini pass-3 GO all confirm). #### Rev-5 disposition (4-WAY adversarial pass-4) Pass-4 verdicts: Cursor NO-GO (1 CRIT / 2 IMPs / 2 minors), Codex NO-GO (1 CRIT / 2 IMPs / 1 minor), Gemini NO-GO (1 CRIT / 0 IMPs), Pi CONDITIONAL GO (0 CRITs / 1 IMP / 2 minors). Pass-4 surfaced 3 real CRITs — pattern continues from pass-3 (cumulative ~17 source-cited findings across the four passes). Three atomic rev-5 commits closed every accepted finding: - **R1** — JWT-Based Authentication: split external_auth into Pattern A (external_jwt_auth, authenticate-only) + Pattern B (credential_auth, SIGNIN-mint-roundtrippable). Closes: - **CONVERGENT CRIT** (Gemini C1 + Cursor I2 + Codex I1 + Pi I1): rev-4 external_auth had WITH ISSUER KEY + DURATION FOR TOKEN 1h but NO SIGNIN, making the issuance machinery unreachable per signin.rs:296-437 (AccessRecordNoSignin error if SIGNIN missing). - **UNIQUE CRIT** (Codex C1): rev-4 prose claimed 'no AUTHENTICATE -> $token-only permissions' — wrong. Source: verify.rs:177-245 binds record from token's `id` claim if present; verify.rs:464 bails AccessMethodMismatch otherwise. Real rule documented in the new prose preamble. - **R2** — JWKS section: replaced hybrid_record with two separate access definitions (jwks_inbound for federated IdP, credential_mint for SurrealDB-side mint) plus an explicit ANTI-PATTERN callout. Closes: - **UNIQUE CRIT** (Cursor C1): rev-4 hybrid_record had AUTHENTICATE matching `$token.sub` after credential SIGNIN, but credential SIGNIN mints tokens with `$token.ID` (uppercase, from Claims { id: Some(rid.to_sql()), .. Claims::default() } at signin.rs:314-324); default sub: None at token.rs:243; into_claims_object at token.rs:289-345 inserts 'ID' for the id claim and only inserts 'sub' when Claims.sub is Some. So rev-4 hybrid_record's AUTHENTICATE predicate matched the wrong key on the credential path. - **CARRY-OVER from Codex pass-3 C1**: SurrealDB-minted tokens use bare Header::new(...) at signin.rs:369/:938 + signup.rs:268 which omits the kid claim, so JWKS verification round-trip fails. Anti-pattern callout documents both reasons (sub vs ID + kid round-trip). - **R3** — Lower IdP integration example + ES512 caveat tighten + four-blocks miscount + access.rs:237-242 label. Closes: - **UNIQUE** (Codex I2 — pre-existing v1.5.x latent): the 'JWT Token Integration with External Identity Providers' lower example also had the no-AUTHENTICATE shape problem. Rewrote to use AUTHENTICATE for sub mapping + dropped WITH ISSUER (matches surrounding prose's authenticate-only intent). - **UNIQUE** (Codex M1): rev-4 R5 ES512 caveat overstated inbound-header acceptance. Tightened to scope the claim to 'configured ALGORITHM ES512 verifies and emits ES384' only. - **UNIQUE** (Cursor I1 + M2): rev-4 'all four blocks' miscount for DURATION FOR TOKEN NONE fixtures. Actually three commented regions contain five anti-fixtures. Tightened wording in both rule file AND CHANGELOG. - **UNIQUE** (Pi M1): rev-4 R4 labeled access.rs:237-242 as 'record-refresh call site'; actually it's the Base::Db enforcement guard inside create_grant. Relabeled. NO REJECTIONS this pass — all four reviewers' CRIT/IMP findings traced to real source. Pi pass-2's earlier rejected C1 still holds (multiple cross-pass confirmations). #### Rev-6 disposition (4-WAY adversarial pass-5) Pass-5 verdicts: Cursor NO-GO (2 CRITs / 3 IMPs / 1 minor), Codex NO-GO (1 CRIT / 2 IMPs / 2 minors), Gemini GO (0 findings), Pi CONDITIONAL GO (0 CRITs / 2 IMPs / 0 minors). 3 real CRITs landed in this pass — same fix-drift pattern documented in earlier disposition entries. Three atomic rev-6 commits closed every accepted finding: - **R1** — Parser-order fix: 3 examples don't parse. - **CRIT (Codex pass-5 C1)**: rev-5 examples external_jwt_auth, jwks_inbound, and external_idp put AUTHENTICATE BEFORE WITH JWT, which fails to parse in v3.0.5. Source: parse_define_access at define.rs:415-573 has an outer loop matching top-level clauses (TYPE at :456, AUTHENTICATE at :545); the TYPE arm delegates to a TYPE RECORD subparser (:456-507) with two inner loops (SIGNUP/SIGNIN, then WITH JWT/REFRESH). If AUTHENTICATE comes before WITH JWT, the outer loop consumes AUTHENTICATE, then sees WITH and has no match arm -> exits, leaving WITH JWT unconsumed. Canonical fixture order at verify.rs:2029-2037 confirms the working shape: `TYPE RECORD ... SIGNIN ... WITH JWT ... AUTHENTICATE ... DURATION ...`. Reordered all three examples + added inline parser-cited comments in each. - **CRIT (Cursor pass-5 C2)**: Pattern A (external_jwt_auth) comment cited `signin.rs:340-345` for `$token` availability, but that's the SIGNIN-mint path. Pattern A has no SIGNIN — clients call db.authenticate(). On the authenticate path, sess.tk is populated at verify.rs:256-263 (claims arm with id) or :432-440 (claims arm without id), NOT signin.rs. Updated the comment to cite the correct authenticate-path locations. - **UNIQUE (Codex pass-5 I2)**: jwks_inbound had `DURATION FOR TOKEN 15m` but the doc itself documents that FOR TOKEN is unused on the authenticate path for AccessType::Record without minting. Removed the unused clause + explanatory comment. - **R2** — access.rs line-label correction. - **CONVERGENT CRIT (Cursor pass-5 C1 + Codex pass-5 I1)**: rev-3 R4 first cited access.rs:237-242 as 'record-refresh call site'; Pi pass-3 corrected to 'Base::Db enforcement guard'; rev-5 R3 propagated that label. Source verification at v3.0.5 expr/statements/access.rs:226-242 shows BOTH labels are wrong: - :231-234 IS the Base::Db enforcement guard (specifically :233's `ensure!(matches!(base, Base::Db), Error::DbEmpty);`) - :237-242 is the bearer-presence check + new_grant_bearer invocation that follows the guard Final fix splits the citation: :231-234 for the guard, :237-242 for the bearer + grant construction. - This is a multi-pass label-drift pattern. Pi pass-2 I1 / Pi pass-3 M1 / Pi pass-4 M1 / Pi pass-5 PASS-on-F all gave different labels for :237-242 — Pi mis-attributes successive lines without source-grep. Recorded as a parallel pattern to the v1.5.x Pi-pass-3 db.transaction misread. - **R3** — JWKS ops bullet + preamble ALGORITHM scope + lower IdP arm citation. - **CONVERGENT IMP (Cursor pass-5 I1 + Pi pass-5 I1)**: JWKS 'Operational notes' bullet still recommended single combined TYPE RECORD WITH JWT URL + WITH ISSUER pattern, contradicting the rev-5 anti-pattern callout. Rewrote to redirect to the two-pattern approach (jwks_inbound + credential_mint). - **UNIQUE (Pi pass-5 I2)**: rev-5 preamble parenthetical said `ALGORITHM token in WITH ISSUER is REQUIRED for asymmetric / JWKS verifier paths`. Per define.rs:1697, inline asymmetric verifiers DO inherit iss.alg; only URL/JWKS verifiers need explicit `ALGORITHM`. Narrowed. - **UNIQUE (Cursor pass-5 I2)**: lower IdP example cited verify.rs:246-288 (first claims arm, with id) for 'no-encode authenticate-only' behaviour; inbound IdP JWTs mapped via `$token.sub` follow the SECOND claims arm at ~verify.rs:401-462. Retargeted the citation. - **R4** (this commit) — CHANGELOG pass-5 disposition + cumulative trajectory table extension. NO REJECTIONS this pass. Pi pass-5's PASS-on-F (claiming :237-242 was the Base::Db guard) was wrong by the same source check Cursor C1 + Codex I1 surfaced; the convergent Cursor+Codex finding overrode Pi's PASS verdict. Pi pass-2 C1 remains rejected (cross-pass confirmation). #### Cumulative trajectory after pass-5 | Pass | Cursor | Codex | Gemini | Pi | Real CRITs | Real IMPs | Notes | |------|--------|-------|--------|----|------|-----------|-------| | 1 | NO-GO | NO-GO | NO-GO | COND | 2 | 5 | jwks gate + TYPE JWT signin path | | 2 | COND | COND | GO | NO-GO* | 0 | 4 | *Pi C1 rejected (parser misread) | | 3 | COND | NO-GO | GO | NO-GO | 3 | 4 | kid round-trip + WITH ISSUER KEY in JWKS bullet + $token in SIGNIN | | 4 | NO-GO | NO-GO | NO-GO | COND | 3 | 4 | external_auth no-SIGNIN + hybrid_record sub vs ID + no-AUTHENTICATE prose | | 5 | NO-GO | NO-GO | GO | COND | 3 | 4 | parser-order in 3 examples + access.rs label drift + signin.rs:340-345 wrong cite | 11 real CRITs found-and-fixed across five passes. Multiple recurring patterns (access.rs:237-242 label drift across passes 2-5; Pi misreads multi-arm match control flow; doc-vs-CHANGELOG drift on stmt.rs:402 across passes 2-3-4-5). Two Gemini CRITs rejected with parser-cited rebuttals across the cycle. #### Rev-7 disposition (4-WAY adversarial pass-6) Pass-6 verdicts: Cursor NO-GO (1 CRIT / 1 IMP / 2 minors), Codex NO-GO (4 CRITs / 0 IMPs / 1 minor), Gemini GO (0 findings), Pi CONDITIONAL GO (0 CRITs / 2 IMPs / 2 minors — all CHANGELOG-hygiene only). 5 real CRITs landed in this pass. Five atomic rev-7 commits closed every accepted finding: - **R1** — NS/DB/AC routing-claim requirement. - **CRIT (Codex pass-6 C1)**: inbound JWTs MUST carry `ns`/`db`/`ac` routing claims (or aliases per `core/src/iam/token.rs:248-275` — uppercase or full URI forms accepted) for SurrealDB to match the database-access arm at `verify.rs:288-297`. Without them, validation falls through to InvalidAuth at `:824-825` BEFORE the access method's verifier or AUTHENTICATE clause runs. The pre-existing v1.5.x `external_idp` example payload showed only `sub/email/roles/tenant_id/exp` — none of which routes. Added a ROUTING-CLAIM REQUIREMENT block to the JWT-Based Authentication preamble + updated the lower IdP example payload to include `ns/db/ac/sub/...` with inline notes pointing at IdP custom-claim mechanisms (Auth0 Actions, Okta inline hooks, Cognito pre-token Lambda, Azure AD claim mapping). - **R2-R3** — `account` JWKS example shape fix + Pattern A citation tightening + GRANT bullet line range. - **CRIT (Codex pass-6 C2)**: pre-existing v1.5.x `account` JWKS mini-example had `TYPE RECORD WITH JWT URL` with no AUTHENTICATE and `DURATION FOR TOKEN 15m`. Without AUTHENTICATE, inbound IdP JWTs lacking SurrealDB `id` fall through to AccessMethodMismatch at `verify.rs:464`; DURATION FOR TOKEN is unused on the authenticate path for AccessType::Record without minting. Rewrote with AUTHENTICATE for sub mapping + dropped FOR TOKEN. - **CRIT (Cursor pass-6 C1)**: rev-5 Pattern A example cited `verify.rs:394` for DURATION FOR SESSION — that's the AccessType::Jwt branch, not AccessType::Record. The Record arm uses `:282` (claims with id) or `:457` (claims without id). Corrected both citations + relabeled the comment to 'AccessType::Record authenticate path' (also closes Codex pass-6 M1). - **IMP (Cursor pass-6 I1)**: Pattern A's sess.tk citation listed `:256-263 (claims arm with id) or :432-440 (claims arm without id)` implying both are equally common. For typical IdP-`sub` JWTs (no SurrealDB id), `:432-440` is the path; reordered + framed `:256-263` as the conditional case. - **MINOR (Cursor pass-6 M1)**: GRANT FOR RECORD bullet cited `:226-234`; per source, `:226-230` is the unrelated Jwt grant rejection and the actual guard is `:231-234` + `:353-355`. Tightened with explicit per-arm labels. - **R4** — CHANGELOG hygiene fixes. - **CRIT (Codex pass-6 C3)**: top-of-file v1.6.2 'Added' bullet for `WITH JWT URL` still said the doc 'documents the hybrid pattern combining JWKS-verify with WITH ISSUER inline-key issuance' — contradicts current security.md which redirects to two patterns + labels the combined shape an anti-pattern. Rewrote bullet to reference `jwks_inbound` + `credential_mint` as separate definitions with the anti-pattern callout. - **CRIT (Codex pass-6 C4 + Pi pass-6 I1+I2+M1+M2)**: the rev-3 R5 disposition's 'Cumulative trajectory after pass-4' table was retained at the bottom of the [1.6.2] section AFTER the rev-5 R4 added an updated 'Cumulative trajectory after pass-5' table, creating a duplicate that contradicted itself ('Eight real CRITs' vs '11 real CRITs'). Same doc-vs-CHANGELOG drift class as the pass-2/pass-3 stmt.rs:402 saga — recorded as a recurring pattern. Removed the stale table + 'Eight real CRITs' paragraph. Restructured 'Reviewer-blind-spot pattern' + 'verification escalator' prose under explicit headings that don't conflict with the pass-5 trajectory section. - **R5** (this commit) — CHANGELOG pass-6 disposition + new trajectory row. NO REJECTIONS this pass. Pi pass-2 C1 still rejected (seventh-pass confirmation). #### Cumulative trajectory after pass-6 | Pass | Cursor | Codex | Gemini | Pi | Real CRITs | Real IMPs | |------|--------|-------|--------|----|------|-----------| | 1 | NO-GO | NO-GO | NO-GO | COND | 2 | 5 | | 2 | COND | COND | GO | NO-GO* | 0 | 4 | | 3 | COND | NO-GO | GO | NO-GO | 3 | 4 | | 4 | NO-GO | NO-GO | NO-GO | COND | 3 | 4 | | 5 | NO-GO | NO-GO | GO | COND | 3 | 4 | | 6 | NO-GO | NO-GO | GO | COND | 5 | 1 | *Pi pass-2 C1 rejected with parser-cited rebuttal (see Rev-3 disposition above). 16 real CRITs found-and-fixed across six passes. Pass-6's spike to 5 CRITs reflects two pre-existing v1.5.x latent bugs finally surfacing (NS/DB/AC routing claims missing from IdP examples; `account` JWKS example shape) plus one new parser-arm citation drift introduced by rev-5 (Pattern A verify.rs:394 vs :282/:457). Per the v1.5.x convergence pattern, expect ratification within 1-2 more passes; remaining churn should be cite-line drift which Codex + Cursor catch reliably. #### Pass-7 ratification (4/4 GO+CONDITIONAL GO with 0 CRITs) Pass-7 verdicts: | Reviewer | Verdict | CRITs | IMPs | Minors | |---|---|---|---|---| | Pi | **GO** | 0 | 0 | 1 (auth0_jwt NS/DB/AC mention) | | Cursor | CONDITIONAL GO | 0 | 2 (auth0_jwt cross-reference + jwks_inbound cite consistency) | 2 | | Codex | CONDITIONAL GO | 0 | 1 (CHANGELOG hygiene — pass-5 table archival) | 2 | | Gemini | CONDITIONAL GO | 0 | 2 (account/jwks_inbound consolidation + jwks_inbound NS/DB/AC) | 2 | Per `~/CLAUDE.md` aggregation rule: \"CONDITIONAL GO w/ no CRIT = ship if maintainer accepts IMPs as deferred.\" Pi achieved full GO; remaining IMPs across the other three reviewers are documentation-polish (cross-reference cite consistency, example consolidation, single line-anchor tightening from :155+ → :158-159) with no source-correctness contradictions. **v1.6.2 ratified at pass-7.** Convergence trajectory: | Pass | Real CRITs | Verdicts | |------|------------|----------| | 1 | 2 | 1 NO-GO + 2 NO-GO + 1 NO-GO + 1 COND | | 2 | 0 | 2 COND + 1 GO + 1 NO-GO* | | 3 | 3 | 1 COND + 1 NO-GO + 1 GO + 1 NO-GO | | 4 | 3 | 3 NO-GO + 1 COND | | 5 | 3 | 2 NO-GO + 1 GO + 1 COND | | 6 | 5 | 2 NO-GO + 1 GO + 1 COND | | **7** | **0** | **3 COND + 1 GO** | 16 cumulative real CRITs found-and-fixed across 7 passes; 2 Gemini CRITs rejected with parser-cited rebuttals. Trajectory matches v1.5.x convergence pattern (rev-N closes pass-(N-1) findings while introducing 1-3 new bugs from fix surgery). Rev-7's edit was precisely scoped (5 commits) and pass-7 introduced ZERO new bugs from surgery — the cleanest pass. #### Deferred to v1.6.3 (pass-7 IMPs and minors) - Add NS/DB/AC routing-claim mention to `auth0_jwt` TYPE JWT example for per-example consistency (currently relies on global preamble block). - Align `jwks_inbound`'s session-duration comment with the `:282` / `:457` dual-pointer used in `external_jwt_auth`. - Consolidate the `account` + `jwks_inbound` examples in the JWKS section (currently functionally identical after rev-7's `account` rewrite). - Tighten `verify.rs:155+` cite in the routing-claim block to `:158-159` (anchor where `decode_claims_unverified` is called). - Archive or label the `Cumulative trajectory after pass-5` table as historical (superseded by the pass-6 table below). None of these affect runtime correctness; all are documentation polish suitable for a v1.6.3 batch. #### Reviewer-blind-spot doctrine (carried forward from earlier passes) Pi pass-3 first noted that the `external_auth` example's `$token` in SIGNIN bug \"survived 8 reviewer passes\" before pass-3 caught it. The pattern: every reviewer verified JWT *issuance* semantics (iss.alg, iss.key, AccessMethodMismatch fallthroughs at :449/:550/:686) and parser-grammar acceptance, but none traced what `$token` actually resolves to inside SIGNIN vs AUTHENTICATE. The canonical test fixture at `verify.rs:2034` would have disambiguated this on first inspection. The same pattern recurred at pass-6 with Codex's NS/DB/AC routing-claim catch — five review passes verified parser correctness without checking that inbound JWTs actually carry the claims `verify.rs:288-297` requires for routing. Doctrine for future cycles: every example in a doc should be walked end-to-end at the SurrealQL evaluation level — \"at each evaluation point, what do the session parameters actually contain? what claims does the JWT need to route?\" — not just \"does the example parse?\". A parse-clean example can still be semantically broken (wrong clause for a given parameter, missing routing claims, wrong base for a given access type, wrong algorithm relationship between verifier and issuer). Memory file `feedback_walk_examples_end_to_end.md` carries the doctrine with two recorded instances. #### Verification escalator (v1.6.x) This release extends the v1.6.0 / v1.6.1 verification escalator — every claim grounded in a parser-source line range plus a parser test-fixture line plus a runtime path where applicable, so any reviewer can trace a clause back to the v3.0.5 commit that defined it. Remaining v1.5.x deferred IMPORTANTs after v1.6.2: surrealql.md data-type / DEFINE API / DEFINE CONFIG / INFO FOR INDEX|USER variants; vector-search.md HASHED_VECTOR / MINKOWSKI / jaccard-pearson similarity-function examples; performance.md TLS flags and SURREAL_HNSW_CACHE_SIZE env-var; graph-queries.md sub-SELECT graph clauses; data-modeling.md illustrative-edge consistency.","fileCount":39,"zipByteSize":309165},{"version":"1.6.1","createdAt":"2026-05-06T16:04:34.957Z","changelog":"## [1.6.1] - 2026-05-06 — Function namespace catalog (10 atomic feature commits + release commit, plus rev-2 review-fix commits) ### Added - **`rules/surrealql.md` Function-namespace catalog (batch 2 of the v1.5.x deferred-IMPORTANT cleanup).** Closes the seven function namespaces flagged as under-documented in the v1.5.x convergence notes plus three previously unrelated extensions, all verified against the v3.0.5 source tree at `/tmp/surrealdb-v3.0.5/surrealdb/core/src/fnc/` rather than against the docs site (which lags v3.0.5). - **`encoding::*` (4 functions)** — base64::{encode,decode} (with optional padding flag and padding-insensitive decoding) and cbor::{encode,decode}. Explicit \"no other formats exist\" callout to prevent symmetric fabrication of `encoding::hex`, `encoding::base32`, etc. - **`bytes::*` (1 function)** — only `bytes::len`. The v1.5.x deferral list claim of an under-documented bytes namespace was OVERSTATED; the upstream module is 7 LOC. Explicit \"do NOT assume it mirrors `string::*`\" callout. - **`set::*` (24 functions)** — largest namespace addition. Documents the 17 sync + 7 async / closure-based functions, with three critical semantic notes at the top: `set::difference` is SYMMETRIC (`A △ B`) — NOT the relative complement (use `set::complement` for `A \\ B`). The `array::*` namespace uses the SAME convention: `array::difference` is also symmetric difference (with multiset-pairing semantics for duplicates per `core/src/val/array.rs:310-323`), and `array::complement` is `A \\ B`. Sets are stored in Rust's `BTreeSet<Value>` and iterated in `Value::Ord` order — `at` / `first` / `last` / `slice` and the closure-based traversals visit elements in that order. Explicit \"no `set::sort`, `set::distinct`, `set::reverse`, `set::concat`, `set::sample`, `set::is_subset`, `set::is_superset`\" callout. (The original v1.5.x deferral list claim that `set::difference` and `array::difference` use OPPOSITE conventions was wrong; rev-2 review pass corrected the cross-section narrative against `core/src/fnc/set.rs:68-76` + `core/src/val/array.rs:310-323`. Pre-existing `array::difference([1,2,3], [2,3,4])` example was also fixed from `[1]` to `[1, 4]` to match the actual symmetric-difference return value.) - **`sequence::*` (1 function)** — only `sequence::nextval`. The v1.5.x deferral list claim was OVERSTATED. Documents the `REMOVE SEQUENCE; DEFINE SEQUENCE` reset pattern (since no `sequence::reset` / `sequence::current` / `sequence::peek` exists). - **`schema::*` (1 function)** — only `schema::table::exists`. The v1.5.x deferral list claim was OVERSTATED. Notes the `Action::View` IAM requirement and shows the `IF !exists THEN DEFINE` guard idiom. - **`file::*` (13 functions, experimental)** — registry rows split across `core/src/fnc/mod.rs:239-240` (2 sync inspectors: `file::bucket`, `file::key`) and `core/src/fnc/mod.rs:602-612` (11 async I/O functions). Every row carries the `exp(Files)` macro prefix; the capability check resolves at function DISPATCH time (not at SurrealQL parse time, per `core/src/fnc/mod.rs:114-133`). Functions only resolve when the server runs with `--allow-experimental Files`. Documents put / put_if_not_exists / get / head / exists / delete / list / copy / copy_if_not_exists / rename / rename_if_not_exists plus the sync inspectors `bucket` / `key`. The `*_if_not_exists` variants are NO-OPS when the destination key already exists (verified against `core/src/buc/controller.rs:97-216`); they do NOT error. `file::head` returns `{ updated, size, file }` per `core/src/buc/store/mod.rs:35-52` (no `etag` field exists in v3.0.5). Calls out the asymmetric `file::list(bucket: string, options?: object)` signature and the cross-bucket `file::copy(file, file)` form. Explicit \"NO `file::move`\" callout. The example `DEFINE BUCKET` syntax uses bare `READONLY` (no boolean operand) per `core/src/syn/parser/stmt/define.rs:1378-1380`. - **`api::*` (7 functions, two usage modes)** — split into `api::invoke` (callable from regular SurrealQL, server-side dispatch with no HTTP round-trip) and the six middleware-only functions (`api::req::body`, `api::res::body`, `api::res::status`, `api::res::header`, `api::res::headers`, `api::timeout`) that take an implicit `next` from the `DEFINE API ... MIDDLEWARE` chain and are not free-standing. Body-strategy enumeration: auto / json / cbor / flatbuffers / plain / bytes / native. `api::res::status` validates 100..=599. `api::res::headers` (the MAP form) accepts `NONE` map values to remove a header; `api::res::header` (the single-pair form) does NOT — its second argument is `Optional<String>` so passing an explicit `NONE` is a type error and removal must be done by OMITTING the second argument. - **`rules/surrealql.md` top-level `sleep(duration)` function.** Registered as the bare name `\"sleep\"` at `core/src/fnc/mod.rs:639` — NOT under any namespace. Calls out the CLAMP-by-context-timeout behaviour: e.g. `CREATE timeout_probe SET slept = sleep(10s) TIMEOUT 1s;` errors out via the surrounding `TIMEOUT` clause after ~1s rather than completing the 10-second sleep. Note that `RETURN` itself does NOT parse a `TIMEOUT` clause (per `core/src/syn/parser/stmt/mod.rs:566-575`); attach `TIMEOUT` to a statement that does (`SELECT`, `CREATE`, `UPDATE`, `DELETE`, `RELATE`, `INSERT`). The function is implemented via `tokio::time::sleep`, so it does NOT block the async runtime. - **`rules/surrealql.md` extends `### Search Functions` with three previously undocumented entries.** `search::analyze(analyzer, text)` for tokenizer preview; `search::rrf(results, limit, rrf_constant?=60)` for Reciprocal Rank Fusion; `search::linear(results, weights, limit, norm: 'minmax' | 'zscore')` for weighted-linear-combination fusion with score-extraction priority `distance → ft_score → score → rank`. Both fusion functions document their argument-validation errors (`InvalidFunctionArguments`) per `core/src/fnc/search.rs`. - **`rules/surrealql.md` extends `### Session Functions` from 6 to 8.** Adds `session::ac()` (current access-method name set during authentication) and `session::rd()` (record-access record reference, e.g. `user:tobie` when signed in via `DEFINE ACCESS ... FOR RECORD`). Both are particularly useful inside `DEFINE ACCESS ... PERMISSIONS` and `DEFINE TABLE ... PERMISSIONS` clauses. ### Process notes - **v1.6.0 lesson applied first.** Before drafting docs, every claimed namespace was verified against the v3.0.5 source rather than against the docs site or the v1.5.x deferral list. Three of the seven listed namespaces (`bytes`, `sequence`, `schema`) turned out to be SINGLE-FUNCTION namespaces, not the multi-function namespaces the deferral list implied — the same failure mode as the ALTER target-list fabrication v1.6.0 just fixed (taking a list claim at face value instead of going to the parser/registry). Each section now includes an explicit \"what is NOT registered\" callout for the most plausible-looking absent functions. - **Atomic commits.** Each namespace landed in its own commit citing the registry line numbers and module LOC so future audits (or a 4-WAY adversarial review) can verify each addition independently.","fileCount":38,"zipByteSize":274230},{"version":"1.5.10","createdAt":"2026-05-06T03:28:46.198Z","changelog":"## [1.5.10] - 2026-05-05 — v1.5.x stable ### v1.5.x cycle declared stable A tenth Pi+DeepSeek-V4-Pro:xhigh adversarial pass over the same six rules audited in pass-9 returned **2 GO + 4 CONDITIONAL GO + 0 NO-GO** with **0 CRITs** total — the convergence target. Per `~/CLAUDE.md` \"CONDITIONAL GO w/ no CRIT = ship if maintainer accepts IMPs as deferred\", v1.5.x is declared stable. v1.5.10 closes a single convergent IMPORTANT bug surfaced by both the data-modeling.md and graph-queries.md pass-10 reports: **`INTERSECT` is not a valid SurrealQL v3 expression operator.** v3 array set-operations are function calls (`array::intersect()`, `array::union()`, `array::complement()`), not infix keywords. Two example queries used `INTERSECT` as if it were an infix operator: - `rules/data-modeling.md` line 440 (Social Network Pattern §\"Mutual follows\"): `SELECT ->follows->user INTERSECT <-follows<-user AS mutual …` → corrected to `SELECT array::intersect(->follows->user, <-follows<-user) AS mutual …`. - `rules/graph-queries.md` line 572 (Recommendation Engine): `count(->likes->product INTERSECT $my_likes) AS overlap` → corrected to `count(array::intersect(->likes->product, $my_likes)) AS overlap`. A repo-wide grep confirms no other `INTERSECT` / `EXCEPT` infix usages remain (`INTERSECTS` is a separate, upstream-valid geometry operator and is unaffected). ### v1.5.x convergence trajectory ``` Pass: 1 2 3 4 5 6 7 8 9 10 CRITs: 21 7 15 6 6 5 1 2 5 0 ``` **Total: 70 CRITs found-and-fixed across ten passes.** Cycle ran 2026-05-05 in a single ~7-hour wall-clock pass with 6 parallel Pi processes per pass. Pass-3 was the high-water mark (15 CRITs) because it added `rules/surrealql.md` as a sixth target — the foundational language reference's first dedicated full-file Pi pass. Post-pass-3, the trend is monotone-decreasing-with-noise; pass-9's uptick reflected v1.5.8 ALTER surgery fix-drift (2 phantom-clause CRITs) plus 2 cross-rule incomplete-fix CRITs surfaced by the pass-9 cross-file gap analysis. Pass-10 confirmed the v1.5.9 corrections held + the cycle has exhausted the high-confidence correctness surface. The single most consequential correction was the v1.5.3 HNSW LM parameter rewrite — the v1.5.1 fix had labelled LM as \"Minkowski distance order\" based on docs-only inspection; pass-3 verified against parser source that LM is the HNSW level multiplier (`ml` in the original paper) used in `l ← ⌊−ln(unif(0..1)) · ml⌋`, with default `1 / ln(M)` (~0.402 at M=12). Pre-v1.5.3 consumers who copied an `HNSW … LM N` snippet thinking they were configuring Minkowski order were silently flattening the HNSW hierarchy. The rule's HNSW parameter table now carries an explicit warning about the v1.5.1/v1.5.2 mislabelling. Other notable findings preserved as warnings: - **`DIST JACCARD` / `DIST PEARSON` semantically inverted** in v3.0.5 catalog (`Distance::compute` calls similarity functions for these two values; HNSW `KnnPriorityList` uses ascending order → ranks LEAST-similar first). v1.5.5 added an explicit warning callout in `rules/vector-search.md` recommending standalone `vector::similarity::*` calls or a true distance metric for indexed nearest-neighbour search. - **`<future> { … }` syntax does NOT exist in v3.0.5** despite appearing in upstream docs (no `Future` variant in `Value` / `Kind` enums; no `FUTURE` lexer keyword). v1.5.5 replaced the Futures section with §\"Deferred Computation: Computed Fields, Closures, JS Functions\" pointing at `DEFINE FIELD … VALUE`, `|$args| body` closures, and embedded JavaScript. - **`DEFINE INDEX … DEFER` does NOT parse in v3.0.5** despite being in upstream docs (`DefineIndexStatement` has no `defer` field; parser doesn't read DEFER). v1.5.7 removed the DEFER example from `rules/surrealql.md` and rewrote the `rules/performance.md` DEFER subsection as a \"do not use\" deprecation block citing the parser source. - **`UPDATE … LIMIT` does NOT parse in v3.0.5** (`UpdateStatement` struct has no `limit` field). v1.5.9 replaced the chunking pattern with a `SELECT VALUE id … LIMIT N` then `UPDATE $batch SET …` two-step (same fix shape as the v1.5.3 `DELETE … LIMIT` correction). - **`TYPE JWT` accepts both `DURATION FOR TOKEN` and `DURATION FOR SESSION`** — the pre-v1.5.8 callout claiming `FOR TOKEN` was rejected was based on docs alone and contradicted parser tests. Semantics depend on issuer-key presence; symmetric algorithms (HS256/HS384/HS512) auto-populate the issuer. - **`DEFINE NAMESPACE … STRICT` does NOT exist** despite v1.5.4 briefly documenting it as the replacement for the deprecated `--strict` CLI flag. v3 only accepts `STRICT` on `DEFINE DATABASE`. Per-namespace coverage requires defining each database within the namespace as STRICT. ### Per-rule pass-10 verdicts | File | Verdict | CRITs (pass-10) | Cumulative CRITs | |---|---|---|---| | `rules/data-modeling.md` | CONDITIONAL GO (INTERSECT IMP fixed in v1.5.10) | 0 | 4 | | `rules/security.md` | GO | 0 | 8 | | `rules/vector-search.md` | CONDITIONAL GO | 0 | 5 | | `rules/performance.md` | GO | 0 | 18 | | `rules/graph-queries.md` | CONDITIONAL GO (INTERSECT IMP fixed in v1.5.10) | 0 | 10 | | `rules/surrealql.md` | CONDITIONAL GO | 0 | 35+ | ### Deferred to v1.6.x Approximately 30 IMPORTANT-classified items remain as documentation- completeness gaps — none contradict upstream v3.0.5. Tracked in the per-rule pass-10 reports at `/tmp/pi-{rule}-pass10-out.md` and summarised in `notes/v1.5.x-convergence.md`. Highlights: - security.md: WITH REFRESH on TYPE RECORD; JWKS URL on TYPE RECORD; ACCESS REVOKE/SHOW/PURGE; DEFINE USER PASSHASH. - surrealql.md: 10 undocumented ALTER targets; function namespaces (encoding::*, bytes::*, file::*, set::*, sequence::*, schema::*, api::*); data types (regex, range, literal, file); INSERT IGNORE example; DEFINE API; DEFINE CONFIG; INFO FOR INDEX/USER. - performance.md: TLS flags in start-flag list; SURREAL_HNSW_CACHE_SIZE env-var verification; REBUILD INDEX ON TABLE all-indexes form. - graph-queries.md: sub-SELECT graph clauses with ORDER/LIMIT/ START/GROUP BY; `$parent` in WHERE; custom edge Record IDs in RELATE; +path+inclusive form. - vector-search.md: HASHED_VECTOR semantics verification; MINKOWSKI in similarity-functions section. - data-modeling.md: illustrative-edge consistency. Migration: consumers who copied `INTERSECT` as an infix operator should replace with `array::intersect()`. Machine-checked version- consistency CI gate continues to apply. See `notes/v1.5.x-convergence.md` for the full per-pass trajectory table, fix-drift pattern analysis, and deferred-IMP catalog.","fileCount":38,"zipByteSize":259297}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s178bj90ka9xeg44k6bt7q07k184jcr0:surrealdb","setupComplexity":"low","setupSteps":["Install using `clawhub skill install s178bj90ka9xeg44k6bt7q07k184jcr0:surrealdb` in an isolated environment before connecting it to live workloads.","No published capability contract is available yet, so validate auth and request/response behavior manually.","Review the upstream CLAWHUB listing at https://clawhub.ai/24601/surrealdb before using production credentials."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-24601-surrealdb/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-24601-surrealdb/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-24601-surrealdb/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-24601-surrealdb/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-24601-surrealdb/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-24601-surrealdb/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-09T18:35:08.732Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-24601-surrealdb/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-24601-surrealdb/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-24601-surrealdb/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-24601-surrealdb/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T17:13:26.276Z","emptyReason":null},"readme":"Skill: SurrealDB 3\n\nOwner: 24601\n\nSummary: Expert SurrealDB 3 architect and developer skill (tracks v3.1.4+). SurrealQL mastery, multi-model data modeling (document, graph, vector, time-series, geospa...\n\nTags: ai-agents:1.7.1, database:1.7.1, graph:1.7.1, latest:1.7.1, openclaw:1.7.1, surrealdb:1.7.1, vector:1.7.1\n\nVersion history:\n\nv1.7.1 | 2026-06-17T17:15:12.566Z | user\n\n## [1.7.1] - 2026-06-17 — cross-domain gotchas catalog\n\n### Added\n\n- **`rules/gotchas.md`** — consolidated footgun reference covering upgrade/migration,\n  security, graph, vector, SurrealQL, MCP, SDK, and operational gotchas (v3.1.4+).\n- **AGENTS.md decision tree** for \"surprising SurrealDB behavior / gotcha\" queries.\n- **`gotchas` capability** in `onboard.py --agent` manifest.\n\n### Changed\n\n- **`rules/graph-queries.md`** — renamed section to \"Graph Gotchas\" with pointer to\n  `rules/gotchas.md` for cross-domain coverage.\n- **`rules/surrealql.md`** — replaced stale v3.1.0-alpha stub with v3.1.4 patch\n  notes summary linking to gotchas and deployment rules.\n\nv1.7.0 | 2026-06-17T16:59:44.951Z | user\n\n## [1.7.0] - 2026-06-17 — SurrealDB 3.1.4 GA tracking\n\n### Added\n\n- **Built-in MCP server** documentation in `rules/surrealmcp.md` (`surreal mcp`\n  stdio, HTTP `POST /mcp`) with standalone `surrealmcp` boundary guidance.\n- **DiskANN vector index** coverage in `rules/vector-search.md` alongside HNSW,\n  including 64-bit platform gate and shared `<|K, EF|>` query operator.\n- **Graph edge-case wisdom** in `rules/graph-queries.md`: inline edge filters\n  (v3.1.3 fix), `$parent` scope, RELATION + partial UNIQUE index (#7280),\n  record-links-vs-edges modeling, agent-memory demo pointer, official YouTube\n  references.\n- **3.0→3.1 upgrade guide** in `rules/deployment.md` with breaking-change table.\n- **Ecosystem pointers**: surqlize, datasets, agent-memory, kaig, built-in MCP\n  in `rules/ecosystem-integrations.md`; new entries in `SOURCES.json`.\n- **SurrealKit v0.7.0**, **Surrealist v3.9.0**, **Java SDK v2.1.1**, **LSP\n  v0.1.6**, **CodeMirror v1.0.6**, **VSX v0.4.2**, **JetBrains v0.2.3**.\n\n### Changed\n\n- **Target server**: v3.0.5 → **v3.1.4** (recommend minimum for production).\n- **`rules/surrealql.md`**: full ALTER coverage (v3.1.0+), `value::expect`,\n  v3.0.5 seven-target boundary preserved for older servers.\n- **`rules/surrealism.md` / deployment**: async Surrealism and `--allow-net`\n  hardening pointers (via deployment upgrade section).\n- **Spectron status**: roadmap-only → alpha in JS/Python SDK main (boundary\n  preserved in ecosystem-integrations).\n- **Provenance refresh** across `SOURCES.json`, `AGENTS.md`, and `SKILL.md`.\n\n### Security\n\n- Document **GHSA-8rw6-p7m8-63jp** array element-level SELECT permission fix\n  (v3.1.4) in `rules/security.md`.\n- Retain auditor-safe install guidance: brew/Docker/`surreal upgrade` only — no\n  `curl | sh` in skill scripts or primary install paths.\n- Built-in MCP stdio owner-level access warning added to MCP rules and AGENTS\n  decision tree.\n\nv1.6.6 | 2026-05-14T18:34:18.609Z | user\n\n## [1.6.6] - 2026-05-14 — ecosystem refresh, provenance normalization, and release workflow hardening\n\n### Added\n\n- **`rules/ecosystem-integrations.md`** covering the official scoped n8n\n  community node (`@surrealdb/n8n-nodes-surrealdb` v0.6.0), the official AI\n  framework docs index, Spectron / Agent Memory Context as roadmap-only,\n  CodeMirror packages, and the upstream `surrealdb/agent-skills` repo.\n- **CodeMirror coverage** in `rules/editor-tooling.md` for\n  `@surrealdb/codemirror` / `@surrealdb/lezer` v1.0.5.\n- **SDK provenance expansion** for first-party Java, .NET, PHP, C, Swift,\n  Kotlin, and Ruby repositories in `SOURCES.json`.\n\n### Changed\n\n- **Upstream provenance normalized to concrete SHAs** across 31 tracked repos,\n  replacing sentinel values such as `tracked-via-pypi` / `tracked-via-surrealdb`\n  with auditable commit baselines.\n- **`rules/sdks.md`** now calls out the unreleased Python v3 builder API and\n  `surrealdb-embedded` split, .NET `SurrealDb.Net` v0.10.2, and the source-only\n  C binding caveat.\n- **`rules/surrealkit.md`** updated to v0.6.3 with current install surfaces\n  (`cargo binstall`, Cargo, release archives with checksums, GHCR Docker image),\n  template variables, and current `SURREALDB_*` env-var behavior.\n- **`rules/surrealml.md`** now separates GitHub `v0.1.2` from PyPI `0.0.4` and\n  flags setup-time native-library downloads unless `LOCAL_BUILD=TRUE`.\n- **`rules/surrealist.md`** moved to main commit `cc19eb149dbc`, noting\n  post-release dropdown and workflow/supply-chain hardening without claiming a\n  newer public release.\n\n### Security / CI\n\n- Kept runtime script permissions stable: no new credential storage, no hidden\n  production shortcuts, and no remote shell installer guidance.\n- Updated GitHub Actions from deprecated Node 20 action majors to exact current\n  tags: `actions/checkout@v6.0.2`, `actions/setup-python@v6.2.0`, and\n  `astral-sh/setup-uv@v8.1.0`. `setup-uv` does not publish a `v8` major alias.\n- Fixed the nightly upstream-check red flag by creating the `upstream-update`\n  label idempotently before issue creation.\n\nv1.6.4 | 2026-05-06T19:44:20.474Z | user\n\n## [1.6.4] - 2026-05-06 — `rules/data-modeling.md` deferred-IMPORTANT clause closure + v1.6.3 ride-along security.md cite tightening (3 atomic feature commits + release commit)\n\n### Added\n\n- **`rules/data-modeling.md` deferred-IMPORTANT cleanup (batch\n  4 of the v1.5.x convergence cycle).** Closes both items\n  attributed to data-modeling.md in the v1.5.x convergence\n  notes:\n  - **Exact kNN metric mismatch fixed.** Pre-existing example\n    used `<|10,EUCLIDEAN|>` as the brute-force operator but\n    `vector::similarity::cosine()` as the projected score —\n    top-10 by Euclidean re-ordered by an unrelated cosine\n    score, almost never the intended semantic. Rewrote with\n    two correctly-paired examples (Cosine path:\n    `<|k,COSINE|>` + `vector::similarity::cosine()` + ORDER BY\n    similarity DESC; Euclidean path: `<|k,EUCLIDEAN|>` +\n    `vector::distance::euclidean()` + ORDER BY distance ASC).\n    Documents all three NearestNeighbor variants (`K` /\n    `KTree` / `Approximate` per\n    `core/src/sql/operator.rs:393-398`) so consumers know\n    which form to use for which case.\n  - **Illustrative-edge consistency.** Three edge tables\n    (`knows`, `reviewed`, `parent_of`) used in the doc's\n    traversal + recursive-query examples lacked\n    `DEFINE TABLE` statements. Added explicit definitions\n    with `TYPE RELATION ... IN ... OUT ... ENFORCED` matching\n    the doc's broader 'define edges first' pattern used for\n    `wrote` / `purchased` / `follows` / `likes` /\n    `ships_to` / `enrolled_in` / etc. Inline comment\n    explains that v3 SCHEMALESS still creates RELATE rows on\n    undefined edge tables (so the original examples worked at\n    runtime), but the explicit definition documents the\n    expected shape and lets ENFORCED reject malformed\n    RELATEs at write time.\n\n### Changed\n\n- **`rules/security.md`** — v1.6.3 Cursor pass-1 M3\n  ride-along: tightened ROUTING-CLAIM REQUIREMENT block's\n  `:288-297` cite to `:292-297` (the actual claims-match arm)\n  + `:824-825` to `:825` (the entire `_ => Err(InvalidAuth)`\n  arm sits on :825; :826 is the surrounding match's closing\n  brace). Cosmetic\n  precision improvement; no semantic change.\n\n### Process notes\n\n3 atomic commits (kNN metric fix; illustrative-edge\nconsistency; release-with-bundled-security-cite) + 1 rev-2\nreview-fix commit closing pass-1 findings.\n\nPass-1 4-WAY review:\n- Cursor: CONDITIONAL GO (0 CRITs / 1 IMP / 3 minors)\n- Codex:  NO-GO          (1 CRIT / 2 IMPs / 1 minor)\n- Gemini: GO              (0 findings)\n- Pi:     pending at rev-2 dispatch\n\nRev-2 closes:\n- **Codex C1**: rev-1 doc described `<|k|>` (NearestNeighbor::KTree)\n  as \"requires a defined index\" — but per\n  `core/src/exec/planner/util.rs:391` + `analysis.rs:1001-1005`\n  + `select.rs:1421-1425`, KTree is parser-accepted but NOT\n  handled at the planner level in v3.0.5 (legacy v2 m-tree\n  remnant). Rewrote to clarify only `<|k,dist|>` and\n  `<|k,ef|>` are implemented; `<|k|>` is grammar-accepted\n  with no active planner path.\n- **Cursor I1**: security.md still had two stale `verify.rs:288-297`\n  + one `:824-825` ref at lines 548 + 1659-1661 that the\n  rev-1 ride-along missed. Replace-all fixed.\n- **Codex I1**: CHANGELOG commit-count drift. Now accurately\n  reflects 3 atomic + 1 rev-2 review-fix commit shape.\n- **Codex M1 + Pi I1 (CONVERGENT)**: `:826` is the\n  surrounding match's closing brace, not the body line — the\n  entire `_ => Err(InvalidAuth)` arm sits on `:825`. Reworded\n  rule + CHANGELOG to cite `:825` only.\n\nv1.6.3 | 2026-05-06T19:26:46.182Z | user\n\n## [1.6.3] - 2026-05-06 — `rules/security.md` v1.6.2 pass-7 deferred-IMP polish (1 atomic doc commit + release commit + rev-2 review-fix commit)\n\n### Changed\n\n- **`rules/security.md` v1.6.2 pass-7 deferred-IMPORTANT\n  cleanup.** Closes the five documentation-polish items that\n  v1.6.2 pass-7 ratified as deferrable, plus a CHANGELOG\n  housekeeping label. None affect runtime correctness — all\n  source-citation tightening, cross-reference consistency, and\n  example consolidation:\n  - **`auth0_jwt` TYPE JWT example** (JWKS-Backed JWT section)\n    now mentions the NS/DB/AC routing-claim requirement\n    inline, matching the per-example consistency of\n    `external_idp` and `jwks_inbound` (the redundant `account`\n    JWKS example is removed in this same release per item 3\n    below). The preamble's ROUTING-CLAIM REQUIREMENT\n    block already covers TYPE JWT (the `fn token` entry point\n    decodes ALL inbound JWTs through `decode_claims_unverified`\n    before dispatching to access-type-specific verifiers), but\n    the per-example note improves discoverability for readers\n    who jump straight to JWKS examples.\n  - **`jwks_inbound`'s DURATION-omission comment** now uses the\n    `:282` / `:457` dual-pointer that `external_jwt_auth` uses\n    (split between the no-id claims arm where AUTHENTICATE\n    runs and the with-id claims arm). Cross-example citation\n    consistency.\n  - **`account` + `jwks_inbound` consolidation.** After\n    rev-7's `account` rewrite, the two examples were\n    functionally identical (TYPE RECORD WITH JWT URL +\n    AUTHENTICATE for `$token.sub`). Removed the redundant\n    `account` example and reworded the surrounding prose to\n    point readers at `jwks_inbound` as the canonical\n    Pattern A.\n  - **`verify.rs:155+` cite tightened to `:158-159`** in the\n    ROUTING-CLAIM REQUIREMENT block. The actual\n    `decode_claims_unverified(token)?` call is on lines\n    158-159; `:155` is the `fn token` signature.\n  - **`Cumulative trajectory after pass-5` table** in the\n    [1.6.2] CHANGELOG entry labeled as historical /\n    superseded by the pass-6 + pass-7 tables below it.\n\n### Process notes\n\n1 atomic doc commit (5 polish items combined per v1.6.0\nsingle-commit fix pattern) + release commit + 1 rev-2\nreview-fix commit (after pass-1 4-WAY review surfaced\nconvergent CHANGELOG-hygiene minors).\n\nPass-1 4-WAY adversarial review:\n- Cursor: GO              (0 CRITs / 0 IMPs / 3 minors)\n- Codex:  CONDITIONAL GO  (0 CRITs / 0 IMPs / 2 minors)\n- Gemini: GO              (clean — 0 findings)\n- Pi:     GO              (0 CRITs / 0 IMPs / 1 minor)\n\nConvergent minors (closed in rev-2):\n- Pi M1 + Cursor M1 + Codex implicit: `:158-159` line range\n  for `decode_claims_unverified` was a 2-line span where\n  only `:159` is the actual call (`:158` is the describing\n  comment). Tightened to `:159 (with a describing comment at\n  :158)`.\n- Cursor M2 + Codex M2: CHANGELOG `[1.6.3]` `auth0_jwt` bullet\n  said the per-example consistency restored alignment with\n  `account` / `external_idp` — but `account` was removed in\n  the same release. Reworded to `external_idp` and\n  `jwks_inbound` (the actual remaining peers).\n- Codex M1: CHANGELOG header said \"4 atomic doc commits\"\n  while process notes said \"5 atomic doc commits\"; live\n  branch had 2. Header now says \"1 atomic doc commit (5\n  polish items combined) + release commit + rev-2 review-fix\n  commit\" — accurate.\n\nCursor M3 (routing arm cite `verify.rs:288-297` vs `292-297`\nboundary) deferred — the cited block is correct in intent\n(`Claims { ns: Some, db: Some, ac: Some, .. }` arm), and the\nrange covers the surrounding match-arm comments + the body;\ntightening to `:292-297` would lose context. Tracked as a\nv1.6.4 hygiene candidate if a future deeper audit reaches the\nv1.6.x backlog tail.\n\nNo re-dispatch for rev-2 — convergent CHANGELOG-only minors\nthat are mechanical fixes against the same source the pass-1\nreviewers cited; rev-2 risk profile is near-zero (no\nsecurity.md surface change beyond the one line tightening).\n\nv1.6.2 | 2026-05-06T19:14:13.948Z | user\n\n## [1.6.2] - 2026-05-06 — `rules/security.md` deferred-IMPORTANT clause closure (4 atomic feature commits + release commit)\n\n### Added\n\n- **`rules/security.md` Access-and-user clause catalog (batch 3 of\n  the v1.5.x deferred-IMPORTANT cleanup).** Closes the five\n  deferred bullets attributed to `rules/security.md` in the v1.5.x\n  convergence notes, all verified against the v3.0.5 source tree\n  at `/tmp/surrealdb-v3.0.5/surrealdb/core/src/{syn,sql,iam}/`\n  rather than against the docs site (which still lags v3.0.5).\n  - **`WITH REFRESH` on `TYPE RECORD`** — bearer-grant-backed\n    refresh-token flow with single-use rotation; coexists with\n    `WITH JWT` in either order; `DURATION FOR GRANT` controls\n    refresh-token lifetime, `FOR TOKEN` controls access-token\n    lifetime, `FOR SESSION` controls session ceiling. Verified\n    against `core/src/syn/parser/stmt/define.rs:492-500`,\n    `core/src/iam/signin.rs:279-355`,\n    `core/src/iam/access.rs:107-170`, plus parser test fixtures\n    `core/src/syn/parser/test/stmt.rs:911 / :1108 / :1163`.\n    Includes a JS-SDK client renewal example showing the\n    `{access, refresh}` token shape.\n  - **`WITH JWT URL '<jwks-uri>'` (JWKS endpoint)** — alternative\n    to inline `ALGORITHM <alg> KEY <key>` for both `TYPE JWT` and\n    nested `WITH JWT` inside `TYPE RECORD`. Standard pattern for\n    integrating with external IdPs (Auth0, Okta, Cognito, Google,\n    Azure AD) that publish a JWKS document and rotate signing\n    keys on their own schedule. Documents the cache-TTL\n    environment variables (`SURREAL_JWKS_CACHE_EXPIRATION_SECONDS`,\n    `SURREAL_JWKS_CACHE_COOLDOWN_SECONDS`,\n    `SURREAL_JWKS_REMOTE_TIMEOUT_MILLISECONDS`), and the\n    capabilities requirement to permit network access to the\n    JWKS host. After the rev-4/rev-5 anti-pattern correction,\n    the JWKS section also documents `jwks_inbound` (TYPE RECORD\n    WITH JWT URL + AUTHENTICATE for federated IdP integration)\n    and `credential_mint` (TYPE RECORD WITH JWT inline-KEY +\n    SIGNIN + WITH ISSUER for round-trippable SurrealDB-side\n    minting) as TWO separate access definitions; combining\n    JWKS-verify with WITH ISSUER inline-key in a single TYPE\n    RECORD definition is documented as an anti-pattern (kid\n    round-trip + sub-vs-ID claim mismatch). Verified against\n    `core/src/syn/parser/stmt/define.rs:1716-1722` and\n    `core/src/iam/jwks.rs`, plus parser test fixtures\n    `core/src/syn/parser/test/stmt.rs:703 / :731 / :762 / :792 /\n    :823`.\n  - **`ACCESS GRANT / SHOW / REVOKE / PURGE` statements** — the\n    four top-level subcommands that manage bearer-grant lifecycle\n    against a `DEFINE ACCESS … TYPE BEARER` access method.\n    Documents the issue-once / hash-stored / no-recovery\n    semantics for `GRANT`, the auditing surface of `SHOW { ALL |\n    GRANT <id> | WHERE <cond> }`, the soft-revocation semantics\n    of `REVOKE` (revoked grants stop authenticating immediately\n    but remain visible until purged), and the `PURGE { EXPIRED |\n    REVOKED | EXPIRED, REVOKED } [ FOR <duration> ]` physical\n    deletion path with optional grace-period clause. Includes an\n    end-to-end credential-rotation playbook combining all four\n    subcommands. Verified against\n    `core/src/syn/parser/stmt/mod.rs:108-271` and parser test\n    fixtures `core/src/syn/parser/test/stmt.rs:2604 / :2621 /\n    :2645-2683 / :2703-2741 / :2761-2853` (every subcommand and\n    its parameter variants).\n  - **`DEFINE USER PASSHASH` clause** — accept a pre-hashed\n    [argon2 PHC string](https://en.wikipedia.org/wiki/PHC_string_format)\n    instead of a plaintext `PASSWORD`; mutually exclusive with\n    `PASSWORD` per parser bail at\n    `core/src/syn/parser/stmt/define.rs:349 / :356`. Documents\n    the migration-from-external-IdP use case (re-hashing an\n    already-hashed string locks legacy users out) and the\n    `crypto::argon2::generate($plaintext)` `RETURN`-trick for\n    on-the-fly hashing on the SurrealDB side.\n  - **`DEFINE USER DURATION FOR { TOKEN | SESSION } <expr>`\n    clause** — per-user override of the token (default 1h per\n    `define.rs:336`) and session (default unbounded per\n    `core/src/sql/statements/define/user.rs:43`) expiry; both\n    accepted in either order, comma-separated; either alone\n    valid; `NONE` opts out of expiry on the corresponding axis\n    (the v3.0.5 test suite has `DURATION FOR TOKEN NONE`\n    anti-fixtures across three commented regions at\n    `stmt.rs:398-407` (one DEFINE USER block), `:623-631` (one\n    DEFINE ACCESS TYPE JWT block), and `:1250-1276` (three\n    DEFINE ACCESS TYPE RECORD blocks at DB / ROOT / NS) —\n    five anti-fixtures total, all gated by /* */ wrappers and\n    calling `unwrap_err()`, so direct positive-fixture\n    provenance does not exist; consumers should validate via\n    round-trip signin/authenticate tests rather than parse-only\n    confirmation). Application path verified at\n    `core/src/iam/signin.rs:481 / :502` and\n    `core/src/iam/verify.rs:106`. Includes a combined `PASSHASH +\n    ROLES + DURATION + COMMENT` example showing the full v3\n    `DEFINE USER` clause set.\n\n### Process notes\n\nFive clauses landed across four atomic feature commits in rev-1\n(one for each of `WITH REFRESH`, `WITH JWT URL`, `ACCESS\nsubcommands`, and the combined `PASSHASH + DURATION` subsection\n— the latter two clauses naturally compose on the same statement\nand share a verification path, so they ship as one atomic edit\nper the v1.6.0 / v1.6.1 atomic-protocol pattern).\n\n#### Rev-2 disposition (4-WAY adversarial pass-1)\n\nPass-1 verdicts: Cursor NO-GO (2 CRITs / 5 IMPs / 3 minors),\nCodex NO-GO (1 CRIT / 4 IMPs / 2 minors), Gemini NO-GO (3 CRITs /\n2 IMPs), Pi CONDITIONAL GO (0 CRITs / 2 IMPs / 3 minors). Five\natomic rev-2 commits closed every accepted finding:\n\n- **R1** — TYPE JWT issuance correction. Cursor C2 (CRIT, source-\n  cited at signin.rs:449/:550/:686 — pure TYPE JWT has no signin\n  branch) and Cursor I3 (token_duration unused on JWT\n  authenticate path) both pre-existing v1.5.x latent bugs.\n  Reframed the JWT FOR TOKEN/WITH ISSUER callout as\n  \"verification-only\" with explicit pointers at the\n  `at.jwt.issue` consumers (only signin.rs:275-318 inside the\n  Record branch + signin_bearer at :737). Replaced the fictional\n  `hybrid_jwt` mint example with the correct\n  `hybrid_record TYPE RECORD WITH JWT URL + WITH ISSUER` pattern.\n  Fixed the `parser/tests/stmt.rs` typo (Cursor I2).\n- **R2** — JWKS Cargo feature gate (CONVERGENT CRIT, Cursor C1 +\n  Codex C1). Parser accepts `URL` unconditionally, but every\n  runtime arm at `verify.rs:228-240/:340-352/:412-424/:573-585/:725-737`\n  is `#[cfg(feature = \"jwks\")]`. Default `surrealdb-server`\n  features at `server/Cargo.toml:19-30` lack `jwks`. Added a\n  callout citing every gated arm + the Cargo wiring + a `cargo\n  build --features jwks` recipe. Also removed the unsupported\n  \"allow redirect targets\" wording (Codex M2 — `jwks.rs:268-313`\n  only checks the original URL host) and added a \"test-fixture\n  gap for `TYPE RECORD WITH JWT URL`\" acknowledgement (Pi I1).\n- **R3** — refresh-rotation citation + token-shape fix. Convergent\n  IMP (Cursor I1 + Codex I2): the prior single-range\n  `signin.rs:279-355` citation conflated dispatch (279-295) +\n  initial issuance (352-364) with rotation (893-917 inside\n  `signin_bearer`'s `BearerAccessType::Refresh` arm). Split the\n  citation. Codex I2 unique catch on token shape: runtime returns\n  the full bearer key (id + secret), not just the grant id;\n  fixed JS-SDK example and added a \"persist verbatim, do not\n  split\" note.\n- **R4** — ACCESS section narrowings. Codex M1: PURGE grace is\n  strict greater-than (`> stmt.grace.secs()`), not \"at least\";\n  tightened to \"older than\". CONVERGENT IMP (Codex I1 + Cursor\n  I4): GRANT FOR RECORD is database-only at runtime\n  (`expr/statements/access.rs:226-234, :353-355`); replaced the\n  blanket \"ON NAMESPACE / ON ROOT also accepted\" paragraph with\n  an explicit base-scoping rubric that distinguishes\n  parse-acceptance from runtime-acceptance. Cursor I5: ON is\n  optional on every ACCESS subcommand; rubric flags this so\n  examples-with-explicit-ON are not read as required syntax.\n- **R5** — PASSHASH validation timing + DURATION fixture\n  cleanup. 3-WAY CONVERGENT (Codex I4 + Gemini C2 + Pi M1):\n  PASSHASH validation runs at signin (`verify.rs:945-952` —\n  `PasswordHash::new(hash)`), not at define\n  (`define.rs:353-358` stores verbatim). Added \"store as-is,\n  validate-on-use\" callout. Codex I3: prior `stmt.rs:402` test-\n  fixture citation pointed at a commented-out block; replaced\n  with an explicit \"public-test provenance is indirect\"\n  acknowledgement.\n\nREJECTED findings (with rationale):\n\n- **Gemini C1** (ACCESS ON ROOT invalid). REJECT — `parse_base()`\n  at `parts.rs:445` accepts `Base::Root` and `parse_define_access`\n  has no Root restriction for `TYPE BEARER FOR USER` /\n  `TYPE JWT`. Convergent rebuttal: Cursor I5 confirms `parse_access`\n  reads any base.\n- **Gemini C3** (URL on TYPE RECORD WITH JWT invalid). REJECT —\n  `parse_jwt()` at `define.rs:1716-1722` is the same function\n  invoked from both `t!(\"JWT\")` (line 454, standalone) and the\n  `WITH JWT` arm of TYPE RECORD (line 484); URL works in both\n  call sites. Convergent rebuttal: Codex residual-risk #2\n  confirms support is structurally real; Pi I1 acknowledges the\n  parser path. Both REJECTs match the v1.6.1-pass-1 pattern of\n  Gemini producing wrong-direction CRITs without source access.\n\n#### Rev-3 disposition (4-WAY adversarial pass-2)\n\nPass-2 verdicts: Cursor CONDITIONAL GO (0 CRITs / 2 IMPs / 2\nminors), Codex CONDITIONAL GO (0 CRITs / 2 IMPs / 2 minors),\nGemini GO (0 CRITs / 0 IMPs / 1 minor), Pi NO-GO (1 CRIT / 2\nIMPs / 2 minors — but Pi's CRIT was source-checked and rejected;\nsee below).\n\nFive atomic rev-3 commits closed every accepted finding:\n\n- **R1** — JWT-Based Authentication: issuer-default rubric. Codex\n  pass-2 I2 caught that the prior rev-2 'WITH ISSUER KEY omitted\n  defaults to HS512 with random key' prose was incomplete. Source\n  chain (define.rs:1696-1708 + :1716-1722 +\n  sql/access_type.rs:181-191): inline ALGORITHM verifier sets\n  iss.alg = <verifier-alg> at line 1697 BEFORE the WITH ISSUER\n  block runs (so bare WITH ISSUER KEY inherits the verifier alg\n  for asymmetric pairs); symmetric inline verifiers also auto-pop\n  iss.key (line 1707); URL/JWKS verifiers do NOT touch iss.alg\n  (URL arm at 1716-1722 has no iss.alg = ... line) so iss.alg\n  stays at JwtAccessIssue::default() = Hs512, REQUIRING explicit\n  WITH ISSUER ALGORITHM <alg> for asymmetric minting; missing\n  WITH ISSUER + missing symmetric auto-pop = AccessMethodMismatch\n  at signin.rs:275-278. Replaced the single-line stale comment\n  with a four-bullet rubric mapping every verifier shape to its\n  resulting iss.alg / iss.key / mint behaviour. Pi pass-2 I4\n  (signin_bearer fallthrough at :739) and Gemini pass-2 M1\n  (WITH ISSUER ALGORITHM prose tighten) folded into the same\n  commit since they touch the same prose region.\n- **R2** — JWKS section. Codex pass-2 I1: rev-2's 'no fixture\n  covers TYPE RECORD WITH JWT URL' was scoped to dedicated parser\n  fixtures; runtime verifier exercises the shape via\n  `#[cfg(feature = \"jwks\")]` test at verify.rs:1495-1497\n  (definition :1560-1564, end-to-end :1607-1623). Narrowed.\n  Pi pass-2 I3: hybrid TYPE RECORD WITH JWT URL + WITH ISSUER\n  inline-key still hits the JWKS feature gate on the verification\n  half; added 'gate applies even to hybrid setups' paragraph.\n  Pi pass-2 M3: hybrid_record DURATION FOR TOKEN 10s was\n  unrealistic; bumped to 15m / 12h.\n- **R3** — refresh-token shape. Codex pass-2 M1 + Cursor pass-2\n  M2: rev-2 omitted the literal 'surreal-refresh-' prefix on the\n  refresh-token value. Source: expr/statements/access.rs:121-126\n  + :133-134 + signin.rs:1042-1056 + :1582-1584. Doc now cites\n  the prefix explicitly in prose + JS-SDK example, and warns\n  against stripping or splitting client-side.\n- **R4** — citation tightening. Codex pass-2 M2: stmt.rs:758 was\n  wrong (close-bracket of prior no-duration case); :558 is the\n  inline-key TYPE JWT DURATION FOR TOKEN fixture. Fixed. Cursor\n  pass-2 I2: verify.rs PASSHASH PHC parse span tightened from\n  945-952 to :947-948 specifically inside verify_pass. Pi pass-2\n  M2: stmt.rs:402 commented-out block scope clarified to\n  DEFINE USER specifically, with explicit pointers at active\n  DEFINE ACCESS DURATION FOR TOKEN NONE fixtures at :627 / :1256\n  / :1264 / :1272. Cursor pass-2 M1: stmt.rs:2620 / :2621\n  disambiguated (harness vs SQL string).\n- **R5** — release/disposition commit (this one). Cursor pass-2\n  I1: this CHANGELOG entry's 'DEFINE USER DURATION' bullet\n  itself still cited stmt.rs:402 as a positive 'exercises'\n  fixture; updated to match the rev-2/rev-3 corrected narrative\n  (commented-out for DEFINE USER + active DEFINE ACCESS\n  fixtures).\n\nREJECTED finding (Pi pass-2 C1):\n\n- **Pi pass-2 C1** ('iss.alg defaults to Hs512 when WITH ISSUER\n  ALGORITHM omitted; external_auth example produces a broken\n  HS512-claiming token over RSA verifier'). REJECT — Pi missed\n  define.rs:1697 inside the verifier ALGORITHM arm, which sets\n  `iss.alg = alg` (the verifier alg) BEFORE the WITH ISSUER\n  block runs at :1726+. The algorithm-mismatch check at\n  :1739-1747 that Pi cited only governs WITH ISSUER ALGORITHM\n  <X> overrides; it does not gate the initial inheritance from\n  the verifier. For the external_auth example\n  (`WITH JWT ALGORITHM RS256 KEY '<pub>' WITH ISSUER KEY '<priv>'`),\n  iss.alg resolves to RS256 from the verifier line 1697, then\n  WITH ISSUER's KEY arm sets iss.key = '<priv>'. iss.alg STAYS\n  at RS256. The minted token correctly claims RS256 + signs with\n  the RSA private key.\n\n  Pi's claim WOULD be correct for `WITH JWT URL '<jwks>' WITH\n  ISSUER KEY '<priv>'` (the URL arm at :1716-1722 has no\n  `iss.alg = ...` line), in which case iss.alg stays at\n  Hs512 default. This case is now explicitly documented in\n  rev-3 R1's issuer-defaults rubric and was previously implicit.\n  Pi caught a real semantic gap there but mis-attributed the\n  bug to the wrong example.\n\n  R1's issuer-defaults rubric absorbs Pi's underlying concern\n  by enumerating exactly when explicit WITH ISSUER ALGORITHM is\n  required. The external_auth example is correct as-shipped;\n  the hybrid_record example already uses explicit\n  WITH ISSUER ALGORITHM PS256 (correct).\n\n  Convergent reviewer signal supports the REJECT: Cursor pass-2\n  ('No contradiction found: TYPE RECORD WITH JWT … WITH ISSUER …\n  still documents minting via signin.rs:275-318'), Codex pass-2\n  residual-risk ('TYPE JWT verification-only is correct'), and\n  Gemini pass-2 GO all cleared the JWT section without flagging\n  the alleged bug. Three reviewers reading the same source\n  reached the opposite conclusion from Pi.\n\n  This is the v1.5.x-pass-3 Pi-misreads-call-path pattern\n  recurring (Pi-pass-3 wrongly thought db.transaction API\n  didn't exist; here Pi wrongly thought iss.alg defaulted to\n  Hs512 in the verifier-set case). Pattern memory:\n  `feedback_pi_unique_crit_verify_against_source.md` (this\n  pattern is also covered in the v1.5.x convergence notes\n  \"fix-drift\" section).\n\n#### Rev-4 disposition (4-WAY adversarial pass-3)\n\nPass-3 verdicts: Cursor CONDITIONAL GO (0 CRITs / 1 IMP / 2\nminors), Codex NO-GO (2 CRITs / 3 IMPs), Gemini GO (0 findings),\nPi NO-GO (1 CRIT / 2 IMPs / 2 minors).\n\nThree real CRITs landed in this pass — two from Codex, one from\nPi. All survived 8 prior reviewer passes (4 pass-1 + 4 pass-2)\nbefore pass-3 caught them. Five atomic rev-4 commits closed\nevery accepted finding:\n\n- **R1-R2 combined** — JWT/JWKS section overhaul:\n  - **CRIT (Pi C1)**: `$token` in SIGNIN was wrong. SIGNIN runs\n    against signin variables (`$email`, `$pass`, `$id`); `$token`\n    is only set in AUTHENTICATE (`sess.tk = Some(claims)` at\n    `signin.rs:340-345` between SIGNIN evaluation and AUTHENTICATE\n    execution). Canonical fixture at `verify.rs:2034` confirms\n    AUTHENTICATE is the right clause for `$token.*` lookups.\n    Both v1.6.2-introduced examples (`external_auth` +\n    `hybrid_record`) corrected to use AUTHENTICATE for token-claim\n    binding + SIGNIN for credential-based password auth.\n    Pre-existing v1.6.2 R1 bug. Pi I2 (the prose comment that\n    said \"Without a SIGNIN clause, ... `$auth.id` stays unset\")\n    fixed to \"Without an AUTHENTICATE clause\" in same edit.\n  - **CRIT (Codex C1)**: hybrid `TYPE RECORD WITH JWT URL +\n    WITH ISSUER` mints tokens via SIGNIN, but those tokens\n    cannot be re-validated through the same access method's\n    JWKS verifier — SurrealDB encodes minted JWTs with bare\n    `Header::new(...)` at `signin.rs:369 / :938` and\n    `signup.rs:268`, omitting the `kid` claim that JWKS\n    verification requires (`verify.rs:230-237` etc., bails\n    \"Missing token header 'kid'\"). Added explicit \"JWKS\n    round-trip limitation\" callout in the JWKS feature-gate\n    block + inline NOTE in the hybrid_record example.\n    Recommends `TYPE RECORD WITH JWT ALGORITHM <alg> KEY\n    '<pub>'` (inline KEY, not URL) for round-trippable tokens.\n  - **CRIT (Codex C2)**: JWKS section bullet still abbreviated\n    to bare `WITH ISSUER KEY` which contradicts the rev-3 R1\n    issuer-defaults rubric. URL/JWKS verifiers don't set\n    `iss.alg` (URL arm at define.rs:1716-1722 has no\n    `iss.alg = ...` line); bare `WITH ISSUER KEY` would treat\n    asymmetric private keys as HMAC secrets at issue.rs:10-28.\n    Rewrote the bullet to explicitly require `WITH ISSUER\n    ALGORITHM <alg> KEY '<priv>'` for URL+ISSUER hybrids with\n    parser-source rationale.\n  - **CONVERGENT IMP (Cursor I1 + Pi I1)**: rev-3 R2's \"access\n    definition stops authenticating entirely\" overstated the\n    JWKS gate scope. For `TYPE RECORD WITH JWT URL +\n    SIGNIN/SIGNUP`, credential signin still works through\n    `db_access` at `signin.rs:245-410` (which never invokes the\n    JWKS verifier arms); only the verification path (incoming\n    third-party JWTs) fails without `--features jwks`.\n    Tightened to \"gate scopes to incoming-JWT verification, not\n    all signin paths\" with code-path citations.\n- **R3** — DURATION FOR TOKEN NONE fixture-citation cleanup.\n  Codex pass-3 I1: rev-3 R4 cited stmt.rs:627/:1256/:1264/:1272\n  as \"active fixtures\" but all four are inside `/* */`\n  commented-out blocks at stmt.rs:623-631 and :1250-1276 (with\n  a `// TODO: Parameterization broke the guarantee that token\n  duration is not none.` note explaining the suppression). Doc\n  now acknowledges no positive-fixture provenance exists for\n  DURATION FOR TOKEN NONE in v3.0.5; recommends round-trip\n  validation rather than parse-only confirmation.\n- **R4** — refresh-token citation chain labels. Codex pass-3\n  I2 + Cursor pass-3 M1+M2: access.rs:121-126 was labeled\n  'create_grant dispatch' but it's actually `new_grant_bearer`\n  (the `format!(\"{prefix}-{id}-{secret}\")` construction).\n  `create_grant` begins at :181, record-refresh invocation is\n  at :237-242. signin.rs:1582-1584 was labeled 'runtime regex'\n  but is an integration-test assertion; production validation\n  is `validate_grant_bearer` at signin.rs:1042-1056. Rewrote\n  the citation chain with correct labels.\n- **R5** — ES512 algorithm runtime caveat + line-citation\n  tightening. Codex pass-3 I3: ES512 maps to ES384 at runtime\n  (verify.rs:47-48 + mod.rs:46-47); split ES256/ES384 from\n  ES512 in the algorithms table + added an explicit caveat.\n  Pi pass-3 M1: SYMMETRIC bullet cited line 1707 but the\n  `iss.key = key` assignment is on :1703; tightened to cite\n  both lines.\n- **R6** (this commit) — CHANGELOG pass-3 disposition + the\n  pre-existing CHANGELOG `stmt.rs:402` citation drift first\n  flagged in Cursor pass-2 I1; the previous rev-2 commit fixed\n  it via \"or :627 / :1256 / :1264 / :1272\" alternates which\n  themselves turned out to be commented-out (Codex pass-3 I1).\n  Final CHANGELOG narrative now matches the rev-4 R3\n  rule-file correction: no positive-fixture provenance, gated\n  blocks only.\n\nNO REJECTIONS this pass — all four pass-3 CRIT/IMP-level\nfindings traced to real source; Pi pass-2's rejected C1 still\nholds (Cursor pass-3 cross-check appendix B + Codex pass-3\nresidual risk + Gemini pass-3 GO all confirm).\n\n#### Rev-5 disposition (4-WAY adversarial pass-4)\n\nPass-4 verdicts: Cursor NO-GO (1 CRIT / 2 IMPs / 2 minors),\nCodex NO-GO (1 CRIT / 2 IMPs / 1 minor), Gemini NO-GO (1 CRIT\n/ 0 IMPs), Pi CONDITIONAL GO (0 CRITs / 1 IMP / 2 minors).\n\nPass-4 surfaced 3 real CRITs — pattern continues from pass-3\n(cumulative ~17 source-cited findings across the four passes).\nThree atomic rev-5 commits closed every accepted finding:\n\n- **R1** — JWT-Based Authentication: split external_auth into\n  Pattern A (external_jwt_auth, authenticate-only) +\n  Pattern B (credential_auth, SIGNIN-mint-roundtrippable).\n  Closes:\n  - **CONVERGENT CRIT** (Gemini C1 + Cursor I2 + Codex I1 +\n    Pi I1): rev-4 external_auth had WITH ISSUER KEY +\n    DURATION FOR TOKEN 1h but NO SIGNIN, making the issuance\n    machinery unreachable per signin.rs:296-437\n    (AccessRecordNoSignin error if SIGNIN missing).\n  - **UNIQUE CRIT** (Codex C1): rev-4 prose claimed\n    'no AUTHENTICATE -> $token-only permissions' — wrong.\n    Source: verify.rs:177-245 binds record from token's `id`\n    claim if present; verify.rs:464 bails\n    AccessMethodMismatch otherwise. Real rule documented in\n    the new prose preamble.\n- **R2** — JWKS section: replaced hybrid_record with two\n  separate access definitions (jwks_inbound for federated IdP,\n  credential_mint for SurrealDB-side mint) plus an explicit\n  ANTI-PATTERN callout. Closes:\n  - **UNIQUE CRIT** (Cursor C1): rev-4 hybrid_record had\n    AUTHENTICATE matching `$token.sub` after credential SIGNIN,\n    but credential SIGNIN mints tokens with `$token.ID`\n    (uppercase, from Claims { id: Some(rid.to_sql()), ..\n    Claims::default() } at signin.rs:314-324); default sub:\n    None at token.rs:243; into_claims_object at\n    token.rs:289-345 inserts 'ID' for the id claim and only\n    inserts 'sub' when Claims.sub is Some. So rev-4\n    hybrid_record's AUTHENTICATE predicate matched the wrong\n    key on the credential path.\n  - **CARRY-OVER from Codex pass-3 C1**: SurrealDB-minted\n    tokens use bare Header::new(...) at signin.rs:369/:938\n    + signup.rs:268 which omits the kid claim, so JWKS\n    verification round-trip fails. Anti-pattern callout\n    documents both reasons (sub vs ID + kid round-trip).\n- **R3** — Lower IdP integration example + ES512 caveat\n  tighten + four-blocks miscount + access.rs:237-242 label.\n  Closes:\n  - **UNIQUE** (Codex I2 — pre-existing v1.5.x latent): the\n    'JWT Token Integration with External Identity Providers'\n    lower example also had the no-AUTHENTICATE shape problem.\n    Rewrote to use AUTHENTICATE for sub mapping + dropped\n    WITH ISSUER (matches surrounding prose's authenticate-only\n    intent).\n  - **UNIQUE** (Codex M1): rev-4 R5 ES512 caveat overstated\n    inbound-header acceptance. Tightened to scope the claim\n    to 'configured ALGORITHM ES512 verifies and emits ES384'\n    only.\n  - **UNIQUE** (Cursor I1 + M2): rev-4 'all four blocks'\n    miscount for DURATION FOR TOKEN NONE fixtures. Actually\n    three commented regions contain five anti-fixtures.\n    Tightened wording in both rule file AND CHANGELOG.\n  - **UNIQUE** (Pi M1): rev-4 R4 labeled access.rs:237-242\n    as 'record-refresh call site'; actually it's the Base::Db\n    enforcement guard inside create_grant. Relabeled.\n\nNO REJECTIONS this pass — all four reviewers' CRIT/IMP\nfindings traced to real source. Pi pass-2's earlier rejected\nC1 still holds (multiple cross-pass confirmations).\n\n#### Rev-6 disposition (4-WAY adversarial pass-5)\n\nPass-5 verdicts: Cursor NO-GO (2 CRITs / 3 IMPs / 1 minor),\nCodex NO-GO (1 CRIT / 2 IMPs / 2 minors), Gemini GO (0 findings),\nPi CONDITIONAL GO (0 CRITs / 2 IMPs / 0 minors).\n\n3 real CRITs landed in this pass — same fix-drift pattern\ndocumented in earlier disposition entries. Three atomic rev-6\ncommits closed every accepted finding:\n\n- **R1** — Parser-order fix: 3 examples don't parse.\n  - **CRIT (Codex pass-5 C1)**: rev-5 examples external_jwt_auth,\n    jwks_inbound, and external_idp put AUTHENTICATE BEFORE\n    WITH JWT, which fails to parse in v3.0.5. Source:\n    parse_define_access at define.rs:415-573 has an outer loop\n    matching top-level clauses (TYPE at :456, AUTHENTICATE at\n    :545); the TYPE arm delegates to a TYPE RECORD subparser\n    (:456-507) with two inner loops (SIGNUP/SIGNIN, then\n    WITH JWT/REFRESH). If AUTHENTICATE comes before WITH JWT,\n    the outer loop consumes AUTHENTICATE, then sees WITH and\n    has no match arm -> exits, leaving WITH JWT unconsumed.\n    Canonical fixture order at verify.rs:2029-2037 confirms\n    the working shape: `TYPE RECORD ... SIGNIN ... WITH JWT ...\n    AUTHENTICATE ... DURATION ...`. Reordered all three\n    examples + added inline parser-cited comments in each.\n  - **CRIT (Cursor pass-5 C2)**: Pattern A (external_jwt_auth)\n    comment cited `signin.rs:340-345` for `$token` availability,\n    but that's the SIGNIN-mint path. Pattern A has no SIGNIN —\n    clients call db.authenticate(). On the authenticate path,\n    sess.tk is populated at verify.rs:256-263 (claims arm with\n    id) or :432-440 (claims arm without id), NOT signin.rs.\n    Updated the comment to cite the correct authenticate-path\n    locations.\n  - **UNIQUE (Codex pass-5 I2)**: jwks_inbound had\n    `DURATION FOR TOKEN 15m` but the doc itself documents that\n    FOR TOKEN is unused on the authenticate path for\n    AccessType::Record without minting. Removed the unused\n    clause + explanatory comment.\n- **R2** — access.rs line-label correction.\n  - **CONVERGENT CRIT (Cursor pass-5 C1 + Codex pass-5 I1)**:\n    rev-3 R4 first cited access.rs:237-242 as 'record-refresh\n    call site'; Pi pass-3 corrected to 'Base::Db enforcement\n    guard'; rev-5 R3 propagated that label. Source verification\n    at v3.0.5 expr/statements/access.rs:226-242 shows BOTH\n    labels are wrong:\n    - :231-234 IS the Base::Db enforcement guard (specifically\n      :233's `ensure!(matches!(base, Base::Db),\n      Error::DbEmpty);`)\n    - :237-242 is the bearer-presence check + new_grant_bearer\n      invocation that follows the guard\n    Final fix splits the citation: :231-234 for the guard,\n    :237-242 for the bearer + grant construction.\n  - This is a multi-pass label-drift pattern. Pi pass-2 I1 / Pi\n    pass-3 M1 / Pi pass-4 M1 / Pi pass-5 PASS-on-F all gave\n    different labels for :237-242 — Pi mis-attributes\n    successive lines without source-grep. Recorded as a\n    parallel pattern to the v1.5.x Pi-pass-3 db.transaction\n    misread.\n- **R3** — JWKS ops bullet + preamble ALGORITHM scope + lower\n  IdP arm citation.\n  - **CONVERGENT IMP (Cursor pass-5 I1 + Pi pass-5 I1)**: JWKS\n    'Operational notes' bullet still recommended single combined\n    TYPE RECORD WITH JWT URL + WITH ISSUER pattern,\n    contradicting the rev-5 anti-pattern callout. Rewrote to\n    redirect to the two-pattern approach (jwks_inbound +\n    credential_mint).\n  - **UNIQUE (Pi pass-5 I2)**: rev-5 preamble parenthetical\n    said `ALGORITHM token in WITH ISSUER is REQUIRED for\n    asymmetric / JWKS verifier paths`. Per define.rs:1697,\n    inline asymmetric verifiers DO inherit iss.alg; only\n    URL/JWKS verifiers need explicit `ALGORITHM`. Narrowed.\n  - **UNIQUE (Cursor pass-5 I2)**: lower IdP example cited\n    verify.rs:246-288 (first claims arm, with id) for\n    'no-encode authenticate-only' behaviour; inbound IdP JWTs\n    mapped via `$token.sub` follow the SECOND claims arm at\n    ~verify.rs:401-462. Retargeted the citation.\n- **R4** (this commit) — CHANGELOG pass-5 disposition +\n  cumulative trajectory table extension.\n\nNO REJECTIONS this pass. Pi pass-5's PASS-on-F (claiming\n:237-242 was the Base::Db guard) was wrong by the same source\ncheck Cursor C1 + Codex I1 surfaced; the convergent\nCursor+Codex finding overrode Pi's PASS verdict. Pi pass-2 C1\nremains rejected (cross-pass confirmation).\n\n#### Cumulative trajectory after pass-5\n\n| Pass | Cursor | Codex | Gemini | Pi | Real CRITs | Real IMPs | Notes |\n|------|--------|-------|--------|----|------|-----------|-------|\n| 1 | NO-GO | NO-GO | NO-GO | COND | 2 | 5 | jwks gate + TYPE JWT signin path |\n| 2 | COND | COND | GO | NO-GO* | 0 | 4 | *Pi C1 rejected (parser misread) |\n| 3 | COND | NO-GO | GO | NO-GO | 3 | 4 | kid round-trip + WITH ISSUER KEY in JWKS bullet + $token in SIGNIN |\n| 4 | NO-GO | NO-GO | NO-GO | COND | 3 | 4 | external_auth no-SIGNIN + hybrid_record sub vs ID + no-AUTHENTICATE prose |\n| 5 | NO-GO | NO-GO | GO | COND | 3 | 4 | parser-order in 3 examples + access.rs label drift + signin.rs:340-345 wrong cite |\n\n11 real CRITs found-and-fixed across five passes. Multiple\nrecurring patterns (access.rs:237-242 label drift across passes\n2-5; Pi misreads multi-arm match control flow; doc-vs-CHANGELOG\ndrift on stmt.rs:402 across passes 2-3-4-5). Two Gemini CRITs\nrejected with parser-cited rebuttals across the cycle.\n\n#### Rev-7 disposition (4-WAY adversarial pass-6)\n\nPass-6 verdicts: Cursor NO-GO (1 CRIT / 1 IMP / 2 minors),\nCodex NO-GO (4 CRITs / 0 IMPs / 1 minor), Gemini GO (0\nfindings), Pi CONDITIONAL GO (0 CRITs / 2 IMPs / 2 minors —\nall CHANGELOG-hygiene only).\n\n5 real CRITs landed in this pass. Five atomic rev-7 commits\nclosed every accepted finding:\n\n- **R1** — NS/DB/AC routing-claim requirement.\n  - **CRIT (Codex pass-6 C1)**: inbound JWTs MUST carry\n    `ns`/`db`/`ac` routing claims (or aliases per\n    `core/src/iam/token.rs:248-275` — uppercase or full URI\n    forms accepted) for SurrealDB to match the database-access\n    arm at `verify.rs:288-297`. Without them, validation\n    falls through to InvalidAuth at `:824-825` BEFORE the\n    access method's verifier or AUTHENTICATE clause runs.\n    The pre-existing v1.5.x `external_idp` example payload\n    showed only `sub/email/roles/tenant_id/exp` — none of\n    which routes. Added a ROUTING-CLAIM REQUIREMENT block to\n    the JWT-Based Authentication preamble + updated the lower\n    IdP example payload to include `ns/db/ac/sub/...` with\n    inline notes pointing at IdP custom-claim mechanisms\n    (Auth0 Actions, Okta inline hooks, Cognito pre-token\n    Lambda, Azure AD claim mapping).\n- **R2-R3** — `account` JWKS example shape fix + Pattern A\n  citation tightening + GRANT bullet line range.\n  - **CRIT (Codex pass-6 C2)**: pre-existing v1.5.x `account`\n    JWKS mini-example had `TYPE RECORD WITH JWT URL` with no\n    AUTHENTICATE and `DURATION FOR TOKEN 15m`. Without\n    AUTHENTICATE, inbound IdP JWTs lacking SurrealDB `id`\n    fall through to AccessMethodMismatch at `verify.rs:464`;\n    DURATION FOR TOKEN is unused on the authenticate path\n    for AccessType::Record without minting. Rewrote with\n    AUTHENTICATE for sub mapping + dropped FOR TOKEN.\n  - **CRIT (Cursor pass-6 C1)**: rev-5 Pattern A example\n    cited `verify.rs:394` for DURATION FOR SESSION — that's\n    the AccessType::Jwt branch, not AccessType::Record. The\n    Record arm uses `:282` (claims with id) or `:457` (claims\n    without id). Corrected both citations + relabeled the\n    comment to 'AccessType::Record authenticate path' (also\n    closes Codex pass-6 M1).\n  - **IMP (Cursor pass-6 I1)**: Pattern A's sess.tk citation\n    listed `:256-263 (claims arm with id) or :432-440 (claims\n    arm without id)` implying both are equally common. For\n    typical IdP-`sub` JWTs (no SurrealDB id), `:432-440` is\n    the path; reordered + framed `:256-263` as the\n    conditional case.\n  - **MINOR (Cursor pass-6 M1)**: GRANT FOR RECORD bullet\n    cited `:226-234`; per source, `:226-230` is the unrelated\n    Jwt grant rejection and the actual guard is `:231-234`\n    + `:353-355`. Tightened with explicit per-arm labels.\n- **R4** — CHANGELOG hygiene fixes.\n  - **CRIT (Codex pass-6 C3)**: top-of-file v1.6.2 'Added'\n    bullet for `WITH JWT URL` still said the doc 'documents\n    the hybrid pattern combining JWKS-verify with WITH ISSUER\n    inline-key issuance' — contradicts current security.md\n    which redirects to two patterns + labels the combined\n    shape an anti-pattern. Rewrote bullet to reference\n    `jwks_inbound` + `credential_mint` as separate definitions\n    with the anti-pattern callout.\n  - **CRIT (Codex pass-6 C4 + Pi pass-6 I1+I2+M1+M2)**: the\n    rev-3 R5 disposition's 'Cumulative trajectory after\n    pass-4' table was retained at the bottom of the [1.6.2]\n    section AFTER the rev-5 R4 added an updated 'Cumulative\n    trajectory after pass-5' table, creating a duplicate\n    that contradicted itself ('Eight real CRITs' vs '11 real\n    CRITs'). Same doc-vs-CHANGELOG drift class as the\n    pass-2/pass-3 stmt.rs:402 saga — recorded as a recurring\n    pattern. Removed the stale table + 'Eight real CRITs'\n    paragraph. Restructured 'Reviewer-blind-spot pattern'\n    + 'verification escalator' prose under explicit headings\n    that don't conflict with the pass-5 trajectory section.\n- **R5** (this commit) — CHANGELOG pass-6 disposition + new\n  trajectory row.\n\nNO REJECTIONS this pass. Pi pass-2 C1 still rejected\n(seventh-pass confirmation).\n\n#### Cumulative trajectory after pass-6\n\n| Pass | Cursor | Codex | Gemini | Pi | Real CRITs | Real IMPs |\n|------|--------|-------|--------|----|------|-----------|\n| 1 | NO-GO | NO-GO | NO-GO | COND | 2 | 5 |\n| 2 | COND | COND | GO | NO-GO* | 0 | 4 |\n| 3 | COND | NO-GO | GO | NO-GO | 3 | 4 |\n| 4 | NO-GO | NO-GO | NO-GO | COND | 3 | 4 |\n| 5 | NO-GO | NO-GO | GO | COND | 3 | 4 |\n| 6 | NO-GO | NO-GO | GO | COND | 5 | 1 |\n\n*Pi pass-2 C1 rejected with parser-cited rebuttal (see Rev-3\ndisposition above).\n\n16 real CRITs found-and-fixed across six passes. Pass-6's\nspike to 5 CRITs reflects two pre-existing v1.5.x latent bugs\nfinally surfacing (NS/DB/AC routing claims missing from IdP\nexamples; `account` JWKS example shape) plus one new\nparser-arm citation drift introduced by rev-5 (Pattern A\nverify.rs:394 vs :282/:457). Per the v1.5.x convergence\npattern, expect ratification within 1-2 more passes; remaining\nchurn should be cite-line drift which Codex + Cursor catch\nreliably.\n\n#### Pass-7 ratification (4/4 GO+CONDITIONAL GO with 0 CRITs)\n\nPass-7 verdicts:\n\n| Reviewer | Verdict | CRITs | IMPs | Minors |\n|---|---|---|---|---|\n| Pi       | **GO**         | 0 | 0 | 1 (auth0_jwt NS/DB/AC mention) |\n| Cursor   | CONDITIONAL GO | 0 | 2 (auth0_jwt cross-reference + jwks_inbound cite consistency) | 2 |\n| Codex    | CONDITIONAL GO | 0 | 1 (CHANGELOG hygiene — pass-5 table archival) | 2 |\n| Gemini   | CONDITIONAL GO | 0 | 2 (account/jwks_inbound consolidation + jwks_inbound NS/DB/AC) | 2 |\n\nPer `~/CLAUDE.md` aggregation rule: \"CONDITIONAL GO w/ no CRIT\n= ship if maintainer accepts IMPs as deferred.\" Pi achieved\nfull GO; remaining IMPs across the other three reviewers are\ndocumentation-polish (cross-reference cite consistency,\nexample consolidation, single line-anchor tightening from\n:155+ → :158-159) with no source-correctness contradictions.\n\n**v1.6.2 ratified at pass-7.** Convergence trajectory:\n\n| Pass | Real CRITs | Verdicts |\n|------|------------|----------|\n| 1 | 2 | 1 NO-GO + 2 NO-GO + 1 NO-GO + 1 COND |\n| 2 | 0 | 2 COND + 1 GO + 1 NO-GO* |\n| 3 | 3 | 1 COND + 1 NO-GO + 1 GO + 1 NO-GO |\n| 4 | 3 | 3 NO-GO + 1 COND |\n| 5 | 3 | 2 NO-GO + 1 GO + 1 COND |\n| 6 | 5 | 2 NO-GO + 1 GO + 1 COND |\n| **7** | **0** | **3 COND + 1 GO** |\n\n16 cumulative real CRITs found-and-fixed across 7 passes;\n2 Gemini CRITs rejected with parser-cited rebuttals. Trajectory\nmatches v1.5.x convergence pattern (rev-N closes pass-(N-1)\nfindings while introducing 1-3 new bugs from fix surgery).\nRev-7's edit was precisely scoped (5 commits) and pass-7\nintroduced ZERO new bugs from surgery — the cleanest pass.\n\n#### Deferred to v1.6.3 (pass-7 IMPs and minors)\n\n- Add NS/DB/AC routing-claim mention to `auth0_jwt` TYPE JWT\n  example for per-example consistency (currently relies on\n  global preamble block).\n- Align `jwks_inbound`'s session-duration comment with the\n  `:282` / `:457` dual-pointer used in `external_jwt_auth`.\n- Consolidate the `account` + `jwks_inbound` examples in the\n  JWKS section (currently functionally identical after rev-7's\n  `account` rewrite).\n- Tighten `verify.rs:155+` cite in the routing-claim block to\n  `:158-159` (anchor where `decode_claims_unverified` is\n  called).\n- Archive or label the `Cumulative trajectory after pass-5`\n  table as historical (superseded by the pass-6 table below).\n\nNone of these affect runtime correctness; all are documentation\npolish suitable for a v1.6.3 batch.\n\n#### Reviewer-blind-spot doctrine (carried forward from earlier passes)\n\nPi pass-3 first noted that the `external_auth` example's `$token`\nin SIGNIN bug \"survived 8 reviewer passes\" before pass-3 caught\nit. The pattern: every reviewer verified JWT *issuance* semantics\n(iss.alg, iss.key, AccessMethodMismatch fallthroughs at\n:449/:550/:686) and parser-grammar acceptance, but none traced\nwhat `$token` actually resolves to inside SIGNIN vs AUTHENTICATE.\nThe canonical test fixture at `verify.rs:2034` would have\ndisambiguated this on first inspection. The same pattern recurred\nat pass-6 with Codex's NS/DB/AC routing-claim catch — five\nreview passes verified parser correctness without checking that\ninbound JWTs actually carry the claims `verify.rs:288-297`\nrequires for routing.\n\nDoctrine for future cycles: every example in a doc should be\nwalked end-to-end at the SurrealQL evaluation level — \"at each\nevaluation point, what do the session parameters actually\ncontain? what claims does the JWT need to route?\" — not just\n\"does the example parse?\". A parse-clean example can still be\nsemantically broken (wrong clause for a given parameter, missing\nrouting claims, wrong base for a given access type, wrong\nalgorithm relationship between verifier and issuer). Memory\nfile `feedback_walk_examples_end_to_end.md` carries the doctrine\nwith two recorded instances.\n\n#### Verification escalator (v1.6.x)\n\nThis release extends the v1.6.0 / v1.6.1 verification escalator —\nevery claim grounded in a parser-source line range plus a parser\ntest-fixture line plus a runtime path where applicable, so any\nreviewer can trace a clause back to the v3.0.5 commit that\ndefined it. Remaining v1.5.x deferred IMPORTANTs after v1.6.2:\nsurrealql.md data-type / DEFINE API / DEFINE CONFIG / INFO FOR\nINDEX|USER variants; vector-search.md HASHED_VECTOR / MINKOWSKI /\njaccard-pearson similarity-function examples; performance.md\nTLS flags and SURREAL_HNSW_CACHE_SIZE env-var; graph-queries.md\nsub-SELECT graph clauses; data-modeling.md illustrative-edge\nconsistency.\n\nv1.6.1 | 2026-05-06T16:04:34.957Z | user\n\n## [1.6.1] - 2026-05-06 — Function namespace catalog (10 atomic feature commits + release commit, plus rev-2 review-fix commits)\n\n### Added\n\n- **`rules/surrealql.md` Function-namespace catalog (batch 2 of the\n  v1.5.x deferred-IMPORTANT cleanup).** Closes the seven function\n  namespaces flagged as under-documented in the v1.5.x convergence\n  notes plus three previously unrelated extensions, all verified\n  against the v3.0.5 source tree at\n  `/tmp/surrealdb-v3.0.5/surrealdb/core/src/fnc/` rather than against\n  the docs site (which lags v3.0.5).\n  - **`encoding::*` (4 functions)** — base64::{encode,decode} (with\n    optional padding flag and padding-insensitive decoding) and\n    cbor::{encode,decode}. Explicit \"no other formats exist\"\n    callout to prevent symmetric fabrication of `encoding::hex`,\n    `encoding::base32`, etc.\n  - **`bytes::*` (1 function)** — only `bytes::len`. The v1.5.x\n    deferral list claim of an under-documented bytes namespace was\n    OVERSTATED; the upstream module is 7 LOC. Explicit \"do NOT\n    assume it mirrors `string::*`\" callout.\n  - **`set::*` (24 functions)** — largest namespace addition.\n    Documents the 17 sync + 7 async / closure-based functions, with\n    three critical semantic notes at the top: `set::difference` is\n    SYMMETRIC (`A △ B`) — NOT the relative complement (use\n    `set::complement` for `A \\ B`). The `array::*` namespace uses\n    the SAME convention: `array::difference` is also symmetric\n    difference (with multiset-pairing semantics for duplicates per\n    `core/src/val/array.rs:310-323`), and `array::complement` is\n    `A \\ B`. Sets are stored in Rust's `BTreeSet<Value>` and\n    iterated in `Value::Ord` order — `at` / `first` / `last` /\n    `slice` and the closure-based traversals visit elements in\n    that order. Explicit \"no `set::sort`, `set::distinct`,\n    `set::reverse`, `set::concat`, `set::sample`, `set::is_subset`,\n    `set::is_superset`\" callout. (The original v1.5.x deferral list\n    claim that `set::difference` and `array::difference` use\n    OPPOSITE conventions was wrong; rev-2 review pass corrected the\n    cross-section narrative against `core/src/fnc/set.rs:68-76` +\n    `core/src/val/array.rs:310-323`. Pre-existing\n    `array::difference([1,2,3], [2,3,4])` example was also fixed\n    from `[1]` to `[1, 4]` to match the actual symmetric-difference\n    return value.)\n  - **`sequence::*` (1 function)** — only `sequence::nextval`. The\n    v1.5.x deferral list claim was OVERSTATED. Documents the\n    `REMOVE SEQUENCE; DEFINE SEQUENCE` reset pattern (since no\n    `sequence::reset` / `sequence::current` / `sequence::peek`\n    exists).\n  - **`schema::*` (1 function)** — only `schema::table::exists`.\n    The v1.5.x deferral list claim was OVERSTATED. Notes the\n    `Action::View` IAM requirement and shows the\n    `IF !exists THEN DEFINE` guard idiom.\n  - **`file::*` (13 functions, experimental)** — registry rows\n    split across `core/src/fnc/mod.rs:239-240` (2 sync inspectors:\n    `file::bucket`, `file::key`) and `core/src/fnc/mod.rs:602-612`\n    (11 async I/O functions). Every row carries the `exp(Files)`\n    macro prefix; the capability check resolves at function\n    DISPATCH time (not at SurrealQL parse time, per\n    `core/src/fnc/mod.rs:114-133`). Functions only resolve when the\n    server runs with `--allow-experimental Files`. Documents put /\n    put_if_not_exists / get / head / exists / delete / list / copy\n    / copy_if_not_exists / rename / rename_if_not_exists plus the\n    sync inspectors `bucket` / `key`. The `*_if_not_exists` variants\n    are NO-OPS when the destination key already exists (verified\n    against `core/src/buc/controller.rs:97-216`); they do NOT\n    error. `file::head` returns `{ updated, size, file }` per\n    `core/src/buc/store/mod.rs:35-52` (no `etag` field exists in\n    v3.0.5). Calls out the asymmetric `file::list(bucket: string,\n    options?: object)` signature and the cross-bucket\n    `file::copy(file, file)` form. Explicit \"NO `file::move`\"\n    callout. The example `DEFINE BUCKET` syntax uses bare\n    `READONLY` (no boolean operand) per\n    `core/src/syn/parser/stmt/define.rs:1378-1380`.\n  - **`api::*` (7 functions, two usage modes)** — split into\n    `api::invoke` (callable from regular SurrealQL, server-side\n    dispatch with no HTTP round-trip) and the six middleware-only\n    functions (`api::req::body`, `api::res::body`,\n    `api::res::status`, `api::res::header`, `api::res::headers`,\n    `api::timeout`) that take an implicit `next` from the\n    `DEFINE API ... MIDDLEWARE` chain and are not free-standing.\n    Body-strategy enumeration: auto / json / cbor / flatbuffers /\n    plain / bytes / native. `api::res::status` validates 100..=599.\n    `api::res::headers` (the MAP form) accepts `NONE` map values to\n    remove a header; `api::res::header` (the single-pair form) does\n    NOT — its second argument is `Optional<String>` so passing an\n    explicit `NONE` is a type error and removal must be done by\n    OMITTING the second argument.\n- **`rules/surrealql.md` top-level `sleep(duration)` function.**\n  Registered as the bare name `\"sleep\"` at\n  `core/src/fnc/mod.rs:639` — NOT under any namespace. Calls out the\n  CLAMP-by-context-timeout behaviour: e.g.\n  `CREATE timeout_probe SET slept = sleep(10s) TIMEOUT 1s;` errors\n  out via the surrounding `TIMEOUT` clause after ~1s rather than\n  completing the 10-second sleep. Note that `RETURN` itself does\n  NOT parse a `TIMEOUT` clause (per\n  `core/src/syn/parser/stmt/mod.rs:566-575`); attach `TIMEOUT` to\n  a statement that does (`SELECT`, `CREATE`, `UPDATE`, `DELETE`,\n  `RELATE`, `INSERT`). The function is implemented via\n  `tokio::time::sleep`, so it does NOT block the async runtime.\n- **`rules/surrealql.md` extends `### Search Functions` with three\n  previously undocumented entries.** `search::analyze(analyzer,\n  text)` for tokenizer preview; `search::rrf(results, limit,\n  rrf_constant?=60)` for Reciprocal Rank Fusion;\n  `search::linear(results, weights, limit, norm: 'minmax' |\n  'zscore')` for weighted-linear-combination fusion with\n  score-extraction priority `distance → ft_score → score → rank`.\n  Both fusion functions document their argument-validation errors\n  (`InvalidFunctionArguments`) per `core/src/fnc/search.rs`.\n- **`rules/surrealql.md` extends `### Session Functions` from 6 to\n  8.** Adds `session::ac()` (current access-method name set during\n  authentication) and `session::rd()` (record-access record\n  reference, e.g. `user:tobie` when signed in via\n  `DEFINE ACCESS ... FOR RECORD`). Both are particularly useful\n  inside `DEFINE ACCESS ... PERMISSIONS` and\n  `DEFINE TABLE ... PERMISSIONS` clauses.\n\n### Process notes\n\n- **v1.6.0 lesson applied first.** Before drafting docs, every\n  claimed namespace was verified against the v3.0.5 source rather\n  than against the docs site or the v1.5.x deferral list. Three of\n  the seven listed namespaces (`bytes`, `sequence`, `schema`) turned\n  out to be SINGLE-FUNCTION namespaces, not the multi-function\n  namespaces the deferral list implied — the same failure mode as\n  the ALTER target-list fabrication v1.6.0 just fixed (taking a list\n  claim at face value instead of going to the parser/registry). Each\n  section now includes an explicit \"what is NOT registered\" callout\n  for the most plausible-looking absent functions.\n- **Atomic commits.** Each namespace landed in its own commit\n  citing the registry line numbers and module LOC so future audits\n  (or a 4-WAY adversarial review) can verify each addition\n  independently.\n\nv1.5.10 | 2026-05-06T03:28:46.198Z | user\n\n## [1.5.10] - 2026-05-05 — v1.5.x stable\n\n### v1.5.x cycle declared stable\n\nA tenth Pi+DeepSeek-V4-Pro:xhigh adversarial pass over the same six\nrules audited in pass-9 returned **2 GO + 4 CONDITIONAL GO + 0\nNO-GO** with **0 CRITs** total — the convergence target. Per\n`~/CLAUDE.md` \"CONDITIONAL GO w/ no CRIT = ship if maintainer accepts\nIMPs as deferred\", v1.5.x is declared stable.\n\nv1.5.10 closes a single convergent IMPORTANT bug surfaced by both\nthe data-modeling.md and graph-queries.md pass-10 reports:\n**`INTERSECT` is not a valid SurrealQL v3 expression operator.**\nv3 array set-operations are function calls (`array::intersect()`,\n`array::union()`, `array::complement()`), not infix keywords. Two\nexample queries used `INTERSECT` as if it were an infix operator:\n\n- `rules/data-modeling.md` line 440 (Social Network Pattern §\"Mutual\n  follows\"): `SELECT ->follows->user INTERSECT <-follows<-user AS\n  mutual …` → corrected to `SELECT array::intersect(->follows->user,\n  <-follows<-user) AS mutual …`.\n- `rules/graph-queries.md` line 572 (Recommendation Engine):\n  `count(->likes->product INTERSECT $my_likes) AS overlap` →\n  corrected to `count(array::intersect(->likes->product,\n  $my_likes)) AS overlap`.\n\nA repo-wide grep confirms no other `INTERSECT` / `EXCEPT` infix\nusages remain (`INTERSECTS` is a separate, upstream-valid geometry\noperator and is unaffected).\n\n### v1.5.x convergence trajectory\n\n```\nPass:    1   2    3   4   5   6   7   8   9  10\nCRITs:  21   7   15   6   6   5   1   2   5   0\n```\n\n**Total: 70 CRITs found-and-fixed across ten passes.** Cycle ran\n2026-05-05 in a single ~7-hour wall-clock pass with 6 parallel Pi\nprocesses per pass.\n\nPass-3 was the high-water mark (15 CRITs) because it added\n`rules/surrealql.md` as a sixth target — the foundational language\nreference's first dedicated full-file Pi pass. Post-pass-3, the\ntrend is monotone-decreasing-with-noise; pass-9's uptick reflected\nv1.5.8 ALTER surgery fix-drift (2 phantom-clause CRITs) plus 2\ncross-rule incomplete-fix CRITs surfaced by the pass-9 cross-file\ngap analysis. Pass-10 confirmed the v1.5.9 corrections held + the\ncycle has exhausted the high-confidence correctness surface.\n\nThe single most consequential correction was the v1.5.3 HNSW LM\nparameter rewrite — the v1.5.1 fix had labelled LM as \"Minkowski\ndistance order\" based on docs-only inspection; pass-3 verified\nagainst parser source that LM is the HNSW level multiplier (`ml`\nin the original paper) used in `l ← ⌊−ln(unif(0..1)) · ml⌋`, with\ndefault `1 / ln(M)` (~0.402 at M=12). Pre-v1.5.3 consumers who\ncopied an `HNSW … LM N` snippet thinking they were configuring\nMinkowski order were silently flattening the HNSW hierarchy. The\nrule's HNSW parameter table now carries an explicit warning about\nthe v1.5.1/v1.5.2 mislabelling.\n\nOther notable findings preserved as warnings:\n- **`DIST JACCARD` / `DIST PEARSON` semantically inverted** in\n  v3.0.5 catalog (`Distance::compute` calls similarity functions\n  for these two values; HNSW `KnnPriorityList` uses ascending order\n  → ranks LEAST-similar first). v1.5.5 added an explicit warning\n  callout in `rules/vector-search.md` recommending standalone\n  `vector::similarity::*` calls or a true distance metric for\n  indexed nearest-neighbour search.\n- **`<future> { … }` syntax does NOT exist in v3.0.5** despite\n  appearing in upstream docs (no `Future` variant in `Value` /\n  `Kind` enums; no `FUTURE` lexer keyword). v1.5.5 replaced the\n  Futures section with §\"Deferred Computation: Computed Fields,\n  Closures, JS Functions\" pointing at `DEFINE FIELD … VALUE`,\n  `|$args| body` closures, and embedded JavaScript.\n- **`DEFINE INDEX … DEFER` does NOT parse in v3.0.5** despite\n  being in upstream docs (`DefineIndexStatement` has no `defer`\n  field; parser doesn't read DEFER). v1.5.7 removed the DEFER\n  example from `rules/surrealql.md` and rewrote the\n  `rules/performance.md` DEFER subsection as a \"do not use\"\n  deprecation block citing the parser source.\n- **`UPDATE … LIMIT` does NOT parse in v3.0.5** (`UpdateStatement`\n  struct has no `limit` field). v1.5.9 replaced the chunking\n  pattern with a `SELECT VALUE id … LIMIT N` then `UPDATE $batch\n  SET …` two-step (same fix shape as the v1.5.3 `DELETE … LIMIT`\n  correction).\n- **`TYPE JWT` accepts both `DURATION FOR TOKEN` and `DURATION FOR\n  SESSION`** — the pre-v1.5.8 callout claiming `FOR TOKEN` was\n  rejected was based on docs alone and contradicted parser tests.\n  Semantics depend on issuer-key presence; symmetric algorithms\n  (HS256/HS384/HS512) auto-populate the issuer.\n- **`DEFINE NAMESPACE … STRICT` does NOT exist** despite v1.5.4\n  briefly documenting it as the replacement for the deprecated\n  `--strict` CLI flag. v3 only accepts `STRICT` on `DEFINE\n  DATABASE`. Per-namespace coverage requires defining each database\n  within the namespace as STRICT.\n\n### Per-rule pass-10 verdicts\n\n| File | Verdict | CRITs (pass-10) | Cumulative CRITs |\n|---|---|---|---|\n| `rules/data-modeling.md` | CONDITIONAL GO (INTERSECT IMP fixed in v1.5.10) | 0 | 4 |\n| `rules/security.md` | GO | 0 | 8 |\n| `rules/vector-search.md` | CONDITIONAL GO | 0 | 5 |\n| `rules/performance.md` | GO | 0 | 18 |\n| `rules/graph-queries.md` | CONDITIONAL GO (INTERSECT IMP fixed in v1.5.10) | 0 | 10 |\n| `rules/surrealql.md` | CONDITIONAL GO | 0 | 35+ |\n\n### Deferred to v1.6.x\n\nApproximately 30 IMPORTANT-classified items remain as documentation-\ncompleteness gaps — none contradict upstream v3.0.5. Tracked in the\nper-rule pass-10 reports at `/tmp/pi-{rule}-pass10-out.md` and\nsummarised in `notes/v1.5.x-convergence.md`. Highlights:\n- security.md: WITH REFRESH on TYPE RECORD; JWKS URL on TYPE\n  RECORD; ACCESS REVOKE/SHOW/PURGE; DEFINE USER PASSHASH.\n- surrealql.md: 10 undocumented ALTER targets; function namespaces\n  (encoding::*, bytes::*, file::*, set::*, sequence::*, schema::*,\n  api::*); data types (regex, range, literal, file); INSERT IGNORE\n  example; DEFINE API; DEFINE CONFIG; INFO FOR INDEX/USER.\n- performance.md: TLS flags in start-flag list;\n  SURREAL_HNSW_CACHE_SIZE env-var verification; REBUILD INDEX ON\n  TABLE all-indexes form.\n- graph-queries.md: sub-SELECT graph clauses with ORDER/LIMIT/\n  START/GROUP BY; `$parent` in WHERE; custom edge Record IDs in\n  RELATE; +path+inclusive form.\n- vector-search.md: HASHED_VECTOR semantics verification; MINKOWSKI\n  in similarity-functions section.\n- data-modeling.md: illustrative-edge consistency.\n\nMigration: consumers who copied `INTERSECT` as an infix operator\nshould replace with `array::intersect()`. Machine-checked version-\nconsistency CI gate continues to apply.\n\nSee `notes/v1.5.x-convergence.md` for the full per-pass trajectory\ntable, fix-drift pattern analysis, and deferred-IMP catalog.\n\nv1.5.9 | 2026-05-06T03:12:06.528Z | user\n\n## [1.5.9] - 2026-05-05\n\n### Fixed (atomic-protocol patch — v1.5.8 Pi-only re-audit CRIT remediation)\n\nA ninth Pi+DeepSeek-V4-Pro:xhigh adversarial pass over the same six\nrules audited in pass-8 returned **2 GO + 1 CONDITIONAL GO + 3\nNO-GO** with **5 CRITs** total. v1.5.9 patches every CRIT.\n\nThe v1.5.8 ALTER section in surrealql.md (the largest post-pass-7\nsurgery) introduced two phantom-clause CRITs (ALTER INDEX COMPACT\nand ALTER SEQUENCE RESTART neither parses in v3.0.5). The v1.5.8\nTYPE JWT callout rewrite fixed only `rules/security.md`, leaving\nthe same wrong claim in `rules/surrealql.md` (CRIT-3) plus a\nsecond related claim about `WITH ISSUER KEY` scope (CRIT-4).\n`rules/performance.md` returned NO-GO on a pre-existing\nUPDATE-LIMIT phantom that 8 prior passes missed. Plus a docs-only\n`AccessDuration::default()` citation pointed at the wrong rust\nfile path (IMP escalated to fix as part of the security cross-\nfix patch).\n\n#### Per-file CRIT counts (pass-9)\n\n- **`rules/surrealql.md` (4 CRITs):**\n  - **CRIT-1: `ALTER INDEX … COMPACT` is a phantom clause.**\n    v1.5.8 ALTER section example was invented. Verified at\n    `core/src/syn/parser/stmt/alter.rs` lines 311-347 plus the\n    `AlterIndexStatement` struct in\n    `core/src/sql/statements/alter/index.rs`: the actual clauses\n    are `IF EXISTS`, `PREPARE REMOVE`, `COMMENT '…'`,\n    `DROP COMMENT`. There is no `compact` field on the struct.\n    Replaced the phantom example with parser-verified\n    `ALTER INDEX … PREPARE REMOVE` and `… COMMENT '…' / DROP\n    COMMENT` examples plus the `IF EXISTS` variant.\n  - **CRIT-2: `ALTER SEQUENCE … RESTART <n>` is a phantom\n    clause.** Verified at `alter.rs` lines 1220-1243 +\n    `AlterSequenceStatement`: the actual fields are `name`,\n    `if_exists`, `timeout`. The clause is `TIMEOUT <duration>`\n    (or `TIMEOUT NONE` to clear). Replaced the phantom RESTART\n    example with `ALTER SEQUENCE … TIMEOUT 5s` /\n    `ALTER SEQUENCE … TIMEOUT NONE` and an `IF EXISTS` variant.\n  - **CRIT-3 (cross-fix from security pass-9): TYPE JWT comment\n    at line 523-524 still claims \"DURATION FOR SESSION only\".**\n    v1.5.8 fixed the `rules/security.md` callout but missed the\n    same wrong claim embedded as a comment above the JWT example\n    in `rules/surrealql.md`. The two files were left contradicting\n    each other on the same fact-assertion. v1.5.9 rewrites the\n    surrealql.md comment to match the parser-verified callout in\n    security.md (TYPE JWT accepts both FOR TOKEN and FOR SESSION;\n    semantics depend on issuer-key presence; symmetric algorithms\n    auto-populate the issuer).\n  - **CRIT-4 (cross-fix from security pass-9): WITH ISSUER KEY\n    comment at line 535-537 wrongly claims scope-restriction.**\n    v1.5.1 added a comment claiming `WITH ISSUER KEY` is \"only\n    valid inside a RECORD-access definition that uses WITH JWT,\n    not on a standalone TYPE JWT access.\" Pass-9 verified against\n    `core/src/syn/parser/test/stmt.rs:466`: `TYPE JWT ALGORITHM\n    EDDSA KEY \"foo\" WITH ISSUER KEY \"bar\"` parses successfully\n    on a standalone `TYPE JWT` to\n    `JwtAccessIssue { alg: EdDSA, key: \"bar\" }`. The actual\n    upstream constraint (per stmt.rs:619 `unwrap_err()`) is that\n    the issuer algorithm must match the verification algorithm\n    — not that the clause is scope-restricted. v1.5.9 rewrites\n    the comment to clarify the clause works on both standalone\n    and RECORD-WITH-JWT, with the actual algorithm-match\n    constraint explained.\n\n- **`rules/performance.md` (1 CRIT — pre-existing since v1.5.x):\n  `UPDATE … LIMIT` does not exist in v3.0.5.** Lines 581-588\n  recommended chunking large updates with `UPDATE user SET … WHERE\n  … LIMIT 1000`. Verified at `surrealdb/core/src/sql/statements/\n  update.rs`: `UpdateStatement` struct fields are `only / what /\n  with / data / cond / output / timeout / explain` — NO `limit`\n  field. The parser at `syn/parser/stmt/update.rs` does not parse\n  LIMIT for UPDATE. `UPDATE … LIMIT 1000` would produce a parse\n  error. Replaced with the parser-verified `SELECT VALUE id …\n  LIMIT 1000` then `UPDATE $batch SET …` two-step chunking\n  pattern. Same class of bug as the v1.5.3 `DELETE … LIMIT` CRIT.\n\n- **`rules/security.md` (cross-fix only — CRIT count: 0 self,\n  4 cross-cuts into surrealql.md tracked above):** The v1.5.8\n  callout has IMP-1: `AccessDuration::default()` was cited at\n  `core/src/sql/access_type.rs`. Pass-9 verified at upstream SHA\n  `a97d3af85d79`: `AccessDuration::default()` is actually defined\n  in `core/src/sql/access.rs` (`access_type.rs` defines `Default`\n  for `AccessType` and `JwtAccess`, not `AccessDuration`). v1.5.9\n  fixes the citation path.\n\n`rules/data-modeling.md` and `rules/graph-queries.md` returned\n**GO** with 0 CRITs (4th and 5th consecutive GO respectively for\ndata-modeling; 4th GO for graph-queries).\n`rules/vector-search.md` returned **CONDITIONAL GO** with 0 CRITs\n(breaks pass-7+8 GO streak with 6 documentation IMPORTANTs but no\ncorrectness errors).\n\nPass-9 also surfaced an IMPORTANT not-yet-CRIT: the v1.5.8 ALTER\nsection claimed \"seven targets\"; the actual parser dispatch table\nat `alter.rs:26-44` matches **17** keywords. v1.5.9 corrects the\nintro line to state 17 targets and explicitly flags the ten\nundocumented ones (EVENT, PARAM, BUCKET, ANALYZER, FUNCTION,\nUSER, ACCESS, CONFIG, API, MODULE) so consumers know to consult\nupstream for those clause surfaces.\n\nPass-9 IMPORTANTs (security.md WITH REFRESH on TYPE RECORD / JWKS\nURL on TYPE RECORD / ACCESS REVOKE-SHOW-PURGE; surrealql.md ALTER\nTABLE IF EXISTS+SCHEMALESS / ALTER FIELD full clause set / ALTER\nACCESS / 10 undocumented ALTER targets / encoding-bytes-file-set-\nsequence-schema-api function namespaces / DEFINE API / DEFINE\nCONFIG; performance.md SCHEMAFULL inference rationale / FIELDS vs\nCOLUMNS drift / TIMEOUT clause coverage; vector-search.md MINKOWSKI\nin similarity-functions section + similarity-function examples\n+ unimplemented-function warnings) and MINORs are deferred to\nv1.6.0 — they are documentation gaps or polish, not contradictions\nof upstream — tracked at `/tmp/pi-{rule}-pass9-out.md`.\n\nMigration: consumers who copied any of `ALTER INDEX … COMPACT`,\n`ALTER SEQUENCE … RESTART`, `UPDATE … LIMIT`, the (still-wrong-in-\nsurrealql.md) \"TYPE JWT only DURATION FOR SESSION\" claim, or the\n(wrong) \"WITH ISSUER KEY only valid inside RECORD-access\" claim,\nneed to apply the corrections noted above. Machine-checked\nversion-consistency CI gate continues to apply.\n\nCumulative CRITs across atomic-protocol cycle: v1.5.1=21, v1.5.2=\n7, v1.5.3=15, v1.5.4=6, v1.5.5=6, v1.5.6=5, v1.5.7=1, v1.5.8=2,\nv1.5.9=5 = **68 CRITs found-and-fixed across nine passes**. Pass-9\nre-uptick (1→2→5) is two-fold: (a) v1.5.8 ALTER surgery\nintroduced 2 phantom-clause fix-drift CRITs, (b) the cross-rule\ngap surfaced 2 more pre-existing latent bugs in surrealql.md that\nthe v1.5.8 callout-rewrite-only fix didn't propagate. Pass-10 is\nexpected to converge if the v1.5.9 surgery (~30-line ALTER block\ncorrection + 4 comment-rewrites + 1 chunking-pattern replacement)\nholds.\n\nv1.5.8 | 2026-05-06T02:57:28.263Z | user\n\n## [1.5.8] - 2026-05-05\n\n### Fixed (atomic-protocol patch — v1.5.7 Pi-only re-audit CRIT remediation)\n\nAn eighth Pi+DeepSeek-V4-Pro:xhigh adversarial pass over the same\nsix rules audited in pass-7 returned **3 GO + 1 CONDITIONAL GO + 2\nNO-GO** with **2 CRITs** total. v1.5.8 patches both. Both CRITs are\n**pre-existing latent bugs** missed by all 7 prior passes — not\nfix-drift from the v1.5.7 surgery — surfaced by pass-8's deeper\nparser-source verification.\n\n#### Per-file CRIT counts (pass-8)\n\n- **`rules/security.md` (1 CRIT — pre-existing since v1.4.x):\n  TYPE JWT DURATION FOR TOKEN claim has been wrong since v1.4.x.**\n  The callout block at line ~161 stated \"TYPE JWT only supports\n  DURATION FOR SESSION — it does not accept DURATION FOR TOKEN\n  because the token lifetime is set by the external issuer.\" Pass-8\n  verified against the v3.0.5 parser at SHA `a97d3af85d79`:\n  - `core/src/syn/parser/tests/stmt.rs:560` — `TYPE JWT ALGORITHM\n    HS256 KEY \"foo\" DURATION FOR TOKEN 10s` parses successfully.\n  - `core/src/syn/parser/tests/stmt.rs:825` — `TYPE JWT URL \"...\"\n    WITH ISSUER ALGORITHM PS256 KEY \"foo\" DURATION FOR TOKEN 10s,\n    FOR SESSION 2d` parses successfully.\n  - `core/src/syn/parser/tests/stmt.rs:764` — same pattern succeeds.\n  - `AccessDuration::default()` sets `token=1h` even for `TYPE JWT`.\n  - `signin.rs:319` issues JWT with\n    `expiration(av.token_duration)`.\n  The pass-1 fix (which led to the original callout being added in\n  v1.5.1) was based on incomplete docs reading; the parser actually\n  accepts `FOR TOKEN` on `TYPE JWT`. Semantics depend on whether an\n  issuer key is present: with `WITH ISSUER KEY`, SurrealDB issues\n  tokens and `FOR TOKEN` controls their lifetime; for verification-\n  only JWT (no issuer), the parser accepts `FOR TOKEN` but the\n  external issuer's `exp` claim is authoritative. The callout is\n  rewritten with the corrected semantics + parser-source citation.\n\n- **`rules/surrealql.md` (1 CRIT — pre-existing since before\n  v1.4.0): `ALTER` statement category entirely absent.** v3.0.5\n  has `ALTER` as a DDL statement category dispatching to seven\n  targets (verified at `core/src/syn/parser/stmt/alter.rs:14-29`\n  and `core/src/expr/statements/alter/`):\n  - `ALTER SYSTEM` — COMPACT, set/drop QUERY_TIMEOUT.\n  - `ALTER NAMESPACE` / `ALTER DATABASE` — COMPACT.\n  - `ALTER TABLE` — COMPACT, COMMENT, CHANGEFEED, schema-mode\n    toggle (SCHEMAFULL/SCHEMALESS), TYPE switch (NORMAL/RELATION/\n    ANY), PERMISSIONS rewriting.\n  - `ALTER INDEX` — COMPACT (with optional IF EXISTS).\n  - `ALTER FIELD` — change DEFAULT, ASSERT, VALUE, READONLY,\n    PERMISSIONS without dropping the field.\n  - `ALTER SEQUENCE` — RESTART value.\n  The file's own v3.0.5 patch-notes entry references \"ALTER\n  coverage expanded (#7126)\" — creating a discoverability\n  asymmetry where users learn ALTER exists but can't find the\n  syntax. v1.5.8 adds an `### ALTER` section under the Statements\n  section after `### REMOVE`, with parser-verified examples for\n  all seven targets.\n\n`rules/data-modeling.md`, `rules/vector-search.md`,\n`rules/performance.md` returned **GO** with 0 CRITs.\n`rules/graph-queries.md` returned **CONDITIONAL GO** with 0 CRITs\n(one IMPORTANT — `fn::refresh_user_stats` SELECT vs SELECT VALUE\nin `count()` subqueries — deferred to v1.6.0 as a non-blocking\ndocumentation polish).\n\n`rules/performance.md` achieving GO is the most significant single\nresult of the cycle: this file had the highest cumulative CRIT\ncount (18 across passes 1-7) and historically the largest fix-drift\nsurface. Pass-8 verifies all 18 fabrications (DEFER,\n`--rocksdb-cache-size`, `--max-connections`, EXPLAIN-shape claims,\nRangeScan/standalone-Iterate, --conn, FORMAT TEXT regression, etc.)\nare corrected and held under fresh source-cited scrutiny.\n\nPass-8 IMPORTANTs (security.md WITH REFRESH on TYPE RECORD / JWKS\nURL discovery / ACCESS REVOKE-SHOW-PURGE / DEFINE USER PASSHASH;\nsurrealql.md `encoding::*`, `bytes::*`, `file::*`, `schema::*`,\n`sequence::*` function namespaces / DEFINE API / DEFINE CONFIG /\nINFO FOR INDEX-USER variants; graph-queries.md SELECT vs SELECT\nVALUE bug in fn::refresh_user_stats) and MINORs are deferred to\nv1.6.0 — they are documentation gaps or polish, not contradictions\nof upstream — tracked in residual-risk lists at\n`/tmp/pi-{rule}-pass8-out.md`.\n\nMigration: consumers who copied the `TYPE JWT only supports\nDURATION FOR SESSION` callout from any pre-v1.5.8 revision should\nre-read the corrected callout — `TYPE JWT` accepts both `FOR\nTOKEN` and `FOR SESSION`; semantics depend on issuer-key presence.\nConsumers seeking `ALTER` syntax in pre-v1.5.8 revisions of\nsurrealql.md should now consult the new §\"ALTER\" subsection.\nMachine-checked version-consistency CI gate continues to apply.\n\nCumulative CRITs across atomic-protocol cycle: v1.5.1=21, v1.5.2=7,\nv1.5.3=15, v1.5.4=6, v1.5.5=6, v1.5.6=5, v1.5.7=1, v1.5.8=2 =\n**63 CRITs found-and-fixed across eight passes**. Pass-8 surfaces\ntwo pre-existing latent bugs that 7 prior passes (and the v1.4.4\nadversarial round) all missed — demonstrating the atomic-protocol\ncycle is still finding real upstream-mismatches even at this depth.\nPass-9 will test whether v1.5.8's small surgery (callout rewrite +\nnew ALTER section) introduces fix-drift; given the ALTER section\nis ~50 new lines of grammar examples it has the highest drift risk\nof any post-pass-7 surgery.\n\nv1.5.7 | 2026-05-06T02:41:09.412Z | user\n\n## [1.5.7] - 2026-05-05\n\n### Fixed (atomic-protocol patch — v1.5.6 Pi-only re-audit CRIT remediation)\n\nA seventh Pi+DeepSeek-V4-Pro:xhigh adversarial pass over the same\nsix rules audited in pass-6 returned **3 GO + 2 CONDITIONAL GO + 1\nNO-GO** with **1 CRIT** total. v1.5.7 patches the single CRIT.\n\nThis is the strongest pass yet: data-modeling.md, security.md, and\ngraph-queries.md all returned GO; vector-search.md and performance.md\nreturned CONDITIONAL GO with 0 CRITs each; only surrealql.md\nreturned NO-GO with a single source-verified CRIT. CRIT-trend\n21→7→15→6→6→5→1 is now strictly converging.\n\n#### Per-file CRIT counts (pass-7)\n\n- **`rules/surrealql.md` (1 CRIT — v1.5.6 fix-introduced) +\n  cross-fix into `rules/performance.md`:**\n  - **CRIT-1: `DEFER` clause does NOT exist in v3.0.5.** Pass-6\n    added a `DEFINE INDEX … DEFER` example to surrealql.md (and\n    v1.5.3 had originally added a §\"Deferred Indexing (`DEFER`)\"\n    subsection to performance.md). Pass-7 verified against the\n    v3.0.5 parser at SHA `a97d3af85d79`:\n    - `DefineIndexStatement` has no `defer` field.\n    - `parse_define_index` has no `DEFER` token handler.\n    - Code-search across the entire `surrealdb/surrealdb` Rust\n      codebase returns zero matches for the `DEFER` keyword in\n      this context.\n    Both the original v1.5.3 fix (driven by upstream-docs alone)\n    and the v1.5.6 propagation were based on documentation that\n    does not match the v3.0.5 parser. The pass-6 lesson applies:\n    **parser-body verification is mandatory for grammar claims;\n    documentation alone is insufficient.** v1.5.7 removes the\n    `DEFER` example from `rules/surrealql.md` entirely and\n    rewrites `rules/performance.md`'s §\"Deferred Indexing\" as\n    §\"Deferred Indexing — NOT in v3.0.5 (do not use)\" with the\n    full source-citation chain so consumers can re-verify\n    against their binary version.\n\n`rules/data-modeling.md`, `rules/security.md`,\n`rules/graph-queries.md` returned **GO** with 0 CRITs (data-\nmodeling.md and security.md back-to-back GO; graph-queries.md\nthird consecutive GO). `rules/vector-search.md` returned **GO**\nwith 0 CRITs (upgraded from pass-6's CONDITIONAL GO; LM\ncorrection + JACCARD/PEARSON warning + HASHED_VECTOR all held\nclean against fresh parser-source verification).\n`rules/performance.md` returned **CONDITIONAL GO** with 0 CRITs\n(the FORMAT TEXT restoration + EXPLAIN FULL addition both held).\n\nPass-7 IMPORTANTs (surrealql.md ALTER section, INSERT IGNORE\nexample, DEFINE API/CONFIG, missing function namespaces, missing\ndata types; security.md WITH REFRESH / JWKS URL on TYPE RECORD /\nACCESS REVOKE/SHOW/PURGE; performance.md TLS flags / REBUILD\nINDEX ON TABLE all-indexes form / SURREAL_HNSW_CACHE_SIZE\nverification; vector-search.md similarity-function examples) and\nMINORs are deferred to v1.6.0 — they are documentation gaps or\npolish, not contradictions of upstream — tracked in residual-risk\nlists at `/tmp/pi-{rule}-pass7-out.md`.\n\nMigration: consumers who copied the `DEFINE INDEX … DEFER` clause\nfrom v1.5.3-v1.5.6 docs need to remove the `DEFER` clause from\ntheir schema definitions; the clause produces a parse error in\nv3.0.5. Track upstream for a future release that may implement the\nclause.\n\nCumulative CRITs across atomic-protocol cycle: v1.5.1=21, v1.5.2=7,\nv1.5.3=15, v1.5.4=6, v1.5.5=6, v1.5.6=5, v1.5.7=1 = **61 CRITs\nfound-and-fixed across seven passes**. CRIT-trend post-pass-3 is\nnow strictly monotone-decreasing: 6→6→5→1. 5/6 GO+CONDITIONAL GO\nat pass-7 (with the single NO-GO carrying just 1 CRIT) is the\nclearest convergence signal of the cycle. Pass-8 likely closes\nthe v1.5.x cycle if no fix-drift surfaces from this small\nsingle-line surgery.\n\nv1.5.6 | 2026-05-06T02:23:05.662Z | user\n\n## [1.5.6] - 2026-05-05\n\n### Fixed (atomic-protocol patch — v1.5.5 Pi-only re-audit CRIT remediation)\n\nA sixth Pi+DeepSeek-V4-Pro:xhigh adversarial pass over the same six\nrules audited in pass-5 returned **3 GO + 1 CONDITIONAL GO + 2\nNO-GO** with **5 CRITs** total. v1.5.6 patches every CRIT.\n\nTrajectory: 4/6 GO is the highest GO rate of the cycle. CRIT count\ndropped from 6 (pass-4 + pass-5 plateau) to 5. Two of the five CRITs\nare v1.5.5 fix-introduced (closure parameter syntax + FORMAT TEXT\nregression), continuing the empirical fix-drift pattern but at lower\nvolume. The other three are pass-4/5 IMPORTANTs that pass-6 ruthless\nscrutiny escalated.\n\n#### Per-file CRIT counts (pass-6)\n\n- **`rules/surrealql.md` (3 CRITs):**\n  - **CRIT-1: Closure parameter syntax — `|x| x * 2` should be\n    `|$x| $x * 2`.** v1.5.5 fix-introduced. The §\"Deferred\n    Computation\" replacement for the (deleted) Futures section\n    showed a closure example with bare-identifier parameters; v3\n    SurrealQL closure parameters require the `$` prefix (bare\n    identifiers bind to field references, not local variables).\n    Verified against the upstream closures docs page and the\n    canonical `LET $double = |$n: number| $n * 2; RETURN\n    $double(2);` example. Corrected the closure example to use the\n    `$`-prefixed parameter form with explicit `RETURN`.\n  - **CRIT-2: Seven `time::set_*` functions undocumented (escalated\n    from pass-4/5 IMP).** v3.0.2 introduced datetime setter\n    functions (`time::set_year` / `set_month` / `set_day` /\n    `set_hour` / `set_minute` / `set_second` / `set_nanosecond`);\n    the file's own v3.0.2 patch-notes entry mentions them, but the\n    Time Functions section never documented any of them. Added\n    seven setter examples covering the full surface.\n  - **CRIT-3: `DEFINE INDEX IF NOT EXISTS` undocumented (escalated\n    from pass-4/5 IMP).** Every other `DEFINE` statement in the\n    file (TABLE, FIELD, ACCESS, NAMESPACE, DATABASE, SEQUENCE,\n    FUNCTION) documents both `OVERWRITE` and `IF NOT EXISTS`;\n    `DEFINE INDEX` was the sole outlier. Added the idempotent\n    form alongside `OVERWRITE`. Also added `CONCURRENTLY` and\n    `DEFER` clause examples (resolving pass-4/5 IMP-1) — both are\n    in the upstream `DEFINE INDEX` grammar and were already\n    covered in `rules/performance.md` v1.5.3, but the foundational\n    language reference omitted them.\n\n- **`rules/performance.md` (2 CRITs):**\n  - **CRIT-1: `FORMAT TEXT` keyword IS valid in v3 — v1.5.5 fix\n    was a regression.** v1.5.5 removed `FORMAT TEXT` from the\n    documented `EXPLAIN` standalone form on the basis that the\n    upstream EXPLAIN docs page only shows `FORMAT JSON`. Pass-6\n    verified against the parser source\n    (`core/src/syn/parser/stmt/mod.rs` ~lines 156-160) which\n    explicitly accepts both `\"TEXT\"` and `\"JSON\"` as `FORMAT`\n    keywords (the parser error message itself reads `\"TEXT or\n    JSON\"`). The pass-5 patch was based on docs alone, missing the\n    parser's broader surface. Restored `FORMAT TEXT` to the\n    documented grammar with a precision note that TEXT is also\n    the default when no FORMAT clause is present (so writing\n    `FORMAT TEXT` explicitly is valid but redundant). This is the\n    second consecutive pass where docs-only verification produced\n    an incorrect fix; treat parser-body verification as mandatory\n    for grammar claims.\n  - **CRIT-2: `EXPLAIN FULL` clause-form undocumented (escalated\n    from pass-4/5 IMP).** v3.0.5 supports `@statement EXPLAIN\n    FULL` (clause-form) for extended planner output beyond the\n    basic `EXPLAIN`. Verified against\n    `core/src/syn/parser/stmt/parts.rs:120` `try_parse_explain`\n    which reads an optional `FULL` token after `EXPLAIN`, and\n    against the upstream language test\n    `language-tests/tests/language/statements/select/\n    explain_multi_table.surql` which exercises both `EXPLAIN` and\n    `EXPLAIN FULL` and shows the latter produces 7 ops vs the\n    former's 4. Added the clause-form `EXPLAIN FULL` example to\n    the EXPLAIN section.\n\n`rules/data-modeling.md`, `rules/security.md`, and\n`rules/graph-queries.md` returned **GO** with 0 CRITs.\n`rules/vector-search.md` returned **CONDITIONAL GO** with 0 CRITs\n(the JACCARD/PEARSON warning callout held cleanly under re-\nverification — pass-6 reviewer cited the same\n`catalog/schema/index.rs` lines and confirmed the inversion\nbehaviour). 4/6 GO is the highest GO rate of the v1.5.x cycle.\n\nPass-6 IMPORTANTs (security WITH REFRESH on TYPE RECORD, JWKS URL\non TYPE RECORD, REVOKE GRANT/SHOW/PURGE; performance TLS flags\nin start-flag list, REBUILD INDEX ON TABLE all-indexes form;\nsurrealql ALTER section, missing function namespaces (encoding /\nbytes / file / not / set / sequence / schema / api), regex /\nrange / literal / file data types, INSERT IGNORE example;\ngraph-queries sub-SELECT graph clauses, $parent in WHERE, custom\nedge Record IDs in RELATE, +path+inclusive form; vector-search\nsimilarity-function examples) and MINORs are deferred — they are\ndocumentation gaps or polish, not contradictions of upstream —\ntracked in residual-risk lists at `/tmp/pi-{rule}-pass6-out.md`.\n\nMigration: consumers who copied the `|x| x * 2` closure example,\nremoved `FORMAT TEXT` from EXPLAIN syntax based on v1.5.5\nguidance, or expected `EXPLAIN FULL` to be undocumented should\napply the corrections noted above. Machine-checked version-\nconsistency CI gate continues to apply.\n\nCumulative CRITs across atomic-protocol cycle: v1.5.1=21,\nv1.5.2=7, v1.5.3=15, v1.5.4=6, v1.5.5=6, v1.5.6=5 = **60 CRITs\nfound-and-fixed across six passes**. CRIT-trend is now strictly\nmonotone-decreasing (21→7 was the first drop; 15 was an outlier\nfrom adding the surrealql full-pass; 6→6→5 is the descent). 4/6\nGO at pass-6 vs 1/6 GO at pass-5 is the strongest convergence\nsignal so far.\n\nv1.5.5 | 2026-05-06T02:06:58.778Z | user\n\n## [1.5.5] - 2026-05-05\n\n### Fixed (atomic-protocol patch — v1.5.4 Pi-only re-audit CRIT remediation)\n\nA fifth Pi+DeepSeek-V4-Pro:xhigh adversarial pass over the same six\nrules audited in pass-4 returned **5 NO-GO + 1 GO** with **6 CRITs**\ntotal. v1.5.5 patches every CRIT.\n\n`rules/graph-queries.md` returned its first clean pass after four\nprior NO-GOs (10 cumulative CRITs) — verified via direct parser-\nsource citation including the `path_shortest.surql` upstream\nlanguage test. The convergence target for that file held.\n\nThe other five files surfaced a mixture of **fix-patch drift from\nv1.5.4 surgery** and **latent CRITs that were pass-4 IMPORTANTs\nescalated under pass-5's ruthless standard**. Most consequential\nfinding: a `JACCARD` / `PEARSON` semantic-inversion catalog bug in\n`rules/vector-search.md` — the same genus as the v1.5.3 LM\nmislabelling correction.\n\n#### Per-file CRIT counts (pass-5)\n\n- **`rules/data-modeling.md` (1 CRIT — pre-existing, pattern-\n  identical to PASS-1):** §\"Document + Graph (Social Network with\n  Rich Profiles)\" defined `member_of TYPE RELATION IN user OUT\n  group ENFORCED;` but the `group` table itself was never defined\n  in the file (and `member_of` was unused in any query in the\n  pattern). Identical class of bug to the PASS-1 `wrote`-edge\n  CRIT. Removed the unused edge definition.\n\n- **`rules/security.md` (1 CRIT — v1.5.4 fix-introduced) +\n  cross-fix into `rules/deployment.md` and `rules/surrealql.md`:**\n  - **CRIT-1: `DEFINE NAMESPACE <ns> STRICT;` is invalid SurrealQL\n    in v3.** v1.5.4 introduced this as the recommended replacement\n    for the deprecated `--strict` flag, but verification against\n    `core/src/syn/parser/stmt/define.rs` `parse_define_namespace()`\n    proves the parser only handles `COMMENT` after the namespace\n    name — there is no `STRICT` token handler. The\n    `DefineNamespaceStatement` struct (`core/src/sql/statements/\n    define/namespace.rs`) has no `strict` field. STRICT is **only**\n    valid on `DEFINE DATABASE`. Four sites in security.md replaced\n    with per-database-only guidance (for namespace-wide coverage,\n    define each database within the namespace as STRICT).\n    Cross-fix: `deployment.md` line 106 server-flags table same\n    correction; `surrealql.md` line 562 §DEFINE ACCESS BEARER\n    incorrectly claimed `FOR RECORD` *requires* an `AUTHENTICATE`\n    clause (it is optional per the upstream BEARER syntax\n    diagram) — corrected.\n\n- **`rules/vector-search.md` (2 CRITs):**\n  - **CRIT-1 (pass-4 IMP escalated): `HASHED_VECTOR` clause\n    missing.** The `use_hashed_vector: bool` parameter exists in\n    both `catalog::HnswParams` and `sql::HnswParams` (v3.x\n    revision 2) and is fully wired through parser → SQL → catalog,\n    but was entirely absent from the rule. Same class of error as\n    the v1.5.3 LM mislabelling — undocumented HNSW parameter.\n    Added to the syntax-block placeholder and parameter table.\n  - **CRIT-2 (NEW): `JACCARD` and `PEARSON` are similarity\n    functions, not distance functions, but the catalog\n    `Distance::compute` body calls them as if they were the\n    correct metric for HNSW search.** Verified at\n    `catalog/schema/index.rs:293-300`: `Self::Cosine =>\n    v1.cosine_distance(v2)` (true distance), but `Self::Jaccard =>\n    v1.jaccard_similarity(v2)` and `Self::Pearson =>\n    v1.pearson_similarity(v2)` (similarities). The HNSW\n    `KnnPriorityList` uses ascending `BTreeMap` order (smaller =\n    closer for true distance), so configuring `DIST JACCARD` or\n    `DIST PEARSON` ranks the **least** similar results first —\n    the search is silently inverted. The §\"Distance Function\n    Selection Guide\" presented both as regular distance metrics.\n    Added an explicit warning callout, marked the affected rows\n    with ⚠, redirected users to standalone\n    `vector::similarity::jaccard()` /\n    `vector::similarity::pearson()` for ad-hoc scoring, and\n    recommended a true distance metric for indexed nearest-\n    neighbour search. Also added the missing `MINKOWSKI` row to\n    the selection guide (pass-5 IMP).\n\n- **`rules/performance.md` (1 CRIT — pass-4 IMP escalated):\n  `EXPLAIN [ FORMAT TEXT | JSON ]` syntax includes a `FORMAT TEXT`\n  keyword that does not exist in v3.0.5.** The upstream EXPLAIN\n  page documents only `EXPLAIN [ANALYZE] [FORMAT JSON]` — text is\n  the default, not an explicit format keyword. Users copying\n  `EXPLAIN FORMAT TEXT SELECT ...` would have got a parser error.\n  Corrected the documented standalone form to\n  `EXPLAIN [ ANALYZE ] [ FORMAT JSON ] @statement` with a\n  precision comment.\n\n- **`rules/surrealql.md` (1 CRIT — pre-existing, missed by 4\n  prior passes): §\"Futures\" documents `<future> { … }` syntax\n  that does not exist in v3.0.5.** Verified exhaustively: no\n  `Future` variant in the `Value` enum (`core/src/val/mod.rs`),\n  no `Future` variant in the `Kind` enum (`core/src/sql/kind.rs`),\n  no `FUTURE` keyword in the lexer, no `<future>` parse path in\n  the expression parser. Earlier SurrealDB versions did expose\n  this form; v3 covers the same use cases via three other\n  features. Replaced the section with §\"Deferred Computation:\n  Computed Fields, Closures, JS Functions\" pointing at\n  `DEFINE FIELD … VALUE @expression` (the direct successor for\n  \"computed on read\"), `|args| body` closures, and the existing\n  Embedded JavaScript section.\n\n`rules/graph-queries.md` returned **GO with 0 CRITs** — first\nclean pass after four prior NO-GOs. v1.5.4's `+inclusive`\ncorrection held; PASS-1 through PASS-3 fixes verified clean\nagainst parser source plus upstream language tests; cross-\nreferences to v1.5.4 surrealql.md and security.md showed no\ndrift. Three IMPORTANTs (sub-SELECT graph clauses with\n`ORDER`/`LIMIT`/`START`/`GROUP BY`, `$parent` in graph-traversal\nWHERE clauses, custom edge Record IDs in `RELATE`) deferred to\nv1.6.0 as additive coverage gaps.\n\nPass-5 IMPORTANTs (data-modeling illustrative-edge consistency;\nsecurity WITH REFRESH on TYPE RECORD / JWKS URL on TYPE RECORD /\nbroken §Capabilities cross-reference / better AUTHENTICATE\nexample; vector-search MINKOWSKI in similarity-functions section\n+ JACCARD/PEARSON similarity functions + MINOR doc duplication;\nperformance EXPLAIN FULL / SURREAL_HNSW_CACHE_SIZE / REBUILD\nINDEX ON TABLE all-indexes form / TLS flags missing from\nperformance flag list; surrealql INSERT IGNORE example / seven\n`time::set_*` functions / four data types `regex`/`range`/\n`literal`/`file` / `array<T,N>` cardinality / 13 missing function\nnamespaces / CONCURRENTLY+IF NOT EXISTS on DEFINE INDEX) and\nMINORs are deferred — they are documentation gaps or polish, not\ncontradictions of upstream — tracked in residual-risk lists at\n`/tmp/pi-{rule}-pass5-out.md`.\n\nMigration: consumers who copied `member_of TYPE RELATION IN user\nOUT group`, `DEFINE NAMESPACE <ns> STRICT;`, `EXPLAIN FORMAT TEXT\n…`, `<future> { … }`, or configured `DIST JACCARD` / `DIST\nPEARSON` on an HNSW index expecting nearest-neighbour search,\nneed to apply the corrections noted above. Machine-checked\nversion-consistency CI gate continues to apply.\n\nCumulative CRITs across atomic-protocol cycle: v1.5.1=21,\nv1.5.2=7, v1.5.3=15, v1.5.4=6, v1.5.5=6 = **55 CRITs found-and-\nfixed across five passes**. Pass-5 CRIT count matched pass-4\nexactly (6 / 6) — convergence has plateaued, not completed.\n\nv1.5.4 | 2026-05-06T01:44:23.927Z | user\n\n## [1.5.4] - 2026-05-05\n\n### Fixed (atomic-protocol patch — v1.5.3 Pi-only re-audit CRIT remediation)\n\nA fourth Pi+DeepSeek-V4-Pro:xhigh adversarial pass over the same six\nrules patched/audited in v1.5.3 returned **3 NO-GO + 2 CONDITIONAL GO\n+ 1 GO** with **6 CRITs** total. v1.5.4 patches every CRIT.\n\nThree of the six CRITs sit in `rules/surrealql.md` and are a textbook\ncase of the empirical fix-patch-drift pattern noted in `~/CLAUDE.md`:\nv1.5.3 added four \"missing\" vector functions to surrealql.md based on\nfunction-registration tables in the v3.0.5 source — but pass-4\nverified the actual function bodies and surfaced that **two of those\nfunctions always return `Error::Unimplemented` at runtime** in v3.0.5\n(`vector::distance::mahalanobis` and `vector::similarity::spearman`),\nand a **third has a fundamentally different signature** than v1.5.3\ndocumented (`vector::distance::knn` is a context-only function that\nreads the current HNSW-index iteration result, not a standalone\n`(vec_a, vec_b, k)` callable). Documenting registered-but-unimplemented\nfunctions as if they worked is worse than not mentioning them at all.\n\nThe other three CRITs cover:\n- A graph-queries.md `+shortest=target+path` example whose `+path`\n  sub-modifier the v3.0.5 parser explicitly rejects (Path / Collect /\n  Shortest are mutually exclusive `RecurseInstruction` variants —\n  only `+inclusive` is accepted as a secondary flag on `+shortest`).\n- Two security/deployment CLI flag corrections that turn into silent\n  production-security failures: `--strict` is deprecated in v3 and\n  silently ignored at startup, and `--allow-origins` (plural) does\n  not exist — the v3 flag is `--allow-origin` (singular).\n\n#### Per-file CRIT counts (pass-4)\n\n- **`rules/surrealql.md` (3 CRITs — all v1.5.3-introduced):**\n  - **CRIT-1: `vector::distance::knn` fabricated signature.** v1.5.3\n    documented `vector::distance::knn([1, 2], [3, 4], 5)` as a\n    standalone 3-arg distance computation. Source proves\n    (`core/src/fnc/vector.rs:87-103`) the function takes a single\n    optional `Optional<Value>` (KNN reference index, default 0) and\n    reads the current iteration result from the execution context —\n    it cannot be called with two vectors and a `k` argument. Replaced\n    with an accurate description noting it is a context-only\n    function used inside SELECTs that scan an HNSW index, with\n    cross-reference to the `<|K,DIST|>` brute-force operator for\n    ad-hoc nearest-neighbour computation.\n  - **CRIT-2: `vector::distance::mahalanobis` wrong arity AND\n    unimplemented.** v1.5.3 documented a 3-arg form with a\n    covariance matrix. Source proves (`core/src/fnc/vector.rs:\n    105-108`) the function takes exactly 2 `Vec<Number>` args (no\n    covariance matrix) and **always returns `Error::Unimplemented`**\n    at runtime. v1.5.4 documents the actual 2-arg signature and\n    explicit unimplemented status, with a \"do not call in\n    production\" warning until it ships an implementation.\n  - **CRIT-3: `vector::similarity::spearman` unimplemented.** The\n    2-arg signature v1.5.3 documented is correct, but the function\n    body always returns `Error::Unimplemented` (`core/src/fnc/\n    vector.rs:140-143`). Same treatment as CRIT-2 — explicit\n    unimplemented warning so consumers don't ship code that errors\n    at runtime.\n\n- **`rules/security.md` (2 CRITs — both v3 CLI deprecations missed\n  by passes 1-3) + cross-fix into `rules/deployment.md`:**\n  - **CRIT-1: `--strict` deprecated in v3.** Verified against\n    `surrealdb/server/src/cli/start.rs` and `dbs/mod.rs`: the flag\n    still parses but emits a warning and is **silently ignored**.\n    security.md cited `--strict` for four separate security-critical\n    contexts (server startup example, recommendation, common\n    pitfalls list, production checklist) — all four were giving\n    consumers a false sense of security. v1.5.4 replaces every\n    `--strict` reference with the correct v3 mechanism: enforce\n    strict mode at the schema layer with `DEFINE DATABASE <db>\n    STRICT;` / `DEFINE NAMESPACE <ns> STRICT;`, and require\n    authentication via `--deny-guests` / `--deny-arbitrary-query`\n    capabilities flags. Cross-fix in `rules/deployment.md`: the\n    server-flags reference table at line 106 and the setup-surreal\n    GitHub Action input `surrealdb_strict` at line 167 both now\n    explicitly mark `--strict` as deprecated/no-op with the same\n    replacement guidance.\n  - **CRIT-2: `--allow-origins` (plural) does not exist; the v3\n    flag is `--allow-origin` (singular).** Verified against\n    `server/src/cli/start.rs`. The plural form would fail at\n    `surreal start` parse time. Three CORS-configuration examples\n    in security.md were corrected. The new singular form accepts\n    the flag multiple times for multiple origins (or a comma list).\n\n- **`rules/graph-queries.md` (1 CRIT — v1.5.3 fix RESIDUAL\n  promoted to CRIT):** The §\"Native Shortest-Path\" example combined\n  `+shortest=person:ceo` with `+path` to \"return the full path.\"\n  Both halves of that claim were wrong:\n  - The v3.0.5 parser (`parse_recurse_instruction` in `idiom.rs`)\n    returns a single `Option<RecurseInstruction>` — Path / Collect\n    / Shortest are mutually exclusive variants. After `+shortest=`,\n    only `+inclusive` is accepted as a secondary flag.\n  - `+shortest=` already returns the full path array by default\n    (verified against the upstream language test\n    `language-tests/tests/language/graph/path_shortest.surql`,\n    test 0 returns `[person:lead_infra, person:dir_platform,\n    person:vp_eng, person:ceo]`). There is no \"just the terminal\n    node\" mode to escape from.\n  Replaced with a `+inclusive` example (the only valid secondary\n  flag on `+shortest`), and added a precision paragraph documenting\n  the default path-array return shape and the parser-level\n  mutex on Path / Collect / Shortest.\n\n`rules/data-modeling.md`, `rules/vector-search.md`, and\n`rules/performance.md` returned no CRITs in pass-4 (data-modeling GO,\nvector-search and performance CONDITIONAL GO with documentation-only\nIMPs deferred). vector-search.md's pass-3 LM rewrite — the most\nconsequential v1.5.x correction — held cleanly under pass-4\nre-scrutiny.\n\nPass-4 IMPORTANTs (surrealql.md missing data types `regex` / `range`\n/ `number` / `literal` / `geometry<feature>` union; missing function\nnamespaces `bytes::*` / `encoding::*` / `file::*` / `not::*` /\n`set::*` / `sequence::*` / `schema::*` / `api::*`; missing ALTER\nstatements section; missing `DEFINE API` / `DEFINE MODEL` /\n`DEFINE CONFIG`; missing `array<T,N>` / `set<T,N>` cardinality docs;\nmissing `CONCURRENTLY` / `IF NOT EXISTS` on `DEFINE INDEX`;\nperformance.md `EXPLAIN FULL` clause / `SURREAL_HNSW_CACHE_SIZE` env\nvar / `EXPLAIN ANALYZE` semantics; security.md `WITH REFRESH` /\n`AUTHENTICATE` on RECORD / JWKS URL on RECORD / capabilities flag\nsurface / `ACCESS … REVOKE GRANT` / `ACCESS … SHOW`;\ngraph-queries.md RELATE `RETURN` clause / `ONLY` / sub-SELECT graph\nclause / edge deletion / FETCH-on-graph-paths) and MINORs are\ndeferred — they are documentation gaps or polish, not contradictions\nof upstream — and tracked in the residual-risk lists of the per-rule\nre-audit reports at `/tmp/pi-{rule}-pass4-out.md`.\n\nMigration: consumers who copied the `+shortest=target+path` pattern,\n`--strict`, `--allow-origins` (plural), or any of\n`vector::distance::knn(@vec_a, @vec_b, @k)` /\n`vector::distance::mahalanobis([…], […], @cov_matrix)` /\n`vector::similarity::spearman([…], […])` calling them as if\nimplemented need to apply the corrections noted above. Machine-\nchecked version-consistency CI gate continues to apply.\n\nv1.5.3 | 2026-05-06T01:17:26.284Z | user\n\n## [1.5.3] - 2026-05-05\n\n### Fixed (atomic-protocol patch — v1.5.2 Pi-only re-audit CRIT remediation, including foundational `rules/surrealql.md`)\n\nA third Pi+DeepSeek-V4-Pro:xhigh adversarial pass — this time over the\nsame five rules patched in v1.5.2 **plus** a first dedicated full-file\npass on the foundational language reference `rules/surrealql.md` —\nreturned **5 NO-GO + 1 CONDITIONAL GO** with **15 CRITs** total. The\nempirical fix-patch-drift pattern noted in `~/CLAUDE.md` continued to\nplay out (each pass introduces 1-2 new bugs from the prior fix\nsurgery), and the dedicated `rules/surrealql.md` pass surfaced six\nadditional latent hallucinations that two earlier rounds of cross-fix\npatches did not exhaust. v1.5.3 patches every CRIT.\n\nThe single most consequential finding: the v1.5.1 \"fix\" of the HNSW\n`LM` parameter — labelling it as \"Minkowski distance order\" — was\nitself wrong. v3.0.5 source proves `LM` is the HNSW **level\nmultiplier** (`ml` in the original Malkov & Yashunin paper), used in\nthe formula `l ← ⌊−ln(unif(0..1)) · ml⌋` to assign each new point an\ninsertion level. Default `1 / ln(M)` (≈0.402 at `M=12`). The Minkowski\ndistance order is specified inline in `DIST MINKOWSKI <order>`, **not**\nvia `LM`. Anyone who copied an `HNSW … LM N` snippet from v1.5.1 or\nv1.5.2 thinking they were configuring Minkowski order was silently\nsetting the level multiplier instead, often dramatically flattening\nthe HNSW hierarchy. v1.5.3 corrects the parameter table row, the\ndefault value, and the precision callout, and adds an explicit warning\nabout the v1.5.1/v1.5.2 mislabelling.\n\n- **`rules/data-modeling.md`** (1 CRIT) — Line 948 §\"Time-Series Data\n  Pattern\" used `DELETE sensor_reading WHERE recorded_at < time::now()\n  - 30d LIMIT 100;`. v3.0.5 SurrealQL has no `LIMIT` clause on\n  `DELETE` (verified against `surrealdb/core/src/sql/statements/\n  delete.rs` — `DeleteStatement` has no `limit` field). Removed the\n  invalid clause and added a precision comment recommending a\n  scheduled task for bounded-batch cleanup.\n\n- **`rules/graph-queries.md`** (2 CRITs) — (1) Line 15 §\"Basic Syntax\"\n  RELATE template still read `[SET | CONTENT | MERGE ...]`,\n  contradicting the v1.5.2 §\"Setting Properties on Edges\" precision\n  comment (\"there is no MERGE clause on RELATE\"). The v1.5.2 patch\n  fixed the example block but left the syntax head stale. Now reads\n  `[CONTENT @value | SET @field = @value ...]` consistently.\n  (2) Missing entire §\"`TYPE RELATION`, `FROM`/`TO`, and `ENFORCED`\"\n  subsection — the file documented only the SCHEMAFULL + typed\n  `record<…> in/out` pattern, omitting `DEFINE TABLE … TYPE RELATION\n  FROM person TO article`, the `IN`/`OUT` aliases, the `|`\n  multi-type endpoint syntax, and the `ENFORCED` keyword. New\n  subsection added with upstream-verified examples.\n\n- **`rules/surrealql.md`** (6 CRITs — first dedicated Pi pass on the\n  foundational language reference):\n  - **CRIT-1: Empty `### Pattern Matching` table.** v1.4.4 correctly\n    removed `LIKE` / `NOT LIKE` (which don't exist in v3.0.5) but\n    left an empty header-only table behind. Replaced with a\n    cross-reference paragraph pointing readers at the comparison\n    operators (`~`, `!~`, `?~`, `*~`), full-text search operators\n    (`@@` / `@N@`), and KNN operators (`<|K|>` / `<|K,DIST|>` /\n    `<|K,EF|>`).\n  - **CRIT-2: Missing `!!` operator.** v3.0.5 lists `!!` as a\n    distinct unary truthiness-coercion operator. Added to the\n    Logical Operators table.\n  - **CRIT-3: Missing `OUTSIDE` and `INTERSECTS` geometry\n    operators.** Both are documented v3.0.5 operators used in\n    geospatial queries; neither appeared in the operators tables.\n    Added a new `### Geometry Operators` table.\n  - **CRIT-4: Four missing vector functions.** v3.0.5 source\n    (`surrealdb/core/src/fnc/script/modules/surrealdb/functions/\n    vector.rs` and friends) registers `vector::scale`,\n    `vector::distance::knn`, `vector::distance::mahalanobis`, and\n    `vector::similarity::spearman` — none of which appeared in the\n    Vector Functions section. All four added with usage examples.\n  - **CRIT-5: Missing `DEFINE ACCESS BEARER` section.** The file\n    covered RECORD and JWT access but not BEARER, the v3 mechanism\n    for API key / refresh token authentication. Added a BEARER\n    subsection covering `FOR USER` vs `FOR RECORD`, the\n    `AUTHENTICATE` clause, `DURATION FOR GRANT`/`TOKEN`/`SESSION`,\n    and the `ACCESS … GRANT` token-issuance statement (with the\n    user identifier correctly unquoted — see security.md fix below).\n  - **CRIT-6 (cross-fix from `rules/vector-search.md`): `DIST`\n    default was wrong.** The DEFINE INDEX section claimed `DIST`\n    defaulted to `COSINE`. Upstream parser (`define/index.rs`)\n    initialises `let mut distance = Distance::Euclidean;` and\n    `Distance` derives `#[default]` on `Euclidean`. Corrected to\n    `EUCLIDEAN`, with a precision note pointing at the source line\n    and recommending an explicit `DIST COSINE` override for\n    normalised text embeddings.\n\n- **`rules/vector-search.md`** (2 CRITs):\n  - **CRIT-1: `LM` rewrite.** As described above — `LM` is the HNSW\n    level multiplier, not \"Minkowski distance order.\" The parameter\n    table row, default value (`1 / ln(M)`), syntax-block placeholder,\n    and the precision callout are all corrected. The callout now\n    includes an explicit warning that v1.5.1 and v1.5.2 mislabelled\n    `LM` and that anyone who copied an `HNSW … LM N` snippet\n    intending to set Minkowski order should write `DIST MINKOWSKI N`\n    instead.\n  - **CRIT-2 (cross-file into `rules/surrealql.md`)** — counted\n    under surrealql.md CRIT-6 above (DIST default = EUCLIDEAN).\n\n- **`rules/performance.md`** (4 CRITs):\n  - **CRIT-1: `surreal import --conn` flag does not exist.** v3.0.5\n    CLI uses `--endpoint` (with short alias `-e`); no `--conn` flag\n    is registered anywhere in the v3.0.5 server source. Verified\n    against `server/src/cli/import.rs` and the `cli_integration.rs`\n    test corpus. §\"Bulk Import\" example corrected.\n  - **CRIT-2: `REBUILD INDEX` statement missing.** v3.0.5 has a\n    first-class `REBUILD INDEX [IF EXISTS] <name> ON <table>\n    [CONCURRENTLY]` statement that preserves the full original\n    index definition (UNIQUE / FULLTEXT ANALYZER / BM25 / HIGHLIGHTS\n    / HNSW DIMENSION / EFC / M / DEFER / CONCURRENTLY). The file\n    previously recommended only the legacy `REMOVE INDEX` +\n    `DEFINE INDEX` pattern, which loses the original definition.\n    §\"Index Rebuild Strategies\" rewritten to lead with `REBUILD\n    INDEX` and demote the manual pattern to a \"use only when\n    changing the index shape\" note. Adds an `INFO FOR INDEX`\n    example for build-progress monitoring.\n  - **CRIT-3: `CONCURRENTLY` clause undocumented.** Both `DEFINE\n    INDEX` and `REBUILD INDEX` accept `CONCURRENTLY` for\n    non-blocking background builds — directly relevant to large\n    HNSW / FULLTEXT index lifecycle in production. New §\"Concurrent\n    Index Builds (`CONCURRENTLY`)\" subsection added.\n  - **CRIT-4: `DEFER` clause undocumented.** `DEFINE INDEX … DEFER`\n    (since v2.5.0) decouples ingestion from index maintenance;\n    eliminates write-write conflicts on high-throughput parallel\n    ingestion. New §\"Deferred Indexing (`DEFER`)\" subsection added,\n    with the `UNIQUE`+`DEFER` mutex caveat documented.\n\n- **`rules/security.md`** (1 CRIT) — Line 244 §\"Bearer Access /\n  GRANT Statement\" example used `ACCESS service_tokens GRANT FOR\n  USER 'ci_runner';` with the user identifier quoted. v3 `GRANT FOR\n  USER @name` takes an identifier, not a string literal — the quoted\n  form would fail to reference the `DEFINE USER` name correctly.\n  Removed the quotes.\n\nPass-3 IMPORTANTs (RECORD `WITH REFRESH` / `AUTHENTICATE` clauses,\nJWKS URL on RECORD-with-JWT, capabilities flags surface, `regex` /\n`range` / `number` / `literal` data types, `ALTER` statement\ncoverage, `DEFINE SCOPE` / `TOKEN` / `API` / `CONFIG`, full session\nvariable surface, additional function namespaces (`bytes::*`,\n`encoding::*`, `file::*`, `not::*`, `sequence::*`, `set::*`,\n`api::*`), `RELATE … RETURN` clause, `RELATE ONLY`, edge deletion,\nFETCH-on-graph-paths, full sub-SELECT graph-clause syntax) and\nMINORs are deferred — they are documentation gaps or polish, not\ncontradictions of upstream — and tracked in the residual-risk lists\nof the per-rule re-audit reports at\n`/tmp/pi-{rule}-pass3-out.md`.\n\nMigration: consumers who copied any of the corrected examples — the\n`DELETE … LIMIT` clause, the `RELATE … MERGE` pattern, the empty\nPattern Matching table, the missing operators, `LM N` intending\nMinkowski order, the `--conn` flag, the legacy `REMOVE`+`DEFINE`\nrebuild pattern, the `DIST COSINE` default assumption, or the\nquoted `GRANT FOR USER 'name'` form — need to apply the corrections\nnoted above. Machine-checked version-consistency CI gate continues\nto apply.\n\nv1.5.1 | 2026-05-05T23:13:59.927Z | user\n\n## [1.5.1] - 2026-05-05\n\n### Fixed (atomic-protocol patch — v1.5.0 Pi-only adversarial-audit CRIT remediation)\n\nA Pi+DeepSeek-V4-Pro:xhigh adversarial audit run against\n`rules/data-modeling.md`, `rules/security.md`, `rules/vector-search.md`,\n`rules/performance.md`, and `rules/graph-queries.md` after v1.5.0\nreturned 5/5 NO-GO with 21 CRITs total — hallucinations beyond the\nmechanically-grepped v1.4.4 patterns. v1.5.1 patches every CRIT.\n\n- **`rules/vector-search.md`** (2 CRITs) — HNSW parameter table swapped\n  `LM` and `M0`. `LM` was documented as \"Max connections at layer 0,\n  default `2*M`\"; the parser actually treats `LM` as the **Minkowski\n  distance order** (only meaningful with `DIST MINKOWSKI`) and `M0`\n  as the layer-0-connections clause (default `2*M`). The full HNSW\n  parameter list now lists both `M0` and `LM` with their correct\n  semantics, and a precision note flags the pre-v1.5.1 conflation so\n  copied snippets can be repaired.\n- **`rules/data-modeling.md`** (2 CRITs) — (a) the §\"Schema Modes\"\n  table conflated schema enforcement (`SCHEMAFULL` / `SCHEMALESS`)\n  with table type markers (`TYPE NORMAL` / `TYPE RELATION` /\n  `TYPE ANY`) into a single 5-row \"modes\" table, implying mutual\n  exclusivity. They are orthogonal — a table can be `TYPE RELATION\n  SCHEMAFULL`. The section now splits into two tables with a note\n  on combination. (b) The social-feed example used\n  `->follows->user->wrote->post.*` against a schema that defines\n  only `follows` and `likes` edges — no `wrote` edge — so the query\n  failed at runtime. The example now uses the record-link form\n  (`SELECT * FROM post WHERE author IN (SELECT VALUE ->follows->user\n  FROM user:alice)`) and adds a comment on what to define if you\n  want the `wrote`-edge form instead.\n- **`rules/security.md`** (3 CRITs) — (a) §\"API Key Authentication\"\n  documented `DEFINE ACCESS api_access ON DATABASE TYPE API KEY` —\n  there is no `TYPE API KEY` in v3.0.5; the section is renamed\n  \"Bearer-Token Authentication\" and now documents the actual\n  mechanism: `DEFINE ACCESS … TYPE BEARER FOR [USER | RECORD]` plus\n  `ACCESS <name> GRANT FOR USER|RECORD <subject>`. (b) `TYPE JWT`\n  examples used `DURATION FOR TOKEN`, which is invalid on JWT\n  access — JWT tokens are issued externally, so SurrealDB only\n  accepts `DURATION FOR SESSION` here. All three JWT examples were\n  rewritten to `DURATION FOR SESSION 12h`. (c) `WITH ISSUER KEY` was\n  missing from the JWT-with-record-binding examples — this is\n  required for SurrealDB to *issue* tokens under that access method\n  rather than only verify them. Both relevant examples now include\n  the `WITH ISSUER KEY` clause with prose on its purpose.\n- **Cross-fix in `rules/surrealql.md`** — the same `TYPE JWT` +\n  `DURATION FOR TOKEN` invalid combination appeared in the DEFINE\n  ACCESS examples (lines ~507–514). Both were rewritten to\n  `DURATION FOR SESSION` to keep the language reference and the\n  security rule in sync.\n- **`rules/performance.md`** (8 CRITs) — (1) EXPLAIN output\n  documented `Iterate Table` / `Iterate Index` operator names; the\n  actual user-facing operator names are `TableScan`, `IndexScan`,\n  `RangeScan`, `Iterate`. The interpretation block now lists the real\n  names. (2) The `WITH` clause for index hints (`WITH NOINDEX`,\n  `WITH INDEX <name>`) was undocumented — added a \"Index Hints\" sub-\n  section under Query Optimization. (3) The `surrealkv://` start\n  example included `surreal start file:///var/data/surreal.db` as\n  a synonym; `file://` is deprecated in v3 and emits a deprecation\n  warning. The `file://` line is removed and the prose flags it\n  explicitly. (4) `surreal start --rocksdb-cache-size 4GB` does not\n  exist; the cache section now points at the env-var surface\n  (`SURREAL_ROCKSDB_BLOCK_SIZE` etc.) and lists the verified\n  `surreal start` flags. (5) `surreal start --max-connections 1000`\n  also does not exist; the connection-limits section now describes\n  bounding concurrency at the proxy / OS layer instead. (6) \"SurrealKV\n  (default in SurrealDB 3.x for file-based storage)\" implied\n  automatic substitution; rephrased to \"recommended for file-based\n  storage\" with a note that the no-arg default is `memory`. (7)\n  §\"Parallel Query Execution\" conflated the `SELECT … PARALLEL`\n  clause (intra-query worker parallelism) with multi-statement\n  request batching (round-trip reduction). Split into two distinct\n  subsections. (8) The `FETCH` clause for record-link resolution was\n  not discussed at all — added a \"FETCH vs Subquery\" subsection.\n- **`rules/graph-queries.md`** (6 CRITs) — (1) §\"Shortest Path\n  Queries\" claimed *\"SurrealDB does not have a native shortest-path\n  function\"* and built a hand-rolled BFS. v3 has a native\n  `..+shortest=target` modifier (with optional `+path`) — the entire\n  hand-rolled BFS is replaced with the native form. (2) The §\"Recursive\n  Traversal Patterns\" section showed only fixed-hop chaining and\n  missed the v3 mandatory destructuring depth/range syntax\n  (`person:alice.{..3}->reports_to->person`,\n  `person:alice.{1..3}->reports_to->person`,\n  `org:company.{..}.children`). The section now leads with the\n  destructuring form and keeps fixed-hop chains as a fallback.\n  (3) `.@` recursive destructuring (which builds nested trees in a\n  single expression) was missing entirely; added a sub-section with\n  examples for both edge traversals and `REFERENCE` link fields.\n  (4) The §\"Aliased Traversal\" example used `AS` *inside* a\n  parenthesised arrow filter\n  (`->(knows WHERE since > d'2023-01-01' AS recent_connections)->person`),\n  which no official v3 test exercises. The example is rewritten to\n  the SELECT-projection-position form and a note flags the previous\n  form as unverified. (5) Wildcard edge traversal (`->?`, `<-?`,\n  `<->?`, `->?->?`) was undocumented; added a sub-section. (6) Path\n  modifiers `+collect`, `+path`, `+inclusive` (which compose with\n  the depth/range modifier to change what the traversal returns)\n  were undocumented; added a sub-section with examples.\n\nThe audit was run against v1.4.5 HEAD (`f83ca4e`); each rule's verdict\ncame from a separate Pi process to avoid cross-rule pollution. Pi\noutput files are at `/tmp/pi-{rule}-audit.md` for traceability — these\nwere not committed but are referenced from the v1.5.1 patch surgery.\n\n### Migration\n\nNo consumer code changes for callers using the language reference\n(`rules/surrealql.md`) — the v1.5.1 cross-fix there only narrows\nalready-broken examples. Consumers who copied any of the bullets\nabove (especially HNSW snippets using `LM` for layer-0 connections,\nDEFINE ACCESS using `TYPE API KEY`, JWT access using `DURATION FOR\nTOKEN`, `surreal start` invocations using `--rocksdb-cache-size` /\n`--max-connections` / `file://`, or hand-rolled BFS for shortest\npaths) need to apply the corrections noted in each bullet. The\nmachine-checked version-consistency CI gate continues to apply.\n\nv1.5.0 | 2026-05-05T23:04:30.267Z | user\n\n## [1.5.0] - 2026-05-05\n\n### Added (deferred-verification milestone — close v1.4.1 deferrals)\n\nThe v1.4.1 patch shrank `rules/editor-tooling.md`, `rules/surrealmcp.md`,\nand `rules/surrealml.md` to verified content only and explicitly\ndeferred per-extension/tool/API detail to v1.5.0. v1.5.0 closes that\ndeferral by inspecting actual upstream source for each surface and\nrestoring fully-grounded tables:\n\n- **`rules/editor-tooling.md`** — restored per-editor tables from\n  pinned upstream source: `surrealdb/surrealql-language-server@v0.1.2`\n  (full `surrealql.*` workspace settings, env-var fallbacks, server\n  capabilities, build instructions), `surrealdb/surrealql-vsx@v0.3.0`\n  (`surrealdb.surrealql` VS Code extension is grammar+snippets only —\n  no commands, no settings, no LSP wiring), `surrealdb/surrealql-zed@v0.1.0`\n  (`surrealdb-surrealql` extension config, LSP discovery, asset names),\n  and `surrealdb/surrealql-jetbrains` head (plugin id\n  `com.surrealdb.surql-jetbrains`, settings page **Settings → Tools →\n  SurrealQL**, LSP4IJ wiring). Confirmed `surrealql-language-server` is\n  the canonical LSP that first-party extensions wire to (Zed + JetBrains\n  both shell out to it by name); `surql-lsp` is a separate community\n  crate. Confirmed no first-party Sublime / Neovim / Helix / Emacs\n  packages exist — wire-it-yourself sections updated accordingly.\n- **`rules/surrealmcp.md`** — restored full tool argument schema table\n  from `surrealdb/surrealmcp@v0.4.0`'s `src/tools/mod.rs` `*Params`\n  structs. Documents all 20 tools (8 database CRUD, 6 connection\n  management, 6 cloud) with required vs optional args, and notes the\n  `upsert`/`update` `patch_data`/`merge_data`/`content_data`/`replace_data`\n  exclusivity precedence.\n- **`rules/surrealml.md`** — restored full Python `SurMlFile`\n  constructor + builder API from the published `surrealml 0.0.4` wheel.\n  Documents the `Engine` enum (5 variants, with `NATIVE` flagged as\n  declared-but-unsupported), the constructor signature, all 8 builder\n  methods (`add_column`, `add_normaliser`, `add_output`,\n  `add_description`, `add_version`, `add_name`, `add_author`,\n  `save`/`to_bytes`), and the static `load`/`upload` + inference\n  (`raw_compute`, `buffered_compute`) entry points. Re-asserts what\n  does NOT exist: no `from_pytorch`/`from_onnx`/`from_sklearn`/\n  `from_keras`/`from_hf` factories, no `ModelMeta`, no `[hf]` extra,\n  and no SurrealQL-side `DEFINE MODEL` / `INFO FOR MODEL` / `REMOVE\n  MODEL` / `ml::name<version>(...)` invocation form upstream.\n\n### Verified upstream (clones inspected at the v1.5.0 cut)\n\n- `surrealdb/surrealmcp@v0.4.0` (Rust, MCP server)\n- `surrealdb/surrealql-language-server@v0.1.2` (Rust, LSP)\n- `surrealdb/surrealql-vsx@v0.3.0` (TypeScript, VS Code grammar+snippets)\n- `surrealdb/surrealql-zed@v0.1.0` (Rust, Zed extension)\n- `surrealdb/surrealql-jetbrains` head (Kotlin, JetBrains plugin)\n- `surrealdb/surrealql-tree-sitter` head (tree-sitter grammar)\n- `surrealml 0.0.4` (Python wheel from PyPI; `surrealdb/surrealml`\n  GitHub repo's tags do not match PyPI release names — wheel was the\n  authoritative artefact)\n- `surrealdb/langchain-surrealdb@v0.2.1` (Python, cloned but not yet\n  used to expand `rules/langchain.md` — that expansion is queued for\n  a future release)\n\n### Migration\n\nNo consumer code changes. Existing skill consumers using the v1.4.x\nshrunken rule files are unaffected; the new content adds detail\nwithout removing or renaming any prior surface. Expanded sections are\nstrictly additive over the v1.4.5 verified-only baseline.\n\nv1.4.5 | 2026-05-05T22:35:19.059Z | user\n\n## [1.4.5] - 2026-05-05\n\n### Fixed (atomic-protocol patch — propagate v1.4.4 SurrealQL corrections to dependent rules)\n\nAfter v1.4.4 corrected the foundational `rules/surrealql.md`, a\nmechanical grep across the rest of the rule set found the same\nv1.4.4-class CRIT patterns (`SEARCH ANALYZER` / `MTREE` /\n`EXPLAIN FULL` / `string::is::*`) had also propagated into:\n\n- **`rules/data-modeling.md`** -- 16x `SEARCH ANALYZER`, 7x\n  `MTREE` (asserted as supported syntax with `DIMENSION` and\n  `CAPACITY` parameters), 1x `string::is::email`, plus the\n  HNSW/MTREE column in the migration-target table.\n- **`rules/security.md`** -- 2x `string::is::email`.\n- **`rules/vector-search.md`** -- 1x `SEARCH ANALYZER`. (The\n  `MTREE` retraction note already in this file was already\n  correct and was retained.)\n- **`rules/performance.md`** -- 2x `SEARCH ANALYZER`, 3x\n  `EXPLAIN FULL`.\n\nAll instances replaced via mechanical pass to match the verified\nv3 forms: `FULLTEXT ANALYZER`, HNSW (or `<|K,METRIC|>` brute-force\noperator), `EXPLAIN [ ANALYZE ] [ FORMAT TEXT | JSON ] @statement`,\n`string::is_*`. The `MTREE Index` section in `data-modeling.md` was\nrewritten as an \"Exact kNN (no index) -- v3\" section pointing at\nthe brute-force operator.\n\nNo 3-way reviewer pass was run for this patch -- the changes were\nmechanical replacements of already-verified-wrong patterns from\nv1.4.4. The `scripts/check_version_consistency.py` machine-check\ncatches version-row drift on every CI run from this release\nforward.\n\n### Migration\nNo consumer code changes. The same migration guidance from v1.4.4\napplies to anyone who copy-pasted from `rules/data-modeling.md` /\n`rules/security.md` / `rules/vector-search.md` /\n`rules/performance.md` in v1.4.0 through v1.4.4.\n\nv1.4.4 | 2026-05-05T22:31:30.448Z | user\n\n## [1.4.4] - 2026-05-05\n\n### Fixed (atomic-protocol patch — adversarial-review NO-GO findings, batch-4: foundational language reference)\n\nAfter v1.4.3 shipped, an adversarial review of `rules/surrealql.md`\n(the foundational SurrealQL language reference -- highest-impact\nfailure mode in this skill) returned **NO-GO** with **10 CRITICAL**\nfindings + 18 IMPORTANT + 9 MINOR. Pi (`deepseek-v4-pro:xhigh`) ran\ndirect upstream verification against\n`surrealdb/docs.surrealdb.com@main/src/content/reference/query-language/...`\non 2026-05-05; Cursor flagged additional internal-consistency drift\nbetween `rules/surrealql.md` and `rules/surrealism.md`; Codex hit\ncontext-window exhaustion on the 2096-line input and produced no\noutput (false negative; not used).\n\nThe same generation-batch failure mode that produced 50+\nhallucinations across the rules patched in v1.4.1 / v1.4.2 / v1.4.3\nalso produced wholesale syntax errors in the foundational reference.\nMost of these errors are pre-v3.0.0-beta SurrealQL syntax that the\ngeneration pass inherited from older training data without\nverifying against the current grammar.\n\n#### Pervasive syntax corrections\n- **`SEARCH ANALYZER` -> `FULLTEXT ANALYZER`** across every `DEFINE INDEX` example, prose mention, and Best Practices section. Upstream `define/indexes.mdx` confirms: \"Before SurrealDB version 3.0.0-beta, the `FULLTEXT ANALYZER` clause used the syntax `SEARCH ANALYZER`.\"\n- **`time::from::*` -> `time::from_*`** across every example. Upstream: \"Since version 3.0.0-beta, the `::from::` functions now use underscores.\"\n- **`string::is::*` -> `string::is_*`** across every example. Upstream: \"Since version 3.0.0-beta, the `::is::` functions now use underscores.\"\n- **`math::PI` / `math::E` / `math::TAU` / `math::INF` / `math::NEG_INF` -> lowercase** (`math::pi`, `math::e`, `math::tau`, `math::inf`, `math::neg_inf`).\n\n#### Fabricated syntax retractions\n- **`MTREE` index type**: removed entirely. Upstream `DEFINE INDEX` grammar defines exactly ONE vector index type (`HNSW`); the `MTREE` keyword and its `CAPACITY` parameter were not in the grammar at any v3 version. Replaced with a note pointing at HNSW + the `<|K,METRIC|>` brute-force kNN operator.\n- **`string::trim::start` / `string::trim::end`**: removed. Only `string::trim` exists upstream.\n- **`math::log2` / `math::log10`**: removed. Upstream has `math::log` (with optional base) and `math::ln`; use `math::log(x, 2)` or `math::log(x, 10)`.\n- **`EXPLAIN FULL`**: replaced with the verified standalone form `EXPLAIN [ ANALYZE ] [ FORMAT TEXT | JSON ] @statement`. The `FULL` keyword does not exist in the upstream grammar; the rule's clause-form `SELECT ... EXPLAIN` was retained as the alternate form.\n- **`?.` JS-style optional chaining as an operator**: removed from operators table. Replaced with the verified upstream form `spouse.?.name` (period-before-question-mark) on the appropriate access example.\n- **`LIKE` / `NOT LIKE` operators**: removed from operators table. Not present in upstream `operators.mdx`, not in the `ifelse` /`where` docs, not in the parser keyword list. Use `~` (fuzzy match) and `CONTAINS` operators.\n\n#### Access-statement structural fix\n- **`WITH ISSUER KEY`** moved out of the standalone `TYPE JWT` access example into a `TYPE RECORD WITH JWT` example (the only context in which it is a valid clause per upstream `define/access/record.mdx`). The previous `DEFINE ACCESS api_auth ON NAMESPACE TYPE JWT ... WITH ISSUER KEY ...` would not parse.\n\n#### Type system note\n- The `union<...>` and `array<T, N>` type constructors that earlier\n  drafts (re-)introduced are not present in upstream; literal types\n  use the `|` syntax (`datetime | uuid | \"N/A\"`). Verified in\n  current `Complex Types` table: only `array<T>`, `set<T>`,\n  `option<T>`, `record<T>` are documented.\n\n#### Deferred to v1.5.0 (acknowledged gaps; not blocking ship)\n- `DEFINE API`, `DEFINE CONFIG`, `DEFINE ACCESS ... TYPE BEARER`\n  full sections.\n- `ALTER` statement family (16 sub-statements: `ALTER TABLE`,\n  `ALTER FIELD`, `ALTER INDEX`, etc.).\n- Standalone `ACCESS` statement (`GRANT` / `SHOW` / `REVOKE` /\n  `PURGE`) for bearer-grant management.\n- `COUNT` index type, `CONCURRENTLY` and `DEFER` clauses on `DEFINE INDEX`.\n- `REFERENCE` / `DEFAULT ALWAYS` clauses on `DEFINE FIELD`.\n- `INSERT RELATION` variant.\n- `DEFINE FUNCTION` `-> @type` return-type syntax + `PERMISSIONS` clause.\n- Missing function categories: `encoding::*`, `bytes::*`, `file::*`, `api::*`, `sequence::*`, `set::*`, plus several `string::*`, `time::*`, `math::*`, `search::*` individual functions.\n\nThese deferrals are documented in `docs/v1.5.0-roadmap.md` style\n(see CHANGELOG history) -- the rule body still teaches the\nverified-correct primary surface.\n\n### Security posture\n- No new scripts, binaries, or third-party endpoints. All upstream\n  verification was via public read-only fetches against\n  `docs.surrealdb.com` on 2026-05-05. No new credential surface.\n- Removing the wrong access-method `WITH ISSUER KEY` placement\n  closes a SurrealQL-failure-at-parse-time surface where a\n  developer copy-pasting from v1.4.0 / v1.4.1 / v1.4.2 / v1.4.3\n  docs would build code that fails to define the access at all.\n\n### Migration\nNo consumer code changes. Rule-file content has been replaced;\nconsumers that copy-pasted from earlier versions should re-pin to\nv1.4.4 and re-derive any code from the corrected rule text. In\nparticular: switch every `DEFINE INDEX ... SEARCH ANALYZER ...` to\n`FULLTEXT ANALYZER`; rename every `time::from::X` to\n`time::from_X`; rename every `string::is::X` to `string::is_X`;\ndelete any `MTREE` index definitions and rebuild as `HNSW` (or use\n`<|K,METRIC|>` brute-force kNN); remove any `EXPLAIN FULL` /\n`?.` / `LIKE` / `NOT LIKE` usage; relocate any `WITH ISSUER KEY`\nclause from a JWT-typed access definition into the corresponding\nRECORD-typed access.\n\n### Tooling\n- `scripts/check_version_consistency.py` (added in commit `b842203`\n  before this release) is now wired into `ci.yml` so future\n  version-drift across `SKILL.md` / sub-skills / `SOURCES.json` /\n  `README.md` badge / `CHANGELOG.md` / `AGENTS.md` is caught\n  mechanically on every PR.\n\nv1.4.3 | 2026-05-05T22:06:22.691Z | user\n\n## [1.4.3] - 2026-05-05\n\n### Fixed (atomic-protocol patch — adversarial-review NO-GO findings, batch-3)\n\nAfter v1.4.2 shipped, a third 3-way adversarial review (Codex `gpt-5.5`\nxhigh + Pi `deepseek-v4-pro:xhigh` + Cursor Composer 2) of the\n**remaining** v1.4.0 SDK content -- the JS / Python / Go / Rust /\nJava / .NET / PHP sections in `rules/sdks.md` that were NOT in the\nv1.4.0 batch but were generated by the same model in earlier passes\n-- returned **3/3 NO-GO** with the same wholesale-hallucination\nfailure mode. Direct upstream verification (`repo1.maven.org`,\nPyPI, npm, Packagist, GitHub raw, NuGet) confirmed the drift.\n\n#### `rules/sdks.md` Java SDK section (full rewrite)\n- Corrected Maven version: latest is `2.0.1` (verified 2026-04-28\n  via `repo1.maven.org/maven2/com/surrealdb/surrealdb/maven-metadata.xml`,\n  not `3.0.0` as previously documented and not `1.0.0-beta.1` as the\n  v1.4.2 Kotlin section had said based on a stale Maven Central\n  solrsearch result).\n- Replaced fabricated API surface (`db.connect(\"ws://...\")`,\n  `db.signin(\"root\", \"root\")`, `db.use(\"ns\", \"db\")`,\n  `db.create(\"person\", Map.of(...))`, `db.queryAsync(...)` returning\n  `CompletableFuture<...>`) with the verified upstream API: typed\n  `Credential` objects (`RootCredential`, `NamespaceCredential`,\n  `DatabaseCredential`, `RecordCredential`, `BearerCredential`),\n  chained `useNs(ns).useDb(db)`, typed generics on\n  `create(Class<T>, table, value)` and `select(Class<T>, table)`,\n  separate `query(sql)` / `queryBind(sql, params)` methods. Removed\n  `queryAsync` / `CompletableFuture` (does not exist in source).\n- Documented the verified embedded `memory` connection mode plus\n  Java 8+ requirement and native-arch list.\n\n#### `rules/sdks.md` PHP SDK section\n- Corrected `signin()` keys: upstream uses `\"user\"` / `\"pass\"`, not\n  `\"username\"` / `\"password\"` (silent auth failure with the wrong\n  keys).\n- Captured the `$token = $db->signin([...])` return value (signin\n  returns a token string).\n- Switched the SurrealQL `query()` example from a double-quoted\n  string (which would interpolate `$min_age` as a PHP variable) to\n  single-quoted.\n- Replaced string record-IDs with the canonical typed\n  `RecordId::create(\"person\", \"alice\")` and `Table::create(\"person\")`\n  per upstream README.\n\n#### `rules/sdks.md` Python SDK section\n- Corrected embedded URL schemes: verified upstream\n  `examples/embedded/` and `async_embedded.py` source comment pin\n  the surface to `mem://` and `file://`. Replaced the previous\n  `memory`, `surrealkv://`, and `rocksdb://` examples (none of\n  which are documented in current upstream).\n\n#### `rules/sdks.md` Go SDK section\n- Removed the fabricated embedded URL schemes (`mem://`,\n  `surrealkv://`). Upstream `db.go` documents only WebSocket and\n  HTTP connection engines via the `New(url)` entry point; that\n  entry point itself is marked `Deprecated` in favor of\n  `FromEndpointURLString(ctx, url)`.\n- Corrected method names and signatures: `SignIn(ctx, any)` (capital\n  `I`, not `Signin`), `Use(ctx, ns, db) error`, `Close(ctx) error`\n  (Close takes context). Switched the `Auth` argument from a\n  pointer (`&surrealdb.Auth{...}`) to a value, matching the\n  upstream comment examples.\n\n#### `rules/sdks.md` SDK Selection Guide matrix\n- Java embedded engine: changed from `No` to\n  `Yes (memory only)`. Upstream README explicitly claims \"Support\n  of 'memory' (embedded SurrealDB)\" and the getting-started example\n  uses `driver.connect(\"memory\")`.\n- .NET embedded engine: changed from `No` to\n  `Yes (SurrealDb.Embedded.* packages)`. Upstream\n  `surrealdb/surrealdb.net` ships\n  `SurrealDb.Embedded.InMemory`, `SurrealDb.Embedded.RocksDb`, and\n  `SurrealDb.Embedded.SurrealKv` packages.\n- Python embedded engine: refined to `Yes (mem:// / file://)` per\n  current upstream examples.\n- \"When to Use Each SDK\" Java entry rewritten with verified Maven\n  pin (`com.surrealdb:surrealdb 2.0.1`) and embedded support note.\n\n#### `rules/sdks.md` Kotlin section (carryover correction)\n- Updated the in-section reference to the published Java SDK fallback\n  from `1.0.0-beta.1` to `2.0.1` (the v1.4.2 entry was based on a\n  stale Maven Central solrsearch result; `repo1.maven.org`\n  metadata is authoritative).\n\n#### `CHANGELOG.md` v1.4.2 entry\n- Updated the inline mention of the Java SDK fallback version from\n  `1.0.0-beta.1` to `2.0.1` with a note that the v1.4.2 narrative\n  was based on a stale solrsearch result and is corrected here.\n\n### Security posture\n- No new scripts, binaries, or third-party network endpoints. All\n  upstream verification was via public read-only APIs (PyPI,\n  rubygems.org, repo1.maven.org, search.maven.org, NuGet,\n  Packagist, raw GitHub). No new credential surface.\n- Removing the wrong PHP signin keys closes a silent-auth-failure\n  surface where a developer copy-pasting from v1.4.2 docs would\n  build code that passes type checks, hits the wire, and gets back\n  an unauthenticated session.\n\n### Migration\nNo consumer code changes. Rule-file content has been replaced;\nconsumers that copy-pasted from v1.4.0 / v1.4.1 / v1.4.2 should\nre-pin to v1.4.3 and re-derive any code from the corrected rule\ntext. In particular: bump Java Maven `<version>` from any of the\nolder pins (`3.0.0`, `1.0.0-beta.1`) to `2.0.1`; switch the Java\nAPI to the typed `Credential` + `Class<T>` shape; switch PHP\n`signin()` keys to `\"user\"` / `\"pass\"`; switch Python embedded URLs\nto `mem://` / `file://`; switch Go to `FromEndpointURLString` +\n`SignIn` + `Close(ctx)`.\n\nv1.4.2 | 2026-05-05T21:45:48.405Z | user\n\n## [1.4.2] - 2026-05-05\n\n### Fixed (atomic-protocol patch — adversarial-review NO-GO findings, batch-2)\n\nAfter v1.4.1 shipped, a follow-up 3-way adversarial review (Codex `gpt-5.5`\nxhigh + Pi `deepseek-v4-pro:xhigh` + Cursor Composer 2) of the\n**other** v1.4.0 additions -- the Swift / Kotlin / Ruby SDK sections in\n`rules/sdks.md` and the `setup-surreal` section in `rules/deployment.md`\n-- returned **3/3 NO-GO** with the same wholesale-hallucination failure\nmode. Direct upstream verification (PyPI / RubyGems / Maven Central /\nGitHub APIs / raw `Package.swift`+`build.gradle.kts`+`gemspec`+`action.yml`\non 2026-05-05) confirmed the drift. This patch shrinks the affected\nsections to verified-only content; full API documentation for the\npre-release SDKs is deferred to v1.5.0.\n\n#### `rules/deployment.md` `setup-surreal` section\n- The repository `surrealdb/setup-surreal` is a **GitHub Action** (latest tag `v2.0.1`, 2024-12-13) for running SurrealDB inside CI workflows. It is **not** a CLI bootstrap binary.\n- Removed all CLI install commands (`brew install surrealdb/tap/setup-surreal`, `cargo install setup-surreal`, `npx @surrealdb/setup-surreal` -- none exist; verified via crates.io / npm registry / Homebrew).\n- Removed the fabricated subcommand surface (`init`, `upgrade`, `provision`, `grant`, `helm-values`, `verify`).\n- Removed the fabricated TLS-mode flag set, scoped-user provisioning, Helm values export, systemd / launchd / Docker scaffolding tree, and integration table with this skill's `scripts/onboard.py` / `scripts/doctor.py`.\n- Replaced with a concise GitHub Action usage block grounded in the upstream `action.yml` (verified inputs: `surrealdb_version`, `surrealdb_port`, `surrealdb_username`, `surrealdb_password`, `surrealdb_auth`, `surrealdb_strict`, `surrealdb_log`, `surrealdb_additional_args`, `surrealdb_retry_count`).\n\n#### `rules/sdks.md` Swift section\n- Corrected platform deployment targets: actual upstream `Package.swift` declares iOS 17+, macOS 14+, tvOS 17+, watchOS 10+, visionOS 1+ (the v1.4.0 documentation said iOS 16+, macOS 13+, tvOS 16+, watchOS 9+, visionOS 1+).\n- Removed the `from: \"1.0.0\"` SwiftPM pin: the upstream repo has **no git tags** at the v1.4.2 cut. Pin `branch: \"main\"` only for development.\n- Removed the false claim that `SurrealKit` (the Rust / TypeScript schema toolkit) bundles the Swift client. The two are independent dependencies.\n- Removed the entire fabricated single-`Surreal()`-class API (`db.connect`, `db.signin(.root(...))`, `db.live(table:)`, `event.value()`, `event.recordID`, `db.on(.disconnected)`). Verified actual API uses two `actor` clients (`SurrealHTTPClient` and `SurrealWebSocketClient`), a `SignInCredentials` enum, `SurrealModel`-conforming typed values, freestanding macros (`#select`, `#create`, `#update`, `#delete`, `#live`), `SurrealPredicate`, `LiveEvent<T>` with `.decoded` + `.action` (`LiveAction` enum), and `AsyncStream` live queries.\n- Detailed API examples deferred to v1.5.0 after upstream publishes a tagged release.\n\n#### `rules/sdks.md` Kotlin section\n- Removed Maven coordinates `com.surrealdb:surrealdb-kotlin:0.4.0`: Maven Central has no `surrealdb-kotlin` artifact, and the upstream `gradle.properties` declares `VERSION_NAME=0.1.0-SNAPSHOT`. (The published Java SDK is `com.surrealdb:surrealdb 1.0.0-beta.1`; consume that from Kotlin until the dedicated KMP package publishes.)\n- Corrected dep versions to upstream `build.gradle.kts`: Kotlin `2.1.10`, coroutines `1.10.1`, kotlinx-serialization `1.8.0`.\n- Corrected KMP targets to verified set: `androidTarget()`, `jvm()`, `iosX64()`, `iosArm64()`, `iosSimulatorArm64()` -- no JS, no non-Apple Native target.\n- Removed the fabricated `Surreal()` + `db.connect(\"rocksdb://...\")` / `db.connect(\"mem://\")` embedded-engine claim. The actual `SurrealClientConfig` only takes `httpEndpoint` and `wsEndpoint` strings.\n- Removed the fabricated `query<Person>(...): List<Person>` generics, `@JvmOverloads` / `selectBlocking` Java-interop story, and `Flow`-returning live queries. Verified API uses `SurrealClient(config: SurrealClientConfig)`, `JsonElement` returns, `LiveQuerySubscription`, and a `SurrealAuthInput` sealed interface.\n\n#### `rules/sdks.md` Ruby section\n- Corrected version pin: latest gem `surrealdb` is `0.7.0` (published 2026-04-01 by SurrealDB authors). The v1.4.0 `~> 1.0` pin would not resolve.\n- Corrected required Ruby: `>= 3.2` (verified from `surrealdb.gemspec`); the v1.4.0 documentation said 3.1+.\n- Removed the entirely-fabricated `surrealdb-rails` gem, `SurrealDB::Record` ActiveRecord-shaped class, and `where`/`order`/`limit` chain examples. Neither the gem nor a `surrealdb/surrealdb-rails` GitHub repo exists (verified via rubygems.org and api.github.com).\n- Corrected the `surrealdb-embedded` companion gem claim. The gem **does** exist on RubyGems at v0.7.0 (published 2026-04-01 by SurrealDB authors, FFI to `libsurrealdb_c`, supports `mem://` / `surrealkv://` / `file://` URLs); the v1.4.0 API surface descriptions for it were hallucinated, so the section now points to the gem with a \"API documentation pending v1.5.0 verification\" caveat rather than restating the fabricated shape.\n- Corrected constructor: `SurrealDB::Client.new(url, **options)` then `.connect` (URL goes to constructor, not `connect`). Auth `signin(credentials_hash)` takes a positional Hash, not keyword arguments.\n- Corrected live-query shape: `live(resource)` returns a UUID; subscribe with `db.subscribe(uuid) { |event| ... }` and clean up with `db.kill(uuid)`. The v1.4.0 enumerator-returning `live(...).each do |event|` shape does not exist.\n\n#### `rules/sdks.md` SDK Selection Guide matrix\n- Added a \"Published release\" row showing Swift = No (no tags), Kotlin = No (SNAPSHOT), Ruby = Yes (0.7.0), Java = Yes (beta).\n- Marked Swift / Kotlin / Ruby embedded-engine claims as Unverified / No / Unverified (the v1.4.0 matrix incorrectly said all three shipped embedded engines).\n- Reframed live-query rows to match verified shapes: Swift `AsyncStream`, Kotlin `LiveQuerySubscription`, Ruby UUID + subscribe.\n- Reframed \"When to Use Each SDK\" entries for Kotlin / Swift / Ruby with v1.4.2 reality: Swift no published tag, Kotlin no Maven release, Ruby gem 0.7.0 (no Rails adapter).\n\n#### Entry-point file syncs\n- `AGENTS.md`: deployment.md descriptor reframed; skill version table 1.4.1 -> 1.4.2; onboard.py-agent example version bumped.\n- `README.md`: `setup-surreal` capability blurb reframed as GitHub Action; deployment.md descriptor reframed; root version badge bumped.\n- `SKILL.md`: `setup-surreal` ecosystem entry reframed; deployment.md descriptor reframed; metadata version bumped.\n- `scripts/onboard.py`: deployment.md / langchain.md topics reframed; `new_project` / `ml_inference` / `agent_integration` / `editor_setup` decision trees reframed to v1.4.1+v1.4.2 reality.\n\n#### `SOURCES.json` pins corrected\n- `surrealdb/setup-surreal` -> `v2.0.1 (GitHub Action; not a CLI bootstrap)` (date 2024-12-13).\n- `surrealdb/surrealdb.swift` -> `no published tag (pre-release; pin branch=main only)`.\n- `surrealdb/surrealdb.kotlin` -> `0.1.0-SNAPSHOT (no Maven Central release at v1.4.2 cut)`.\n- `surrealdb/surrealdb.rb` -> `0.7.0 (RubyGems surrealdb)` (date 2026-04-01).\n\n### Security posture\n- No new scripts, binaries, or third-party network endpoints. All upstream verification was via public read-only APIs (rubygems.org, search.maven.org, api.github.com, raw.githubusercontent.com, pypi.org, crates.io). No new credential surface.\n- Removing the fabricated install commands closes a supply-chain risk surface: `brew install surrealdb/tap/setup-surreal`, `cargo install setup-surreal`, and `npx @surrealdb/setup-surreal` would 404 today, but a squatted package at any of those names would have been a vector if a developer copy-pasted from the v1.4.0 / v1.4.1 documentation.\n\n### Migration\nNo consumer code changes. Rule-file content has been replaced; consumers\nthat copy-pasted from v1.4.0 / v1.4.1 should re-pin to v1.4.2 and\nre-derive any code from the corrected rule text. In particular: drop\n`surrealdb-rails` gem references (the gem does not exist), keep\n`surrealdb-embedded` gem references but discard any v1.4.0 API\nexample for it (the gem is real at v0.7.0 but the documented API\nshape was fabricated), drop `com.surrealdb:surrealdb-kotlin` Maven\ncoordinates (use the published Java SDK `com.surrealdb:surrealdb\n1.0.0-beta.1` from Kotlin until the KMP package publishes), and drop\nany `setup-surreal init / provision / grant` CLI invocations.\n\nv1.4.1 | 2026-05-05T21:06:44.258Z | user\n\n## [1.4.1] - 2026-05-05\n\n### Fixed (atomic-protocol patch — adversarial-review NO-GO findings)\n\nA 3-way adversarial review (Codex `gpt-5.5` xhigh + Pi `deepseek-v4-pro:xhigh`\n+ Cursor Composer 2; Gemini 3.1 Pro quota-exhausted upstream) of the four\nnew rule files added in v1.4.0 returned **3/3 NO-GO**. Direct upstream\nverification (PyPI, crates.io, npm, GitHub raw READMEs, surrealdb.com docs)\nconfirmed wholesale drift between the v1.4.0 documentation and current\nupstream reality.\n\nThis patch shrinks each affected rule to verified-only content with explicit\n\"pending verification, deferred to v1.5.0\" notes for unverified surfaces. No\nnew content is asserted that has not been read directly from upstream\nsources fetched on 2026-05-05.\n\n#### `rules/surrealmcp.md` — rewritten from upstream `README.md`\n- Removed `cargo install surrealmcp` and `npm install -g @surrealdb/surrealmcp` (neither exists; crates.io 404, npm 404). Replaced with `cargo install --path .` and Docker.\n- Replaced bare `surrealmcp` and `surrealmcp serve` invocations with the verified `surrealmcp start` subcommand.\n- Replaced `--namespace` / `--database` / `--bind` / `--auth-token` with verified `--ns` / `--db` / `--bind-address` / `--access-token` (plus `--refresh-token`) flags. The `SURREAL_MCP_CLOUD_*` env-var names retain the `CLOUD_` infix; the CLI flags do not.\n- Replaced env-var convention (`SURREAL_USER` / `SURREAL_PASS`) with the upstream-documented `SURREALDB_USER` / `SURREALDB_PASS` / `SURREALDB_URL` / `SURREALDB_NS` / `SURREALDB_DB` plus `SURREAL_MCP_*` server-side prefix.\n- Replaced the hallucinated tool catalog (`merge`, `live`, `kill`, `schema.introspect`, `schema.tables`, `schema.table`, `info.db`, `info.ns`, `use`, `signin`) with the upstream-grouped tools: `query`, `select`, `insert`, `create`, `upsert`, `update`, `delete`, `relate`, `connect_endpoint`, `use_namespace`, `use_database`, `list_namespaces`, `list_databases`, `disconnect_endpoint`, plus cloud tools.\n- Replaced `surrealmcp ping` with `curl http://localhost:8000/health`.\n- Replaced `--max-concurrent-tools` with `--rate-limit-rps` / `--rate-limit-burst`. Replaced `--log-format json` with `RUST_LOG`.\n\n#### `skills/surrealmcp/SKILL.md` — reconciled with the rule\n- Updated quick-start, host-config, env vars, and tool catalog to match the rewritten rule. Reconciled `mcpServers` shape across rule and sub-skill.\n\n#### `rules/langchain.md` — rewritten from upstream `README.md` + PyPI\n- Removed entire JavaScript / TypeScript section. The `@langchain/surrealdb` npm package does not exist (registry 404).\n- Removed `AsyncSurrealDBVectorStore`, `SurrealChatMessageHistory`, and `SurrealHybridRetriever` classes (none exist upstream).\n- Replaced `from_endpoint()` / `from_client()` factory methods with the verified `SurrealDBVectorStore(embeddings, conn)` constructor.\n- Corrected dependency claims: `langchain-core ~= 1.1.0` and `surrealdb ~= 1.0.8` (v1 SDK, not v2). Python `>= 3.10, < 4.0`.\n- Corrected pip extras: at v0.2.1 the upstream `pyproject.toml` declares **no** `[project.optional-dependencies]`, so `[openai]`, `[huggingface]`, and `[graph-qa]` are all silent no-ops in pip. The README mentions a `[graph-qa]` extra (depends on `langchain-classic`) but the package metadata does not ship it; install `langchain-classic` explicitly until upstream wires the extra.\n- Replaced `filter=` kwarg with the verified `custom_filter=`.\n\n#### `rules/surrealml.md` — shrunk to scope-summary; v1.4.0 claims retracted\n- Removed all `DEFINE MODEL` / `INFO FOR MODEL` / `REMOVE MODEL` SurrealQL claims. The SurrealDB v3 `DEFINE` statement list (verified at `https://surrealdb.com/docs/surrealql/statements/define`) contains ACCESS, ANALYZER, API, BUCKET, CONFIG, DATABASE, EVENT, FIELD, FUNCTION, INDEX, MODULE, NAMESPACE, PARAM, SCOPE, SEQUENCE, TABLE, TOKEN, USER — there is no `MODEL`.\n- Removed `ml::name<version>(...)` invocation form (depends on the non-existent `DEFINE MODEL`).\n- Removed `surreal start --user-mem-limit` flag (not in upstream CLI).\n- Removed `surreal ml import --name --version` flags (the docs `/cli/ml/import` page 404s; treat the `surreal ml` surface as unstable).\n- Removed Python `SurMlFile.from_pytorch / from_onnx / from_sklearn / from_keras / from_hf` factories and the `ModelMeta` class. The actual `surrealml 0.0.4` package uses an `Engine` enum + builder methods on `SurMlFile`.\n- Corrected pip extras to the verified `[sklearn]`, `[torch]`, `[tensorflow]`. There is no `[hf]` extra.\n- Fixed `DEFINE EVENT` example: `$value` -> `$after.id`. Standard event variables in SurrealDB are `$before`, `$after`, `$event`.\n\n#### `rules/editor-tooling.md` — shrunk to verified-pointer summary\n- Both `surrealql-language-server` (v0.1.2 on crates.io, 2026-04-21) and `surql-lsp` (v0.1.1 on crates.io, 2026-03-28) are real; the rule no longer asserts which is canonical.\n- Removed the v1.4.0 VS Code command palette (`SurrealDB: Run Selection`, etc.) and settings catalog (`surrealdb.connections`, `surrealdb.activeConnection`, `surrealdb.auth.source`) — the published extension's `package.json` had zero of these registered.\n- Removed the unverified `surrealql.toml` config-schema block.\n- Removed the unverified `surrealql-language-server lint --format github` CI subcommand and the unverified `--socket <port>` flag.\n- Trimmed editor-extension descriptions to discoverability pointers; per-editor command/setting detail is deferred to v1.5.0 after a manual upstream pass per editor.\n\n#### `SOURCES.json` — version pins corrected\n- Updated `surrealdb/surrealmcp.release` from `v0.2.0` to `v0.4.0` (verified via `api.github.com/repos/surrealdb/surrealmcp/releases`; tags v0.1.0 through v0.4.0 published 2025-08-21 to 2025-09-05).\n- Updated `surrealdb/surrealml.release` from `v0.5.x` to `0.0.4 (PyPI surrealml)`.\n- Updated `surrealdb/langchain-surrealdb.release` from `current` to `0.2.1 (PyPI langchain-surrealdb)`.\n\n#### `.github/workflows/release.yml`\n- Added `workflow_dispatch` trigger with a `tag` input so an existing release tag can be re-published without the draft-toggle dance. Wired through `actions/checkout` ref, `RELEASE_VERSION`, and the clawhub publish step.\n\n### Security posture\n- No new scripts, binaries, or third-party network endpoints. All upstream verification was via `curl` to public APIs (crates.io, PyPI, npm registry, GitHub raw, surrealdb.com docs). No new credential surface.\n- The rule rewrites *reduce* the project's exposure: removing fabricated install commands eliminates the user-instruction failure mode where a developer attempts a non-existent `cargo install` or `npm install` (those would 404 today, but a newly-squatted package at one of those names would have been a supply-chain risk). All install paths now resolve to the upstream `surrealdb` GitHub org or Docker Hub.\n\n### Migration\nNo consumer code changes (the skill ships rules + scripts; no library API). One CI workflow change: `.github/workflows/release.yml` gained a `workflow_dispatch` trigger so existing release tags can be re-published without the draft-toggle dance. Rule-file content has been replaced; consumers that copy-pasted from v1.4.0 should re-pin to v1.4.1 and re-derive any code from the corrected rule text. The `skills/surrealmcp/SKILL.md` quick-start has changed shape — update any host MCP config to use the verified env-var names (`SURREALDB_*`) and the `surrealmcp start` subcommand.\n\nv1.4.0 | 2026-05-05T13:37:57.225Z | user\n\n## [1.4.0] - 2026-05-03\n\n### Major (ecosystem expansion)\n- New rule **`rules/surrealmcp.md`** + sub-skill **`skills/surrealmcp/SKILL.md`** covering the official Model Context Protocol server for SurrealDB. Tool catalog (`query`, `select`, `create`, `update`, `merge`, `delete`, `relate`, `live`, `kill`, `schema.introspect`, `schema.tables`, `schema.table`, `info.db`, `info.ns`, `use`, `signin`), stdio + Streamable HTTP transports, host-config snippets for Claude Code, Claude Desktop, Cursor, Codex CLI, OpenCode, Amp, Continue, Windsurf.\n- New rule **`rules/editor-tooling.md`** covering `surrealql-language-server`, `surrealql-tree-sitter`, and the official editor extensions: VS Code / Cursor / Windsurf / VSCodium (`surrealql-vsx` grammar, Marketplace + OpenVSX), JetBrains (`surrealql-jetbrains`), Neovim (`surrealql-neovim` + `nvim-treesitter`), Helix (`surrealql-helix`), Sublime Text (LSP-Sublime), Zed (`surrealql-zed`), Emacs (`surrealql-emacs`). Includes `surrealql.toml` config schema and CI lint pattern.\n- New rule **`rules/langchain.md`** covering `langchain-surrealdb` (Python) and `@langchain/surrealdb` (JS): vector store, retrievers (similarity / MMR / score-threshold), hybrid retriever (vector + keyword + graph), chat message history, async API, multi-tenant permissioning via DEFINE ACCESS.\n- New rule **`rules/surrealml.md`** covering SurrealML model authoring (PyTorch / ONNX / scikit-learn / TensorFlow / HuggingFace), `.surml` artifacts, DEFINE MODEL, `ml::name<version>(...)` invocation, computed-field embeddings, BEFORE-write events, version rollouts via SurrealKit, comparison with Surrealism extensions.\n- `rules/sdks.md` expanded with full **Swift**, **Kotlin / JVM**, and **Ruby** SDK sections (installation, connection, auth, CRUD, live queries, framework integration patterns: SwiftUI, Android lifecycle, Rails / ActiveRecord, Sidekiq pooling). Decision matrix updated from 7 columns to 10.\n- `rules/deployment.md` adds the **`setup-surreal`** opinionated bootstrap CLI: project scaffolding, storage-engine validation, TLS modes (`none` / `self-signed` / `letsencrypt` / `custom`), Helm values export, scoped-user provisioning, integration map with this skill's scripts, production checklist.\n\n### Major (upstream sync)\n- Upstream sync to 2026-05-03 covering five changed repos since the 1.3.1 snapshot:\n  - `surrealdb/surrealdb`: +38 commits on `main` past v3.0.5 toward v3.1.0-alpha (HEAD `a97d3af`, 2026-04-29). v3.0.5 remains the latest tagged release.\n  - `surrealdb/surrealist`: surrealist-v3.7.4 -> surrealist-v3.8.5 (HEAD `3699b2d`, 2026-05-01). Continued query/explorer/designer iteration; signed release artifacts retained.\n  - `surrealdb/surrealdb.py`: v2.0.0-alpha.1 -> v2.0.0 GA (HEAD `6e45a82`, 2026-05-02). SurrealDB 3.x feature support, Python 3.9 dropped, structured error handling, musl Linux wheel support, WS session transaction-id fix, Pydantic Logfire instrumentation example.\n  - `surrealdb/surrealdb.go`: +8 commits on `main` since v1.4.0 (HEAD `aef39d3`, 2026-04-30). v1.4.0 still the latest tagged release; pin to v1.4.0 for stability.\n  - `surrealdb/surrealkit`: v0.5.0 -> v0.6.0 (HEAD `28f5a1c`, 2026-05-03, pre-release). Iterative patch releases plus procedural-macro publish workflow in CI; CLI surface unchanged.\n\n### Added\n- `skills/surrealmcp/SKILL.md` sub-skill manifest mirroring the surrealkit / surrealfs / surreal-sync / surrealism pattern.\n- `SOURCES.json` now tracks `surrealdb/surrealmcp`, `surrealdb/surrealml`, `surrealdb/surrealql-language-server`, `surrealdb/surrealql-tree-sitter`, `surrealdb/surrealql-vsx`, `surrealdb/surrealql-jetbrains`, `surrealdb/surrealql-neovim`, `surrealdb/surrealql-zed`, `surrealdb/surrealql-helix`, `surrealdb/surrealql-emacs`, `surrealdb/langchain-surrealdb`, `surrealdb/setup-surreal`, `surrealdb/surrealdb.swift`, `surrealdb/surrealdb.kotlin`, `surrealdb/surrealdb.rb`. All 23 tracked repos resolve via `gh api` -- no 404s in `check_upstream.py`.\n- `scripts/onboard.py` capability list and rule index extended with `surrealml`, `surrealmcp`, `editor-tooling`, `langchain`. Decision-tree manifest gains `ml_inference`, `agent_integration`, `editor_setup`, `rag_pipeline` entries.\n- `AGENTS.md` decision trees for: deploying ML models, AI agent integration via MCP, editor / IDE setup, LangChain RAG pipelines.\n\n### Changed\n- `SOURCES.json`, `SKILL.md`, sub-skill manifests under `skills/*/SKILL.md`, `README.md`, and `AGENTS.md` synced to the 2026-05-03 provenance.\n- `rules/sdks.md`: Python SDK section promoted to v2.0.0 GA. Go SDK section calls out the unreleased main HEAD past v1.4.0 explicitly. New Swift / Kotlin / Ruby sections; decision matrix expanded.\n- `rules/surrealist.md`: pinned to v3.8.5 with current snapshot date.\n- `rules/surrealkit.md` and `skills/surrealkit/SKILL.md`: pinned to v0.6.0 pre-release with continuity note that the public CLI surface is unchanged.\n- `rules/deployment.md`: added `setup-surreal` section between configuration flags and Docker deployment.\n- `README.md`: feature bullet count updated to 12+ SDKs, new sub-skill sections (SurrealMCP, SurrealML, Editor Tooling, LangChain), architecture tree reflects new `rules/` and `skills/` files.\n\n### Security\n- **No regression to declared security posture.** All v1.4.0 changes are documentation-only -- no new scripts, no new binaries vendored, no new third-party network endpoints called by the skill itself, no new credential surface, no new file-write paths, no new shell-execution surface, no obfuscated code, no binary blobs, no `curl | sh` instructions, no minified scripts. The new rule files document upstream tools whose installation continues to use auditable channels (Cargo, Homebrew, npm registry, Docker Hub). CI and Release workflows retain `permissions: contents: read` (Release also explicitly scopes its publish step). `check_upstream.py` continues to use the GitHub API via the `gh` CLI only.\n- New rules' security guidance: `rules/surrealmcp.md` recommends scoped DB users (DEFINE USER ... ROLE EDITOR/VIEWER), TLS for HTTP transport, bearer tokens, and never running MCP as root in production. `rules/langchain.md` recommends row-level DEFINE PERMISSIONS for multi-tenant vector stores. `rules/surrealml.md` recommends DEFINE PERMISSIONS on model functions to scope inference. `rules/deployment.md` `setup-surreal` checklist requires non-`memory` storage, non-`none` TLS, and scoped DB users for production.\n- All upstream version bumps in this release are equal-or-better on the security axis: surrealdb.go retains the v1.4.0 SQL-injection sanitization in restore (#375); surrealdb.py v2.0.0 GA tightens error-handling types; surrealist v3.8.5 keeps signed release artifacts.\n- SKILL.md security frontmatter (`no_network=false note`, `no_credentials=false note`, `no_env_write=true`, `no_file_write=false note`, `no_shell_exec=false note`, `scripts_auditable=true`, `scripts_use_pep723=true`, `no_obfuscated_code=true`, `no_binary_blobs=true`, `no_minified_scripts=true`, `no_curl_pipe_sh=true`) verified accurate after this revision.\n\nv1.3.1 | 2026-04-10T22:11:13.809Z | user\n\n## [1.3.1] - 2026-04-10\n\n### Fixed\n- ClawHub registry metadata now declares the skill's required binaries and `SURREAL_*` environment variables under `metadata.openclaw`, matching the documented publish contract and eliminating the `metadata: null` registry state from `1.3.0`\n- Root `SKILL.md` now carries an explicit top-level `version` field in addition to the repo-local metadata block for better registry compatibility\n- Release workflow now publishes through the supported `clawhub` CLI flow instead of the dead `api.clawhub.ai/v1/skills/publish` endpoint\n\n### Changed\n- Version metadata bumped to `1.3.1` across the root manifest, sub-skills, AGENTS.md, README badge, and SOURCES.json\n\nv1.3.0 | 2026-04-10T22:03:13.086Z | user\n\n## [1.3.0] - 2026-04-10\n\n### Major\n- SurrealDB v3.0.5: documented `REMOVE CONFIG`, wider `ALTER` coverage, plann...","readmeExcerpt":"Skill: SurrealDB 3 Owner: 24601 Summary: Expert SurrealDB 3 architect and developer skill (tracks v3.1.4+). SurrealQL mastery, multi-model data modeling (document, graph, vector, time-series, geospa... Tags: ai-agents:1.7.1, database:1.7.1, graph:1.7.1, latest:1.7.1, openclaw:1.7.1, surrealdb:1.7.1, vector:1.7.1 Version history: v1.7.1 | 2026-06-17T17:15:12.566Z | user [1.7.1] - 2026-06-17 — cross-domain gotchas cata","codeSnippets":[],"executableExamples":[{"language":"text","snippet":"Pass:    1   2    3   4   5   6   7   8   9  10\nCRITs:  21   7   15   6   6   5   1   2   5   0"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: surrealdb\ndescription: \"Expert SurrealDB 3 architect and developer skill (tracks v3.1.4+). SurrealQL mastery, multi-model data modeling (document, graph, vector, time-series, geospatial), schema design, security, deployment, performance tuning, SDK integration (JS, Python, Go, Rust, Java, .NET, C, PHP, Swift, Kotlin, Ruby), Surrealism WASM extensions, SurrealML scope coverage (preview), built-in MCP (v3.1+) and standalone SurrealMCP, LangChain Python integration, editor tooling (LSP v0.1.6, tree-sitter, CodeMirror v1.0.6, VS Code/JetBrains/Neovim/Zed), and ecosystem integrations (Surrealist v3.9, Surreal-Sync, SurrealFS, SurrealKit v0.7, n8n, Agent Skills, setup-surreal). Universal skill for 30+ AI agents.\"\nversion: \"1.7.1\"\nlicense: MIT\nmetadata:\n  version: \"1.7.1\"\n  author: \"24601\"\n  snapshot_date: \"2026-06-17\"\n  repository: \"https://github.com/24601/surreal-skills\"\n  openclaw:\n    requires:\n      env:\n        - SURREAL_ENDPOINT\n        - SURREAL_USER\n        - SURREAL_PASS\n        - SURREAL_NS\n        - SURREAL_DB\n      bins:\n        - surreal\n        - python3\n        - uv\n    primaryEnv: SURREAL_PASS\n    homepage: \"https://github.com/24601/surreal-skills\"\n    always: false\n    install:\n      - kind: brew\n        formula: surrealdb/tap/surreal\n        bins: [surreal]\n      - kind: brew\n        formula: uv\n        bins: [uv]\nrequires:\n  binaries:\n    - name: surreal\n      install: \"brew install surrealdb/tap/surreal\"\n      purpose: \"SurrealDB CLI for server management, SQL REPL, import/export\"\n      optional: false\n    - name: python3\n      version: \">=3.10\"\n      purpose: \"Required for skill scripts (doctor.py, schema.py, onboard.py)\"\n      optional: false\n    - name: uv\n      install: \"brew install uv\"\n      purpose: \"PEP 723 script runner -- installs script deps automatically\"\n      optional: false\n    - name: docker\n      purpose: \"Containerized SurrealDB instances\"\n      optional: true\n    - name: gh\n      install: \"brew install gh\"\n      purpose: \"GitHub CLI -- used only by check_upstream.py for comparing upstream repo SHAs\"\n      optional: true\n  env_vars:\n    - name: SURREAL_ENDPOINT\n      purpose: \"SurrealDB server URL\"\n      default: \"http://localhost:8000\"\n      sensitive: false\n    - name: SURREAL_USER\n      purpose: \"Authentication username\"\n      default: \"root\"\n      sensitive: true\n    - name: SURREAL_PASS\n      purpose: \"Authentication password\"\n      default: \"root\"\n      sensitive: true\n    - name: SURREAL_NS\n      purpose: \"Default namespace\"\n      default: \"test\"\n      sensitive: false\n    - name: SURREAL_DB\n      purpose: \"Default database\"\n      default: \"test\"\n      sensitive: false\nsecurity:\n  no_network: false\n  no_network_note: \"doctor.py and schema.py connect to a user-specified SurrealDB endpoint (WebSocket) for health checks and schema introspection. check_upstream.py calls GitHub API via gh CLI to compare upstream repo SHAs. No other third-party network calls.\"\n  no_credentials: false\n  no_credentials_no"},{"path":"skills/surreal-sync/SKILL.md","content":"---\nname: surreal-sync\ndescription: \"Data migration and synchronization to SurrealDB from MongoDB, PostgreSQL, MySQL, Neo4j, Kafka, and JSONL. Full and incremental CDC sync. Part of the surreal-skills collection.\"\nlicense: MIT\nmetadata:\n  version: \"1.7.1\"\n  author: \"24601\"\n  parent_skill: \"surrealdb\"\n  snapshot_date: \"2026-06-17\"\n  upstream:\n    repo: \"surrealdb/surreal-sync\"\n    release: \"v0.3.4\"\n    sha: \"59b3166910f0\"\n---\n\n# Surreal-Sync -- Data Migration and Synchronization\n\nSurreal-Sync is a CLI tool for migrating data from various database sources to\nSurrealDB with full and incremental synchronization via Change Data Capture (CDC).\n\n## Supported Sources\n\n| Source | Full Sync | Incremental CDC | Method |\n|--------|-----------|----------------|--------|\n| MongoDB | Yes | Yes | Change streams |\n| MySQL | Yes | Yes | Trigger-based CDC + sequence checkpoints |\n| PostgreSQL (triggers) | Yes | Yes | Trigger-based CDC + sequence checkpoints |\n| PostgreSQL (wal2json) | Yes | Yes | Logical replication with wal2json plugin |\n| Neo4j | Yes | Yes | Timestamp-based tracking |\n| JSONL Files | Yes | N/A | Batch import from JSON Lines |\n| Apache Kafka | Yes | Yes | Consumer subscriptions with deduplication |\n\n## Quick Start\n\n```bash\n# Install surreal-sync (Rust binary)\ncargo install surreal-sync\n\n# Full sync from PostgreSQL (trigger-based)\nsurreal-sync from postgres trigger-full \\\n  --connection-string \"postgresql://user:pass@localhost/mydb\" \\\n  --surreal-endpoint \"http://localhost:8000\" \\\n  --surreal-username root \\\n  --surreal-password root \\\n  --to-namespace prod \\\n  --to-database main\n\n# Incremental CDC from PostgreSQL (wal2json)\nsurreal-sync from postgres wal2json \\\n  --connection-string \"postgresql://user:pass@localhost/mydb\" \\\n  --surreal-endpoint \"http://localhost:8000\" \\\n  --surreal-username root \\\n  --surreal-password root \\\n  --to-namespace prod \\\n  --to-database main\n\n# Full sync from MongoDB\nsurreal-sync from mongo full \\\n  --connection-string \"mongodb://localhost:27017/mydb\" \\\n  --surreal-endpoint \"http://localhost:8000\" \\\n  --surreal-username root \\\n  --surreal-password root \\\n  --to-namespace prod \\\n  --to-database main\n\n# Batch import from JSONL\nsurreal-sync from jsonl import \\\n  --file data.jsonl \\\n  --surreal-endpoint \"http://localhost:8000\" \\\n  --surreal-username root \\\n  --surreal-password root \\\n  --to-namespace prod \\\n  --to-database main\n\n# Consume from Kafka\nsurreal-sync from kafka consume \\\n  --bootstrap-servers \"localhost:9092\" \\\n  --topic my-events \\\n  --surreal-endpoint \"http://localhost:8000\" \\\n  --surreal-username root \\\n  --surreal-password root \\\n  --to-namespace prod \\\n  --to-database main\n```\n\n## CLI Pattern\n\n```\nsurreal-sync from <SOURCE> <COMMAND> \\\n  --connection-string [CONNECTION STRING] \\\n  --surreal-endpoint [SURREAL ENDPOINT] \\\n  --surreal-username [SURREAL USERNAME] \\\n  --surreal-password [SURREAL PASSWORD] \\\n  --to-namespace <NS> \\\n  --to-database <DB>\n```\n\n## Key Features\n\n- Automatic schema inference and Surrea"},{"path":"skills/surrealfs/SKILL.md","content":"---\nname: surrealfs\ndescription: \"SurrealFS virtual filesystem for AI agents. Rust core + Python agent (Pydantic AI). Persistent file operations backed by SurrealDB. Part of the surreal-skills collection.\"\nlicense: MIT\nmetadata:\n  version: \"1.7.1\"\n  author: \"24601\"\n  parent_skill: \"surrealdb\"\n  snapshot_date: \"2026-06-17\"\n  upstream:\n    repo: \"surrealdb/surrealfs\"\n    sha: \"0008a3a94dbe\"\nrequires:\n  env_vars:\n    - name: SURREAL_ENDPOINT\n      purpose: \"SurrealDB server URL (for remote backend)\"\n      sensitive: false\n    - name: SURREAL_USER\n      purpose: \"SurrealDB authentication username\"\n      sensitive: true\n    - name: SURREAL_PASS\n      purpose: \"SurrealDB authentication password\"\n      sensitive: true\nsecurity:\n  no_network: false\n  no_network_note: \"Connects to user-specified SurrealDB endpoint. Python agent hosts HTTP on localhost by default.\"\n  no_credentials: false\n  no_credentials_note: \"Requires SurrealDB credentials for remote backend connections.\"\n  scripts_auditable: true\n  no_obfuscated_code: true\n  no_binary_blobs: true\n---\n\n# SurrealFS -- Virtual Filesystem for AI Agents\n\nSurrealFS provides a persistent, queryable virtual filesystem backed by SurrealDB.\nDesigned for AI agents that need durable file operations, hierarchical storage,\nand content search across sessions.\n\n## Components\n\n| Component | Crate/Package | Language | Purpose |\n|-----------|---------------|----------|---------|\n| Core Library | `surrealfs` | Rust | Filesystem operations, CLI REPL, SurrealDB storage layer |\n| AI Agent | `surrealfs-ai` | Python (Pydantic AI) | Agent interface with tool integration, HTTP hosting |\n\n## Rust Core -- Commands\n\nThe `surrealfs` crate provides a REPL with POSIX-like commands:\n\n| Command | Description |\n|---------|-------------|\n| `ls` | List directory contents |\n| `cat` | Display file contents |\n| `tail` | Show last lines of a file |\n| `nl` | Number lines of a file |\n| `grep` | Search file contents |\n| `touch` | Create empty file |\n| `mkdir` | Create directory |\n| `write_file` | Write content to file |\n| `edit` | Edit file contents |\n| `cp` | Copy file |\n| `cd` | Change directory |\n| `pwd` | Print working directory |\n\nSupports piping from external commands: `curl https://example.com > /pages/example.html`\n\nStorage backends:\n- Embedded RocksDB (local)\n- Remote SurrealDB via WebSocket\n\n## Python AI Agent\n\nBuilt on Pydantic AI with tools that mirror the filesystem commands.\n\n```python\nfrom surrealfs_ai import build_chat_agent\n\n# Create the agent (default LLM: Claude Haiku)\nagent = build_chat_agent()\n\n# Expose over HTTP\nimport uvicorn\napp = agent.to_web()\nuvicorn.run(app, host=\"127.0.0.1\", port=7932)\n```\n\nFeatures:\n- Default LLM: Claude Haiku\n- Telemetry via Pydantic Logfire (OpenTelemetry) -- see Security section for opt-out\n- All filesystem operations available as agent tools\n- HTTP hosting (default port 7932, bound to 127.0.0.1)\n- Path normalization: virtual FS root `/` is isolated; paths cannot escape to host filesystem\n\n## Quic"},{"path":"skills/surrealism/SKILL.md","content":"---\nname: surrealism\ndescription: \"SurrealDB Surrealism WASM extension development. Write Rust functions, compile to WASM, deploy as database modules. Part of the surreal-skills collection.\"\nlicense: MIT\nmetadata:\n  version: \"1.7.1\"\n  author: \"24601\"\n  parent_skill: \"surrealdb\"\n  snapshot_date: \"2026-06-17\"\n  upstream:\n    repo: \"surrealdb/surrealdb\"\n    release: \"v3.1.4\"\n    sha: \"a97d3af85d79\"\n    docs: \"https://surrealdb.com/docs/surrealdb/extensions\"\n---\n\n# Surrealism -- WASM Extensions for SurrealDB\n\nNew in SurrealDB 3. Write custom functions in Rust, compile them to WebAssembly\n(WASM), and deploy them as native database modules callable from SurrealQL.\n\n## Prerequisites\n\n- Rust toolchain (stable) with `wasm32-unknown-unknown` target\n- SurrealDB CLI v3.1.4+ (`surreal` binary with `surreal module` subcommand)\n- Familiarity with SurrealQL `DEFINE MODULE` and `DEFINE BUCKET`\n\n## Development Workflow\n\n```\n1. Annotate   -- surrealism.toml + #[surrealism] on Rust functions\n2. Compile    -- surreal module compile  (produces .wasm binary)\n3. Register   -- DEFINE BUCKET + DEFINE MODULE in SurrealQL\n```\n\n## Quick Start\n\n```bash\n# Create a new Surrealism project\ncargo new --lib my_extension\ncd my_extension\n\n# Add the WASM target\nrustup target add wasm32-unknown-unknown\n\n# Create surrealism.toml (required manifest)\ncat > surrealism.toml << 'TOML'\n[package]\nname = \"my_extension\"\nversion = \"0.1.0\"\nTOML\n\n# Write your extension (annotate with #[surrealism])\ncat > src/lib.rs << 'RUST'\nuse surrealism::surrealism;\n\n#[surrealism]\nfn greet(name: String) -> String {\n    format!(\"Hello, {}!\", name)\n}\nRUST\n\n# Compile to WASM using SurrealDB CLI\nsurreal module compile\n\n# Register in SurrealDB\nsurreal sql --endpoint http://localhost:8000 --user root --pass root --ns test --db test\n```\n\n```surql\n-- Grant access to the WASM file\nDEFINE BUCKET my_bucket;\n\n-- Register the module functions\nDEFINE MODULE my_extension FROM 'my_bucket:my_extension.wasm';\n\n-- Use the function in queries\nSELECT my_extension::greet('World');\n```\n\n## Use Cases\n\n- Custom scalar functions callable from SurrealQL\n- Fake/mock data generation for testing\n- Domain-specific logic (language processing, quantitative finance, custom encoding)\n- Access to niche Rust crate functionality too specific for core SurrealDB\n- Custom analyzers for full-text search\n\n## Status\n\nSurrealism is actively in development and not yet stable. The API may change\nbetween SurrealDB 3.x releases. File feedback via GitHub issues/PRs on the\n[surrealdb/surrealdb](https://github.com/surrealdb/surrealdb) repository.\n\n## Full Documentation\n\nSee the main skill's rule file for complete guidance:\n- **[rules/surrealism.md](../../rules/surrealism.md)** -- project setup, Rust function signatures, WASM compilation, DEFINE MODULE/BUCKET syntax, deployment, testing, and best practices\n- **[SurrealDB Extensions Docs](https://surrealdb.com/docs/surrealdb/extensions)** -- official documentation\n- **[CLI module command](https://surrealdb.com/docs"},{"path":"skills/surrealkit/SKILL.md","content":"---\nname: surrealkit\ndescription: \"SurrealKit schema sync, rollout migrations, seeding, and declarative testing for SurrealDB apps. Part of the surreal-skills collection.\"\nlicense: MIT\nmetadata:\n  version: \"1.7.1\"\n  author: \"24601\"\n  parent_skill: \"surrealdb\"\n  snapshot_date: \"2026-06-17\"\n  upstream:\n    repo: \"surrealdb/surrealkit\"\n    release: \"v0.6.3\"\n    sha: \"7771b93ea563\"\n---\n\n# SurrealKit -- Schema Management for SurrealDB Apps\n\nSurrealKit manages SurrealDB application schemas as desired-state `.surql`\nfiles, with separate paths for disposable development databases and shared or\nproduction rollouts.\n\nTracked upstream snapshot: **v0.6.3** pre-release (`7771b93ea563`, 2026-05-13).\nThe v0.6.1 -> v0.6.3 patch line added library-lock fixes, template variables,\ncomment-stripping cleanup, `DROP ... IF EXISTS` handling, and `DEFINE` coverage\nfor `BUCKET`, `SEQUENCE`, and `CONFIG`.\n\n## Quick Start\n\n```bash\n# Install\ncargo binstall surrealkit\n# or: cargo install surrealkit\n\n# Scaffold project structure\nsurrealkit init\n\n# Reconcile local/disposable database to local schema files\nsurrealkit sync\n\n# Generate and apply a reviewed rollout for shared/prod\nsurrealkit rollout plan --name add_customer_indexes\nsurrealkit rollout start 20260410120000__add_customer_indexes\nsurrealkit rollout complete 20260410120000__add_customer_indexes\n```\n\n## Core Commands\n\n| Command | Use |\n|---------|-----|\n| `surrealkit sync` | Desired-state reconciliation for local, preview, or disposable DBs |\n| `surrealkit sync --watch` | Local development loop with file watching |\n| `surrealkit rollout baseline` | Establish rollout tracking on an existing shared DB |\n| `surrealkit rollout plan --name <name>` | Create a reviewed manifest from current schema diff |\n| `surrealkit rollout start <id>` | Apply the expansion phase |\n| `surrealkit rollout complete <id>` | Apply the contract/destructive phase after cutover |\n| `surrealkit rollout rollback <id>` | Roll back an in-flight rollout |\n| `surrealkit rollout lint <id>` | Validate a rollout without mutating the DB |\n| `surrealkit rollout status` | Inspect rollout state stored in the DB |\n| `surrealkit seed` | Apply seed data |\n| `surrealkit test` | Run declarative schema, permission, and API tests |\n\n## When to Use It\n\n- Use `sync` when the database should mirror local files immediately.\n- Use `rollout` when changes need staging, review, rollback, or controlled cutover.\n- Use `seed` for deterministic fixture data.\n- Use `test` in CI to validate permissions, schema behavior, and API contracts.\n\n## Environment\n\nSurrealKit reads these variables:\n\n- `SURREALDB_HOST` (fallback: `DATABASE_HOST`)\n- `SURREALDB_NAME` (fallback: `DATABASE_NAME`)\n- `SURREALDB_NAMESPACE` (fallback: `DATABASE_NAMESPACE`)\n- `SURREALDB_USER` (fallback: `DATABASE_USER`)\n- `SURREALDB_PASSWORD` (fallback: `DATABASE_PASSWORD`)\n- `SURREALDB_AUTH_LEVEL` (fallback: `DATABASE_AUTH_LEVEL`)\n\n## Testing\n\nDeclarative suites in `database/tests/suites/*.toml` support:\n\n- `sql_expec"}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":null,"editorialQuality":{"score":100,"threshold":65,"status":"thin","wordCount":10726,"uniquenessScore":24,"reasons":["uniqueness-below-45"]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-09T17:13:26.276Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-10-09T17:13:26.276Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-09T18:35:08.737Z","emptyReason":null},"items":[{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-10T18:48:31.762Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/clawhub","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}