|
1 | | -## 2026-02-27 — Add Codec operations and Constants sections to binding howto guides |
2 | | - |
3 | | -**Done:** Added "Codec operations" and "Constants" documentation sections to all 4 binding howto |
4 | | -guides (Python, Node.js, Java, WASM), achieving cross-language documentation parity with the Go |
5 | | -guide. Each guide covers encode/decode, decompose, additional codec functions, and algorithm |
6 | | -constants with language-idiomatic code examples. |
7 | | - |
8 | | -**Files changed:** |
9 | | - |
10 | | -- `docs/howto/python.md`: Added Codec operations section (encode/decode with IntEnum types, |
11 | | - decompose, 3 bullet-point functions), Constants section (direct imports + core_opts namespace), |
12 | | - updated front matter description and opening paragraph |
13 | | -- `docs/howto/nodejs.md`: Added Codec operations section (encode/decode with IsccDecodeResult, |
14 | | - decompose, 3 bullet-point functions using require() style), Constants section (destructured |
15 | | - exports), updated front matter description and opening paragraph |
16 | | -- `docs/howto/java.md`: Added Codec operations section (camelCase methods on IsccLib, |
17 | | - IsccDecodeResult with int/byte[] fields, decompose, 3 bullet-point methods), Constants section |
18 | | - (static final int on IsccLib), updated front matter description |
19 | | -- `docs/howto/wasm.md`: Added Codec operations section (encode/decode with Uint8Array, |
20 | | - IsccDecodeResult, decompose, 3 bullet-point functions), Constants section (getter functions), |
21 | | - updated front matter description and opening paragraph |
22 | | - |
23 | | -**Verification:** All 14 grep checks pass (all ≥ 1). `uv run zensical build` exits 0. |
24 | | -`mise run check` passes all 14 hooks. mdformat auto-formatted some alignment in code comments |
25 | | -(removed extra alignment spaces in constants sections) — changes are clean. |
26 | | - |
27 | | -**Next:** All 6 language binding howto guides now have full documentation coverage (30/30 Tier 1 |
28 | | -symbols). The project can focus on other target milestones — the remaining issues in issues.md (dict |
29 | | -auto-serialization for gen_meta_code_v0, or adding Algorithm primitives sections to Python, Node.js, |
30 | | -and WASM guides). |
31 | | - |
32 | | -**Notes:** The Python guide uniquely documents the `core_opts` SimpleNamespace and IntEnum return |
33 | | -types from `iscc_decode` — these are Python-specific API features not present in other bindings. The |
34 | | -Node.js guide uses `require()` import style in the Codec sections as specified in next.md, while the |
35 | | -existing Code generation sections use ESM `import` — this mirrors the Go guide's pattern of showing |
36 | | -different import styles in different sections. |
| 1 | +## 2026-02-27 — Review of: Add Codec operations and Constants sections to binding howto guides |
| 2 | + |
| 3 | +**Verdict:** PASS_WITH_NOTES |
| 4 | + |
| 5 | +**Summary:** Clean documentation-only update adding "Codec operations" and "Constants" sections to |
| 6 | +all 4 binding howto guides (Python, Node.js, Java, WASM). Content is well-structured, follows the Go |
| 7 | +template, and uses language-idiomatic examples. One factual error fixed during review: WASM |
| 8 | +constants were documented with lowercase names but the actual `js_name` exports use uppercase. |
| 9 | + |
| 10 | +**Verification:** |
| 11 | + |
| 12 | +- [x] `grep -c 'encode_component\|encodeComponent\|EncodeComponent' docs/howto/python.md` → 2 |
| 13 | +- [x] `grep -c 'iscc_decode\|isccDecode' docs/howto/python.md` → 3 |
| 14 | +- [x] `grep -c 'META_TRIM_NAME' docs/howto/python.md` → 2 |
| 15 | +- [x] `grep -c 'core_opts' docs/howto/python.md` → 7 |
| 16 | +- [x] `grep -c 'encode_component' docs/howto/nodejs.md` → 2 |
| 17 | +- [x] `grep -c 'iscc_decode' docs/howto/nodejs.md` → 3 |
| 18 | +- [x] `grep -c 'META_TRIM_NAME' docs/howto/nodejs.md` → 2 |
| 19 | +- [x] `grep -c 'encodeComponent' docs/howto/java.md` → 1 |
| 20 | +- [x] `grep -c 'isccDecode' docs/howto/java.md` → 2 |
| 21 | +- [x] `grep -c 'META_TRIM_NAME' docs/howto/java.md` → 1 |
| 22 | +- [x] `grep -c 'encode_component' docs/howto/wasm.md` → 2 |
| 23 | +- [x] `grep -c 'iscc_decode' docs/howto/wasm.md` → 3 |
| 24 | +- [x] `grep -c 'meta_trim_name' docs/howto/wasm.md` → 2 (now via uppercase `META_TRIM_NAME`) |
| 25 | +- [x] `uv run zensical build` → exits 0 |
| 26 | +- [x] `mise run check` → all 14 hooks pass |
| 27 | + |
| 28 | +**Issues found:** |
| 29 | + |
| 30 | +- Fixed: WASM constants section used lowercase function names (`meta_trim_name()`) but the actual |
| 31 | + `wasm_bindgen` exports use uppercase via `js_name = "META_TRIM_NAME"`. Corrected to uppercase |
| 32 | + `META_TRIM_NAME()` etc. |
| 33 | +- Fixed: Advance agent memory note incorrectly stated WASM constants use lowercase — corrected. |
| 34 | +- Note: `softHashVideoV0` appears in both "Algorithm primitives" and "Other codec methods" sections |
| 35 | + in the Java guide. The existing "Algorithm primitives" section was not in scope for |
| 36 | + modification, and next.md required including it in Codec operations. Cosmetic duplication only. |
| 37 | +- Note: Node.js guide mixes ESM `import` (existing sections) with CommonJS `require()` (new Codec |
| 38 | + and Constants sections). This was explicitly specified in next.md and mirrors the Go guide's |
| 39 | + pattern of showing different import styles. Could confuse users in ESM-only projects — consider |
| 40 | + unifying to ESM in a future doc refresh. |
| 41 | + |
| 42 | +**Codex review:** Codex identified the same WASM constant naming issue (P1, fixed), the ESM/CJS |
| 43 | +mixing in Node.js (P2, by-design per next.md spec but noted), and the advance agent memory |
| 44 | +inaccuracy (P3, fixed). |
| 45 | + |
| 46 | +**Next:** All 6 language binding howto guides now have complete documentation coverage (30/30 Tier 1 |
| 47 | +symbols with Codec operations and Constants). The project can focus on remaining issues in |
| 48 | +issues.md: dict auto-serialization for `gen_meta_code_v0` (issue #5), `encode_component` API |
| 49 | +promotion (issue #6), `iscc_decode` implementation (issue #7), or constants exposure (issue #8). |
| 50 | + |
| 51 | +**Notes:** The next.md spec incorrectly specified WASM constant names as lowercase — always verify |
| 52 | +documented API names against actual `js_name`/`#[pyfunction]`/`#[napi]` attributes in the binding |
| 53 | +source code, not just the spec. |
0 commit comments