Skip to content

Commit 4e2fe2e

Browse files
author
CID Agent
committed
cid(review): PASS — __version__ attribute and module docstring fix
1 parent 590f8f5 commit 4e2fe2e

File tree

4 files changed

+32
-49
lines changed

4 files changed

+32
-49
lines changed

.claude/agent-memory/review/MEMORY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Review patterns, quality gate knowledge, and common issues accumulated across CI
4747

4848
- Go-only changes: `mise run check` + `mise exec -- go test ./...` is sufficient
4949

50-
- Full test suite (157 tests) runs in \<1s — always run it for Python changes
50+
- Full test suite (159 tests) runs in \<1s — always run it for Python changes
5151

5252
## Gotchas
5353

.claude/context/handoff.md

Lines changed: 26 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,29 @@
1-
## 2026-02-25 — Add `__version__` attribute and fix iscc-py module docstring
2-
3-
**Done:** Added `__version__` attribute to `iscc_lib` Python package via
4-
`importlib.metadata.version("iscc-lib")`, fixed three incorrect module name references in
5-
`crates/iscc-py/src/lib.rs` (changed `iscc._lowlevel``iscc_lib._lowlevel` and
6-
`python/iscc/__init__.py``python/iscc_lib/__init__.py`), and added two tests verifying the
7-
version attribute.
8-
9-
**Files changed:**
10-
11-
- `crates/iscc-py/python/iscc_lib/__init__.py`: Added `from importlib.metadata import version` and
12-
`__version__ = version("iscc-lib")` near the top; added `"__version__"` to `__all__`
13-
- `crates/iscc-py/src/lib.rs`: Fixed three references — line 1 docstring (`iscc._lowlevel`
14-
`iscc_lib._lowlevel`), line 3 (`iscc``iscc_lib`), line 4 path (`python/iscc/__init__.py`
15-
`python/iscc_lib/__init__.py`), and line 360 module doc (`iscc._lowlevel`
16-
`iscc_lib._lowlevel`)
17-
- `tests/test_smoke.py`: Added `test_version_exists_and_correct` (verifies `__version__` is a string
18-
equal to `"0.0.1"`) and `test_version_in_all` (verifies `"__version__"` is in `__all__`)
19-
20-
**Verification:** All 159 Python tests pass (19 smoke + 140 conformance).
21-
`python -c "import iscc_lib; print(iscc_lib.__version__)"` prints `0.0.1`.
22-
`grep -q 'iscc_lib._lowlevel' crates/iscc-py/src/lib.rs` exits 0. No old incorrect `iscc._lowlevel`
23-
references remain. `cargo clippy -p iscc-py -- -D warnings` clean.
1+
## 2026-02-25 — Review of: Add `__version__` attribute and fix iscc-py module docstring
2+
3+
**Verdict:** PASS
4+
5+
**Summary:** Clean, minimal implementation adding `__version__` via `importlib.metadata.version()`
6+
and fixing three incorrect module name references in `lib.rs`. Two `[human]`-sourced issues
7+
resolved. All 159 Python tests pass, 14 pre-commit hooks pass, clippy clean.
8+
9+
**Verification:**
10+
11+
- [x] `pytest tests/test_smoke.py` passes — 19 tests (17 existing + 2 new), all pass
12+
- [x] `pytest tests/` passes — 159 tests (19 smoke + 140 conformance), all pass
13+
- [x] `python -c "import iscc_lib; print(iscc_lib.__version__)"` prints `0.0.1`
14+
- [x] `grep -q 'iscc_lib._lowlevel' crates/iscc-py/src/lib.rs` exits 0 — docstring fixed
15+
- [x] `grep 'iscc\._lowlevel' ... | grep -qv 'iscc_lib'` exits non-zero — no old references remain
16+
- [x] `cargo clippy -p iscc-py -- -D warnings` clean
17+
18+
**Issues found:**
19+
20+
- (none)
2421

2522
**Next:** Remaining `[low]` issues: iscc-wasm conformance feature gate, iscc-wasm stale CLAUDE.md,
26-
iscc-jni exception mapping, and TypeScript port evaluation.
23+
iscc-jni exception mapping, and TypeScript port evaluation. Define-next should pick the next
24+
highest-value item.
2725

