Skip to content

P3 Final: Batch hydration, mypy fixes, hydration regression#28

Merged
Deepfreezechill merged 1 commit intomainfrom
fix/p3-final-batch-hydration
Apr 3, 2026
Merged

P3 Final: Batch hydration, mypy fixes, hydration regression#28
Deepfreezechill merged 1 commit intomainfrom
fix/p3-final-batch-hydration

Conversation

@Deepfreezechill
Copy link
Copy Markdown
Owner

Summary

Fixes all R2 blockers from /8eyes and /collab review rounds.

Changes (6 files, +580/-27)

  • Batch hydration: Rewrote _hydrate_records()\ from O(N) per-record to O(1) batched queries (4 queries total vs 3N+NM)
  • TagSearch.get_tags_batch(): Bulk tag retrieval via single IN(...) query
  • AnalysisStore.batch_load_recent_analyses(): ROW_NUMBER() window function + bulk judgment fetch
  • Hydration regression fix: get_versions/get_ancestry/load_by_category now return fully hydrated SkillRecords
  • mypy fixes: assert lastrowid not None, List[Any] params typing
  • Misc: check_same_thread via _make_connection(), max_depth clamp to 50, docstring drift

Review Verdicts

Reviewer Model Verdict Confidence
/8eyes R3 Opus 4.6 ✅ SHIP 0.95
/collab R3 GPT-5.4 ✅ SHIP 0.93

Test Results

\
1,356 passed, 31 skipped, 44 warnings in 37.83s
\\

P4 Advisory

  • \load_all()\ retains per-record O(N) via _to_record()\ — not a regression, flagged for P4
  • Module-level deserialization batching deferred to P4

- Rewrite _hydrate_records() from O(N) per-record to O(1) batched queries
- Add TagSearch.get_tags_batch() for bulk tag retrieval
- Add AnalysisStore.batch_load_recent_analyses() with ROW_NUMBER window fn
- Refactor _to_analysis() to accept preloaded judgments (backward compat)
- Fix 3 mypy errors: assert lastrowid, List[Any] params typing
- Fix hydration regression: get_versions/get_ancestry/load_by_category
- Add _hydrate_record()/_hydrate_records() facade helpers
- Fix check_same_thread via _make_connection(), max_depth clamp to 50
- Fix docstring drift, MigrationManager doc references
- 4 new hydration regression tests in test_facade_coverage.py

/8eyes R3: SHIP 0.95 (Opus 4.6) — 5/5 outcomes pass, 4 attacks repelled
/collab R3: SHIP 0.93 (GPT-5.4) — 5/5 checks pass, 4 attacks repelled
Suite: 1,356 passed, 31 skipped, 44 warnings (all P4 file-size)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 3, 2026

🔒 Phase Gate Enforcement — 🚫 FAIL

Check Result Detail
Issue linkage No linked issues found. PR must contain "Closes #N", "Fixes #N", or "Resolves #N".

Verdict: FAIL
Timestamp: 2026-04-03T15:30:39.407Z
Run: View workflow run


How to fix: Ensure all prerequisite phases are complete, or add emergency:bypass label with a ## Bypass Reason section in the PR body.

@Deepfreezechill Deepfreezechill merged commit f778aa6 into main Apr 3, 2026
0 of 5 checks passed
@Deepfreezechill Deepfreezechill deleted the fix/p3-final-batch-hydration branch April 3, 2026 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant