Skip to content
This repository was archived by the owner on Feb 1, 2026. It is now read-only.

v0.3.12: Comprehensive Documentation

Choose a tag to compare

@Spacehunterz Spacehunterz released this 05 Jan 07:04
· 767 commits to main since this release

v0.3.12: Security Fixes, Documentation, and Automatic Schema Migrations

✨ Major Features

Automatic Schema Migration System

  • Fixes issue #63: no such column: t1.topic error
  • Migrations run automatically on startup—no user intervention needed
  • Fully backward compatible: existing databases are updated automatically
  • All 8 comprehensive tests passed

🔒 Security Fixes

  • SQL Injection Prevention - Whitelist-based validation for dynamic queries in main.py
  • Path Traversal Protection - Restricted /open-in-editor endpoint in admin.py
  • 39 Security Tests - Comprehensive test coverage for attack patterns

🧪 Test Fixes

  • Python 3.14 Compatibility - Fixed auto_capture tests for read-only sqlite3 attributes

📦 What's New in Migrations

Migration Framework (src/query/migrations.py)

  • Automatic version tracking via schema_version table
  • Idempotent migrations (safe to run multiple times)
  • Graceful error handling (failures logged, system continues)

Migration Files (v7-v9)

  • v7: Ensure all core tables exist
  • v8: Add missing topic column to spike_reports (fixes #63)
  • v9: Create workflow orchestration tables

Integration

  • Migrations run automatically in QuerySystem._init_database()
  • After peewee table creation, before queries
  • Logged in debug mode with timestamps

📚 Documentation

  • docs/database/migrations.md - Complete migration guide
  • docs/database/MIGRATION_TEST_RESULTS.md - Full test verification
  • Instructions for adding new migrations

🎯 Issue Resolutions

  • #63: Automatic fix for no such column: t1.topic error
    • Users just run any query command, migrations apply automatically
    • No manual steps required
    • Already-applied migrations never re-run

Testing

✅ All 8 comprehensive tests passed:

  • spike_reports table structure verified
  • Query spike_reports works correctly
  • Schema version tracking functional
  • Migration records recorded
  • Idempotence verified
  • QuerySystem spike query successful
  • Full startup sequence tested
  • Issue #63 regression tests pass

Commit

  • 91e9014 - Implement automatic schema migrations system