Repository navigation
Feature: wp38-s3a-cpu-flag #657
Copy link
Copy link
Open
Labels
Description
Run
- repo: amritk/nish
- base: main @ cbb2213
- plan:
feature/wp38-s3a-cpu-flag/plan→.claude/plans/wp38-s3a-cpu-flag.plan.md@ 98ea77d (pre-flight amendments accepted by the owner 2026-10-16T09:0xZ) - lead:
session_01LJyT4NWMzXWA8EdqFQn58o - source: WP38 §8, the owner's decisions Q7–Q9 of 2026-10-16
- flags: max-slices 4 (3 used), max-rounds 6, autonomous merge (CLAUDE.md / AGENTS.md; no CODEOWNERS)
- verification: types
npm run check· testnpm test, run by CI (4 shards), not locally, per the owner · targetednode tests/run.js <section>· lintnpm run lint· docsnode docs/check-links.mjs· S2 alsonode tests/run.js wasi(WASI_SYSROOT set, skip line read) andnode tests/run.js performance· gate = repo definition of done + CI green on head incl.bootstrap(no coverage command exists in this repo) - generated files:
tests/self/goldens/**,tests/differential/goldens/**,CHANGELOG.md: regenerated with the repo's tooling, never hand-merged - sensitive path authorised: S2 may add one
.github/workflows/ci.ymlstep that greps its AVX2-gated--cpuPASS line; any other ci.yml change escalates - merge order: s7-other-holder-golden → s2-cpu-flag (shared
tests/run.js,tests/self/goldens); s3a-measure and s2-cpu-flag both editdocs/wp38-simd.md, so whichever merges second merges main first - bounds: deadline 2026-10-16T17:10Z · no-branch 45m · no-commit 90m · re-runs 1 per check per head · check-ins 30→60→120m on no drift, capped at the shortest running silence timeout
- worker skills: workers have only
amritk/nishattached, so/check-iterate,/simplifyand/debugfall back to the manual versions in their prompt
Acceptance
Derived from the plan's goals (no separate requirements text); accepted by the owner at sign-off. No UI, so qa means a session running the commands on main.
| # | criterion | static | qa | state |
|---|---|---|---|---|
| 1 | tests/cases/arr_bounds_offset_other panics index out of range: 2 >= 2, exit 1, natively and under Node; its .ll keeps one nish_panic_index branch in mixed, on ys |
pending | ||
| 2 | node bench/simd-s3a.mjs --self --runs 15 builds all four forms of both kernels, prints min/median with one checksum per kernel, and refuses a C vector file whose IR holds llvm.x86. / llvm.aarch64. |
pending | ||
| 3 | docs/wp38-simd.md §2.3 holds the S3a record (commit, machine, clang, table, ratios vs the band, vectorised or not, an AArch64 line, §7's reading) and §7's S3a row is landed |
pending | ||
| 4 | On an AVX2 machine --cpu x86-64-v3 --link builds examples/hello.ts into a binary printing the baseline's output; the capability report says "cpu": "x86-64-v3", "baseline" without the flag |
pending | ||
| 5 | --cpu native, --cpu x86-64-v4, --cpu armv8.2-a, --cpu x86-64-v3 --profile wasi, --cpu x86-64-v3 --target aarch64-unknown-linux-gnu each exit 2 with one line naming x86-64-v3 |
pending | ||
| 6 | One program built with and without --cpu against one cache leaves two runtime entries |
pending | ||
| 7 | Every ct_asm check (Nish fixtures and runtime kernels) passes at baseline and at x86-64-v3 on x86-64 |
pending | ||
| 8 | LANGUAGE.md, docs/guide/using-nish/cli.md and CT-16 describe the flag; node docs/check-links.mjs passes; CI on main, bootstrap included, is green after the last merge |
pending |
Slices
| stage | owns | model | depends on | session | branch | PR | CI | rounds | state |
|---|---|---|---|---|---|---|---|---|---|
| s7-other-holder-golden | tests/cases/arr_bounds_offset_other.*, tests/run.js (offset-index tables), tests/differential/goldens/**, tests/self/goldens/** |
sonnet | — | session_01DHgXtsctiWLebFqKsYsRZk |
feature/wp38-s3a-cpu-flag/s7-other-holder-golden |
— | — | 0/6 | running |
| s3a-measure | bench/simd-s3a/**, bench/simd-s3a.mjs, docs/wp38-simd.md (§2.3 S3a, §7 S3a row), THIRD_PARTY_NOTICES.md |
lead | — (docs edge with s2) | session_01CZTJ1XRQwnoogWuieguSgB |
feature/wp38-s3a-cpu-flag/s3a-measure |
— | — | 0/6 | running |
| s2-cpu-flag | src/compile.ts, src/run-cache.ts, src/capability-report.ts, scripts/build.sh, tests/run.js (ct_asm, driver tests), tests/ct-asm-runtime.js, tests/nish/cli.ts, tests/self/goldens/**, docs/LANGUAGE.md, docs/guide/using-nish/cli.md, docs/security/ct-verification.md, docs/wp38-simd.md (§7 S2 row), .github/workflows/ci.yml (one grep step) |
lead | s7 (merge) | session_017tsWYNnYJaK1qWNRBxrqPy |
feature/wp38-s3a-cpu-flag/s2-cpu-flag |
— | — | 0/6 | running |
| acceptance | — | sonnet | all | — | — | — | — | — | pending |
Skipped
- none
Rejected findings
- none yet
Log
- 2026-10-16T09:10Z plan accepted by the owner with three pre-flight amendments; pushed to
feature/wp38-s3a-cpu-flag/plan(98ea77d); ledger opened - 2026-10-16T09:12Z spawned s7-other-holder-golden (sonnet), s3a-measure, s2-cpu-flag (no-branch clock to 09:57Z)
Reactions are currently unavailable
Activity
amritk commentedon Oct 16, 2026
Log, check-in #1 (09:43Z):
no attributionrun failed on the cloud footer and passed on re-run),cleanagainst main @ a22a056 → review round 1 started (2 shards)Generated by Claude Code
amritk commentedon Oct 16, 2026
Log 09:5xZ: #658 r1 @ 526652b. 11 raised (2 shards), 0 blocking confirmed → converged. 7 non-blocking findings sent once (§7 row "landed" wording, lscpu detail, the form-2-vs-3 gap, the bool-vector bitmask note,
--only "",--runsrounding, the source regex). The worker was told: one push, no further round, the lead merges on green.Rejected (#658 r1): the remark-based vectorisation report (deviation recorded in the record; the default profile is speed); the vectorised() crash on remark paths (no reachable input); dropping
,/:from the depth kernel (the plan names four byte classes); the "3 over its copy" row being inverted (it follows the table's X-over-Y convention).Generated by Claude Code
amritk commentedon Oct 16, 2026
Log 09:5xZ:
--only ""→ exit 2,--runsrounding documented, the regex widened). Waiting on CI at that head.clean· diff ⊆ Owns · no sensitive paths · first in merge order. Squash-merged as 917897c. Unsubscribed; s7 worker archived.tests/self/goldensfirst.Generated by Claude Code
amritk commentedon Oct 16, 2026
Log 10:0xZ:
clean· diff ⊆ Owns · no sensitive paths · no merge-order dependency) → squash-merged as b8c3b72 with the changelog body and theMeasured:trailer from the record. Unsubscribed; s3a worker archived. s3a-measure: merged.no attributionrun failed on the cloud footer and was superseded by a success). No textual conflict with main @ b8c3b72. Subscribed → review round 1 started (2 shards: src/build.sh/ci.yml; tests/docs).Generated by Claude Code
amritk commentedon Oct 16, 2026
Log 10:1xZ: #660 r1 @ c52853d. ~12 raised (2 shards), 7 verified, 0 blocking → converged. 5 non-blocking findings were sent once, together with the "you are next" instruction: merge main (S7 + S3a landed), regenerate goldens, one push. The findings: the CT check counts, the CT-16 README index row, the stale "not built" lines, LANGUAGE.md's host sentence, the README usage line.
Owns amended by the lead for S2 (doc pointers to the same fact; no other stage is open): the CT-16 row of
docs/security/README.md, the S2 "not built" status lines ofdocs/wp38-simd.md, and oneREADME.mdusage line.Rejected (#660 r1): CT-16's finding column vs its status column (the file's convention); the guide's "Haswell … and later" claim (conditioned on AVX2). Not sent, observations only:
--cpuwithout--linkis a no-op; the "-march on 7 units" and cache checks have no CI grep (they are not /proc/cpuinfo-gated).Generated by Claude Code
amritk commentedon Oct 16, 2026
Log 10:4xZ: #660's worker pushed 63991c1. It merged main @ 464f41e (#642) and applied the 5 non-blocking findings plus the authorised pointer edits; CI completed,
clean. Main then moved to b322a4b (#652, std/ and goldens), so per CLAUDE.md the worker was told to merge main again and regenerate before the gate. Recorded deviation: the capability report writes"cpu"only with the flag; a baseline report stays byte-identical rather than carrying"cpu": "baseline". The PR body says this avoids moving the caps goldens and the IR cookbook, which are outside Owns. That bears on acceptance criterion 4 and is left for the owner.Generated by Claude Code
amritk commentedon Oct 16, 2026
Log 10:58Z:
session_01HFtMokKdVhcZbZJDH3zvz3(sonnet; CLI exercise on main @ 3756681; verdict comment behind<!-- feature:acceptance -->).Generated by Claude Code
amritk commentedon Oct 16, 2026
Verdict: FAIL. Seven of the eight criteria pass. Criterion 1 fails on its "under Node" half. Native behaves as specified, but the same program under Node prints
NaNand exits 0.Tested at
375668139fbd(detached checkout of main) afterbash scripts/fetch-seed.sh --force(exit 0) andnpm run build(exit 0). The machine has AVX2:grep -c avx2 /proc/cpuinfoprinted 4. It is an Intel Xeon @ 2.80GHz with clang 18.1.3.arr_bounds_offset_otherpanicsindex out of range: 2 >= 2, exit 1, native and Node;mixedkeeps onenish_panic_indexbranch, onysnish tests/cases/arr_bounds_offset_other.ts --linkthen run printsindex out of range: 2 >= 2, exit 1.nish rungives the same, exit 1. IR:tests/cases/arr_bounds_offset_other.llhas onecall @nish_panic_index(i64 %26, i64 %5).%5is the length loaded from%ys, andxshas no check. Node:node --experimental-strip-types --import ./runtime/nish.mjs -e 'const m = await import("./tests/cases/arr_bounds_offset_other.ts"); process.exit(m.main())'printsNaN, exit 0.runtime/nish.mjs:29-30documents thata[i]is unchecked under Node, andtests/differential/goldens/unfrozen.txt:28lists the case as UNFROZEN, so no run compares Node with native.node bench/simd-s3a.mjs --self --runs 15portability: no target intrinsic in any vector form's source or IR (the x86-64 and AArch64 probes are caught).bench/simd-s3a.mjs:139-153runs the_mm_sad_epu8andvqtbl1q_u8probes and fails if either is missed.--only ""prints--only needs at least one kernel (kernels: mat-vec, depth)and exits 2. I did not plant a refusable vector file.docs/wp38-simd.md§2.3 S3a record; §7 row landed3 over its copynoise band, a section on whether the scalar forms vectorised, the AArch64 line ("no AArch64 figure") and the reading. The §7 S3a row (line 1325) says "Landed (#658)". Caveat: the cited commit46a1e4dis not an object in this checkout. It was a pre-squash PR commit, so the record's anchor can't be resolved from main.--cpu x86-64-v3 --linkonexamples/hello.tshello from Nish, andcmpof the outputs is identical.--emit-capabilitieswith the flag has"cpu": "x86-64-v3"right after"entry". The baseline report has nocpukey (grep -c '"cpu"'gives 0). Its top-level keys areversion,entry,deterministic,capabilitiesandpackages.x86-64-v3--cpu native,--cpu x86-64-v4and--cpu armv8.2-aeach printcompile: unknown cpu level `<x>`; the one accepted is x86-64-v3.--cpu x86-64-v3 --profile wasiprintscompile: --cpu x86-64-v3 is an x86-64 level, so it cannot be used with --profile wasi.--cpu x86-64-v3 --target aarch64-unknown-linux-gnuprintscompile: --cpu x86-64-v3 is an x86-64 level, and the target is aarch64-unknown-linux-gnu.--cpuagainst one cache gives two runtime entriesXDG_CACHE_HOMEset to a fresh directory,nish runwith and without--cpuleft 2 dirs innish/runtime. Repeating them left it at 2. The same withnish --linkon a fresh cache, run three times (baseline, v3, baseline), also left 2. Mixingrunand--linkin one cache gave 4, so the two routes keep separate entries.ct_asmcheck passes at baseline and x86-64-v3node tests/run.js ct_asmgave 222 passed, 0 failed, exit 0, with no skip lines and 0FAILlines. 58 lines name x86-64-v3, including the fixtures (ct_asm_aes,ct_asm_chacha20poly1305) and theruntime-aes.ckernels (exports,nish_aes_schedule,nish_aes_block).docs/LANGUAGE.mdhas "The CPU level" (line 5014, and 7539 onward).docs/guide/using-nish/cli.md:78has the flag. CT-16 indocs/security/ct-verification.md:89is marked "Narrowed (WP38 S2)".node docs/check-links.mjsprintedok: 1346 links in 87 Markdown files, exit 0.Other commands.
npm run check: exit 0.npm run lint: exit 0 (Checked 444 files).node tests/run.js cpu-level: 31 passed, 0 failed, exit 0.node tests/run.js ct_asm: 222 passed, 0 failed, exit 0.node tests/run.js arr_bounds_offset: 51 passed, 0 failed, exit 0, no skip lines.Observation, not a criterion. In my
--selfrun the depth s0 noise band was 1.11x min / 1.08x median, against "within 5%" in the §2.3 record. The C vector forms still beat Nish checked by 1.61x on mat-vec, 2.16x on depth s0 and 5.84x on depth log (min), so the bar still holds on this machine.Not exercised.
llvm.x86.orllvm.aarch64.to see the refusal. I relied on the harness's own two probes.npm test, as instructed. Nothing was fixed, and no PR, branch or issue was opened.Generated by Claude Code
amritk commentedon Oct 16, 2026
Close-out: 3 merged, 0 escalated slices; acceptance 6/8, 2 criteria escalated to #662
session_01HFtMokKdVhcZbZJDH3zvz3Review: 3 rounds in all. 0 blocking findings were confirmed, 12 non-blocking were applied and 6 were refuted.
CI on main @ 3756681: the CI, Interop and Release PR workflows all succeeded.
Acceptance: criteria 2, 3, 5, 6, 7 and 8 are met. The criteria were derived from the plan, not given separately.
arr_bounds_offset_otherpanics natively but printsNaNunder Node. Indexing is unchecked under Node by design, and cases added after R6 are not compared against Node, so the plan's expectation was wrong rather than the code.cpukey; the plan asked for"cpu": "baseline". feat(cli): --cpu x86-64-v3 links module and runtime at one CPU level (WP38 S2) #660 departed from the plan deliberately and documented it.Both are in WP38 S7/S2 acceptance: two criteria the merged code does not meet as written #662 for the owner. This issue stays open as the handoff.
Proposed CLAUDE.md line. #658 and #660 each anchored a record at a branch SHA that the squash merge made unreachable:
Report: https://claude.ai/artifact/7WLnAi9jBv4khrMau59r4k
Generated by Claude Code