fix(merge): integrate gitea/main fork — renumber migrations, dedup, fix paired_tasks insert

Resolves the gitea/main <-> deployed-line merge:
- DB migrations: renumber gitea's colliding 019/020 to 021/022
  (reviewer_failure_count -> v21, turn_progress_text_compat -> v22) so all
  four migrations have distinct versions; update ordered list + bootstrap test.
- paired_tasks INSERT: add the missing VALUES placeholder so both new columns
  (reviewer_failure_count + arbiter_intervention_count) bind (26 cols/values).
- index.ts: drop duplicate startUsagePrimer import from the auto-merge.
- discord output: keep the deployed pipeline (attachment rejection notice) and
  call sanitizeForOutbound at the channel boundary so prose escaping done in
  prepareDiscordOutbound is not double-applied; keep gitea's reviewer
  silent-failure cap + router markdown-escape helpers.
- usage-primer/codex-warmup: keep the dawn-hold removal over gitea's primer.

Full test suite: only pre-existing env/bun-path failures remain; no merge regressions.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Codex
2026-06-18 05:48:50 +09:00
parent e14ac3dfca
commit 822ac34c0e
5 changed files with 11 additions and 137 deletions

View File

@@ -164,15 +164,15 @@ describe('initializeDatabaseSchema', () => {
expect(columns).toContain('progress_updated_at');
// The pre-existing version-15 row is left untouched; the compat migration
// (version 20) is what reconciles the schema.
// (version 22 after merge-renumbering) is what reconciles the schema.
const version15 = database
.prepare('SELECT name FROM schema_migrations WHERE version = 15')
.get() as { name: string };
expect(version15.name).toBe('reviewer_failure_count');
const version20 = database
.prepare('SELECT name FROM schema_migrations WHERE version = 20')
const version22 = database
.prepare('SELECT name FROM schema_migrations WHERE version = 22')
.get() as { name: string } | null;
expect(version20?.name).toBe('turn_progress_text_compat');
expect(version22?.name).toBe('turn_progress_text_compat');
} finally {
database.close();
}