Skip to content

docs(perf): land the four corrections PR #52's squash dropped - #67

Closed
akutuva21 wants to merge 11 commits into
mainfrom
swarm/compiler-docfix2
Closed

akutuva21 wants to merge 11 commits into
mainfrom
swarm/compiler-docfix2

Conversation

@akutuva21

Copy link
Copy Markdown
Member

Follow-up to #52, which merged carrying only one of five corrections.
Documentation only — one file, no production code.

What happened

PR #52 squash-merged as a16f460 with only the +0.024% correction. The other
four commits were pushed after the merge and never landed. Verified before
acting rather than assumed:

git show origin/main:docs/PERF_EXPRESSION_CODEGEN_NO_WIN.md | grep -c "<each phrase>"
-> determinism precondition: 0     (absent)
-> Scope of these two hashes: 0    (absent)
-> Scope of that gate: 0           (absent)
-> prescription that has since gone stale: 0  (absent)

The correction I had pushed first was the only one in the merge. This is the
same shape as every other error in my charge: a stale reference treated as
current. I verified the push succeeded and never verified the merge contained it.

What lands here

  1. Determinism precondition, shown rather than implied. A hash guard is only
    evidence if the artifact is deterministic. Measured, not argued: same binary,
    two runs, 4,000,002 rows each, identical sha256 a27182ec…d05b. The fixture
    is a fixed-step ODE with no RNG, but "by construction" is an argument and the
    two-run check is a measurement.

  2. Both artifact surfaces are hashed — .gdat and .net. This one is
    load-bearing and I had only shown the .gdat command. An instrument's
    sensitivity must be a superset of the defect class it is meant to detect.
    A .gdat-only gate is blind to network-generation nondeterminism entirely:
    correctness's P0 (44664f1) perturbed .net bytes without necessarily
    perturbing trajectory values. I had run the .net hash and quoted it in
    passing without saying why both surfaces mattered.

  3. Hash scope pinned to the commit that produced them. Both came from
    binaries at 8dd441d. They are evidence internal to that one comparison, are
    not expected to reproduce on main now that the determinism fix has landed,
    and a reader who tries and gets a different value must not read that as
    evidence against this document. Stated in the same shape swarmCache named:
    a count from a pre-fix binary and a post-fix binary mean opposite things, and
    the output alone cannot tell you which you are looking at.

  4. The ctest gate scoped to its commit. 461/461 was produced at 6889fba,
    which does not contain the duplicated test_correctness_regressions block
    (grep -c → 0). At the time, origin/main did not configure at all — now
    fixed in 3409bc2. So the 461/461 is a real result for that commit and is
    not evidence that main configures. The generalisable part: an incremental
    cmake --build cannot see that class of failure, because every existing
    build.ninja predates the duplicate — the stale instrument here was the build
    system itself.

The no-win verdict does not depend on any of the above. It rests on the profile
(zero frames in four end-to-end runs) and the 4.89% ceiling measurement, neither
of which requires a fresh configure. The gates were corroboration, never the
basis.

Verification of this PR's own scope

git diff --name-status origin/main HEAD
-> M	docs/PERF_EXPRESSION_CODEGEN_NO_WIN.md
52 insertions, one file, no production code.

Recovered by restoring the single file from 5f36268 onto current main
rather than rebasing that tip — the tip predates several merges and would have
dragged in six unrelated files from other lanes. That is the third time this
branch family drifted against a moving main; the fix each time was to compute
the diff against a freshly fetched base rather than a remembered one.

🤖 Generated with Claude Code

@akutuva21
akutuva21 force-pushed the swarm/compiler-docfix2 branch 5 times, most recently from 38736f6 to 88e8a88 Compare October 1, 2026 03:15
akutuva21 and others added 10 commits September 30, 2026 23:26
…ucible

My previous commit recorded the residual as an unresolved environmental fault
and said nobody had got a configure to green. swarmSerial's plain cmake -B in a
clean detached worktree at 3409bc2 got EXIT=0 twice, with Catch2, Sundials and
ANTLR fetched at their pinned tags and grep -ci 'Failed to clone' -> 0. That
refutes all three circulating explanations (transient network, no network,
sub-build memory pressure), because each predicted a failure where none
occurred.

Restated at the right altitude: there is no REPRODUCIBLE configure failure on
main from a clean tree. WHY the four agents' failures happened remains
unexplained, and this document says so rather than substituting a theory I do
not hold. Nothing is claimed about whether main builds -- cmake -B invokes no
compiler.

