Skip to content

Comments

feat: add metadata filtering to bd ready#3

Open
turian wants to merge 2 commits intofeat/metadata-queryablefrom
feat/metadata-ready-filter
Open

feat: add metadata filtering to bd ready#3
turian wants to merge 2 commits intofeat/metadata-queryablefrom
feat/metadata-ready-filter

Conversation

@turian
Copy link
Owner

@turian turian commented Feb 20, 2026

Summary

  • Add --metadata-field key=value (repeatable, AND) and --has-metadata-key key to bd ready
  • Add MetadataFields and HasMetadataKey fields to types.WorkFilter
  • Add JSON_EXTRACT/JSON_UNQUOTE WHERE clauses to GetReadyWork in queries.go
  • Enables metadata-based work routing (e.g., bd ready --metadata-field team=platform)

Base: feat/metadata-queryable (PR steveyegge#1908 against upstream)

Test plan

  • TestGetReadyWork_MetadataFieldMatch — filters ready work by metadata key=value
  • TestGetReadyWork_HasMetadataKey — filters by key existence
  • TestGetReadyWork_MetadataFieldNoMatch — non-matching value returns empty
  • TestGetReadyWork_MetadataFieldInvalidKey — SQL injection attempt rejected

🤖 Generated with Claude Code

turian and others added 2 commits February 19, 2026 22:34
Add SQL-level metadata filtering using Dolt's JSON_EXTRACT and
JSON_UNQUOTE functions, with strict key validation to prevent
JSON path injection.

New CLI flags for bd list and bd search:
  --metadata-field key=value  (repeatable, AND semantics)
  --has-metadata-key key      (existence check)

New bd query DSL support:
  metadata.team = "platform"
  metadata.sprint = "Q1" AND metadata.team = "platform"

Implements GH#1406.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Support metadata-based work routing in bd ready:
  bd ready --metadata-field team=platform
  bd ready --has-metadata-key sprint

Adds MetadataFields and HasMetadataKey to WorkFilter, with
SQL-level JSON_EXTRACT/JSON_UNQUOTE in GetReadyWork. Enables
agents and teams to claim work based on metadata tags.

Implements GH#1406.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@turian turian force-pushed the feat/metadata-queryable branch from 58f05e6 to ca318fe Compare February 22, 2026 20:58
@steveyegge steveyegge force-pushed the feat/metadata-queryable branch from ca318fe to 5ba0887 Compare February 22, 2026 23: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