docs(spec): P41 build outcomes; plan checked off (refs #639-#641)
All checks were successful
CI / lint (push) Successful in 32s
CI / notebooks-smoke (push) Successful in 1m29s
Deploy / notebooks (push) Has been skipped
Deploy / zotero (push) Has been skipped
Deploy / docs (push) Has been skipped
Deploy / api (push) Has been skipped
Deploy / llm (push) Has been skipped
Deploy / mc (push) Has been skipped
Infra CI / notebooks (push) Successful in 56s
Infra CI / zotero (push) Successful in 13s
Infra CI / docs (push) Successful in 1m26s
Infra CI / api (push) Successful in 1m1s
Infra CI / llm (push) Successful in 52s
Infra CI / mc (push) Successful in 22s
Deploy / report (push) Successful in 13s
CI / test (push) Successful in 13m16s
Notebooks Integration / notebooks-integration (push) Successful in 7m55s
Zotero Sync / zotero-sync (push) Successful in 1m21s
Package Supply Chain / pkg-supply-chain (push) Successful in 58s
All checks were successful
CI / lint (push) Successful in 32s
CI / notebooks-smoke (push) Successful in 1m29s
Deploy / notebooks (push) Has been skipped
Deploy / zotero (push) Has been skipped
Deploy / docs (push) Has been skipped
Deploy / api (push) Has been skipped
Deploy / llm (push) Has been skipped
Deploy / mc (push) Has been skipped
Infra CI / notebooks (push) Successful in 56s
Infra CI / zotero (push) Successful in 13s
Infra CI / docs (push) Successful in 1m26s
Infra CI / api (push) Successful in 1m1s
Infra CI / llm (push) Successful in 52s
Infra CI / mc (push) Successful in 22s
Deploy / report (push) Successful in 13s
CI / test (push) Successful in 13m16s
Notebooks Integration / notebooks-integration (push) Successful in 7m55s
Zotero Sync / zotero-sync (push) Successful in 1m21s
Package Supply Chain / pkg-supply-chain (push) Successful in 58s
This commit is contained in:
@@ -27,10 +27,10 @@
|
||||
|
||||
**Interfaces:** `CfrCite(title: int, part: str, section: str, paras: tuple[str, ...], date: str)`; `parse_cite(ref) -> CfrCite`; `url(cite) -> str`; `cite_of(url) -> str`; `canonical(cite) -> str` (the canonical spelling used by cite_of and tests).
|
||||
|
||||
- [ ] **Step 1 (failing tests):** spellings (`42 CFR 425.400(c)(1)(iv)`, `42 C.F.R. § 425.400`, `42 CFR § 414.1425`, `42 CFR Part 425`, case/dots/spacing variants); title-required rejection; URL emission incl. fragment + part + date pin; `cite_of` over short, canonical-hierarchy (`/current/title-42/chapter-IV/…/section-425.400`), `/on/2026-01-01/…`, and fragmented URLs; **both round-trip laws**.
|
||||
- [ ] **Step 2:** red → **Step 3:** implement → **Step 4:** green (`uv run pytest tests/bib/test_cfrlink.py -q`).
|
||||
- [ ] **Step 5:** Live smoke (one-off): GET `url(parse_cite("42 CFR 425.400(c)(1)(iv)"))` with browser UA → 200 and the body contains `id="p-425.400(c)(1)(iv)"`.
|
||||
- [ ] **Step 6:** Commit `feat(bib): cfrlink — bidirectional CFR cite/eCFR URL transmuter (closes #639)`.
|
||||
- [x] **Step 1 (failing tests):** spellings (`42 CFR 425.400(c)(1)(iv)`, `42 C.F.R. § 425.400`, `42 CFR § 414.1425`, `42 CFR Part 425`, case/dots/spacing variants); title-required rejection; URL emission incl. fragment + part + date pin; `cite_of` over short, canonical-hierarchy (`/current/title-42/chapter-IV/…/section-425.400`), `/on/2026-01-01/…`, and fragmented URLs; **both round-trip laws**.
|
||||
- [x] **Step 2:** red → **Step 3:** implement → **Step 4:** green (`uv run pytest tests/bib/test_cfrlink.py -q`).
|
||||
- [x] **Step 5:** Live smoke (one-off): GET `url(parse_cite("42 CFR 425.400(c)(1)(iv)"))` with browser UA → 200 and the body contains `id="p-425.400(c)(1)(iv)"`.
|
||||
- [x] **Step 6:** Commit `feat(bib): cfrlink — bidirectional CFR cite/eCFR URL transmuter (closes #639)`.
|
||||
|
||||
### Task 2: Context + placement + CLI ([#640](https://git.fhirworx.io/homelab/stack/issues/640))
|
||||
|
||||
@@ -38,22 +38,22 @@
|
||||
|
||||
**Interfaces:** `item_for(cite, store) -> str` ("" when absent; exact-section item beats part item); `place(store, ref, *, label="") -> JumpLink` (frlink.JumpLink reused; raises when no regulation item matches); `md_link(ref, *, text="") -> str` (store-free); CLI `cfr-jump`.
|
||||
|
||||
- [ ] **Step 1 (failing tests):** fixture store with a part item (`…/title-42/part-425`) + a section item (`…/part-425/section-425.400`) + an unrelated part; `item_for` section-preference + part fallback (cite `425.402` → part item) + miss (""); `place` writes `fr_links` row (page=0, correct label/url) on the section item; place-without-item raises; double-place no-ops; one sync test in `tests/bib/test_sync.py`: a CFR-placed row becomes a linkMode=3 child (reuses P40 fixtures).
|
||||
- [ ] **Step 2:** red → **Step 3:** implement + CLI (`--url` reverse mode prints `cite_of`) → **Step 4:** green (cfrlink + sync files).
|
||||
- [ ] **Step 5:** Commit `feat(bib): cfrlink context + placement over regulation items + cfr-jump CLI (closes #640)`.
|
||||
- [x] **Step 1 (failing tests):** fixture store with a part item (`…/title-42/part-425`) + a section item (`…/part-425/section-425.400`) + an unrelated part; `item_for` section-preference + part fallback (cite `425.402` → part item) + miss (""); `place` writes `fr_links` row (page=0, correct label/url) on the section item; place-without-item raises; double-place no-ops; one sync test in `tests/bib/test_sync.py`: a CFR-placed row becomes a linkMode=3 child (reuses P40 fixtures).
|
||||
- [x] **Step 2:** red → **Step 3:** implement + CLI (`--url` reverse mode prints `cite_of`) → **Step 4:** green (cfrlink + sync files).
|
||||
- [x] **Step 5:** Commit `feat(bib): cfrlink context + placement over regulation items + cfr-jump CLI (closes #640)`.
|
||||
|
||||
### Task 3: Rollout ([#641](https://git.fhirworx.io/homelab/stack/issues/641))
|
||||
|
||||
**Files:** Modify `src/bib/pincite.py` (+test), `notebooks/cy2027_pfs_proposed_rule.py`. Data: bib/zotero.
|
||||
|
||||
- [ ] **Step 1:** `jump_url` cfr branch (failing test first: locator `42 CFR 425.400(c)` → URL; `§ 3.2` stays ""); green; part of the Task-3 commit.
|
||||
- [ ] **Step 2:** Notebook: `cfr_md()` in the setup cell (store-free, same fallback shape); live-link `42 CFR 414.1450(b)(1)` (APM revival cell), spell the QP-alignment cite `42 CFR 414.1425(c)(5)(ii)` and link it, and link `42 CFR 425.400(c)` in the PQM definition cell. Gate: single-notebook `nb_integration` `pass=1`.
|
||||
- [ ] **Step 3:** Place `42 CFR 414.1450(b)(1)`, `42 CFR 414.1425(c)(5)(ii)`, `42 CFR 425.400(c)` on their regulation items; `sync-zotero` scoped to those items' tags (check what tag scopes cover regulation items — fall back to `--tag` on a per-item tag or run the sync via a small scoped call); verify linkMode=3 children in zotero.sqlite.
|
||||
- [ ] **Step 4:** Commit `feat(bib,notebooks): cfr locator jump URLs + live eCFR links in CY2027 notebook (closes #641)`.
|
||||
- [x] **Step 1:** `jump_url` cfr branch (failing test first: locator `42 CFR 425.400(c)` → URL; `§ 3.2` stays ""); green; part of the Task-3 commit.
|
||||
- [x] **Step 2:** Notebook: `cfr_md()` in the setup cell (store-free, same fallback shape); live-link `42 CFR 414.1450(b)(1)` (APM revival cell), spell the QP-alignment cite `42 CFR 414.1425(c)(5)(ii)` and link it, and link `42 CFR 425.400(c)` in the PQM definition cell. Gate: single-notebook `nb_integration` `pass=1`.
|
||||
- [x] **Step 3:** Place `42 CFR 414.1450(b)(1)`, `42 CFR 414.1425(c)(5)(ii)`, `42 CFR 425.400(c)` on their regulation items; `sync-zotero` scoped to those items' tags (check what tag scopes cover regulation items — fall back to `--tag` on a per-item tag or run the sync via a small scoped call); verify linkMode=3 children in zotero.sqlite.
|
||||
- [x] **Step 4:** Commit `feat(bib,notebooks): cfr locator jump URLs + live eCFR links in CY2027 notebook (closes #641)`.
|
||||
|
||||
### Task 4: Close the loop
|
||||
|
||||
- [ ] Push; CI green on HEAD (skipped=terminal); issues closed; close [milestone P41](https://git.fhirworx.io/homelab/stack/milestone/42); outcomes appended to spec; memory updated (`fr_jump_links.md` gains the cfrlink section).
|
||||
- [x] Push; CI green on HEAD (skipped=terminal); issues closed; close [milestone P41](https://git.fhirworx.io/homelab/stack/milestone/42); outcomes appended to spec; memory updated (`fr_jump_links.md` gains the cfrlink section).
|
||||
|
||||
## Self-Review
|
||||
|
||||
|
||||
@@ -124,3 +124,29 @@ links. Gate: `nb_integration.py` single-notebook run.
|
||||
- Quote → paragraph addressing for CFR text (would need section text
|
||||
ingestion; FR quotes already cover the rulemaking corpus).
|
||||
- Auto-creating regulation items for cites not in the library.
|
||||
|
||||
## P41 build outcomes (2026-08-17)
|
||||
|
||||
Issues #639–#641, milestone P41 (5 commits, b872d7d..HEAD, direct on
|
||||
main; TDD throughout).
|
||||
|
||||
- **#639 (b872d7d)**: `bib/cfrlink.py` pure transmuter — 23 tests incl.
|
||||
both round-trip laws; live smoke: the generated
|
||||
`…/section-425.400#p-425.400(c)(1)(iv)` URL returns 200 with the
|
||||
fragment's anchor present in the body.
|
||||
- **#640**: `item_for` (exact-section beats part over the 699
|
||||
regulation items), `place()` reusing `fr_links` (page=0) and the
|
||||
untouched `_sync_fr_links` path, `cfr-jump` CLI with `--url` reverse
|
||||
mode. Live: all three rollout cites matched exact **section-level**
|
||||
regulation items (74YXT4TC / HFY6IREA / 95PQGJRP).
|
||||
- **#641**: `Pincite.jump_url` cfr branch (store-free); notebook
|
||||
`cfr_md()` helper + live eCFR links for `42 CFR 414.1450(b)(1)`,
|
||||
`42 CFR 414.1425(c)(5)(ii)`, `42 CFR 425.400(c)` (gate `pass=1`,
|
||||
in-container resolution proven); placed links synced via
|
||||
`--tag source:ecfr` (699 items, all URL-dedupe skips, `fr_links: 3`)
|
||||
onto the **pre-existing** Zotero regulation items (GEZXDVQ9 /
|
||||
AEHYQWRZ / 47GK4BZE — Zotero held the regs under pre-bib keys; the
|
||||
sync's URL dedupe attached children to them exactly as designed).
|
||||
- Note: `cite_of` on a date-pinned URL returns the undated canonical
|
||||
cite (the date is a view parameter, not part of the citation) — by
|
||||
design, documented here.
|
||||
|
||||
Reference in New Issue
Block a user