{
  "generated_at": "2026-07-31T11:58:55Z",
  "lobsters": {
    "path": "/home/rubys/lobsters",
    "sha": "9e849fd42b2253d89a1ab34bad04ae7ec3c53e78",
    "committed_at": "2026-07-30T12:40:21-05:00",
    "dirty": false
  },
  "roundhouse": {
    "sha": "727ebe6c00278f5238ced6da45ee57d9bbded57f",
    "dirty": false
  },
  "ruby": {
    "pinned": "4.0.0",
    "via_mise": true
  },
  "canary": {
    "rails_booted": false,
    "valid_source": "/home/rubys/roundhouse/build/lobsters-specs/emit/runtime/active_record/base.rb",
    "valid_from_emit": true,
    "ok": true
  },
  "emit": {
    "reused": false,
    "errors": 0,
    "warnings": 2364,
    "by_kind": {
      "gradual_untyped": 1314,
      "unresolved_type": 689,
      "unsupported": 168,
      "lower_residue": 80,
      "send_dispatch_failed": 63,
      "ivar_unresolved": 29,
      "missing_preload": 12,
      "incompatible_binop": 9
    },
    "files": 742,
    "path": "/home/rubys/roundhouse/build/lobsters-specs/emit"
  },
  "scope": {
    "suites": [
      "spec/models"
    ],
    "spec_files_run": 25,
    "spec_files_in_suite": 104,
    "excluded": "Request, feature, mailbox and routing specs are not run. Model specs exercise the compiler surface most densely; the request tier is next, and the capybara/mailbox tier is ledgered rather than attempted."
  },
  "examples": {
    "total": 354,
    "passed": 48,
    "failed": 306,
    "pending": 0,
    "errors_outside_examples": 1,
    "duration_s": 154.4
  },
  "errors_outside_examples": [
    "\nAn error occurred in an `after(:context)` hook.\nFailure/Error: @comments.each(&:destroy!)\n\nNoMethodError:\n  undefined method 'each' for nil\n# /home/rubys/lobsters/spec/models/search_spec.rb:60:in 'block (2 levels) in <top (required)>'\n"
  ],
  "harness_compensations": [
    {
      "what": "require \"net/http\" in the shim",
      "kind": "gap",
      "why": "app/models/sponge.rb references Net:: constants but the emit never requires net/http."
    },
    {
      "what": "Numeric duration builders in the shim",
      "kind": "by_design",
      "why": "Specs and factories are untranspiled plain Ruby; the emit path rewrites n.days at transpile time, so the shared runtime never reopens Numeric."
    }
  ],
  "causes": [
    {
      "slug": "scope-not-on-relation",
      "title": "a model scope does not chain off a Relation",
      "owner": "compiler",
      "failures": 133,
      "share": 0.4346,
      "note": "Scopes lower to class methods on the model, so Model.scope resolves but relation.scope does not — lobsters reaches them through associations (user.comments.active, where :active is scope :active on Comment). Matches the whole family rather than one scope name, since which scope surfaces first is an accident of call order. Sibling of the residual noted in the Relation[T] work: scalar class methods deliberately do not forward.",
      "stale_rule": false,
      "examples": [
        "Comment should get a short id",
        "Comment links to users during and after creation",
        "Comment subtracts karma if mod intervenes",
        "Comment hat can be one of the user's hats",
        "Comment speed limit is not enforced as a regular validation"
      ]
    },
    {
      "slug": "searchparser-parslet-dsl",
      "title": "SearchParser emits an empty class — parslet's class-body DSL is dropped",
      "owner": "compiler",
      "failures": 78,
      "share": 0.2549,
      "note": "parslet `rule(...)` calls in a class body are silently dropped though main.rb requires the gem, so SearchParser emits as a 2-line empty class. Needs verbatim class-body passthrough for non-AR classes on the ruby family, and a warning either way.",
      "stale_rule": false,
      "examples": [
        "SearchParser parses",
        "SearchParser stopwords parses a stopword",
        "SearchParser stopwords parses a stopword followed by whitespace",
        "SearchParser stopwords doesn't a stopword prefixing a term",
        "SearchParser stopwords doesn't parse a random short non-stopword"
      ]
    },
    {
      "slug": "symbol-into-integer",
      "title": "Symbol used where an Integer index is expected",
      "owner": "compiler",
      "failures": 24,
      "share": 0.0784,
      "note": "Undiagnosed. Shape suggests a Hash emitted as an Array (or a symbol-keyed read lowered to an index) — needs a reduction before it can be ranked honestly.",
      "stale_rule": false,
      "examples": [
        "Comment hat can't be worn if user doesn't have that hat",
        "InvitationRequest has a limit on the email field",
        "InvitationRequest has a limit on the memo field",
        "InvitationRequest has a limit on the name field",
        "InvitationRequest has a limit on the ip_address field"
      ]
    },
    {
      "slug": "expectation-mismatch",
      "title": "Ran, answered wrong",
      "owner": "compiler",
      "failures": 21,
      "share": 0.0686,
      "note": "No exception — the emitted code executed and produced a different answer than Rails does. Each needs individual diagnosis; they cluster by message no better than by coin flip, so this bucket is a count, not a cause. Keep it visible: it is where correctness bugs hide once the crash-shaped failures clear.",
      "stale_rule": false,
      "examples": [
        "Category validations does not allow a category with a name too long to be saved",
        "Category logs modification in moderation log logs on create",
        "Comment extracts links from markdown",
        "Comment.accessible_to_user when user is a moderator",
        "Comment.accessible_to_user when user does not a moderator"
      ]
    },
    {
      "slug": "nil-arith-coercion",
      "title": "nil reaching integer arithmetic",
      "owner": "compiler",
      "failures": 11,
      "share": 0.0359,
      "note": "A nullable read flows into arithmetic without narrowing. Sibling of the nullable-column arc that closed across all targets on 07-25 — this is the arithmetic seam that arc did not cover.",
      "stale_rule": false,
      "examples": [
        "Story scopes hidden exclude tags are empty ",
        "Story scopes hidden excluded tags are provided ",
        "Story scopes newest exclude tags are emtpy returns two stories",
        "Story scopes newest exclude tags are emtpy first story in a list is last created",
        "Story scopes newest exclude tags are emtpy last story in a list is first created"
      ]
    },
    {
      "slug": "kernel-bigdecimal",
      "title": "Kernel#BigDecimal not available on models",
      "owner": "compiler",
      "failures": 6,
      "share": 0.0196,
      "note": "Kernel-level conversion function called from model bodies; the runtime exposes no BigDecimal.",
      "stale_rule": false,
      "examples": [
        "Comment hat logs hat use on new comment",
        "Comment hat logs hat use on edited comment that adds it",
        "Comment hat doesn't relog hat use on edit that doesn't change hat",
        "Comment confidence is low for flagged comments",
        "Comment confidence it is high for upvoted comments"
      ]
    },
    {
      "slug": "apppath-concat",
      "title": "Rails::AppPath#+ unimplemented",
      "owner": "compiler",
      "failures": 5,
      "share": 0.0163,
      "note": "Rails.root is modeled as an AppPath value class that supports join but not +.",
      "stale_rule": false,
      "examples": [
        "Story fetching titles can fetch PDF titles properly",
        "Story fetching titles can fetch its title properly",
        "Story fetching titles does not follow rel=canonical when this is to the main page",
        "Story fetching titles does not assign canonical url when the response is non-200",
        "Story fetching titles assigns canonical when url when it resolves 200"
      ]
    },
    {
      "slug": "model-class-first",
      "title": "Model.first unimplemented as a class method",
      "owner": "compiler",
      "failures": 5,
      "share": 0.0163,
      "note": "Relation#first exists; the class-level shorthand does not forward to it. Related to the scalar-class-method forwarding gap.",
      "stale_rule": false,
      "examples": [
        "Category logs modification in moderation log logs on update",
        "Tag validations allows a valid tag to be created",
        "Tag logs modification in moderation log logs on create",
        "Tag logs modification in moderation log logs on update",
        "User unbans a user"
      ]
    },
    {
      "slug": "errors-object-api",
      "title": "errors is an Array, not an ActiveModel::Errors",
      "owner": "compiler",
      "failures": 4,
      "share": 0.0131,
      "note": "The runtime errors collection is Array[String]; attribute identity is lost at push, so errors[:attr] and errors.messages have nothing to answer with.",
      "stale_rule": false,
      "examples": [
        "ModNote validates the length of note",
        "ModNote validates the presence of note",
        "Moderation validates the length of action",
        "Moderation validates the length of reason"
      ]
    },
    {
      "slug": "update-attribute",
      "title": "update_attribute unimplemented",
      "owner": "compiler",
      "failures": 3,
      "share": 0.0098,
      "note": "Single-attribute write that skips validation.",
      "stale_rule": false,
      "examples": [
        "User doesn't allow changing usernames in < 1 year of last change",
        "User allows changing username with no creation/changing in < 1 year",
        "User doesn't allow changing to a username someone else stopped using in the last 5 years"
      ]
    },
    {
      "slug": "nested-constant-missing",
      "title": "Nested constant not emitted",
      "owner": "compiler",
      "failures": 2,
      "share": 0.0065,
      "note": "Constants nested inside a model class (Hat::Mail, Notification::Notifiable) are dropped rather than emitted alongside the class.",
      "stale_rule": false,
      "examples": [
        "Hat santizes email addresses",
        "Notification should_display? messages should display all messages"
      ]
    },
    {
      "slug": "harness-time-helpers",
      "title": "travel_to unavailable to specs",
      "owner": "harness",
      "failures": 1,
      "share": 0.0033,
      "note": "ActiveSupport::Testing::TimeHelpers is a spec-side helper stock Rails mixes into example groups. Ours to provide in the shim, not compiler debt.",
      "stale_rule": false,
      "examples": [
        "User allows totp codes from the surrounding time steps"
      ]
    },
    {
      "slug": "keystore-upsert",
      "title": "Keystore.upsert unimplemented",
      "owner": "compiler",
      "failures": 0,
      "share": 0.0,
      "note": "Needs Rails upsert with on_duplicate:/returning: and `self.primary_key = \"key\"` honored. Keystore.increment_value_for sits under Story#mark_submitter, so it fires on nearly every model that saves a story.",
      "stale_rule": true,
      "examples": []
    },
    {
      "slug": "has-attribute-predicate",
      "title": "has_attribute? unimplemented on the model surface",
      "owner": "compiler",
      "failures": 0,
      "share": 0.0,
      "note": "Arrived with lobsters c7dce360 (#2164), which rewrote the Token concern's after_initialize to guard on has_attribute?(:token). The concern is included widely, so it fires on nearly every model factory — it briefly accounted for 140 of 354 examples as the first exception, sitting in front of the dirty-alias cause behind it.",
      "stale_rule": true,
      "examples": []
    },
    {
      "slug": "dirty-saved-change-alias",
      "title": "saved_change_to_* read surface incomplete",
      "owner": "compiler",
      "failures": 0,
      "share": 0.0,
      "note": "This regex spans TWO shapes, which is why its count did not move when only one was fixed: the per-column saved_change_to_<col>? (synthesized by the lowering, since a static runtime cannot answer a name it learns at emit time) and the argument-taking saved_change_to_attribute?(:col) (a runtime Base method). The generic form was the dominant one — 133 of the 149 examples.",
      "stale_rule": true,
      "examples": []
    },
    {
      "slug": "relation-pick",
      "title": "Relation#pick unimplemented",
      "owner": "compiler",
      "failures": 0,
      "share": 0.0,
      "note": "pick returns a single value rather than an Array; a previous fix covered the call sites that lower to SQL, not the runtime Relation.",
      "stale_rule": true,
      "examples": []
    },
    {
      "slug": "unclassified",
      "title": "Not yet triaged",
      "owner": "unknown",
      "failures": 13,
      "share": 0.0425,
      "note": "No rule in bench/lobsters/spec-causes.json matches these. Triage, then add a rule.",
      "stale_rule": false,
      "examples": [
        {
          "example": "Domain origin takes a selector and replacement to generate an origin identifier",
          "error": "NoMethodError: undefined method 'find_each' for an instance of Array"
        },
        {
          "example": "Domain origin creates a bare-domain origin for bare and trailing slash URLs",
          "error": "NoMethodError: undefined method 'find_each' for an instance of Array"
        },
        {
          "example": "Domain ban should have moderation moderation should be created",
          "error": "SQLite3::SQLException: no such column: domain:"
        },
        {
          "example": "Domain ban should have moderation has correct moderator_user_id",
          "error": "SQLite3::SQLException: no such column: domain:"
        },
        {
          "example": "Domain ban should have moderation has correct action",
          "error": "SQLite3::SQLException: no such column: domain:"
        },
        {
          "example": "Domain ban should have moderation has correct reason",
          "error": "SQLite3::SQLException: no such column: domain:"
        },
        {
          "example": "Domain unban should have moderation moderation should be created",
          "error": "SQLite3::SQLException: no such column: domain:"
        },
        {
          "example": "Domain unban should have moderation has correct moderator_user_id",
          "error": "SQLite3::SQLException: no such column: domain:"
        },
        {
          "example": "Domain unban should have moderation has correct action",
          "error": "SQLite3::SQLException: no such column: domain:"
        },
        {
          "example": "Domain unban should have moderation has correct reason",
          "error": "SQLite3::SQLException: no such column: domain:"
        }
      ]
    }
  ],
  "by_file": [
    {
      "file": "spec/models/search_parser_spec.rb",
      "examples": 78,
      "passed": 0,
      "failed": 78
    },
    {
      "file": "spec/models/story_spec.rb",
      "examples": 76,
      "passed": 5,
      "failed": 71
    },
    {
      "file": "spec/models/search_spec.rb",
      "examples": 33,
      "passed": 0,
      "failed": 33
    },
    {
      "file": "spec/models/comment_spec.rb",
      "examples": 24,
      "passed": 3,
      "failed": 21
    },
    {
      "file": "spec/models/user_spec.rb",
      "examples": 22,
      "passed": 3,
      "failed": 19
    },
    {
      "file": "spec/models/notification_spec.rb",
      "examples": 16,
      "passed": 0,
      "failed": 16
    },
    {
      "file": "spec/models/link_spec.rb",
      "examples": 14,
      "passed": 0,
      "failed": 14
    },
    {
      "file": "spec/models/domain_spec.rb",
      "examples": 20,
      "passed": 7,
      "failed": 13
    },
    {
      "file": "spec/models/vote_spec.rb",
      "examples": 13,
      "passed": 0,
      "failed": 13
    },
    {
      "file": "spec/models/invitation_request_spec.rb",
      "examples": 6,
      "passed": 2,
      "failed": 4
    },
    {
      "file": "spec/models/mod_note_spec.rb",
      "examples": 4,
      "passed": 0,
      "failed": 4
    },
    {
      "file": "spec/models/category_spec.rb",
      "examples": 6,
      "passed": 3,
      "failed": 3
    },
    {
      "file": "spec/models/invitation_spec.rb",
      "examples": 4,
      "passed": 1,
      "failed": 3
    },
    {
      "file": "spec/models/moderation_spec.rb",
      "examples": 3,
      "passed": 0,
      "failed": 3
    },
    {
      "file": "spec/models/tag_spec.rb",
      "examples": 10,
      "passed": 7,
      "failed": 3
    },
    {
      "file": "spec/models/message_spec.rb",
      "examples": 4,
      "passed": 2,
      "failed": 2
    },
    {
      "file": "spec/models/story_image_spec.rb",
      "examples": 2,
      "passed": 0,
      "failed": 2
    },
    {
      "file": "spec/models/comment_stat_spec.rb",
      "examples": 1,
      "passed": 0,
      "failed": 1
    },
    {
      "file": "spec/models/hat_spec.rb",
      "examples": 5,
      "passed": 4,
      "failed": 1
    },
    {
      "file": "spec/models/mod_mail_spec.rb",
      "examples": 1,
      "passed": 0,
      "failed": 1
    },
    {
      "file": "spec/models/story_text_spec.rb",
      "examples": 1,
      "passed": 0,
      "failed": 1
    },
    {
      "file": "spec/models/hat_request_spec.rb",
      "examples": 3,
      "passed": 3,
      "failed": 0
    },
    {
      "file": "spec/models/keystore_spec.rb",
      "examples": 4,
      "passed": 4,
      "failed": 0
    },
    {
      "file": "spec/models/mastodon_app_spec.rb",
      "examples": 3,
      "passed": 3,
      "failed": 0
    },
    {
      "file": "spec/models/username_spec.rb",
      "examples": 1,
      "passed": 1,
      "failed": 0
    }
  ]
}