<commit_before>class Deploy < ActiveRecord::Base
  belongs_to :user
  belongs_to :stack, touch: true
  belongs_to :since_commit, class_name: "Commit"
  belongs_to :until_commit, class_name: "Commit"

  has_many :chunks, -> { order 'id' }, class_name: 'OutputChunk'

  scope :success, -> { where(status: 'success') }

  state_machine :status, initial: :pending do
    event :run do
      transition pending: :running
    end

    event :failure do<commit_msg>Use a symbol for the Deploy#chunks order<commit_after>class Deploy < ActiveRecord::Base
  belongs_to :user
  belongs_to :stack, touch: true
  belongs_to :since_commit, class_name: "Commit"
  belongs_to :until_commit, class_name: "Commit"

  has_many :chunks, -> { order(:id) }, class_name: 'OutputChunk'

  scope :success, -> { where(status: 'success') }

  state_machine :status, initial: :pending do
    event :run do
      transition pending: :running
    end

    event :failure do
{'fraction_non_alphanumeric': 0.1102863202545069, 'fraction_numerical': 0.0, 'mean_word_length': 4.303370786516854, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3995956', 'n_tokens_mistral': 305, 'n_tokens_neox': 308, 'n_words': 88}