<feed xmlns='http://www.w3.org/2005/Atom'>
<title>claude-plugins-official.git/plugins/code-modernization/scripts/compare.py, branch bump/snowflake-cortex-code</title>
<subtitle>Official Claude Code plugin directory
</subtitle>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/'/>
<entry>
<title>code-modernization: approve a difference once per input</title>
<updated>2026-09-25T04:27:42+00:00</updated>
<author>
<name>Morgan Lunt</name>
<email>morganl@anthropic.com</email>
</author>
<published>2026-09-25T04:27:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=d3a40f72165764888f9a57a3e93db86e88f8e063'/>
<id>d3a40f72165764888f9a57a3e93db86e88f8e063</id>
<content type='text'>
An independent check of a rewritten batch job found differences on two new
inputs of one family (a blank numeric field the rewrite rejects on purpose
and the old program reads as zero). Each input has several output files, so
accepting the deviation meant three or four hand-written entries per input.

A top-level "approvedInputs": {"F23": "reason"} in a cases file now approves
every case that shares that input label. A reason is still required (blank
approves nothing), a case's own reason wins, a missing file is never turned
into a pass, and the result still lists the difference as approved.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
An independent check of a rewritten batch job found differences on two new
inputs of one family (a blank numeric field the rewrite rejects on purpose
and the old program reads as zero). Each input has several output files, so
accepting the deviation meant three or four hand-written entries per input.

A top-level "approvedInputs": {"F23": "reason"} in a cases file now approves
every case that shares that input label. A reason is still required (blank
approves nothing), a case's own reason wins, a missing file is never turned
into a pass, and the result still lists the difference as approved.
</pre>
</div>
</content>
</entry>
<entry>
<title>code-modernization: harden the numeric tolerance and say what Rehost and Replace mean</title>
<updated>2026-09-25T03:34:21+00:00</updated>
<author>
<name>Morgan Lunt</name>
<email>morganl@anthropic.com</email>
</author>
<published>2026-09-25T03:34:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=5b8ec4b30f45b5e8b4c8a6efd63719730cf1a5ad'/>
<id>5b8ec4b30f45b5e8b4c8a6efd63719730cf1a5ad</id>
<content type='text'>
Follow-ups from review of the tolerance check: an absolute tolerance above
1e-6 is refused like a relative one above 1%, numbers are compared as exact
decimals rather than doubles, dotted runs such as 1.2.3 or 10.0.0.1 are text
that must match exactly, and the self-check now changes the leading digit of
every sampled number to prove the tolerance cannot hide a real change.

The business-rules header says how many rules there were at extraction, since
later steps add rules. The assessment says what to do when it recommends
Rehost or Replace, which change no code and so have no build command.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Follow-ups from review of the tolerance check: an absolute tolerance above
1e-6 is refused like a relative one above 1%, numbers are compared as exact
decimals rather than doubles, dotted runs such as 1.2.3 or 10.0.0.1 are text
that must match exactly, and the self-check now changes the leading digit of
every sampled number to prove the tolerance cannot hide a real change.