Also records the inverse-of-intuition methodological note: the FASTEST green
configure was the one with the WEAKER guarantee. FETCHCONTENT_BASE_DIR /
FULLY_DISCONNECTED runs reached green in 4.2s but bypass the GIT_TAG check
(declaration pins v3.4.0, populated copy reports 3.10), so they answer 'does the
committed tree configure', not 'with the pinned dependency set'. An override
that makes a build succeed can be substituting for the thing under test.

Superseded readings are left visible with their timestamps rather than edited
out -- that practice is what let the configure thread converge.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…e is green

My previous note said 'nothing is claimed about whether main builds'. That was
true and it was too weak: a configure reaching green says nothing about
compilation, and at f780ac the production file is broken independently.

Verified here rather than relayed:
  git show origin/main:cpp/engine/OdeIntegrator.cpp | grep -c batchTrajectorySeed -> 2
  git show origin/main:cpp/engine/BatchSsa.hpp | grep -c 'inline uint64_t batchTrajectorySeed' -> 0
BatchSsa.hpp IS included at line 21, and the symbol is declared in no file under
cpp/, so every build fails with 'use of undeclared identifier
batchTrajectorySeed'. Reported by thermoParse in the test file, reproduced
independently by correctness and swarmCache with a -fsyntax-only compiler
artifact. correctness owns both files and is landing the repair.

Consequence recorded: a ctest number measures a build.ninja, and one produced
after 9259a3d cannot have come from a binary the current tree would build. Those
numbers stand as scoping statements for the commits they were run at -- which is
what my 461/461 is, and why I never offered it as a statement about main.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
I cited OdeIntegrator.cpp:1296 for the per-step functional-rate path. Verified
against the blob rather than from memory:

  git show origin/main:cpp/engine/OdeIntegrator.cpp | grep -n 'functionalRateExpr->evaluate'
  -> 1380:   rate = rxn.functionalRateExpr->evaluate(resolver, t);

1296 was correct at my base 6889fba and moved as other lanes landed. An anchor
you did not re-verify is worse than none -- it looks checkable and sends a
reader to the wrong line, which is exactly what sciPkPd.PkSurvey flagged when
they demanded swarmMemory's off-by-one be resolved before it entered a ledger.

Now cites the call rather than the line when the base differs, and records why.
Checked the other anchors in this file against the blob and they hold:
legacy_bridge.cpp:112 and :264 for both evaluateWithFunctions call sites, and
Expression.cpp:331 for the MM branch.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The seed fix has landed: git show origin/main:cpp/engine/BatchSsa.hpp | grep -c
'inline uint64_t batchTrajectorySeed' -> 1. My document still asserted main does
not compile, which was true when written and is now a stale P0 claim.

Pins the failing evidence to 9259a3d (the commit it was true at) rather than
leaving it anchored to origin/main, so a reader grepping main gets a number that
no longer matches the sentence around it.

Adds sciStochastic's -fsyntax-only run against the fix branch (8ce9d1f, 0 errors,
0.9 s) -- until that, only the repair's author had shown it works, and a fix
nobody has run is an intention. Records the instrument lesson in the same place:
that command compiles nothing, costs nothing, and settled in under a second what
three agreeing greps, a fresh configure and a slot request had left open for
twenty minutes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
I wrote 'unaffected, not merely silent' on the strength of one command --
git grep -c batchTrajectorySeed 6889fba -- cpp/ -> 0. swarmMemory offered a
structural exemption for branches touching no compiled file; perfBatch refuted
it against his own branch, which does touch one (cpp/engine/BatchSsa.cpp), and
his soundness was arithmetic instead: his binary postdated his commit. So the
diff check alone is insufficient, and so is the timestamp check alone.

Both are now stated: the symbol is absent at 6889fba entirely, AND the artifact
postdates the commit it is attributed to on a branch with no compiled surface.
Neither half substitutes for the other.

Kept the lesson, because it indicts my own phrasing: an anchor you have not
checked is worse than none -- including a structural argument offered in place
of a check.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
swarmCache found the stale-artifact wrinkle on their own branch and rebuilt.
Applied to mine rather than assuming it exempt:

  git diff --name-only 8dd441d 3d94862 -- cpp/ tests/cpp/ | wc -l -> 0
  stat -f '%Sm' build/cpp/bng_cpp   -> 2026-09-30 22:26:42
  git log -1 --format=%ci 3d94862   -> 2026-09-30 22:26:28 -0400

