Conversation
- Add skene/engine module: YAML models, merge-by-key, LLM engine deltas, and schema discovery (skene/ or skene-context schema.yaml|schema.md) with a clear warning when missing; shared LLM progress indicator. - build: merge engine.yaml, update feature registry, generate trigger SQL; destination menu fourth option is "I build it myself"; numbered fallback prompt uses "Choose 1-4". - push: deploy engine + trigger migration only; upstream packaging prefers *_skene_trigger.sql with legacy *_skene_telemetry.sql fallback. - status: validate engine.yaml and action trigger alignment in migrations. - analyze/plan: use engine context instead of growth-loop JSON artifacts. - Skene provider: normalize base URLs and concise HTTP errors; default skene chat API to production unless base_url is set via CLI, SKENE_BASE_URL, or project .skene.config. - Docs and tests updated; add PyYAML dependency. Made-with: Cursor
- Write build telemetry SQL to *_skene_triggers.sql; add find_trigger_migration in push.py and use it from upstream + skene push (keep skene_trigger/skene_telemetry fallbacks). - Engine status: Found in line shows latest migration file only, with (+N) for other matches. Made-with: Cursor
- Add feature_registry_json from configured output_dir; registry_path_for_project helper. - Rename package field telemetry_sql to trigger_sql for upstream deploy payload. - CLI warns when registry file missing; success message lists JSON keys. - Update docs, cursor plugin, and tests. Made-with: Cursor
Use build_push_manifest inside upstream push_to_upstream to keep manifest construction in one place, and remove unused trigger SQL parameters to reduce dead plumbing without changing loops_count behavior. Made-with: Cursor
|
Here is a review from Claude Code. I used review guidelines built according to the current code style and structure (I will add the guidelines to the repo soon.) Can you please check the following items @teppohudsson ? Code Review FeedbackNice work on the 1. Sync file I/O in async code path
2. Duplicate progress indicatorThe PR adds 3.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f8d7269bbd
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| parsed = parse_source_to_db_event(feature.source) | ||
| if not parsed: | ||
| continue | ||
| _, table, operation = parsed |
There was a problem hiding this comment.
Preserve source schema when building trigger telemetry
engine_features_to_loop_definitions parses features[].source as schema.table.operation but discards the schema here, so downstream SQL generation only receives the table name and emits triggers on public.<table>. For actionable features on non-public schemas (e.g. auth.users.insert), skene build will generate migrations for the wrong table, causing trigger creation to fail or telemetry to never fire.
Useful? React with 👍 / 👎.
…ne safety Use aiofiles for schema loading in the async engine generator so the event loop is not blocked. Deduplicate progress handling by routing analysis and growth-loop generation through skene.progress. Track SKENE_BASE_URL via Config instead of reading the env var in app.py. Add optional project_root checks for engine load/write, harden migration file reads in the engine validator, and extend tests (progress module, path traversal, symlink case). Add Pydantic field descriptions for serialized engine models and align test docstrings and class grouping with the rest of the suite.
Include schema from features[].source in loop telemetry and qualify CREATE TRIGGER targets with schema.table instead of public.<table>. Align trigger/function name slugs with existing public-only naming while prefixing non-public schemas. Update event_type and trigger_events to schema.table.operation and keep engine validator expectations in sync with generated migration names.
| task = asyncio.create_task(progress.show_progress_indicator(stop_event)) | ||
| await first_print.wait() | ||
| stop_event.set() | ||
| await task |
|
@bmichele this should be ready? I've gone through all the parts and fixed those review issues. |
|
I am on it! |
|
There is still plenty of AI slop, but I will close my eyes and merge it. I can't really get a good grasp of all the changes without a code walkthrough |
bmichele
left a comment
There was a problem hiding this comment.
This PR is big to get a grasp of all the changes without a code walkthrough. I did review with AI, some bugs are now fixed but I expect troubles, there is still plenty of AI slop there.
I will close my eyes and merge, we will fix issues as they come up
Summary
This PR moves the Skene workflow around
skene/engine.yaml: build merges LLM-generated engine deltas, updates the feature registry, emits Supabase trigger migrations, and push only ships pre-built artifacts upstream. Status validates the engine document and checks that action-backed features have matching trigger/function SQL in migrations.Highlights:
skene/orskene-context(schema.yaml/schema.md) with a clear warning when schema is missing; shared LLM progress feedback.skene/engine.yaml, upsertsskene-context/feature-registry.json, generates trigger SQL (and base schema migration as before). Destination menu fourth option is “I build it myself”; numbered fallback uses “Choose 1–4”.supabase/migrations/*_skene_triggers.sql, withfind_trigger_migrationand fallbacks for legacy*skene_trigger*/*skene_telemetry*names.actionfeatures withskene_growth_trg_*/skene_growth_fn_*in migration SQL. The Detail column shows the latest matching migration file and(+N)when the same trigger appears in additional files.base_urlis set via CLI,SKENE_BASE_URL, or project.skene.config(fixes push flows that depended on the Skene provider).Test plan
uv run ruff check .anduv run ruff format .uv run pytest(or CI equivalent)uvx skene buildon a fixture/small project; confirmskene/engine.yaml, feature registry update,*_skene_triggers.sql(and schema migration) undersupabase/migrations/.uvx skene statuswith and without matching migrations; confirm Detail showsFound in: <file>and(+N)when duplicates exist.base_urlhits production; override via env/config still works.Checklist