@codexa/cli 9.0.30 → 9.0.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -338,10 +338,10 @@ export function supersedeDecision(
338
338
  }
339
339
  }
340
340
 
341
- // Marcar antiga como superseded e linkar
341
+ // Marcar antiga como superseded
342
342
  db.run(
343
- "UPDATE decisions SET status = 'superseded', superseded_by = ? WHERE id = ?",
344
- [newDecisionId, oldDecisionId]
343
+ "UPDATE decisions SET status = 'superseded' WHERE id = ?",
344
+ [oldDecisionId]
345
345
  );
346
346
 
347
347
  // Registrar como knowledge
package/db/schema.test.ts CHANGED
@@ -494,7 +494,6 @@ describe("Migration System", () => {
494
494
  content TEXT NOT NULL,
495
495
  severity TEXT DEFAULT 'info',
496
496
  broadcast_to TEXT DEFAULT 'all',
497
- acknowledged_by TEXT,
498
497
  created_at TEXT DEFAULT CURRENT_TIMESTAMP
499
498
  )
500
499
  `);
@@ -569,7 +568,27 @@ describe("Migration System", () => {
569
568
  });
570
569
 
571
570
  it("should migrate data from JSON acknowledged_by", () => {
572
- createKnowledgeTables(db);
571
+ // Recreate old schema WITH acknowledged_by column to test migration from legacy format
572
+ createBaseTables(db);
573
+ db.exec(`
574
+ CREATE TABLE IF NOT EXISTS knowledge (
575
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
576
+ spec_id TEXT NOT NULL,
577
+ task_origin INTEGER NOT NULL,
578
+ category TEXT NOT NULL,
579
+ content TEXT NOT NULL,
580
+ severity TEXT DEFAULT 'info',
581
+ broadcast_to TEXT DEFAULT 'all',
582
+ acknowledged_by TEXT,
583
+ created_at TEXT DEFAULT CURRENT_TIMESTAMP
584
+ );
585
+ CREATE TABLE IF NOT EXISTS knowledge_acknowledgments (
586
+ knowledge_id INTEGER NOT NULL REFERENCES knowledge(id) ON DELETE CASCADE,
587
+ task_id INTEGER NOT NULL,
588
+ acknowledged_at TEXT DEFAULT CURRENT_TIMESTAMP,
589
+ PRIMARY KEY (knowledge_id, task_id)
590
+ );
591
+ `);
573
592
  db.run("INSERT INTO specs (id, name, phase) VALUES ('SPEC-001', 'test', 'implementing')");
574
593
 
575
594
  // Insert with old JSON format
@@ -663,9 +682,7 @@ describe("Migration System", () => {
663
682
  spec_id TEXT NOT NULL,
664
683
  planned_vs_done TEXT,
665
684
  deviations TEXT,
666
- pattern_violations TEXT,
667
685
  status TEXT DEFAULT 'pending',
668
- resolution TEXT,
669
686
  created_at TEXT DEFAULT CURRENT_TIMESTAMP
670
687
  );
671
688
  `);
package/db/schema.ts CHANGED
@@ -73,9 +73,7 @@ export function initSchema(): void {
73
73
  spec_id TEXT NOT NULL REFERENCES specs(id),
74
74
  planned_vs_done TEXT,
75
75
  deviations TEXT,
76
- pattern_violations TEXT,
77
76
  status TEXT DEFAULT 'pending',
78
- resolution TEXT,
79
77
  created_at TEXT DEFAULT CURRENT_TIMESTAMP
80
78
  );
81
79
 
@@ -119,7 +117,6 @@ export function initSchema(): void {
119
117
  content TEXT NOT NULL,
120
118
  severity TEXT DEFAULT 'info',
121
119
  broadcast_to TEXT DEFAULT 'all',
122
- acknowledged_by TEXT,
123
120
  created_at TEXT DEFAULT CURRENT_TIMESTAMP
124
121
  );
125
122
 
@@ -503,6 +500,16 @@ const MIGRATIONS: Migration[] = [
503
500
  db.exec(`ALTER TABLE project ADD COLUMN auto_simplify INTEGER DEFAULT 0`);
504
501
  },
505
502
  },
503
+ {
504
+ version: "10.3.0",
505
+ description: "Remover colunas mortas: review.pattern_violations, review.resolution, knowledge.acknowledged_by, decisions.superseded_by",
506
+ up: (db) => {
507
+ db.exec(`ALTER TABLE review DROP COLUMN pattern_violations`);
508
+ db.exec(`ALTER TABLE review DROP COLUMN resolution`);
509
+ db.exec(`ALTER TABLE knowledge DROP COLUMN acknowledged_by`);
510
+ db.exec(`ALTER TABLE decisions DROP COLUMN superseded_by`);
511
+ },
512
+ },
506
513
  ];
507
514
 
508
515
  export function runMigrations(): void {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codexa/cli",
3
- "version": "9.0.30",
3
+ "version": "9.0.31",
4
4
  "description": "Orchestrated workflow system for Claude Code - manages feature development through parallel subagents with structured phases, gates, and quality enforcement.",
5
5
  "type": "module",
6
6
  "bin": {