-
Notifications
You must be signed in to change notification settings - Fork 0
Feat/formal phase 2 3 kani and db proptests #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| --- | ||
| description: Standards for the Rust Ratatui appliance console | ||
| globs: crates/kcore-console/**/*.rs,modules/kcore-branding.nix,packaging/systemd/kcore-console.service,docs/appliance-console.md,docs/user/appliance-console.md | ||
| alwaysApply: false | ||
| --- | ||
|
|
||
| # kcore Console TUI | ||
|
|
||
| The local appliance console is a Rust TUI in `crates/kcore-console` using | ||
| Ratatui with the crossterm backend. Keep it product-grade and read-only: | ||
|
|
||
| - Production mode must never expose a shell. `q`, `Esc`, and `Ctrl+C` must not | ||
| exit in default mode; only `--dev` may exit interactively. | ||
| - Inventory collection must not block rendering. Use a worker/thread/channel or | ||
| another non-blocking path for NIC, disk, API, and diagnostics refresh. | ||
| - Treat missing host data as normal. Display `—` instead of panicking or leaving | ||
| empty cells for unavailable sysfs, `ip`, `lsblk`, API, or systemd data. | ||
| - Keep UI code separate from collection code: `ui/` renders `AppState`; | ||
| `inventory/` reads Linux/API state; `app.rs` owns navigation and selection. | ||
| - Use Ratatui widgets (`Block`, `Paragraph`, `Table`, `Tabs`, `List`, `Gauge` | ||
| when useful) and keep the visual language dark, clean, and appliance-like. | ||
| - If changing `modules/kcore-branding.nix`, verify gettys and `autovt@` remain | ||
| disabled so `tty2`-`tty6` cannot show login prompts. | ||
| - Add or update focused tests for parsing, formatting, navigation, and | ||
| production-vs-dev exit policy whenever behavior changes. | ||
|
|
||
| Before shipping a console change, run at least: | ||
|
|
||
| ```bash | ||
| nix develop -c cargo fmt | ||
| nix develop -c cargo test -p kcore-console | ||
| nix develop -c cargo clippy -p kcore-console --all-targets -- --deny warnings | ||
| nix build .#kcore-console | ||
| ``` | ||
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add the workspace test gate to the shipping checklist.
This checklist only runs
cargo test -p kcore-console, so a console change can still satisfy the local steps while breaking another crate in the workspace.Proposed fix
```bash nix develop -c cargo fmt +nix develop -c cargo test --workspace nix develop -c cargo test -p kcore-console nix develop -c cargo clippy -p kcore-console --all-targets -- --deny warnings nix build .#kcore-consoleVerify each finding against the current code and only fix it if needed.
In @.cursor/rules/kcore-console-tui.mdc around lines 27 - 34, Add the workspace
test gate to the shipping checklist by inserting a step to run the full
workspace tests before the package-specific test; specifically, add "nix develop
-c cargo test --workspace" just before the existing "nix develop -c cargo test
-p kcore-console" line in the checklist so that the workspace-wide tests run
prior to the package-level test.