docs: reconcile spec with actual implementation (drift sync)#248
Merged
Conversation
A doc↔implementation audit (6 scoped passes + codex) found the specs had
drifted from the code across the agent surface, admin surface, storage, DX,
and platform docs. This syncs the docs to what the code actually does; where
the spec described an unbuilt feature it is now clearly marked
**Not yet implemented** rather than presented as current.
protocol.md (agent + admin wire contract):
- expand/neighbours/list_instances/resolve request args + response fields
corrected to the real handlers; `scenario`/`full`/`as_of` documented;
removed never-emitted fields (`snapshot_version`, resolve `error`, session
`content`/`conflicts`/`issues`) as not-yet-implemented.
- documented `fetch_blob` (was undocumented); added `search.similarity` +
`queries`/`page_id`; `validate` returns `{ok, issues}`.
- admin tool names fixed (`admin_audit`/`admin_quota`/`admin_delete_chat_history`);
removed the non-existent `health` tool; tenant/attach_external arg+output
shapes fixed; added the ~11 previously-undocumented admin tools; documented
`tenant_delete` confirm + `tenant_export` `{format_version, sha256}` +
markdown-only tarball (matches #245).
- `tools/list` is not role-gated (admin tools listed, dispatch-gated); added
the plain-HTTP endpoints incl. `/openapi.json`; versioning corrected
(crate semver, no `escurel-ws/1`); `backend_ref` is `{kind, endpoint}`.
storage.md: removed the phantom `frontmatter_index` table (filtering is a
direct `json_extract` over `pages`); `open_writer` marked not-implemented;
`url()` → `Result<Url>`; `links` PK includes `dst_anchor`; FTS ignore regex;
`put_blob` signature; `compact_db` → `compact_lanes`.
dx.md: `Role::User` → `Role::Agent` (the example didn't compile); added the
`AuthMode::ExternalMulti` variant; TestIssuer is RSA-2048.
platform.md / README.md / deploy: the multi-tenant TenantManager model, the
sizing knobs, `log_format=text`, and the `/readyz` OTel check are marked not-
implemented; OTLP env is the convention name (`ESCUREL_OBSERVABILITY_OTLP_ENDPOINT`,
bare name a deprecated alias).
Dockerfile: base bumped rust:1.88 → 1.91 (matches rust-toolchain.toml); the
bundled-DuckDB build comments rewritten to describe download mode.
CLAUDE.md: CI is live (re-enabled at v1.0.0) — flipped the three "CI is paused"
claims; the local four-command gate remains the fast inner loop.
ADR-0002: appended a note that gRPC was retired (surface is MCP-only).
Docs-only; no code changed. Depends on #245 for the `tenant_delete`/
`tenant_export`/OTLP field names it documents.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Part 2 of the spec↔implementation drift remediation (Part 1 = #245 code fixes). A doc↔implementation audit (6 scoped subagent passes + a Codex pass) found the specs had drifted from the code across the agent surface, admin surface, storage, DX, and platform docs. This syncs the docs to what the code actually does. Where the spec described an unbuilt feature, it is now clearly marked Not yet implemented rather than presented as current. No code changed.
docs/spec/protocol.md(the wire contract — biggest change)expand/neighbours/list_instances/resolverequest args + response fields corrected to the real handlers; documented the sharedscenario/full/as_ofparams; removed never-emitted fields (snapshot_version,resolve.error, sessioncontent/conflicts/issues) as not-yet-implemented. Documentedfetch_blob(was undocumented); addedHit.similarity,search.queries/page_id;validate→{ok, issues}.admin_audit/admin_quota/admin_delete_chat_history); removed the non-existenthealthMCP tool; fixed tenant/attach_externalarg+output shapes; added the ~11 previously-undocumented admin tools (admin_index_query, lane introspection, group members,run_stored_query,create_remote_instance, …); documentedtenant_deleteconfirm+tenant_export{format_version, sha256}+ markdown-only tarball (matches fix: align runtime with documented contract (spec-drift code fixes) #245).tools/listis not role-gated (admin tools always listed, dispatch-gated); added the plain-HTTP endpoints incl./openapi.json; versioning corrected to the crate semver (noescurel-ws/1);backend_refis{kind, endpoint}.Other docs
frontmatter_indextable (filtering is a directjson_extractoverpages);open_writernot-implemented;url() -> Result<Url>;linksPK includesdst_anchor; FTS ignore regex;put_blobsignature;compact_db→compact_lanes.Role::User→Role::Agent(the canonical example didn't compile); addedAuthMode::ExternalMulti; TestIssuer is RSA-2048.TenantManagermodel, the sizing knobs,log_format=text, and the/readyzOTel check are marked not-implemented; OTLP env is the convention name (bareESCUREL_OTLP_ENDPOINTa deprecated alias).rust:1.88→1.91(matchesrust-toolchain.toml); bundled-DuckDB comments rewritten to describe download mode. (Image build verified by CI, not locally.)Verification
Docs-only — no code changed, so
fmt/clippy/test/buildare unaffected (sanitycargo build+fmt --checkpass locally; CI runs the full gate). Every claim was verified against the cited source file during the sync. Two larger feature gaps found in the audit are filed as #246 (update_pageoptimistic concurrency) and #247 (tenant_updatestatus/quotas).Depends on #245 for the
tenant_delete/tenant_export/ OTLP field names it documents — merge #245 first.🤖 Generated with Claude Code
Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.