Repository navigation
docs: Task guides for every feature area, run in CI (#272) - #274
Merged
Merged
Conversation
- check_skills checks the yaml keys of docs/guides/*.md and runs their tagged
groups like the skills': --validate-config with no warnings, then each check
against a live server; every guide is its own namespace
- Checks can send Basic credentials (user=name:pw) and assert a body
substring (contains "...")
- New check-mcp: a tools/call against /mcp/jsonrpc, expecting ok, error or a
status code
- Groups can export env vars (env="NAME=value") the text tells the reader to set
- Lines that are only an {{include ...}} directive are skipped by the yaml
key check
- Verified with a probe guide: an unknown key, an invalid config and a missing
body substring fail; REST, MCP 401 and authenticated MCP calls pass
- sql-templates.md: braces and HTML escaping, exactly which sites are bound as prepared-statement parameters, sections and defaults, params/conn/auth/env, pagination, the rendered SQL, _dryRun, writes with RETURNING; every example runs in CI - observability.md: from a request_id to the log line, health probes, metrics, tracing (otlp_file run in CI, Jaeger shown), log-http-requests, audit log, cache refresh history - Fixes found while writing: POST answers 201 (rest-endpoints, CONFIG_REFERENCE said 200); the audit line has timestamp/success/error:<code> and trace ids; the response size is http.response.body.size (flapi.result.bytes is never set); flapii config log-level set
- data-sources.md: how a connection works, files and globs, SQLite, several connections in one template, Postgres/MySQL, BigQuery (-runtime image), Iceberg/Delta, SAP via ERPL, extensions and offline hosts, remote configs under duckdb-hardening; the local examples run in CI - CONFIG_REFERENCE: init runs once at startup (not on first use), is not a template, and resolves relative paths against the working directory
- Guides tag blocks with HTML comments (<!-- flapi: endpoint ... --> before the fence, <!-- flapi: check ... --> after it); a flapi: line inside a guide's code block fails, because readers copied it (into a JSONL file it broke the example) - A guide group must bring its own config: readers never see the fixture - Checks can send a header (header=X-Config-Token:skill-check-token) - The committed guides and the reworked caching guide are converted; their missing configs follow in the revisions
- Make a tool, call it (legacy initialize and modern 2026-07-28), write tools agents use well (descriptions, typed inputSchema, structuredContent, isError, row caps, shaping), resources/templates/prompts, Tasks, protect it (mcp.auth, allowed-roles, per-tool rate limit, description scanner), _dryRun, connect Claude Code, trace agent calls; 31 checks run in CI
- RBAC denial is -32000 with HTTP 403 (not -32603) - _dryRun returns rendered_sql, bindings and parameters; no EXPLAIN or plan - mcp-tool.rate-limit is on when the block is present, max defaults to 100, and an over-budget call is an isError result with retry_after_seconds - The audit status values: success, denied, rate_limited, dry_run, error:<HTTP status>, error:<reason> - A write endpoint's cache block names the table it refreshes
- Where the sample data comes from, captions on every block, project names, run from the config directory, second-terminal curls - New: what one process means (one DuckDB, shared memory and secrets, connection: is no access boundary), when a source fails (no query timeout, stalled, restart to rotate credentials), Snowflake (and the Databricks/MotherDuck state), live-vs-cache decision tables, a production checklist for database sources - Autoload covers core extensions only; the BigQuery example binds a dated parameter; local-file and hardening steps trimmed
- One project with its own config, data download, captions, the config-service
token before flapii, the slug form, terms defined where first used
- New: restrict rows to the caller (auth.* set by REST and mcp.auth, never
bound; list_contains role test, not LIKE; fail closed), runnable with
three users; IN (...) binding and a multi-value filter; the pagination
count query and total-count: false; plan caching
- Fact fixes: auth.email is OIDC only, only ./ paths become absolute, the
typed-literal row is triple-brace only, the full {{ }} escape set
- #271 moved to a known-limitation box
- append gets a full orders project, history joins the shop project - Captions name each file, new project directories are said out loud, and the sample data is downloaded - The config-service refresh (and ?full=true) is shown with X-Config-Token and checked in CI
- contains 'text with "quotes"' matches JSON like "full":true
- One project with its own config (incl. ducklake:), a separate failed-cache project, data download, captions, log to a file, a jq view of traces.jsonl, samples re-captured from the guide's endpoints; metrics proven with the token - New: running it in production (what to alert on; no Prometheus endpoint; the metrics token is the admin token; per-replica counters), behind a proxy (X-Request-Id ignored, traceparent honoured on REST, X-Forwarded-For never read, restrict /health), a production tracing block, audit rotation and failure behaviour - Fact fixes: audit status values, audit sinks incl. null, relative audit path - check_skills: tracing.resource_attributes children are attribute names
- cli.md: project init, starting the config service, pointing flapii at a server (token and URL order), endpoints, templates, caches, schema, log level, metrics, output for scripts and CI, and the server's own subcommands; real output from 26.11.25, token and 401 checks in CI - check_skills: inline check lines inside a config block were ignored
- Each feature group in the Readme names its task guide(s), like self-packaging already did - The guide table and docs/README.md route to the new guides (SQL templates, data sources, CLI, observability) instead of reference sections
- The quickest thing that works, password hashes and the auditor, choosing Basic/Bearer/OIDC/Secrets Manager (with acceptance tables), who may call what (401 vs 403, inheritance, opting out), row filtering with auth.* (the list_contains role test; LIKE matches sysadmin), MCP tools under mcp.auth, CORS, per-user rate limits, audit, testing; 3 projects run in CI - OIDC carries a known-issue box: v26.11.25 rejects every token (#273) - sql-templates links the password-hash section
#272) - A newcomer review found the requests that show a feature (POST, time travel, MCP calls) only in the hidden <!-- flapi: check --> comments - Each check's path (or MCP tool name) must appear in a visible code block of the same guide; 42 findings across the guides, fixed in the revisions
- MCP_REFERENCE still said a running query cannot be interrupted; the task manager calls QueryExecutor::interrupt and the task ends cancelled (verified live with a long-running async tool) - A tool whose SQL fails ends completed with an isError result
…#272) - cli.md: files the steps use are defined, pack from the right directory and without the extensions, real metrics; .sql edits are live, YAML needs a reload; no Prometheus; the config service in production (persistence, 409/501 refusals, git as source of truth, block it at the proxy); a CI job; correct token order and init options marked not implemented - mcp-tools.md: start command and data download, every checked request shown, restart vs reload, client table (Claude Code, Python SDK, mcp-remote), threat model and safe defaults incl. the REST-vs-mcp.auth gap, large results and warehouse cost; initialize needs credentials under mcp.auth, tasks/cancel interrupts, dry-run binding only outside sections; OIDC points at the known issue
- Every checked request is shown; write-through POST/DELETE and a time-travel demo whose data changes between snapshots; a merge demo - Each project has its own directory steps; token exported before start; restart or reload + refresh for new caches; corrected one-shot output - Before production (retention, warm-up cost, topology, persistent data-path) and Run it in production (sizing, monitoring a stale-but-200 cache via data_age_seconds, failure semantics, one writer per file catalog) - Scan interval and slug (~1) facts fixed; tuning and rename details moved to links into CONFIG_REFERENCE and the cache skills
- Three projects named and created up front, restart after every change,
second terminal, --host 127.0.0.1, uvx for passlib/pyjwt, a complete Bearer
project, the config-service server started before flapii
- Runnable REST-vs-MCP leak demo and its fix (mcp.auth reusing the users via a
YAML anchor, allowed-roles)
- Production checklist and Limits you should know (Bearer aud/exp, OIDC
algorithms and single issuer, rate-limit keys, no X-Forwarded-For,
per-replica buckets, REST limits not on MCP)
- Fact fixes: AWS secret fetched at startup, Auth0 issuer slash and preset
{domain}, unknown-kid refetch, OIDC exp, github preset unusable, preset
claim overrides, audit fields, jwt-issuer, nbf/iat, CORS headers echo,
rate-limit key default; IAM policy and rotation for Secrets Manager
- The ERPL trampoline extracts libsapnwrfc and the ICU libraries into the extension directory; the host needs no SAP RFC SDK (ERPL README)
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
New guides: Writing SQL templates, Connecting data sources, Observability, Managing flAPI from the command line.
Reworked guides: Caching, Creating MCP tools, Authentication and authorization. Every Readme feature area now links its guide, and
docs/README.mdroutes to them.Each guide has:
The examples run in CI:
check_skillscoversdocs/guides. Each project passes--validate-configwith no warnings, and its REST and MCP requests (with Basic credentials or headers) are checked against a live server. Annotations are HTML comments that readers never copy. Every guide brings its own config, and every request CI makes is also shown to the reader.Agent crew review per guide:
uvx --from flapi-io==26.11.25;src/;The findings were fixed in revisions, each with a second check run.
Reference fixes found on the way:
statusvalues and fields;http.response.body.size;initruns at startup;-32000/403;_dryRunruns no EXPLAIN;tasks/cancelinterrupts a running query;Product bugs found while writing (filed separately)
Test plan
python3 scripts/check_skills.py --flapi <flapi-io 26.11.25> --flapii "node cli/dist/index.js": 0 failures.Closes #272
🤖 Generated with Claude Code
https://claude.ai/code/session_018txuxF9jXyiKakpUoXrKBi
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.