|
35 | 35 |
|
36 | 36 | --- |
37 | 37 |
|
| 38 | +## #366 — impl(sprint-7): 7-worker implementation wave for sprint-5/6 specs + AuditSink trait unification (merged 2026-05-13) |
| 39 | + |
| 40 | +**Confidence (2026-05-13):** merged clean. Workspace `cargo clippy --workspace --tests --no-deps -- -D warnings` exits 0; all sprint-7 worker tests pass; `UnifiedAuditEvent::canonical_bytes` 26-byte invariant preserved across the OQ-7-2 trait migration. **Status:** Merged to `main` (commit `3a85ec0`). **Adjacent landings (2026-05-13):** MedCare-rs sprint-1 10-PR sweep (#113 Finding 1 `MedcareOntology::from_registry` → PR-α / #114 FingerprintCodec re-export fold Pattern N → PR-γ / #115 AUTH_LEGACY_TRIPLEDES_MIGRATION cipher reality → PR-δ / #116 ALL_SCHEMAS 4→7 mirrors OGIT PR #3 → Finding 2 / #117 SPRINT5_READINESS_RECON / #118 ndarray hpc-extras investigation upstream-blocked / **#119 medcare_healthcare_policy + 6 RoleGroups consumes our `0d725d4` OQ-3 direct-migration decision** / #120 governance board + tier-0 / #121 sprint-1 meta-retrospective with §8 sprint-2 5-PR queue / #122 codex P2 path-fix). All merged the same day. MedCare-rs sprint-2 is now ready on user "go" — 5 PRs queued, item 5 (Audit-sink decision: JSONL primary + optional Lance projection) consumes this PR's `UnifiedBridge::with_jsonl_audit()` ergonomic constructor. |
| 41 | + |
| 42 | +**Added:** |
| 43 | +- **7 sprint-7 worker outputs** across 5 crates (+2 new), ~5 KLOC, ~70 new tests: |
| 44 | + - **S7-W1** `pr-d4-family-hydration` — `parse_family_registry()` API + `FAMILY_TABLE` OnceLock + Healthcare basins `0x10..=0x19` (FMA/SNOMED/ICD10/RxNorm/LOINC/MONDO/HPO/DRON/CHEBI/RadLex) seeded via `data/family_registry.ttl`. **Critical-path unblocker for MedCare-rs E1-2/E1-3/E1-4 cascade.** ~560 LOC, 16/16 + 9/9 tests. |
| 45 | + - **S7-W2** `pr-g1-manifest-modules` — `lance-graph-contract/build.rs` (~260 LOC) + `manifest.rs` (~80 LOC) codegen pipeline reading 6 YAML manifests (dolce / medcare / smb-office / q2-cockpit / fma / hubspot). **CC-7 fix per OQ-2: sorted-slice + `binary_search_by_key`, NOT `phf::Map`. Zero-dep invariant preserved** — `[dependencies]` in `lance-graph-contract` unchanged. ~980 LOC, 8 codegen tests. |
| 46 | + - **S7-W3** `pr-g2-ractor-supervisor` — new crate `lance-graph-supervisor`. `CallcenterSupervisor` with one-for-one supervision, exponential backoff (100ms × 2ⁿ capped 30s), escalation > 10. **CC-2 fix: separate 18-byte `LifecycleAuditEvent`** (NOT merged into AuthOp / UnifiedAuditEvent). **CC-3 fix: `SuperDomain::System` with hard-lock exemption.** 11 tests + 26-byte regression. |
| 47 | + - **S7-W4** `sprint-6-conformance-test` — new crate `lance-graph-consumer-conformance`. Generic `assert_consumer_conformance<B: NamespaceBridge>()` with all 10 contract assertions A1-A10. Fixtures for E1/E2/E3; E4/E5 `#[ignore]` scaffolds. A6 exempts `SuperDomain::System` per meta CC-3. 8 pass + 2 ignored, 0 fail. |
| 48 | + - **S7-W5** `pr-f1-thinking-engine-wire` — `CognitiveBridgeGate` trait in `thinking-engine` + `UnifiedBridgeGate<B: NamespaceBridge>` impl in `lance-graph-callcenter`. Chinese-wall check fires before policy on `tenant_id` mismatch. **No circular dep** (callcenter → thinking-engine only). 329 thinking-engine + 114 callcenter + 12 new gate tests. |
| 49 | + - **S7-W6** (combined `pr-d3a` + `pr-d3b`) — new `crate::audit_sink` module: `AuditSink` trait, `AuditError`, `MerkleRoot`, `CompositeSink` (FailFast/BestEffort), `JsonlAuditSink` (4096-event buffer, per-tenant-per-day, day-rotation + gzip), `LanceAuditSink` (12-column Arrow schema, `FixedSizeBinary(3)` owl_identity, `super_domain × date` Hive partitioning). New binary `audit_verify` with `verify-jsonl` / `verify-lance` / `cross-verify` (exit codes 0/1/2/3). Adds `prev_merkle: AuditMerkleRoot` field to UnifiedAuditEvent (excluded from `canonical_bytes` — byte layout unchanged at 26). ~2230 LOC, 11 new + 132 total callcenter tests. |
| 50 | + - **S7-W7** `pr-ogit-ttl-smb-hydration` (lance-graph side) — extends `parse_family_registry()` for `ogit.SMB.bson:` sub-namespace per OQ-4. Foundry slots `0x80..=0x82`, BSON slots `0xA0..=0xAD`. `family_smb_foundry_and_bson_slots_are_disjoint` test locks the invariant. `registry.enumerate("SMB")` still returns exactly 3. |
| 51 | +- **Opus meta cross-impl review (32 KB)** at `.claude/board/sprint-log-7/meta-review.md`. 8 sections. Verdict: **4 A-grade (W1/W2/W4/W5) + 2 B-grade (W3/W7) + 1 B-minus (W6) + 0 C/D/F**. Sprint-7 implementation quality materially higher than sprint-5-6 spec quality. |
| 52 | +- **AuditSink trait unification (post-meta MUST-FIX, commit `bc530a4`):** dropped `UnifiedAuditSink` D-SDR-4 placeholder shim entirely. `UnifiedBridge::audit_sink` retyped to `Arc<dyn AuditSink>`. Added `NoopAuditSink` in `audit_sink/mod.rs`. Added `UnifiedBridge::with_jsonl_audit(super_domain, salt, base_path)` ergonomic constructor per OQ-7-3. Best-effort `let _ = sink.emit(event);` on the authorize hot path (failures must not block). |
| 53 | +- **Pre-existing lint debt cleanup** across `lance-graph` core / `bgz-tensor` / `lance-graph-planner` / `datafusion_planner` / `nsm` (~30 files, ~12 lint categories). Sonnet janitor with sprint-7-outputs guardrail. Commits `9fb666d` + `a472c4a`. |
| 54 | +- **MedCare-rs sprint-1 cross-cut alignment** (`a61fbd8`): W4 conformance MedCare fixture role name `"doctor"` → `"physician"` (MedCare#119 OQ-3 direct migration); W6 `composite.rs` doc example label `LanceAuditSink "primary"` → `JsonlAuditSink "primary"` (MedCare sprint-2 item 5 framing). |
| 55 | +- **3 governance scratchpads + meta-review at `.claude/board/sprint-log-7/`** + 8 worker scratchpads `agent-W{1..7,META}.md` + SPRINT_LOG.md. |
| 56 | +- **`.claude/settings.json` allowlist entries** for `.claude/board/sprint-log-7/**` paths (lessons-learned from sprint-5-6 worker permission failures). |
| 57 | + |
| 58 | +**Locked:** |
| 59 | +- **OQ-7-2 (AuditSink trait migration)** — full migrate, no adapter. CLAUDE.md "no abstractions beyond what task requires" controls. `UnifiedAuditSink` deleted; `AuditSink` is the single canonical trait. Cross-ref EPIPHANIES `9625fb5` + commit `bc530a4`. |
| 60 | +- **OQ-7-3 (UnifiedBridge::new() default)** — keep `NoopAuditSink` default; add `with_jsonl_audit()` ergonomic constructor for explicit opt-in. No silent disk writes. MedCare sprint-2 item 5 consumes the new constructor. |
| 61 | +- **OQ-7-1 (RoleGroup count)** — 6 RoleGroups (Physician + Nurse + Cashier + Researcher + HipaaAudit + Admin), matches MedCare#119 end-state. Earlier "add 4" wording referred to additions (Nurse + 3 renames); same end-state. |
| 62 | +- **CCA2A 6+1+1 implementation pattern validated at scale:** 6 parallel Sonnet workers + 1 sequenced Sonnet (W7 post-W1) + 1 Opus meta produced ~5 KLOC of code across 5 crates + 2 new crates in under one wall-clock hour for the worker phase. Pattern: combine related specs (W6 = D3a + D3b) when they share traits to avoid trait-split merge conflicts. **Sole worker misfire: S7-W6 first attempt invoked the `fewer-permission-prompts` skill instead of implementing audit sinks; respawn with explicit `DO NOT invoke any skill` guardrail succeeded.** Lesson: worker prompts must list `DO NOT invoke any skill` and the specific skill names (`fewer-permission-prompts`, `update-config`, `simplify`, `loop`) when the task is pure implementation. |
| 63 | +- **Clippy-first verification discipline:** user-locked rule — `cargo clippy --workspace --tests --no-deps -- -D warnings` runs BEFORE any `cargo check` / `cargo build` / `cargo test`. Clippy catches type/lint errors in seconds; full compile+test cycles can time out at 20+ minutes when those errors would have surfaced earlier. Now baked into all worker spawn prompts. |
| 64 | +- **Sprint-7 sequencing decision: 1 mega-PR was the right call** for a branch that already mixed thematic scopes. Meta's "3 thematic PRs" recommendation deferred to sprint-8 worker prompts (each impl spec → one PR ceiling). |
| 65 | + |
| 66 | +**Deferred:** |
| 67 | +- **MedCare-rs sprint-2 (5 PRs queued on user "go")** — Researcher access guard (codex P1; D-SDR-15 prep) / bridge-policy parity test / RBAC entity-name realignment to OGIT (consumes #116 + OGIT PR #3) / `auth_legacy::decrypt()` wiring of `legacy_crypt` (D-SDR-38) / Audit-sink decision PR (consumes this PR's `with_jsonl_audit()`). |
| 68 | +- **E1-3 (`MedCareStack` composition) + E1-4 (audit emission cascade)** — cascade-unblocked by this PR's `parse_family_registry()` + Healthcare basin seeding. medcare-rs session can fire them once they pick up the rebase. |
| 69 | +- **E1-5 (HIPAA hard-lock cross-domain matrix, D-SDR-17)** — sprint-8 compliance work. |
| 70 | +- **E1-6 (JWT middleware stub for `praxis_id`)** — blocked on DM-7 upstream (`RlsRewriter::rewrite(LogicalPlan, &ActorContext)` per foundry-roadmap §2). |
| 71 | +- **hiro-rs / hubspot-rs scaffolds** — repo-creation decision pending. `lance-graph-consumer-conformance` has `#[ignore]` scaffolds for E4/E5 ready to consume them. |
| 72 | +- **`ndarray:master hpc-extras` upstream gap** — surfaced by MedCare#118: `hpc-extras` feature lives on `AdaWorldAPI/ndarray` branch `claude/burn-A1-dep-gating` (PR #116, never merged to master). lance-graph PR #364's `features = ["hpc-extras"]` on the ndarray dep works in our environment via local-checkout-on-integration-branch but is a latent compatibility break against `ndarray:master`. Recorded in `ISSUES.md`. Fix is `ndarray PR #116 → master` (outside this session's scope). |
| 73 | + |
| 74 | +**Docs:** |
| 75 | +- `.claude/specs/` — 13 sprint-5-6 specs (predecessor #365); sprint-7 implementations consume them in this PR. |
| 76 | +- `.claude/board/sprint-log-7/SPRINT_LOG.md` + `meta-review.md` + 8 agent scratchpads. |
| 77 | +- `EPIPHANIES.md` 2026-05-13 OQ-7 DECISION entry (preceded by 2026-05-13 4-OQ-PR-#365 DECISION entry). |
| 78 | +- `ISSUES.md` — `ndarray:master hpc-extras` gap entry. |
| 79 | + |
| 80 | +--- |
| 81 | + |
38 | 82 | ## #365 — specs(sprint-5-6): 13-worker parallel batch + Opus meta review (merged 2026-05-13) |
39 | 83 |
|
40 | 84 | **Confidence (2026-05-13):** governance-only PR, no `.rs` / `Cargo.toml` changes. CI green (format / clippy / build / test / coverage — no code touched). **Status:** Merged to `main`. **OQ resolutions (2026-05-13 post-merge, durable):** OQ-1 → new `parse_family_registry()` API; OQ-2 → sorted-slice + binary search (zero-dep invariant); OQ-3 → direct migration `doctor → physician` + add 4 RoleGroups; OQ-4 → `ogit.SMB.bson:` sub-namespace. Full rationale at `EPIPHANIES.md` 2026-05-13 DECISION entry. Sprint-7 implementation fleet unblocked. |
|
0 commit comments