-- B10保存已由S02确认的引文拒绝;不覆盖原回合,也不重置纠正次数。 CREATE TABLE evaluation.muse_comparison_rejection ( unit_id uuid NOT NULL REFERENCES evaluation.muse_evaluation_unit(unit_id), sequence smallint NOT NULL CHECK(sequence BETWEEN 1 AND 3), task_id uuid NOT NULL REFERENCES evaluation.muse_task(task_id), attempt_id uuid NOT NULL REFERENCES evaluation.muse_attempt(attempt_id), call_id text NOT NULL UNIQUE, user_input_hash text NOT NULL CHECK(user_input_hash ~ '^[0-9a-f]{64}$'), output jsonb NOT NULL, failure_code text NOT NULL CHECK(failure_code IN ('PAIRWISE_QUOTE_NOT_FOUND','PAIRWISE_NOT_EXECUTED')), previous_hash text CHECK(previous_hash ~ '^[0-9a-f]{64}$'), record_hash text NOT NULL CHECK(record_hash ~ '^[0-9a-f]{64}$'), created_at timestamptz NOT NULL DEFAULT clock_timestamp(), PRIMARY KEY(unit_id, sequence) ); CREATE TRIGGER comparison_rejection_guard BEFORE UPDATE OR DELETE ON evaluation.muse_comparison_rejection FOR EACH ROW EXECUTE FUNCTION public.muse_guard_literary_history();