Ruling A7: stack bib code-tags called apply_code_tags once per collection with an independent mapping, so the max-codes-per-item cap was evaluated per source instead of per item — 54 items straddling rules/corpus could dodge it in both calls. Now every selected source (rules anchors + chunks, comments chunks, corpus chunks) merges into one item_key -> (codes, families) mapping before a single apply_code_tags call. Store.add_tags batches an item's new labels into one commit instead of one commit per add_tag call; apply_code_tags uses it. Fixes the 34-minute backfill's commit-per-tag overhead. Also: noqa on the codetags._con() access, a CLI test for --anchors-only on a non-rules collection, and add_tags coverage in test_store.py.
32 KiB
32 KiB