Add batch commands to PortTracker CLI and migrate batch tables into porting.db
Implements batch list/show/ready/next/start/complete commands with dependency validation, migrates 42 implementation batches (2377 features, 2087 tests) from porting_batches.db into the live tracking database, and documents the batch workflow in AGENTS.md.
This commit is contained in:
@@ -99,6 +99,31 @@ CREATE TABLE IF NOT EXISTS status_overrides (
|
||||
created_at DATETIME DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS implementation_batches (
|
||||
id INTEGER PRIMARY KEY,
|
||||
name TEXT NOT NULL,
|
||||
description TEXT,
|
||||
priority INTEGER NOT NULL,
|
||||
feature_count INTEGER DEFAULT 0,
|
||||
test_count INTEGER DEFAULT 0,
|
||||
status TEXT DEFAULT 'pending',
|
||||
depends_on TEXT,
|
||||
go_files TEXT,
|
||||
created_at DATETIME DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS batch_features (
|
||||
batch_id INTEGER NOT NULL REFERENCES implementation_batches(id),
|
||||
feature_id INTEGER NOT NULL REFERENCES features(id),
|
||||
PRIMARY KEY (batch_id, feature_id)
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS batch_tests (
|
||||
batch_id INTEGER NOT NULL REFERENCES implementation_batches(id),
|
||||
test_id INTEGER NOT NULL REFERENCES unit_tests(id),
|
||||
PRIMARY KEY (batch_id, test_id)
|
||||
);
|
||||
|
||||
-- Indexes
|
||||
CREATE INDEX IF NOT EXISTS idx_features_module ON features(module_id);
|
||||
CREATE INDEX IF NOT EXISTS idx_features_status ON features(status);
|
||||
@@ -109,6 +134,10 @@ CREATE INDEX IF NOT EXISTS idx_deps_source ON dependencies(source_type, source_i
|
||||
CREATE INDEX IF NOT EXISTS idx_deps_target ON dependencies(target_type, target_id);
|
||||
CREATE INDEX IF NOT EXISTS idx_library_status ON library_mappings(status);
|
||||
CREATE INDEX IF NOT EXISTS idx_modules_status ON modules(status);
|
||||
CREATE INDEX IF NOT EXISTS idx_batch_features_feature ON batch_features(feature_id);
|
||||
CREATE INDEX IF NOT EXISTS idx_batch_tests_test ON batch_tests(test_id);
|
||||
CREATE INDEX IF NOT EXISTS idx_batches_status ON implementation_batches(status);
|
||||
CREATE INDEX IF NOT EXISTS idx_batches_priority ON implementation_batches(priority);
|
||||
|
||||
-- Triggers to auto-update updated_at
|
||||
CREATE TRIGGER IF NOT EXISTS trg_modules_updated AFTER UPDATE ON modules
|
||||
|
||||
Reference in New Issue
Block a user