Skip to content

Add skill-validator sessions.db support#17

Merged
lewing merged 4 commits intomainfrom
feature/skill-sessions-db
Mar 2, 2026
Merged

Add skill-validator sessions.db support#17
lewing merged 4 commits intomainfrom
feature/skill-sessions-db

Conversation

@lewing
Copy link
Owner

@lewing lewing commented Mar 1, 2026

Summary

Add support for browsing skill-validator evaluation databases (dotnet/skills#149) alongside existing Copilot CLI session-store.db files.

The --db flag now auto-detects the database type via schema inspection (schema_info table for skill-validator vs schema_version for Copilot CLI) and adapts the browser accordingly.

Changes

  • Models.cs: Add SessionDbType enum and BrowserSession record to replace the 8-field value tuple, with optional eval-specific fields (SkillName, ScenarioName, Role, Model, Status, Prompt, MetricsJson, JudgeJson, PairwiseJson)
  • SessionBrowser.cs:
    • DetectDbType() — inspects schema tables to distinguish DB types
    • LoadSkillValidatorSessions() — reads skill-validator schema, joins sessions + run_results, resolves config_dir relative to DB directory
    • Eval-aware browser rendering: status icons (✅/⏱️/🔄/🧪), skill: scenario (role) [model] display format
    • Preview panel shows structured eval metadata (prompt, metrics, judge results, pairwise) for skill-validator sessions
    • Graceful handling when events.jsonl is missing (opens preview instead)
  • replay.cs: Updated help text for --db flag
  • tests/DbPathTests.cs: Updated help text assertion

Usage

# Browse a skill-validator results DB
replay --db results-2026-03-01/sessions.db

# Or pass it directly
replay results-2026-03-01/sessions.db

Testing

All 67 existing tests pass. Integration tests require a skill-validator sessions.db file (tracked as follow-up).

lewing and others added 4 commits February 28, 2026 22:14
- Guard SafeGetString against undefined JsonElement (ValueKind check)
- Add -v q to dotnet run in test helpers to suppress build output
  leaking into stdout, which corrupted JSON parsing in tests

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Detect and load skill-validator databases (from dotnet/skills#149) alongside
existing Copilot CLI session-store.db files. The --db flag now accepts either
database type, auto-detected via schema_info vs schema_version tables.

Changes:
- Add SessionDbType enum and BrowserSession record to replace tuple
- Add DetectDbType() for schema-based DB type detection
- Add LoadSkillValidatorSessions() with config_dir relative path resolution
- Show eval metadata (metrics, judge, pairwise) in preview panel
- Adapt browser icons and display for skill-validator sessions
- Handle sessions without events.jsonl gracefully

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Normalize Windows backslashes in config_dir for Linux/WSL compatibility.
Search nested session-state/<guid>/events.jsonl when direct path not found.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Try standalone 'copilot' first, fall back to 'gh copilot' for users
who installed via the GitHub CLI extension.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@lewing lewing merged commit fbc4099 into main Mar 2, 2026
2 checks passed
@lewing lewing deleted the feature/skill-sessions-db branch March 3, 2026 02:31
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