feat(engine): Trust-system Arc 6 (wave 2) — [portability] config + per-model pragma#186
Merged
hugocorreia90 merged 1 commit intomainfrom Apr 20, 2026
Merged
Conversation
…r-model pragma
Replaces the wave-1 "flag-only" UX with a project-wide config block and
a per-model opt-out pragma. P001 now respects three layers, in order:
1. CLI `--target-dialect <dbx|sf|bq|duckdb>` flag (highest precedence;
useful for CI matrix runs and ad-hoc debugging).
2. `[portability] target_dialect = "<dialect>"` in `rocky.toml`. Lives
at top level because a Rocky project targets one warehouse — per-pipeline
override is speculative; skipped until demand signal.
3. Unset → no lint runs (matches the wave-1 default).
Project-wide allow-listing via `[portability] allow = ["QUALIFY", "NVL"]`
suppresses matching constructs across every model. Per-model exemption
via the SQL line-comment pragma `-- rocky-allow: NVL, QUALIFY`,
case-insensitive comma-separated identifiers.
The pragma parser lives in a new `rocky-sql/src/pragma.rs` module,
deliberately generic: the `ModelPragmas { allowed_constructs }` API
returns a HashSet so a future `[lints]` block driving P002 toggles
reuses it without a second parser.
The `Dialect` enum gains `Serialize/Deserialize/JsonSchema` (lowercase
variants) so `target_dialect = "bigquery"` round-trips cleanly through
`rocky.toml` without a string-side parser. The CLI's short-form
`TargetDialect` (`dbx/sf/bq`) stays as ergonomics in the clap layer
and converts to `Dialect` at the boundary.
run_compile gains a leading `Option<&Path>` argument for the config
path. When present, config-load failures fall through silently — the
wave-1 `compile_without_target_dialect_does_not_run_lint` semantics
hold for projects without a `rocky.toml`.
Schema regen: rocky-project.schema.json + dagster + vscode generated
types updated via `just codegen`. No fixture changes (P002 message
unchanged; new code paths only fire when config opts in, which the
playground default doesn't).
Wave-3 backlog (carry-forward from `project_rocky_active_priority`):
sharper source spans (per-construct byte offsets), lint on expanded
SQL when `--expand-macros` is set.
3 tasks
hugocorreia90
added a commit
that referenced
this pull request
Apr 20, 2026
Closes the first wave of every trust-system arc (Arcs 1-7) plus the two wave-2 follow-ups landed the same day. Nine feature PRs since v1.10.0. - Arc 1 (#170): rocky lineage --downstream, rocky branch, rocky run --branch, rocky replay - Arc 2 (#171): per-run cost attribution, [budget] block, budget_breach hook - Arc 3 (#172): three-state CircuitBreaker, adapter consolidation - Arc 4 (#173): rocky trace Gantt + feature-gated OTLP metrics export - Arc 5 (#174): schema-grounded rocky ai prompt + project-aware validator - Arc 6 wave 1 (#184): --target-dialect P001 portability lint (12 constructs) - Arc 7 wave 1 (#185): blast-radius P002 SELECT * lint (semantic-graph aware) - Arc 6 wave 2 (#186): [portability] config block + per-model rocky-allow pragma - Arc 7 wave 2 wave-1 (#187): --with-seed source-schema inference Plus #169 fix: install scripts pick latest engine version by semver. Version bump: 20 Cargo.toml files (all workspace members except rocky-bigquery, which tracks its own version). Wave 2/3 work for every arc remains in the deferred backlog — see the changelog Deferred section for the full carry-forward.
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
[portability]block inrocky.tomlwithtarget_dialect+allowlist, replacing the wave-1 flag-only UX with project-level configuration.-- rocky-allow: NVL, QUALIFY(case-insensitive, comma-separated) for targeted exemptions.rocky-sql/src/pragma.rsso a future[lints]block for P002 reuses it.Dialectenum nowSerialize/Deserialize/JsonSchema(lowercase variants) sotarget_dialect = "bigquery"parses naturally from TOML.Precedence
--target-dialectflag (highest — useful for CI matrix runs / debugging)[portability] target_dialectinrocky.tomlAllow-listing composes additively: project-wide
[portability] allow = [...]∪ per-model-- rocky-allow:pragma. Either suppresses the matching construct's P001 diagnostic before it hits the diagnostics vec.What's deferred to wave 3
--expand-macrosis set.[lints]block driving per-model P002 toggles (lives in Arc 7's roadmap because it pairs with type-inference work).Test plan
cargo test --workspace— full engine suite, all crates, 0 failures.pragma::testscovering single/multi/case/indent/uppercase/string-literal/edge cases.commands::compile::tests: config-only, flag-overrides-config, project allow-list suppresses, per-model pragma suppresses, pragma-is-per-model-not-project-wide, missing-config falls through. Plus the 4 wave-1 tests still pass with the new signature.pytestinintegrations/dagster/— 307/307 pass; fixtures unchanged because the playground default doesn't opt into portability config.cargo fmt --check+cargo clippy --workspace --all-targets -- -D warnings.just codegen— rocky-project.schema.json, dagster Pydantic, vscode TS all regenerated and committed (portabilityblock now in the schema).-- rocky-allow: NVLpragma. Compile bails with exactly 1 error on m1.