feat(procedures): --project filter over the record project: key - #40
feat(procedures): --project filter over the record project: key#40drewdrewthis wants to merge 3 commits into
Conversation
Records may carry an optional 'project:' frontmatter key naming the GitHub repo (owner/name) they are scoped to (langwatch/procedures STANDARD.md). query-records.sh now takes --project <repo>, matching the value exactly or by its repo basename, wired as a structural filter in record-scan.awk. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 42 minutes Limit details: You’ve used all 1 included review currently available under your plan. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (13)
📝 WalkthroughWalkthroughThe query-records command now supports ChangesProject query support
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant User
participant QueryRecords as query-records.sh
participant Scanner as record-scan.awk
participant Records as Record files
User->>QueryRecords: Run --project repo
QueryRecords->>Scanner: Pass qproject
Scanner->>Records: Parse project frontmatter
Scanner-->>QueryRecords: Return matching records
QueryRecords-->>User: Print query results
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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 `@plugins/procedures/scripts/query-records.sh`:
- Line 165: Update the --project handling in the query-records argument parser
to reject an empty value before shifting past the option arguments, rather than
assigning an empty Q_PROJECT and continuing without a project filter. Preserve
valid project values, and add Bats coverage for --keyword autonomy --project ""
confirming the command rejects the input.
🪄 Autofix
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: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 6d43b9e7-0b85-42ac-9ee7-466e3e5e2e21
📒 Files selected for processing (4)
plugins/procedures/agents/procedure-scout.mdplugins/procedures/hooks/tests/query-records.batsplugins/procedures/scripts/lib/record-scan.awkplugins/procedures/scripts/query-records.sh
…lter # Conflicts: # plugins/procedures/agents/procedure-scout.md # plugins/procedures/scripts/query-records.sh
…to end --project already filtered on `project:`, but nothing wrote or checked the key. Add optional --project to log-record.sh's decision/solution/failure-mode writers (omitted when empty — an empty value is unmatchable, not corpus-wide), a shape check in lint-frontmatter.sh that normalises the value exactly as record-scan.awk indexes it, and the key in all three templates. Correct the docs on the matcher's real semantics: --project matches the full owner/name or the repo name after the last `/`, never the owner alone, and it REFINES an unscoped query rather than replacing it — records with no project key are excluded, so a scoped empty result is not corpus silence. Adds project-field-roundtrip.bats covering writer -> lint -> query.
What
Adds
--project <repo>toquery-records.sh, filtering records by the optionalproject:frontmatter key that https://github.com/langwatch/procedures STANDARD.md defines (the GitHub repoowner/namea record is scoped to).--project langwatchmatchesproject: langwatch/langwatch.project:key never match a--projectquery.record-scan.awk(same one-pass path as--kind/--id/--links-to).--projectwhen the goal names a repo (plus the unscoped fallback query, since project-less records are excluded).Tests
5 new bats cases in
hooks/tests/query-records.bats; full suite 53/53 green locally.🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
--project <repo>filter for narrowing record searches by full repository name or repository basename.Bug Fixes