Files
Shane MaynardandClaude Fable 5 eb82263ead
Test and deploy / test-and-deploy (push) Successful in 1m39s
Add finished-roast .alog uploads with Pi agent deep review and /roasts history
- POST /api/roasts stores the original .alog verbatim (multiple per plan),
  parses it server-side, and kicks off an async zero-tool Pi agent review
  (grade, highlights, concerns, next-batch suggestions, plan-vs-actual)
- /roasts page: table of historical actual roasts with review summaries;
  row detail renders the BT curve as SVG with the plan curve overlaid,
  shows the full review, and offers original-.alog backup download,
  re-evaluate, and delete
- Planner's Reference curve drawer gains a multi-file finished-roast
  uploader that attaches to the open (synced) plan
- Failed reviews record the error on the row and are retryable via
  POST /api/roasts/:id/evaluate (e.g. once a model is configured)

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-08-08 20:18:22 -04:00

20 lines
967 B
SQL

-- Additive only: existing tables, rows, and columns are untouched.
-- Finished-roast .alog uploads: the raw file is retained verbatim (original_content) so the
-- user can always download their own backup; parsed is the parseAlog() output the UI renders;
-- evaluation is the Pi agent's review, written asynchronously after upload.
CREATE TABLE actual_roasts (
id uuid PRIMARY KEY DEFAULT gen_random_uuid(),
user_id uuid NOT NULL REFERENCES users(id) ON DELETE CASCADE,
roast_plan_id uuid REFERENCES roast_plans(id) ON DELETE SET NULL,
filename text NOT NULL,
original_content text NOT NULL,
parsed jsonb NOT NULL,
evaluation jsonb,
evaluation_status text NOT NULL DEFAULT 'pending',
evaluation_error text,
created_at timestamptz NOT NULL DEFAULT now(),
updated_at timestamptz NOT NULL DEFAULT now()
);
CREATE INDEX actual_roasts_user ON actual_roasts(user_id, created_at DESC);
CREATE INDEX actual_roasts_plan ON actual_roasts(roast_plan_id);