Skip to content

feat(math): add the cc-kernel-v1 TypeScript port and its conformance suite - #4

Merged
Cubits11 merged 1 commit into
mainfrom
feat/cc-kernel-port
Nov 3, 2026
Merged

Cubits11 merged 1 commit into
mainfrom
feat/cc-kernel-port

Conversation

@Cubits11

@Cubits11 Cubits11 commented Nov 3, 2026

Copy link
Copy Markdown
Owner

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 vendored SPEC.md and 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 declared 1e-12 tolerance, and pins the SHA-256 of every vendored file.
  • src/math/conformance/cc-kernel-v1/: a verbatim copy of cc-framework conformance/cc-kernel-v1 (SPEC.md, adversarial.json, composition.json, manifest.json), with PROVENANCE.md recording the pin.

Scope

  • Standalone and test-only. Nothing in src/ imports ccKernel yet, so the rendered site does not change.
  • The vendored corpus is pinned to cc-framework bf5740c. It is byte-identical to cc-framework main (835b9ab) as of 2026-11-03.
  • Coupling: a pending local cc-framework change binds SPEC.md and 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).
  • Secret scan of the 7 files: 0 hits, 0 local paths.

🤖 Generated with Claude Code

…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>
@Cubits11
Cubits11 merged commit 2224557 into main Nov 3, 2026
2 checks passed
@Cubits11
Cubits11 deleted the feat/cc-kernel-port branch November 3, 2026 17:22
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