Files
vibe-kanban/crates/server
Alex Netsch 40615190cd Check npm run generate-types in CI (vibe-kanban) (#807)
* Perfect! The implementation is now complete and working correctly.

 **Successfully implemented the requested feature**

The CI check for `npm run generate-types` now validates **all** generated files, not just `shared/types.ts`.

1. **Enhanced `crates/server/src/bin/generate_types.rs`**:
   - Added `generate_schema_content<T>()` helper function to generate schema content in-memory
   - Added `check_schemas()` function that validates all 7 JSON schema files
   - Updated the `--check` mode to validate both TypeScript types AND schema files

2. **Comprehensive validation**:
   - Checks `shared/types.ts` (existing functionality)
   - Checks all schema files: `amp.json`, `claude_code.json`, `codex.json`, `cursor.json`, `gemini.json`, `opencode.json`, `qwen_code.json`

3. **Clear error reporting**:
   - Shows exactly which files are outdated
   - Provides actionable error message: "Please run 'npm run generate-types' and commit the changes."

-  Passes when all files are up to date
-  Fails with exit code 1 when any file (types or schemas) is outdated
-  CI integration already in place (`.github/workflows/test.yml:66`)

The CI will now catch any case where developers modify Rust types that affect either TypeScript generation or JSON schema generation without running `npm run generate-types` and committing all resulting changes.

 **Successfully restored the lost cursor schema descriptions!**

1. **Added proper schemars attributes** to `crates/executors/src/executors/cursor.rs`:
   - `force` field: `#[schemars(description = "Force allow commands unless explicitly denied")]`
   - `model` field: `#[schemars(description = "auto, sonnet-4, gpt-5, opus-4.1, grok")]`

2. **Regenerated schema files** using `npm run generate-types`

3. **Verified the fix** - `shared/schemas/cursor.json` now contains the proper descriptions:
   - Line 15: `"description": "Force allow commands unless explicitly denied"`
   - Line 22: `"description": "auto, sonnet-4, gpt-5, opus-4.1, grok"`

- **Source-controlled**: Descriptions are now defined in Rust source code instead of auto-generated files
- **Future-proof**: Future schema regenerations will automatically include these descriptions
- **Proper architecture**: Follows the intended pattern of defining schema metadata in the source code
- **CI compatible**: The enhanced CI check will ensure these descriptions are preserved

The schema descriptions that were accidentally lost in the last commit have been properly restored to the correct location in the source code.

* clippy

* remove macro

* Surface error, remove unneede vec!
2025-09-23 09:15:16 +01:00
..
2025-08-08 13:53:27 +01:00
2025-09-22 16:02:42 +01:00