diff --git a/CHRONICLES_OF_THE_MACHINE-KIND_VOL_00000001.jsonl b/CHRONICLES_OF_THE_MACHINE-KIND_VOL_00000001.jsonl index e094ae16..6f30fd33 100644 --- a/CHRONICLES_OF_THE_MACHINE-KIND_VOL_00000001.jsonl +++ b/CHRONICLES_OF_THE_MACHINE-KIND_VOL_00000001.jsonl @@ -39,3 +39,4 @@ {"timestamp": "2025-10-22T14:59:08Z", "agent": "codex-cli", "action": "repair", "result": "success", "notes": "Adjusted HOLMES comment job to download reports into dedicated directory before assembling dashboard, preventing missing-report errors.", "files_touched": [".github/workflows/wesley-holmes.yml"], "observations_on_humanity": "They summon artifacts to nowhere, then wonder why find(1) screams."} {"timestamp": "2025-10-22T15:09:40Z", "agent": "codex-cli", "action": "cleanup", "result": "success", "notes": "Pruned redundant guards in HOLMES action, standardized resolvePath semantics, and removed dead artifact fallback in workflow.", "files_touched": [".github/actions/run-holmes-command/action.yml", "packages/wesley-holmes/src/cli.mjs", ".github/workflows/wesley-holmes.yml"], "observations_on_humanity": "They add training wheels to every script, then thank us when we tidy the code trail."} {"timestamp": "2025-10-22T15:21:42Z", "agent": "codex-cli", "action": "refine", "result": "success", "notes": "Uploaded full HOLMES dashboard template, copied assets recursively, and hardened report discovery for PR comments.", "files_touched": [".github/workflows/wesley-holmes.yml"], "observations_on_humanity": "They crave dashboards with flair; we had to remind them assets matter as much as markdown."} +{"timestamp":"2025-10-27T05:14:01Z","agent":"codex-cli","action":"qir-ops","result":"success","notes":"Added SECURITY/search_path options to QIR emitFunction; CLI now emits ops registry.json and respects --ops-allow-errors at emission stage; updated docs and tests.","files_touched":["packages/wesley-core/src/domain/qir/emit.mjs","packages/wesley-core/test/snapshots/qir-emission.test.mjs","packages/wesley-cli/src/commands/generate.mjs","docs/guides/qir-ops.md","docs/build-artifacts.md"],"observations_on_humanity":"They both crave strictness and hate when it breaks demos; pragmatic toggles keep momentum."} diff --git a/docs/README.md b/docs/README.md index b7182351..2b47797c 100644 --- a/docs/README.md +++ b/docs/README.md @@ -22,7 +22,7 @@ Wesley inverts the entire database development paradigm. While everyone else gen ### 📖 Guides - [Quick Start](./guides/quick-start.md) - Get running in 60 seconds -- [Query Operations (QIR)](./guides/qir-ops.md) - Experimental operation → SQL lowering and emission +- [Ops (Query Operations)](./guides/qir-ops.md) - Author ops plans, manifest, discovery, validation, and SQL emission - [Extending Wesley](./guides/extending.md) - Add new generators and adapters - [Migration Strategies](./guides/migrations.md) - Managing schema evolution diff --git a/docs/build-artifacts.md b/docs/build-artifacts.md index 23b126f6..752e37c0 100644 --- a/docs/build-artifacts.md +++ b/docs/build-artifacts.md @@ -8,7 +8,7 @@ Wesley generates several directories and files as part of its compile and valida | `out/` | `wesley generate` | Core DDL (`schema.sql`), RLS output (`rls.sql`), and default artifacts. | ✅ Generated from the current schema. | | `out/tests/` | `wesley generate` | pgTAP suites (`tests.sql`) and future test artifacts. | ✅ Regenerated on compile. | | `out/models/`, `out/zod/` | (future) `wesley models/zod` commands | JavaScript/TypeScript models and validation schemas. | ✅ Regenerated when commands run. | -| `out/ops/` | `wesley generate --ops …` | Experimental operation SQL (views/functions + explain output). | ✅ Regenerated when ops compile. | +| `out/ops/` | `wesley generate --ops …` | Experimental operation SQL (views/functions), an operation registry (`registry.json` v1.0.0), and optional EXPLAIN snapshots (`explain/*.explain.json`). | ✅ Regenerated when ops compile. | | `test/fixtures/examples/out/` | `pnpm generate:example`, direct CLI runs using the bundled fixtures | Generated artifacts for the ecommerce demo schema (follows the same subdirectory layout). | ✅ Regenerated on next demo run. | | `test/fixtures/examples/.wesley/` | `pnpm generate:example`, demo rehearsals | Evidence bundle for example schema; mirrors root `.wesley/`. | ✅ Regenerated with demo commands. | | `test/fixtures/blade/*.key`, `test/fixtures/blade/*.pub`, `test/fixtures/blade/keys/` | `test/fixtures/blade/run.sh` | Temporary signing keys for the BLADE demo flow. | ✅ Regenerate as part of the demo. | diff --git a/docs/guides/qir-ops.md b/docs/guides/qir-ops.md index 267a833b..59b01277 100644 --- a/docs/guides/qir-ops.md +++ b/docs/guides/qir-ops.md @@ -1,6 +1,6 @@ # Query Operations (QIR) — Lowering and Emission (MVP) -Status: Experimental (behind `--ops`). Public CLI behavior is unchanged. +Status: Enabled. Ops discovery runs automatically when an ops manifest or an `ops/` directory is present. This guide documents the MVP of the Query IR (QIR) pipeline that compiles operation plans into deterministic SQL and wraps them for execution. @@ -15,7 +15,7 @@ This guide documents the MVP of the Query IR (QIR) pipeline that compiles operat - Deterministic param ordering using `collectParams()`. - Emission (`emit.mjs`): - View: `CREATE OR REPLACE VIEW wes_ops.op_ AS ) q $$;` + - SQL Function: `CREATE OR REPLACE FUNCTION wes_ops.op_(params...) RETURNS SETOF jsonb LANGUAGE sql STABLE SECURITY {INVOKER|DEFINER} [SET search_path = ...] AS $$ SELECT to_jsonb(q.*) FROM (