28-
**Notes:** next.md specified the version as `"0.0.1"` which is correct for the workspace Cargo.toml
29-
version. The installed package had a stale `0.1.0` version from a previous build — rebuilding with
30-
`maturin develop` resolved the mismatch. Also found a third incorrect `iscc._lowlevel` reference on
31-
line 360 (the `#[pymodule]` docstring) that wasn't mentioned in next.md but was caught by the
32-
verification grep and fixed.
26+
**Notes:** The advance agent found and fixed a third incorrect `iscc._lowlevel` reference on line
27+
360 (the `#[pymodule]` docstring) that wasn't in next.md's scope — this was correctly caught by the
28+
verification grep and is within the spirit of the docstring fix task. Total `__all__` count is now
29+
34 symbols (33 API + `__version__`).

.claude/context/issues.md

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -90,25 +90,6 @@ state-related errors (finalized hashers, etc.).
9090

9191
**Source:** [human]
9292

93-
## [low] iscc-py: Missing `__version__` attribute
94-
95-
`crates/iscc-py/python/iscc_lib/__init__.py` does not expose a `__version__` attribute. The Python
96-
reference (`iscc-core`) exports `__version__`, and standard Python tooling expects it for runtime
97-
version detection.
98-
99-
Fix: add `__version__` via `importlib.metadata.version("iscc-lib")` or let maturin inject it.
100-
101-
**Source:** [human]
102-
103-
## [low] iscc-py: Module docstring references wrong package name
104-
105-
In `crates/iscc-py/src/lib.rs:1`, the module docstring says `iscc._lowlevel` but the actual module
106-
name is `iscc_lib._lowlevel` (per `pyproject.toml` `[tool.maturin].module-name`).
107-
108-
Fix: update the docstring to reference `iscc_lib._lowlevel`.
109-
110-
**Source:** [human]
111-
11293
## [low] iscc-wasm: `conformance_selftest` unconditionally exported increases binary size
11394

11495
In `crates/iscc-wasm/src/lib.rs:197`, `conformance_selftest()` is exported via `#[wasm_bindgen]`

.claude/context/iterations.jsonl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,3 +288,8 @@
288288
{"ts":"2026-02-25T07:25:16.009255+00:00","iteration":20,"role":"define-next","status":"OK","turns":23,"cost_usd":0.860368,"duration_s":147.0}
289289
{"ts":"2026-02-25T07:29:07.169668+00:00","iteration":20,"role":"advance","status":"OK","turns":33,"cost_usd":1.170119,"duration_s":231.2}
290290
{"iteration":20,"timestamp":"2026-02-25T07:33:00Z","step":"Add input validation to alg_dct and alg_wtahash","verdict":"PASS","files_changed":["crates/iscc-lib/src/dct.rs","crates/iscc-lib/src/wtahash.rs","crates/iscc-lib/src/lib.rs"],"issues_resolved":["alg_dct allows non-power-of-two even lengths","alg_wtahash panics on short input"],"tests":{"iscc_lib":269},"notes":"8 new validation tests, no behavioral change for valid inputs."}
291+
{"ts":"2026-02-25T07:32:36.763744+00:00","iteration":20,"role":"review","status":"OK","turns":28,"cost_usd":0.997514,"duration_s":209.6}
292+
{"ts":"2026-02-25T07:55:53.036970+00:00","iteration":21,"role":"update-state","status":"OK","turns":18,"cost_usd":0.836841,"duration_s":247.9}
293+
{"ts":"2026-02-25T07:58:01.988026+00:00","iteration":21,"role":"define-next","status":"OK","turns":20,"cost_usd":0.663946,"duration_s":128.9}
294+
{"ts":"2026-02-25T08:02:44.790355+00:00","iteration":21,"role":"advance","status":"OK","turns":42,"cost_usd":1.427565,"duration_s":282.8}
295+
{"iteration":21,"timestamp":"2026-02-25T08:10:00Z","step":"Add __version__ attribute and fix iscc-py module docstring","verdict":"PASS","files_changed":["crates/iscc-py/python/iscc_lib/__init__.py","crates/iscc-py/src/lib.rs","tests/test_smoke.py"],"issues_resolved":["iscc-py: Missing __version__ attribute","iscc-py: Module docstring references wrong package name"],"tests":{"python":159},"notes":"Standard importlib.metadata.version() pattern. 3 docstring references fixed. 2 new tests."}

0 commit comments

Comments
 (0)