Class: Bundler::Spinel::History

Inherits:
Object
  • Object
show all
Defined in:
lib/bundler/spinel/history.rb

Overview

The historical record: how the catalog shifts as the Spinel compiler evolves. Each “run” is a full corpus re-probe at one engine revision; this renders the verdict-mix timeline + the gem-level deltas between consecutive runs — the bug pipeline closing the loop, made visible.

Constant Summary collapse

RUNS =

Ordered runs (oldest→newest). Each: rev, date, the engine commit subject, the full-corpus probe snapshot, and a curated note on what moved.

[
  { rev: "a03bb49", date: "2026-05-28", commit: "the first full-corpus survey (189,742 gems)",
    file: "survey-fresh/compat.jsonl", note: nil },
  { rev: "8d88ebe", date: "2026-05-29", commit: "module/reflection + GC fixes (is_a?, .class, respond_to?, #1052)",
    file: "survey-8d88ebe/compat.jsonl",
    note: "Mixed: the module-object fixes graduated gems, but <code>96b21e6</code> " \
          "(module_function support) <strong>regressed</strong> ~160 gems whose objects " \
          "were built from a variable-held class (the <code>brass</code> cluster) — caught " \
          "by the re-probe and filed as <a href=\"https://github.com/matz/spinel/issues/1062\">matz/spinel#1062</a>." },
  { rev: "f8040f3", date: "2026-05-31", commit: "DCE for synthetic module class methods (#1062 fix), instance_methods const-fold (#1073), Array#transpose, map→array",
    file: "survey-f8040f3/compat.jsonl",
    note: "<strong>Recovery + gains.</strong> matz bisected #1062 to <code>96b21e6</code> and fixed it " \
          "(<code>e2e010c</code>); together with the new <code>instance_methods</code> const-fold " \
          "(<a href=\"https://github.com/matz/spinel/issues/1073\">#1073</a>) and <code>transpose</code>/map " \
          "specializations, the brass cluster and thousands more moved out of <code>rejected</code>." },
].freeze
ORDER =
%w[clean risky rejected].freeze

Instance Method Summary collapse

Constructor Details

#initialize(base = ".") ⇒ History

Returns a new instance of History.



33
34
35
# File 'lib/bundler/spinel/history.rb', line 33

def initialize(base = ".")
  @base = base
end

Instance Method Details

#build_html(out) ⇒ Object

Render the full history page to ‘out`.



38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# File 'lib/bundler/spinel/history.rb', line 38

def build_html(out)
  runs = RUNS.map { |r| r.merge(tally: tally(File.join(@base, r[:file]))) }
            .select { |r| r[:tally] }
  body = +""
  body << "<h1>How the catalog has changed</h1>\n"
  body << %(<p class="lede">Each row is a full re-probe of the ~190k-gem corpus at one )
  body << %(<a href="https://github.com/matz/spinel">Spinel</a> revision. The harness's )
  body << %(real product is a stream of focused compiler bugs; this is the loop closing — )
  body << %(fixes landing upstream, gems graduating out of <code>rejected</code>.</p>\n)

  body << timeline_table(runs)
  runs.each_cons(2) { |a, b| body << delta_card(a, b) }

  File.write(out, page("History — SpinelGems", body))
  out
end