Skip to content

feat(engine/rocky-cli): rocky state clear-schema-cache + --cache-ttl (Arc 7 PR 4)#232

Merged
hugocorreia90 merged 4 commits intomainfrom
feat/arc7-wave2-wave2-pr4-state-controls
Apr 22, 2026
Merged

feat(engine/rocky-cli): rocky state clear-schema-cache + --cache-ttl (Arc 7 PR 4)#232
hugocorreia90 merged 4 commits intomainfrom
feat/arc7-wave2-wave2-pr4-state-controls

Conversation

@hugocorreia90
Copy link
Copy Markdown
Contributor

Summary

  • rocky state clear-schema-cache [--dry-run] — explicit flush for the SCHEMA_CACHE redb table. Missing state store treated as a no-op (CI-safe on ephemeral runners).
  • --cache-ttl <seconds> global CLI flag — overrides [cache.schemas] ttl_seconds for this invocation only.
  • rocky state becomes a subcommand group with Option<StateAction> defaulting to Show, so bare rocky state (watermarks view) is preserved.

Completes the Arc 7 wave 2 wave-2 sequence (PR 1a #223 infra, PR 1b #228 reads, PR 2 #230 write tap, PR 3 #231 discover warm-up, PR 4 user controls). Design: ~/Developer/rocky-plans/plans/rocky-arc7-wave2-wave2-design.md §4.3 + §6.

--cache-ttl precedence

--cache-ttl > [cache.schemas] ttl_seconds in rocky.toml > built-in default (86400 s / 24 h).

  • --cache-ttl 0 treats every entry as instantly stale (read path returns an empty map).
  • To disable the cache entirely, set [cache.schemas] enabled = false — the flag only tunes TTL.
  • Applies to CLI read paths (rocky compile, rocky run, …); rocky lsp and rocky serve keep the config-derived TTL because daemon lifetimes outlive a single-invocation flag.

clear-schema-cache semantics

  • No interactive prompt (cache is cheap to rebuild via the next rocky run write tap or rocky discover --with-schemas).
  • Missing state store → entries_deleted = 0, exits zero — safe to drop into a CI pipeline before a strict build.
  • --dry-run counts the entries that would be removed without touching redb.

Test plan

Notes on recovery

The original PR 4 agent hit a rate limit mid-flight before pushing. Recovery:

  1. Committed the agent's 23-file working tree (667884408172a0 post-rebase).
  2. Rebased onto current origin/main (which had landed PR 2 + PR 3). Rebase was conflict-free — PR 4's edits touched lines the PR 2/3 changes didn't.
  3. Re-ran just codegen to confirm the regenerated bindings are in sync with current output.rs.
  4. Added a small follow-up commit (eb586a1) stripping Arc 7 wave 2 wave-2 PR N references from the ClearSchemaCacheOutput doc comment — that comment flows into the public schemas/Pydantic/TS surface, and the monorepo CLAUDE.md forbids task references in code (they rot).
  5. Added CHANGELOG entries for both user-visible additions (12b1b3a).

Known follow-ups (not in this PR)

  • Internal code comments in state.rs, source_schemas.rs, main.rs, config.rs still carry some Arc 7 wave 2 wave-2 PR N markers. They don't flow into any public surface, so I left them for reviewer discretion rather than balloon this PR. Happy to strip in a follow-up if preferred.
  • The state_path CLI-vs-LSP divergence flagged in PR 1b / PR 2 is still open and still needs a migration story; untouched here.

…ttl override (PR 4)

Arc 7 wave 2 wave-2 PR 4 — user-facing control surface for the schema cache:

- `rocky state clear-schema-cache [--dry-run]` — explicit flush of the
  SCHEMA_CACHE redb table. Missing state store treated as no-op (CI-friendly:
  safe to run on an ephemeral runner before a build).
- `--cache-ttl <seconds>` global CLI flag — overrides `[cache.schemas]
  ttl_seconds` for this invocation. Precedence: `--cache-ttl` > `rocky.toml`
  > built-in default (86400s / 24h). Applies to CLI read paths; the
  `rocky lsp` / `rocky serve` daemons keep the config-derived TTL.
- `rocky state` becomes a subcommand group; bare `rocky state` preserved
  via `Option<StateAction>` defaulting to `Show`.

Completes the Arc 7 wave 2 wave-2 sequence (PR 1a #223 infra, PR 1b #228
reads, PR 2 #230 write tap, PR 3 #231 discover warm-up, PR 4 user controls).
…tput doc

The doc comment on the output struct flows into schemas/*.schema.json,
dagster Pydantic docstrings, and vscode TypeScript jsdoc. Keep the
behavioral description; drop the 'Arc 7 wave 2 wave-2 PR 4 / PR 2 / PR 1b'
references per monorepo CLAUDE.md (task refs in code rot over time).
…port block

Ruff I001 was tripping on the import block order in types.py; the
original PR 4 agent inserted ClearSchemaCacheOutput between SourceOutput
and StateOutput instead of between CiOutput and ColumnLineageOutput.
@hugocorreia90 hugocorreia90 merged commit e76e62e into main Apr 22, 2026
15 checks passed
@hugocorreia90 hugocorreia90 deleted the feat/arc7-wave2-wave2-pr4-state-controls branch April 22, 2026 23:00
hugocorreia90 added a commit that referenced this pull request Apr 22, 2026
* chore: release engine-v1.14.0 + dagster-v1.10.0 + vscode-v1.6.4

Bumps all three artifacts to cover the 16-PR cascade since engine-v1.13.0
/ dagster-v1.9.0 / vscode-v1.6.3. Details in each CHANGELOG.

Engine headlines (12 PRs):
- Arc 7 wave 2 wave-2 complete — cached DESCRIBE end-to-end
  (#223 infra, #228 reads, #230 write tap, #231 discover warm-up,
  #232 state controls + --cache-ttl override)
- Arc 2 wave 3 complete — bytes_scanned / bytes_written on
  MaterializationOutput (#219 BQ, #221 Databricks, #220 Snowflake
  deferred doc, #222 docstring cascade). Real $ on rocky cost for
  BQ + Databricks
- FR-005 Unity Catalog workspace-binding reconcile (#226)
- FR-002 Fivetran connector metadata via SourceOutput.metadata (#225)
- Housekeeping: compute_backoff dedup into rocky_core::retry (#217)

Dagster headlines (4 PRs):
- FR-001 RockyComponent Pipes execution mode + FR-006 strict doctor
  on RockyResource startup (#224)
- FR-003 RockyResource.state_health() (#227) + FR follow-up threading
  doctor(check=state_rw) for sub-second probes (#229)
- RockyResource.cost() wiring + fixture (#218)

VS Code: regenerated TS bindings for engine 1.14.0 type additions.
No extension feature changes.

* chore(integrations/dagster): regenerate test fixtures for engine 1.14.0

36 fixtures picked up the new engine version string in their top-level
"version" field. No schema changes — just the version bump.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant