Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ is the project blueprint. Major behavioral changes update both:
1. The contract's `status_history` (factual, machine-readable record).
2. The spec markdown (narrative + milestone roll-up).

Status as of v1.23.0 (2026-05-05): M0–M75 all SHIPPED; corpus complete
Status as of v1.23.0 (2026-05-05): M0–M76 all SHIPPED; corpus complete
(30/30); 13/13 gates green; companion ↔ aprender round-trip
mechanically guarded. **M32d numerical-parity FUNCTIONALLY DISCHARGED**
2026-05-02 (aprender PR #1228 squash 5235aaeb9): output transition
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ walks the two traces, applies per-tool semantic-equivalence rules,
and emits a falsifiable parity score plus a closed-enum drift
category for any mismatch.

**Status (2026-05-05)**: M0–M75 all SHIPPED. Contract at v1.23.0
**Status (2026-05-05)**: M0–M76 all SHIPPED. Contract at v1.23.0
ACTIVE_RUNTIME. Corpus complete at the spec-prescribed 30 fixtures
(all score 1.0). Parity-matrix coverage 15/15 reachable
(2 OOS at trace boundary). FALSIFY-CCPA-007 hard-blocking on every PR
Expand Down
7 changes: 4 additions & 3 deletions docs/specifications/claude-code-parity-apr-poc.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

**Version**: 1.23.0
**Date**: 2026-05-02
**Status**: ACTIVE_RUNTIME — M0–M75 SHIPPED; **GPU MoE forward path P0 / HIGHEST PRIORITY** (M49 elevation, R10) with M-GPU-MOE-0 contract scaffold SHIPPED 2026-05-04 (M50, aprender PR #1453 squash `cf08e910f`); M-GPU-MOE-1.0 → 1.1.2 cascade ALL MERGED 2026-05-04 (M51, aprender PRs #1460 + #1462 + #1464 + #1469 + #1477 squash `dc6f94d3b`); M-GPU-MOE-1.2 SHIPPED + 2.0 + 2.3 stacked OPEN (M52 + M53, aprender PR #1484 squash 8cbb7b51e + #1485 OPEN 3-commit + #1487 + #1488 stacked-merged); M-MOE-SUB-1 SaveTensorStage extension SHIPPED 2026-05-05 (M60, aprender PR #1499 squash `b51986641`); trace-moe-gpu-sub-stages-v1 v1.0.0 → v1.1.0 traced-target clarification SHIPPED 2026-05-05 (M64, aprender PR #1503 squash `8c4c6d5c7`); **M-MOE-SUB-2 step (c) helper `moe_ffn_forward_layer_with_router` SHIPPED 2026-05-05 (M68, aprender PR #1507 squash `0f22c7841`)**; **M-MOE-SUB-2 step (a) `forward_qwen3_moe_traced_with_plan` SHIPPED 2026-05-05 (M74, aprender PR #1516 squash `3138d134d`) — wires MoeRouter + MoeFfnOut emit into CPU traced**; **`pv lint --strict-test-binding` mechanical drift-class prevention SHIPPED 2026-05-05 (M71, aprender PR #1511 squash `ff2e0b634`) — closes the entire M65/M66/M67/M70 manual-fix class via PV-VER-002**; §50.4 cascade §55 polymorphic preflight relaxation + §56 5g.1 LIVE smoke + ship-two-models §57 drift sweep + apr-pretrain-arch-polymorphic-v1 v1.4 + v1.5 + v1.6 + apr-pretrain-from-init-v1 v1.2 + apr-cli-tokenize-import-hf-v1 v1.1 SHIPPED 2026-05-05 (M61–M63 + M65–M67 + M69 + M70, aprender PRs #1500/#1501/#1502/#1504/#1505/#1506/#1508/#1509); M32d numerical-parity FUNCTIONALLY DISCHARGED 2026-05-02 (aprender PR #1228 squash 5235aaeb9); qwen3-moe-forward-v1 v1.3.0 DRAFT → v1.4.0 ACTIVE_ALGORITHM_LEVEL flipped on aprender main 2026-05-02T14:57Z (PR #1409 squash 3a2f2705b)
**Status**: ACTIVE_RUNTIME — M0–M76 SHIPPED; **GPU MoE forward path P0 / HIGHEST PRIORITY** (M49 elevation, R10) with M-GPU-MOE-0 contract scaffold SHIPPED 2026-05-04 (M50, aprender PR #1453 squash `cf08e910f`); M-GPU-MOE-1.0 → 1.1.2 cascade ALL MERGED 2026-05-04 (M51, aprender PRs #1460 + #1462 + #1464 + #1469 + #1477 squash `dc6f94d3b`); M-GPU-MOE-1.2 SHIPPED + 2.0 + 2.3 stacked OPEN (M52 + M53, aprender PR #1484 squash 8cbb7b51e + #1485 OPEN 3-commit + #1487 + #1488 stacked-merged); M-MOE-SUB-1 SaveTensorStage extension SHIPPED 2026-05-05 (M60, aprender PR #1499 squash `b51986641`); trace-moe-gpu-sub-stages-v1 v1.0.0 → v1.1.0 traced-target clarification SHIPPED 2026-05-05 (M64, aprender PR #1503 squash `8c4c6d5c7`); **M-MOE-SUB-2 step (c) helper `moe_ffn_forward_layer_with_router` SHIPPED 2026-05-05 (M68, aprender PR #1507 squash `0f22c7841`)**; **M-MOE-SUB-2 step (a) `forward_qwen3_moe_traced_with_plan` SHIPPED 2026-05-05 (M74, aprender PR #1516 squash `3138d134d`) — wires MoeRouter + MoeFfnOut emit into CPU traced**; **`pv lint --strict-test-binding` mechanical drift-class prevention SHIPPED 2026-05-05 (M71, aprender PR #1511 squash `ff2e0b634`) — closes the entire M65/M66/M67/M70 manual-fix class via PV-VER-002**; §50.4 cascade §55 polymorphic preflight relaxation + §56 5g.1 LIVE smoke + ship-two-models §57 drift sweep + apr-pretrain-arch-polymorphic-v1 v1.4 + v1.5 + v1.6 + apr-pretrain-from-init-v1 v1.2 + apr-cli-tokenize-import-hf-v1 v1.1 SHIPPED 2026-05-05 (M61–M63 + M65–M67 + M69 + M70, aprender PRs #1500/#1501/#1502/#1504/#1505/#1506/#1508/#1509); M32d numerical-parity FUNCTIONALLY DISCHARGED 2026-05-02 (aprender PR #1228 squash 5235aaeb9); qwen3-moe-forward-v1 v1.3.0 DRAFT → v1.4.0 ACTIVE_ALGORITHM_LEVEL flipped on aprender main 2026-05-02T14:57Z (PR #1409 squash 3a2f2705b)
**Source of truth**: https://github.com/paiml/claude-code-parity-apr (canonical for enforcement; aprender mirrors only the contract YAML byte-for-byte via `pin.lock`)
**Companion-repo invariants** (must be green on every PR — see § Companion-repo source-of-truth invariants):
1. GitHub Actions `ci/gate` green (required status check) → **FALSIFY-CCPA-009**
Expand Down Expand Up @@ -308,7 +308,7 @@ The teacher's *fixtures* are immutable per-revision; the student (`apr code` orc

## Phases / Milestones

> **Status snapshot (2026-05-05)**: M0–M75 SHIPPED. M32d
> **Status snapshot (2026-05-05)**: M0–M76 SHIPPED. M32d
> **FUNCTIONALLY DISCHARGED** 2026-05-02 via aprender PR #1228 squash
> 5235aaeb9 (Step 5 + 5b + 6 + 7 fix bundle). Output transition on
> lambda-vector RTX 4090 against the cached 17.3 GB Qwen3-Coder-30B-
Expand Down Expand Up @@ -490,6 +490,7 @@ in `contracts/claude-code-parity-apr-v1.yaml § status_history`:
| **M73** | Cross-repo **`aprender-orchestrate` cmd_code arg-count drift fix SHIPPED on aprender main** as squash `1ecf3aaf5` (2026-05-05, aprender PR #1513). Build-break fix: upstream `batuta::agent::code::cmd_code` gained an 8th `emit_trace: Option<PathBuf>` param; the bin-side thin wrapper in `cli/code.rs` was not updated, producing E0061 that blocks `cargo check --workspace` and the clean-room gate. Fix passes `None` for `emit_trace` at the call site. Same drift class as the §50.4 cascade contract-text drift (M65/M66/M67/M70/M71) but applied to a Rust function-signature surface — caller and callee moved out of lockstep across crates, no compile-time check caught it until the broader `cargo check --workspace` swept it up. **Adjacent kaizen opportunity**: just as M71 added `pv lint --strict-test-binding` to mechanically catch contract-test drift, a similar lint or pre-merge gate could mechanically catch cross-crate function-signature drift (e.g., a feature-flagged forced cargo check across all binary crates whenever a public fn signature in a workspace lib changes). Out of scope for this PR but worth considering as a follow-up kaizen ticket. | aprender [#1513 MERGED](https://github.com/paiml/aprender/pull/1513) `1ecf3aaf5` | this PR |
| **M74** | Cross-repo **`forward_qwen3_moe_traced_with_plan` SHIPPED on aprender main** as squash `3138d134d` (2026-05-05, aprender PR #1516). **M-MOE-SUB-2 step (a) — second substantive code in the M-GPU-MOE-1.4 traced-bisection chain.** Wires `SaveTensorStage::MoeRouter` + `MoeFfnOut` emission into the CPU traced MoE forward path per `contracts/trace-moe-gpu-sub-stages-v1.yaml` v1.1.0 step (a). Adds new method `forward_qwen3_moe_traced_with_plan` accepting `Option<&SaveTensorPlan>`; existing `forward_qwen3_moe_traced` becomes a thin one-line delegate passing `None` (public API unchanged, zero-cost when no plan set). When plan selects MoeRouter or MoeFfnOut for a layer, the last sequence position's MoE forward dispatches through `moe_ffn_forward_layer_with_router` (the M68 helper) to obtain top-k router weights without re-running the MoE forward. Other positions use production `moe_ffn_forward_layer` so trace cost stays minimal. Production `forward_qwen3_moe` / `forward_qwen3_moe_cuda` hot paths byte-unchanged (additive-purity invariant pinned in v1.1.0). MoeRouter emit shape: `[num_experts_per_tok]`; MoeFfnOut: `[hidden_dim]`. Both emit via existing `maybe_save_stage` machinery (same machinery used by `forward_traced_with_plan` for SHIP-007 SaveTensor). **Discharges FALSIFY-MOE-SUB-002 partially** at the CPU-traced surface (helper used + emit machinery wired); full discharge needs M-MOE-SUB-2 step (b) GPU sibling + M-MOE-SUB-3 live bisection on RTX 4090 + M-GPU-MOE-1.4 fix at bisected stage. **What this does NOT ship**: GPU sibling `forward_qwen3_moe_cuda_traced.rs`; `apr trace` CLI dispatch wireup to actually pass a plan through; end-to-end SaveTensor live verification. | aprender [#1516 MERGED](https://github.com/paiml/aprender/pull/1516) `3138d134d` | this PR |
| **M75** | Cross-repo **aprender-core clean-room dev-deps compat fix SHIPPED on aprender main** as squash `a5e081563` (2026-05-05, aprender PR #1517, follow-up to #1515). #1515 used path-only-no-version dev-deps which worked for `cargo publish --dry-run` but failed in clean-room's GATE A0 strip stage — the clean-room sed pattern `s/, *path *= *"[^"]*"//g` strips `path = "..."` clauses but leaves no `version` to fall back on, so dev-deps become unresolvable. v1.6.0 fix: use **permissive version + path** dev-dep form (`{ version = "*", path = "..." }`) so the strip leaves a valid `version = "*"` dependency that resolves from crates.io. Refs aprender#1514 (publish-time circular dep). Together M72 + #1515 + M75 close the APR-MONO publish-hygiene class for aprender-core: M72 fixed the lib-name; #1515 broke the dev-dep cycle; M75 makes the cycle-break clean-room-compatible. | aprender [#1517 MERGED](https://github.com/paiml/aprender/pull/1517) `a5e081563` | this PR |
| **M76** | Cross-repo **v0.32.0 publish-cascade SHIPPED on aprender main** as 2 squashes: `0bb94d5d3` (2026-05-05, aprender PR #1518) + `cb20a3648` (2026-05-05, aprender PR #1519). Combined record covering the final two PRs of the v0.32.0 publish cascade (aprender#1514). **#1518 fix**: `apr-cli/src/commands/aliases.rs:13` had `include_str!("../../../../configs/aliases.yaml")` referencing the workspace-root file; `cargo publish` excludes files outside the crate dir, breaking the publish step. Fix copies `aliases.yaml` into the crate dir + updates `include_str!` path. **#1519 chore**: CHANGELOG.md gains a `## [0.32.0] - 2026-05-05` section under `## [Unreleased]` documenting the breaking aprender-rag lib rename (#1510, #1512), the cascade publish (#1514) at v0.32.0 across 15 user-facing crates, and the mechanical-drift kaizen wins (M71 + M73 publish-hygiene cascade). Together M72 + #1515 + M75 + M76 (covering #1518 + #1519) close the v0.32.0 release cycle: lib-rename → dep-cycle break → clean-room compat → publish-include-path → CHANGELOG. **Publish-cascade lessons** (kaizen): (1) cargo publish excludes files outside crate-root → require all `include_str!` paths under `crates/<name>/`; (2) clean-room sed strips `path` but needs a `version` fallback → use `{ version = "*", path = "..." }` dev-dep form; (3) APR-MONO consolidation gaps (lib-name harmonization swept most crates but missed aprender-rag) ripple at publish time only — would benefit from a CI gate that runs `cargo publish --dry-run` for every workspace member. | aprender [#1518](https://github.com/paiml/aprender/pull/1518) `0bb94d5d3` + [#1519](https://github.com/paiml/aprender/pull/1519) `cb20a3648` | this PR |

## Falsification conditions (13 gates total)

Expand Down Expand Up @@ -744,7 +745,7 @@ inverts the schedule for everything after.
| Run | Date | Revision | Verdict | Notes |
|-----|------|----------|---------|-------|
| Run 0 | 2026-04-26 | original spec PR | **NOT YET RUN** (historical) | Spec authored; companion repo not yet scaffolded; gates 009–012 not yet wired. |
| Run 1 | 2026-04-26 → 2026-05-05 | M1–M75 (every merge to companion main) | **PASS** on every commit | Gates 009–012 (ci/gate green, pmat comply 100%, line coverage ≥99%, pv validate clean) have been hard-blocking on every PR since M1's empty-scaffold landed (FALSIFY-CCPA-009 enforces branch protection from that PR forward). M32d FUNCTIONALLY DISCHARGED 2026-05-02 (M35 audit-trail bump records aprender PR #1228 squash 5235aaeb9); subsequent days (5-03 through 5-05) show ongoing post-discharge verification — `make smoke-m32d` PASS on every check, drift detector + meta-test green at M47. Per-run audit trail lives in `contracts/claude-code-parity-apr-v1.yaml § status_history` (one entry per minor-version bump). |
| Run 1 | 2026-04-26 → 2026-05-05 | M1–M76 (every merge to companion main) | **PASS** on every commit | Gates 009–012 (ci/gate green, pmat comply 100%, line coverage ≥99%, pv validate clean) have been hard-blocking on every PR since M1's empty-scaffold landed (FALSIFY-CCPA-009 enforces branch protection from that PR forward). M32d FUNCTIONALLY DISCHARGED 2026-05-02 (M35 audit-trail bump records aprender PR #1228 squash 5235aaeb9); subsequent days (5-03 through 5-05) show ongoing post-discharge verification — `make smoke-m32d` PASS on every check, drift detector + meta-test green at M47. Per-run audit trail lives in `contracts/claude-code-parity-apr-v1.yaml § status_history` (one entry per minor-version bump). |

(Subsequent runs append below in the apr-cli-qa-spec.md format: gate / status / evidence per row. The status_history block in the contract YAML is the byte-precise audit; this table is the human roll-up.)

Expand Down
Loading