Skip to content

Phase 1: implicit-any fix, autonomy schema tables, real migrate --check - #36

Open
cryptoxdog wants to merge 1 commit into
mainfrom
claude/new-session-br7qjb-phase-1
Open

Phase 1: implicit-any fix, autonomy schema tables, real migrate --check#36
cryptoxdog wants to merge 1 commit into
mainfrom
claude/new-session-br7qjb-phase-1

Conversation

@cryptoxdog

Copy link
Copy Markdown
Collaborator

Stacked PR — 1 of 3

Base of the stack (targets main). Phase 2 stacks on this branch, Phase 3 on Phase 2.

What this does

Phase 1 of the SEO-Bot instantiation remediation (R-02, R-04, R-05).

Item File Change
R-02 src/services/llm.ts Annotate the two implicit-any callback params in getDailySpend's DB-outage fallback with RoutingDecision, clearing the tsc --noEmit errors
R-04 src/core/database/schema-extensions.ts Add agentJobs, budgetViolations, compensationLog Drizzle tables (ADR-0008 autonomy runtime controls) + the integer/numeric/bigserial pg-core imports they need
R-05 src/core/database/migrate.ts Rewrite so --check performs a genuine read-only dry-run against drizzle-orm's __drizzle_migrations history table (folderMillis vs latest applied created_at), instead of the flag being silently ignored

Notes

  • No Drizzle migration SQL/snapshot was authored for the new tables: drizzle-kit@0.28.1 generate is a pre-existing tooling defect on this repo's NodeNext imports (reproduces on an unmodified baseline), and hand-authoring a snapshot would risk format drift. The schema source is added; migration generation remains a separate blocker.

Validation

tsc --noEmit 0 errors · eslint src/ 0 errors · vitest 134/134


Generated by Claude Code

…rate --check

R-02: annotate the two implicit-any callback parameters in getDailySpend's
DB-outage fallback with RoutingDecision, clearing the tsc --noEmit errors.

R-04: add agentJobs, budgetViolations, and compensationLog Drizzle table
definitions (ADR-0008 autonomy runtime controls) to schema-extensions.ts,
along with the integer/numeric/bigserial pg-core imports they require.

R-05: rewrite migrate.ts so --check performs a genuine read-only dry-run
against drizzle-orm's __drizzle_migrations history table (folderMillis vs
latest applied created_at), instead of the flag being silently ignored.

Validated: tsc --noEmit 0 errors, eslint src/ 0 errors, vitest 134/134.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SjcHn8jZErKo37ZJi6qybX
@sonarqubecloud

Copy link
Copy Markdown

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