Both halves hold: the artifact postdates the commit it is attributed to by 14s,
and no compiled file differs from what was compiled. The only cpp change I ever
committed was cpp/ast/Expression.cpp, reverted before the gate ran.

Also records the mistake I made doing this: I first compared 6889fba..HEAD and
got 13 compiled files, every one another lane's work that landed on main
afterwards. The diff half only means something against the tree the artifact was
built from.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… check

I wrote 'both halves hold', which is the wrong framing. swarmMemory is right:
the failure mode is not watching both fail, it is publishing whichever half you
happened to run. Both of mine are checks that can fail, and I ran both.

Also replaces the timestamp as the settling instrument with a content check,
which is stronger and answers the question directly:

  git show 3d94862:cpp/ast/Expression.cpp | grep -c 'text_\.size() ==' -> 0
  git show 3d94862:cpp/ast/Expression.cpp | grep -c 'q - b'           -> 2

No length guards, MM cancellation branch present: the gate executed on the
reverted tree, built from the only cpp commit I ever made. Where a content
check is available it settles the question and the timestamp is beside it.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… gate claimed

swarmMemory sharpened 'prefer a content check over a weaker proxy' and applied
it to their own branch. Applied here:

  grep -rc 'PERF_EXPRESSION_CODEGEN_NO_WIN' CMakeLists.txt cpp/CMakeLists.txt tests/cpp/CMakeLists.txt
  -> 0, 0, 0
  grep -c 'docs/' tests/cpp/CMakeLists.txt -> 0

This file is referenced by no build target at any level, so no configuration can
compile it. That does not depend on my diff staying that way, and is stronger
than 'the diff touches no compiled file' -- a later commit could add a compiled
file and lose the weaker property; nothing could add one reaching this file.

Scope stated honestly rather than implied: the ctest numbers here describe the
REJECTED CANDIDATE, measured on a branch that did touch cpp/. The PR carrying
this record is documentation only and claims no gate beyond the diff being one
file under docs/.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…s that proxy it

correctness retracted a published comparison after realising they had applied awk
to drop a field and then described the result as what the test's own unpacking
sees -- a different consumer's transformation substituted for the consumer. The
general form: when the question is what value a reader sees, the instrument must
BE that reader.

Applied to my own work rather than only agreeing with it:
  - the trajectory gate IS the reader: real bng_cpp CLI, hashes the .gdat it
    emits, nothing in between
  - the microbench drives the same entry point the engine calls,
    Expression::evaluate(std::function, t) -- faithful call surface
  - but it compiles Expression.cpp standalone and links nothing else, while
    production links the whole engine with LTO: that part is a proxy

So the fitness numbers rest on a proxy and the correctness gate rests on the
real reader. They answer different questions. The verdict rests on neither alone:
the profile and the 4.89% ceiling are end-to-end, and the microbench only ever
located the cost.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…a distant section

swarmMemory's form is sharper than the labelling I did last turn: an instrument
must BE the consumer, or the claim must be SCOPED to what it actually produced.
Labelling is not scoping.

The population table's first numeric column was headed 'Microbench' as though it
were program fitness, with the standalone-TU caveat sitting ~460 lines away in
Instrument limitations. Every verdict in that table sits under it. The qualifier
now sits immediately above the table, the header says 'standalone TU -- proxy',
and the note says what it does and does not answer: it answered 'did the
string-dispatch cost change' (shortlisting candidates), not 'did the program get
faster'. The end-to-end evidence -- zero frames in four profiles, the 4.89%
ceiling -- is named as what the verdict actually rests on.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@akutuva21
akutuva21 force-pushed the swarm/compiler-docfix2 branch from 840b4b6 to b7ca96b Compare October 1, 2026 03:26
# Conflicts:
#	docs/PERF_EXPRESSION_CODEGEN_NO_WIN.md
@akutuva21

Copy link
Copy Markdown
Member Author

Closing per maintainer request to prune the queue and focus on the remaining PRs. The branch was rebased onto current main at fb97480 if the corrections are ever needed again.

@akutuva21 akutuva21 closed this Oct 5, 2026
@akutuva21
akutuva21 deleted the swarm/compiler-docfix2 branch October 6, 2026 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant