fix(tasks): native br --parent edges, fix cancelled/output round-trips, add task_ready tool#3
Conversation
…und-trips, add task_ready tool - Switch blocked status mapping from br `deferred` to br `blocked` (correct semantics) - Add br `deferred` → proto `blocked` reverse mapping (backward compat) - Use `--parent` flag in br create for native dep edges (enables br epic/dep tree/ready --parent) - Keep parent label for client-side list() filtering - Add close_reason to BrIssue so cancelled tasks round-trip correctly - Add comments to BrIssue so task_get returns output written via task_output - Add task_ready tool exposing `br ready --json` (highest-priority, unblocked tasks) - Add br beads_rust install step to harbor agent setup - Add docs/beads-reference.md: full br CLI reference + best practices Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (1)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
WalkthroughAdds a TaskReady tool and name, registers it in the core tool registry; flips blocked/deferred beads status mapping; enriches BR→Task conversion (close_reason, comments → output) and Changes
Sequence Diagram(s)mermaid Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (3)
docs/beads-reference.md (1)
757-762: Minor: Add language specifiers to fenced code blocks.The hierarchy examples and quick reference card lack language specifiers, triggering markdownlint MD040 warnings. Consider adding
textorplaintextfor better accessibility and syntax highlighting support.Also applies to: 766-772, 840-878
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/beads-reference.md` around lines 757 - 762, The fenced code blocks that show the task hierarchy (the block starting with "root task (in_progress)" and similar quick-reference examples) are missing language specifiers and trigger markdownlint MD040; update each triple-backtick fence for these examples (including the hierarchy blocks and the quick reference card examples) to use a neutral specifier such as ```text or ```plaintext so they are explicitly flagged as plain text for syntax highlighting and accessibility.tools/harbor_agent/proto_agent.py (1)
116-124: Consider adding checksum verification for the downloaded binary.The installation fetches a pre-built binary from GitHub without verifying its integrity. While the version is pinned, adding a SHA256 checksum verification would improve supply chain security.
🔒 Proposed fix with checksum verification
await self.exec_as_root( environment, command=( "BR_VERSION=v0.1.35 && " + "BR_SHA256=<expected-sha256-here> && " "curl -fsSL https://github.com/Dicklesworthstone/beads_rust/releases/download/${BR_VERSION}/" - "br-${BR_VERSION}-linux_amd64.tar.gz | tar -xz -C /usr/local/bin && " + "br-${BR_VERSION}-linux_amd64.tar.gz -o /tmp/br.tar.gz && " + "echo \"${BR_SHA256} /tmp/br.tar.gz\" | sha256sum -c - && " + "tar -xzf /tmp/br.tar.gz -C /usr/local/bin && " + "rm /tmp/br.tar.gz && " "chmod +x /usr/local/bin/br && br --version || echo 'beads_rust install failed (non-fatal)'" ), )🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@tools/harbor_agent/proto_agent.py` around lines 116 - 124, The install command invoked via exec_as_root should verify the downloaded archive's SHA256 before extraction: fetch the release tarball and the expected checksum (or include a pinned SHA256 value) and run sha256sum (or openssl dgst -sha256) to compare the computed digest against the expected one, failing the install if they don't match; update the command string passed to exec_as_root (the command in proto_agent.py that uses BR_VERSION to curl the tarball) to first download the checksum or embed the pinned checksum, verify the file, then extract and chmod only if verification succeeds, and ensure any temporary files are removed on success/failure.packages/core/src/tools/task-ready.ts (1)
44-53: Consider extracting shared priority mapping constant.The priority mapping duplicates
PRIORITY_TO_BRfromtask-store.ts. While the duplication is minor and unlikely to diverge, consider extracting to a shared location if this mapping is needed elsewhere.♻️ Potential shared constant
Create a shared constants file or export from task-store.ts:
// In a shared location (e.g., task-constants.ts) export const PROTO_PRIORITY_TO_BR: Record<string, string> = { critical: '0', high: '1', medium: '2', low: '3', };🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/core/src/tools/task-ready.ts` around lines 44 - 53, Extract the duplicated priority mapping from task-ready.ts (the local priorityMap used with this.params.priority and args.push('--priority', p)) into a shared exported constant (e.g., PROTO_PRIORITY_TO_BR) and import that constant instead of redefining it, aligning it with the existing PRIORITY_TO_BR in task-store.ts so both task-ready.ts and task-store.ts reference the same shared symbol to avoid duplication.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs/beads-reference.md`:
- Line 4: The docs header currently pins `br` version 0.1.23 but the PR installs
0.1.35; update the version string in docs/beads-reference.md to match the
installed version (replace "0.1.23" with "0.1.35") so the documentation reflects
the actual `br` version used by proto_agent.py.
---
Nitpick comments:
In `@docs/beads-reference.md`:
- Around line 757-762: The fenced code blocks that show the task hierarchy (the
block starting with "root task (in_progress)" and similar quick-reference
examples) are missing language specifiers and trigger markdownlint MD040; update
each triple-backtick fence for these examples (including the hierarchy blocks
and the quick reference card examples) to use a neutral specifier such as
```text or ```plaintext so they are explicitly flagged as plain text for syntax
highlighting and accessibility.
In `@packages/core/src/tools/task-ready.ts`:
- Around line 44-53: Extract the duplicated priority mapping from task-ready.ts
(the local priorityMap used with this.params.priority and
args.push('--priority', p)) into a shared exported constant (e.g.,
PROTO_PRIORITY_TO_BR) and import that constant instead of redefining it,
aligning it with the existing PRIORITY_TO_BR in task-store.ts so both
task-ready.ts and task-store.ts reference the same shared symbol to avoid
duplication.
In `@tools/harbor_agent/proto_agent.py`:
- Around line 116-124: The install command invoked via exec_as_root should
verify the downloaded archive's SHA256 before extraction: fetch the release
tarball and the expected checksum (or include a pinned SHA256 value) and run
sha256sum (or openssl dgst -sha256) to compare the computed digest against the
expected one, failing the install if they don't match; update the command string
passed to exec_as_root (the command in proto_agent.py that uses BR_VERSION to
curl the tarball) to first download the checksum or embed the pinned checksum,
verify the file, then extract and chmod only if verification succeeds, and
ensure any temporary files are removed on success/failure.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: b018a4ef-f52b-4de4-8f78-7ab5e731cef1
📒 Files selected for processing (6)
docs/beads-reference.mdpackages/core/src/config/config.tspackages/core/src/services/task-store.tspackages/core/src/tools/task-ready.tspackages/core/src/tools/tool-names.tstools/harbor_agent/proto_agent.py
| # beads_rust (`br`) + proto Agent — Comprehensive Reference | ||
|
|
||
| Generated: 2026-04-02 | ||
| `br` version: 0.1.23 |
There was a problem hiding this comment.
Version mismatch: docs say 0.1.23 but PR installs 0.1.35.
The documentation header references br version 0.1.23, but proto_agent.py installs version 0.1.35. Update to match the installed version.
📝 Proposed fix
-`br` version: 0.1.23
+`br` version: 0.1.35 📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| `br` version: 0.1.23 | |
| `br` version: 0.1.35 |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docs/beads-reference.md` at line 4, The docs header currently pins `br`
version 0.1.23 but the PR installs 0.1.35; update the version string in
docs/beads-reference.md to match the installed version (replace "0.1.23" with
"0.1.35") so the documentation reflects the actual `br` version used by
proto_agent.py.
File was empty (just comments) causing actionlint to fail with "workflow is empty". Workflow was already replaced by docs-deploy.yml. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ed:false required:true mandates single quotes on every string value — incompatible with GitHub Actions convention and the existing workflow files. required:false allows any quoting style; single quotes are still enforced when strings ARE quoted. This unblocks CI which was failing on main and all branches. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Code Coverage Summary
CLI Package - Full Text ReportCore Package - Full Text ReportFor detailed HTML reports, please see the 'coverage-reports-22.x-ubuntu-latest' artifact from the main CI run. |
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Summary
blockedstatus mapping: protoblockednow maps to brblocked(was incorrectly usingdeferred);deferredstill maps back to protoblockedfor backward compatcancelledround-trip: readclose_reasonfrom br so cancelled tasks are not reported ascompletedafter fetchtask_getoutput: comments frombr showare now surfaced astask.output; previouslytask_outputwas write-onlytask_createnow passes--parentto br, enablingbr epic,br dep tree, andbr ready --parentto see the hierarchy (label still written for client-side filtering)task_readytool: exposesbr ready --json— returns unblocked, highest-priority tasks sorted by prioritybr(beads_rust v0.1.35) during environment setupTest plan
task_createwithparentTaskId→br dep tree <parent>shows childtask_update { status: "cancelled" }→task_getreturnsstatus: "cancelled"(notcompleted)task_output→task_getreturnsoutputfield populatedtask_readytool returns unblocked tasks in priority ordertask_update { status: "blocked" }→br list --status blockedshows the task🤖 Generated with Claude Code
Summary by CodeRabbit
Documentation
New Features
Bug Fixes
Fallback / Reliability
Chores