Files
stack/tests/pfs/test_codetables.py
kert 297eef504b
Some checks failed
CI / lint (push) Successful in 30s
CI / notebooks-smoke (push) Successful in 1m25s
Infra CI / notebooks (push) Failing after 1m5s
Infra CI / zotero (push) Successful in 16s
Infra CI / docs (push) Successful in 1m32s
Infra CI / api (push) Successful in 1m5s
Infra CI / llm (push) Successful in 52s
Infra CI / mc (push) Successful in 13s
CI / lint (pull_request) Successful in 31s
CI / test (push) Successful in 17m29s
CI / notebooks-smoke (pull_request) Successful in 1m27s
Infra CI / notebooks (pull_request) Failing after 1m9s
Infra CI / zotero (pull_request) Successful in 14s
Infra CI / docs (pull_request) Successful in 13s
Infra CI / api (pull_request) Successful in 19s
Infra CI / llm (pull_request) Successful in 13s
Infra CI / mc (pull_request) Successful in 13s
CI / test (pull_request) Successful in 28m53s
fix(cli,pfs): I4/I9/I6/M3 — families/lineage read without --write, bulk element/event reads, --all-payable marked experimental, unknown-family error trimmed
I4: `stack pfs families` and `stack pfs lineage` opened a RW
`duckdb_batch` connection even without `--write`, so a plain lookup
contended for the DuckDB single-writer lock a notebook may be holding
(#508-#514). Mirror the `elements --dry-run` shape: `_read()` when
`write` is false, `_batch()` + `ensure_tables` only when true. A
replica that hasn't had `--write` run yet (no `pfs.code_element`/
`code_event`/`code_family`) prints "no derived tables yet — run with
--write" and exits 0 instead of raising.

I9: `families --write` ran `read_elements`/`read_events` once per code
(~2xN queries) inside the write lock. Added `read_all_elements`/
`read_all_events` to `pfs.codetables` — one full-table read each,
grouped in Python, same per-code ordering as the existing readers.

I6: `--all-payable` isn't viable as written (the loop isn't inverted in
this slice per the controller's ruling) — help text now says
"experimental: ~20 min of SQL before any model call" and a
`log.warning` logs the target count when it's used.

M3: the unknown-`--family` error listed every key in `FAMILIES`
(~15k once `refresh_from` has run) — list only `HAND_FAMILIES`.

Claude-Session: https://claude.ai/code/session_01Aum3pEMAM3yQVdFSdVe6Gc
2026-09-09 14:11:21 -04:00

4.9 KiB