Repository navigation
feat(math): add the cc-kernel-v1 TypeScript port and its conformance suite - #4
Merged
Merged
Conversation
…suite src/math/ccKernel.ts implements the CC composition kernel from the vendored cc-kernel-v1 SPEC.md and case corpus, never from the Python reference. ccKernel.conformance.test.ts runs all 32 corpus cases within the declared 1e-12 tolerance and pins the vendored files' SHA-256 digests (39 tests). The corpus under src/math/conformance/cc-kernel-v1/ is a verbatim copy of cc-framework conformance/cc-kernel-v1 at bf5740c (byte-identical to cc-framework main 835b9ab today); PROVENANCE.md records the pin. Nothing in src/ imports the port yet; it is standalone and test-only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
Adds a TypeScript port of the CC composition kernel (
cc-kernel-v1) and a conformance suite that holds it to the upstream corpus.src/math/ccKernel.ts: the kernel, written from the vendoredSPEC.mdand case corpus, never from the Python reference, as the SPEC requires.src/math/ccKernel.conformance.test.ts: runs all 32 corpus cases (24 accept, 8 reject) within the declared1e-12tolerance, and pins the SHA-256 of every vendored file.src/math/conformance/cc-kernel-v1/: a verbatim copy ofcc-frameworkconformance/cc-kernel-v1(SPEC.md,adversarial.json,composition.json,manifest.json), withPROVENANCE.mdrecording the pin.Scope
src/importsccKernelyet, so the rendered site does not change.cc-frameworkbf5740c. It is byte-identical tocc-frameworkmain(835b9ab) as of 2026-11-03.cc-frameworkchange bindsSPEC.mdand the comparison policy in the manifest. If it lands, the corpus hashes change and this copy should be re-vendored once. This suite checks the vendored copy, so it keeps passing until then.Verification
npx vitest run src/math/ccKernel.conformance.test.ts: 39/39 passed (2026-11-03).🤖 Generated with Claude Code