T=274 Spike A+C: write-path benchmarks + language-neutral replay-equivalence gate - #66
Draft
MSD21091969 wants to merge 2 commits into
Draft
T=274 Spike A+C: write-path benchmarks + language-neutral replay-equivalence gate#66MSD21091969 wants to merge 2 commits into
MSD21091969 wants to merge 2 commits into
Conversation
…e gate Spike A (bench-only, no production change): quantifies the write-path costs named by the T=263 ceiling report — full-state HDC encode via the per-node path is ~1.2s / ~7.3 GB allocated per call at 300 nodes (run twice per rewrite under the write lock); the existing-but-unused EncodeNodes batch path is ~4x time / ~50x allocation better; fresh-codebook regeneration is 43ms vs 1.2ms warm per 256 URNs; GraphState.Clone() is 2.7ms/2.15MB per rewrite at 1k nodes, x(N+1) per N-step program. Spike C: testdata/replay/t274-fixture.jsonl (all four rewrite types, idempotent-skip duplicate ADD, additive MUTATE via PropertySpec, WF15 contract LINK) + golden canonical state + SHA-256 6bb67afc79b23155cb79a38a0be74ed5c5685a5f519b5e081a128300a81e6d90. Any candidate engine reproduces the hash from the same JSONL or is not an engine. Context: ffs0 dev/design/manifold-bump-4_0/DECISION-engine-language.md. go test ./... green; go.mod untouched (stdlib + quic-go only holds). authored-by: agent:claude-code.remote / session:none-ungoverned-remote-s0 / t274-engine-language-choice Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PB5ZxREJGN8QHmSR2J4Cig
The repo-wide *.jsonl ignore (for ephemeral state snapshots) also caught the committed test fixture; the golden and hash landed without the log they fold. Force-adding the fixture only — the ignore rule itself is untouched. authored-by: agent:claude-code.remote / session:none-ungoverned-remote-s0 / t274-engine-language-choice Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PB5ZxREJGN8QHmSR2J4Cig
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Test-files-only companion to the ffs0 T=274 engine-language round (
dev/design/manifold-bump-4_0/DECISION-engine-language.mdthere). No production source change;go.moduntouched — the "stdlib + quic-go only" invariant holds.Spike A — benchmarks (
internal/hdc/spike_a_bench_test.go,internal/fold/spike_a_bench_test.go)Quantifies the write-path costs the T=263 ceiling report attributed to codec/allocation rather than language. Measured (linux/amd64, Go 1.24.7, 4 vCPU):
TypeExpressions)runtime.go:971,:1068)EncodeNodes)NewEncoder()per call, 256 URNs) vs warmGraphState.Clone()1k nodes/2k rels · 5k/10kBind(10k float32, by value)Spike C — replay-equivalence acceptance gate (
internal/fold/replay_fixture_test.go,testdata/replay/)Committed 12-entry JSONL log exercising all four rewrite types, the idempotent-skip path (duplicate ADD), additive MUTATE via
PropertySpec, and a WF15 contract LINK; golden canonical state (Nodes+Relations, sorted-key JSON) + SHA-256:Any candidate engine, in any language, reproduces this hash from the same JSONL or is not an engine. Goldens regenerate via
MOOS_UPDATE_GOLDEN=1; semantic spot-checks prevent a regenerated golden from silently blessing a broken fold. The fixture.jsonlis force-added past the repo-wide*.jsonlignore (rule untouched).Verification
go test ./...— green, all packages.go test -run TestReplayFixtureT274 -count=2 ./internal/fold/— deterministic, hash stable.go test -bench=SpikeA -benchmem ./internal/hdc/ ./internal/fold/— produces the table above.🤖 Generated with Claude Code
https://claude.ai/code/session_01PB5ZxREJGN8QHmSR2J4Cig
Generated by Claude Code