Skip to content

BED-9729 rebuild lookup database during preprocess - #75

Open
jaredcatkinson wants to merge 1 commit into
mainfrom
fix/BED-9729-optional-fallback-table-lifecycle
Open

BED-9729 rebuild lookup database during preprocess#75
jaredcatkinson wants to merge 1 commit into
mainfrom
fix/BED-9729-optional-fallback-table-lifecycle

Conversation

@jaredcatkinson

@jaredcatkinson jaredcatkinson commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • rebuild the derived lookup DuckDB before each GitHub preprocess run
  • remove any stale WAL alongside the lookup file
  • add a regression test for an optional resource transitioning from absent to populated across preprocess runs

Testing

  • RUNTIME__LOG_PATH=/tmp/openhound-logs UV_CACHE_DIR=/tmp/uv-cache uv run pytest
  • manually replayed preprocess against ./output/github with team_external_groups removed on the first run and restored on the second run; the second run loaded 4 real rows successfully

Summary by CodeRabbit

  • Bug Fixes

    • Preprocessing now reliably rebuilds lookup data when previously unavailable source information becomes available.
    • Prevents outdated lookup results from persisting across repeated preprocessing runs.
  • Tests

    • Added coverage for building an initially empty lookup database and successfully repopulating it after source data is added.

@coderabbitai

coderabbitai Bot commented Sep 10, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Essentials

Run ID: befa3c50-d07b-4cf1-8b3b-ced5abfd061b

📥 Commits

Reviewing files that changed from the base of the PR and between 056c0f8 and d3eb934.

📒 Files selected for processing (2)
  • src/openhound_github/main.py
  • tests/test_preproc.py

Included review availability: 4 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.


Walkthrough

The preprocess command now removes existing lookup database artifacts before rebuilding mappings. A regression test verifies rebuilding after team external group data becomes available.

Changes

Lookup database rebuild

Layer / File(s) Summary
Reset and validate lookup database
src/openhound_github/main.py, tests/test_preproc.py
The preprocess flow removes the lookup database and its WAL file before rebuilding. The regression test verifies empty initial output and populated output after data becomes available.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to d3eb9

Preprocessing now clears stale lookup artifacts so later runs reflect newly available optional data. The behavior is covered by regression testing and is ready to merge.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 60.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: rebuilding the lookup database during preprocess. It is concise and specific.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/BED-9729-optional-fallback-table-lifecycle

A rabbit reads each line,
The patch grows clear beneath the moon,
Small changes hop in place,
Tests guard the garden path,
Reviews bloom before the dawn.

Comment @coderabbitai help to get the list of available commands.

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