fix: schema.sql drift + manage_feeds feed_key narrowing + submodule bump#804
Conversation
Three follow-ups dropped from PR #786 during the squash-merge: - db/schema.sql: insert the COLUMN COMMENT on personal_access_tokens.worker_id and move idx_personal_access_tokens_worker_id into its alphabetical spot so the file matches `dbmate up` output. The migrations CI job has been failing on this drift since 20260517030000_pat_worker_id_binding was added. - manage_feeds.list_feeds: narrow the event-counts scan by feed_key as well as connection_id (ANY-array on both axes); the LEFT JOIN at the end drops any over-count from the cross product. Cuts the 50-feed list on a busy connection from ~1.5s to ~670ms in prod. - Bump packages/web to ca12cd2 (owletto/main after PR #141), so the parent points at a submodule SHA reachable from owletto/main rather than at the now-orphaned pre-squash 2d2f5bf.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughThe PR documents and indexes personal_access_tokens.worker_id, narrows event aggregation in handleListFeeds by filtering on feed_key, advances the packages/web submodule pointer, and updates integration tests to create and attach test agents when seeding watchers and classifiers. Changesworker_id Device Binding Documentation and Indexing
Event Counts Query Optimization
Web Package Submodule Update
Integration Tests: Agent creation and attachment
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add Comment |
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
pi reviewFindings on the previous head:
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/web`:
- Line 1: The pinned submodule commit ca12cd255e48d0b945fe6033f5d6e0dec5d21541
is not reachable from branch owletto/main; update the submodule reference so it
points to a commit that is an ancestor (or the current HEAD) of owletto/main:
fetch the remote for the submodule, find the correct commit on owletto/main (or
merge/rebase the intended changes into owletto/main), then update the submodule
pointer in this PR to that reachable commit (or to the merged head), commit the
submodule change and push; verify with git fetch --recurse-submodules and git
merge-base or git branch --contains to ensure the new SHA is contained in
owletto/main before merging.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 33839fd8-e7c0-4711-b890-163e1bddb4c0
📒 Files selected for processing (3)
db/schema.sqlpackages/server/src/tools/admin/manage_feeds.tspackages/web
| @@ -1 +1 @@ | |||
| Subproject commit 2d2f5bf253c130ea859982b8243cbf7a1a1719af | |||
| Subproject commit ca12cd255e48d0b945fe6033f5d6e0dec5d21541 | |||
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify the submodule SHA and check if it's reachable from owletto/main
cd packages/web
echo "=== Current submodule pointer ==="
git rev-parse HEAD
echo ""
echo "=== Checking if SHA is reachable from origin/main ==="
git fetch origin main 2>/dev/null || echo "Could not fetch origin/main"
git merge-base --is-ancestor ca12cd255e48d0b945fe6033f5d6e0dec5d21541 origin/main && echo "SHA is reachable from origin/main" || echo "SHA is NOT reachable from origin/main"
echo ""
echo "=== Latest commits on origin/main ==="
git log origin/main --oneline -5 2>/dev/null || echo "Could not read origin/main log"Repository: lobu-ai/lobu
Length of output: 830
🏁 Script executed:
cd packages/web
echo "=== Testing current pointer reachability ==="
git merge-base --is-ancestor 7d3a0f527e46b286c161b2cabc5bf4da0e8f5ed5 origin/main && echo "CURRENT SHA is reachable from origin/main" || echo "CURRENT SHA is NOT reachable from origin/main"Repository: lobu-ai/lobu
Length of output: 147
🏁 Script executed:
# Check the submodule configuration and recent changes
echo "=== .gitmodules file ==="
cat .gitmodules | grep -A 3 "packages/web" || echo "No packages/web in .gitmodules"
echo ""
echo "=== Recent git log for .gitmodules ==="
git log -p --max-count=3 -- .gitmodules | head -100
echo ""
echo "=== Current git submodule status ==="
git submodule status packages/webRepository: lobu-ai/lobu
Length of output: 308
Submodule SHA is not reachable from owletto/main.
The pinned commit ca12cd255e48d0b945fe6033f5d6e0dec5d21541 is not an ancestor of owletto/main. The pipeline check correctly fails because the SHA does not exist in the remote repository. This contradicts the PR objective, which claims this bump should point to owletto/main's merged head.
Verify that the correct commit was used and that it has been merged to owletto/main before this PR is merged.
🧰 Tools
🪛 GitHub Actions: Submodule Drift / 0_check-drift.txt
[error] 1-1: Pinned SHA is not reachable from owletto/main. Error emitted: "Pinned SHA $PINNED is not reachable from owletto/main." (git -C packages/web merge-base --is-ancestor "$PINNED" origin/main)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@packages/web` at line 1, The pinned submodule commit
ca12cd255e48d0b945fe6033f5d6e0dec5d21541 is not reachable from branch
owletto/main; update the submodule reference so it points to a commit that is an
ancestor (or the current HEAD) of owletto/main: fetch the remote for the
submodule, find the correct commit on owletto/main (or merge/rebase the intended
changes into owletto/main), then update the submodule pointer in this PR to that
reachable commit (or to the merged head), commit the submodule change and push;
verify with git fetch --recurse-submodules and git merge-base or git branch
--contains to ensure the new SHA is contained in owletto/main before merging.
Summary
Three follow-ups dropped from PR #786 during the squash-merge:
Test plan
Summary by CodeRabbit
Performance
Chores
Tests