The business-rules header says how many rules there were at extraction, since
later steps add rules. The assessment says what to do when it recommends
Rehost or Replace, which change no code and so have no build command.
</pre>
</div>
</content>
</entry>
<entry>
<title>code-modernization: compare floating-point output within a declared tolerance</title>
<updated>2026-09-25T03:31:54+00:00</updated>
<author>
<name>Morgan Lunt</name>
<email>morganl@anthropic.com</email>
</author>
<published>2026-09-25T03:31:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=4672eac1e36ff37394189376217bdc6f2b2e2e4a'/>
<id>4672eac1e36ff37394189376217bdc6f2b2e2e4a</id>
<content type='text'>
The equivalence check compared bytes only, which cannot pass for numeric
code (Fortran, C, scientific and financial results) whose last digits differ
between compilers and math libraries, so those cases pushed people to mask
the numbers away. A case can now declare a tolerance, relative or absolute,
with a required reason. Only numbers written with a decimal point or an
exponent may differ within it; integers and every other byte must match, a
relative tolerance above 1% is refused, and the tolerance and the largest
difference are recorded in the result. The self-check also fails when a
tolerance is loose enough to hide a change to the leading digit of a number.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The equivalence check compared bytes only, which cannot pass for numeric
code (Fortran, C, scientific and financial results) whose last digits differ
between compilers and math libraries, so those cases pushed people to mask
the numbers away. A case can now declare a tolerance, relative or absolute,
with a required reason. Only numbers written with a decimal point or an
exponent may differ within it; integers and every other byte must match, a
relative tolerance above 1% is refused, and the tolerance and the largest
difference are recorded in the result. The self-check also fails when a
tolerance is loose enough to hide a change to the leading digit of a number.
</pre>
</div>
</content>
</entry>
<entry>
<title>code-modernization: simpler commands, a source option, a report page and an equivalence check</title>
<updated>2026-09-25T03:14:51+00:00</updated>
<author>
<name>Morgan Lunt</name>
<email>morganl@anthropic.com</email>
</author>
<published>2026-09-25T03:14:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/claude-plugins-official.git/commit/?id=cafefb304bde4070c6c0877528ee49c1252eff85'/>
<id>cafefb304bde4070c6c0877528ee49c1252eff85</id>
<content type='text'>
Commands hardcoded legacy/&lt;system&gt;, so code too big to copy, or living at
an absolute path, needed a hand-made symlink. Preflight now takes
--source &lt;path&gt; and makes the legacy/&lt;system&gt; link for you (a junction on
Windows); nothing is copied, and every command says where the link points
before it starts. The harden patch is applied with patch -p1 -d.

Each command ends by naming the next command to run, and the commands are
about a third shorter with no step removed:
- map accepts an existing dependency graph (--graph) or the stack's own
  tooling, maps very large estates in resumable chunks, records reflection
  targets as unresolved instead of dead, asks before describing more than
  40 nodes, and never gives two nodes the same location.
- transform can take its module and target from the brief, counts the
  equivalence cases that executed (zero is a failure and a comparison never
  skips), shows the tests can fail with a deliberate one-line break, and
  hands "same or different" to a script when both systems can run.
- brief writes each phase in one fixed shape: one command, module ids as in
  the map, and criteria written as conditions a build command may tick but
  not reword.
- reimagine reuses the discovery artifacts instead of extracting them again.
- status names the exact command to paste next.

scripts/build_report.py turns whatever the commands wrote into one
self-contained, offline REPORT.html (Mermaid is vendored, all text from the
analysis is escaped, the quarantined secrets file is never read), and
scripts/compare.py decides byte-for-byte whether two outputs match, records
why, and checks it can fail. The shard builder ignores symbolic links and
paths that leave the source, matches a plain name against what lies beneath
it, and falls back to the directory tree when the map's modules share a
location.

The README drops from 275 to about 100 lines; the pane's reference moves to
hooks/README.md.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commands hardcoded legacy/&lt;system&gt;, so code too big to copy, or living at
an absolute path, needed a hand-made symlink. Preflight now takes
--source &lt;path&gt; and makes the legacy/&lt;system&gt; link for you (a junction on
Windows); nothing is copied, and every command says where the link points
before it starts. The harden patch is applied with patch -p1 -d.

Each command ends by naming the next command to run, and the commands are
about a third shorter with no step removed:
- map accepts an existing dependency graph (--graph) or the stack's own
  tooling, maps very large estates in resumable chunks, records reflection
  targets as unresolved instead of dead, asks before describing more than
  40 nodes, and never gives two nodes the same location.
- transform can take its module and target from the brief, counts the
  equivalence cases that executed (zero is a failure and a comparison never
  skips), shows the tests can fail with a deliberate one-line break, and
  hands "same or different" to a script when both systems can run.
- brief writes each phase in one fixed shape: one command, module ids as in
  the map, and criteria written as conditions a build command may tick but
  not reword.
- reimagine reuses the discovery artifacts instead of extracting them again.
- status names the exact command to paste next.

scripts/build_report.py turns whatever the commands wrote into one
self-contained, offline REPORT.html (Mermaid is vendored, all text from the
analysis is escaped, the quarantined secrets file is never read), and
scripts/compare.py decides byte-for-byte whether two outputs match, records
why, and checks it can fail. The shard builder ignores symbolic links and
paths that leave the source, matches a plain name against what lies beneath
it, and falls back to the directory tree when the map's modules share a
location.

The README drops from 275 to about 100 lines; the pane's reference moves to
hooks/README.md.
</pre>
</div>
</content>
</entry>
</feed>
