From df7dc29e7de26d4ab3dc1badbd3f9eef9adc1ec8 Mon Sep 17 00:00:00 2001 From: beads/refinery Date: Thu, 1 Jan 2026 16:11:36 -0800 Subject: [PATCH] bd sync: 2026-01-01 16:11:36 --- .beads/issues.jsonl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.beads/issues.jsonl b/.beads/issues.jsonl index 49732ae8..a716b4a2 100644 --- a/.beads/issues.jsonl +++ b/.beads/issues.jsonl @@ -12,7 +12,7 @@ {"id":"bd-0kue","title":"Merge: onyx-1767106262992","description":"branch: polecat/onyx-1767106262992\ntarget: main\nsource_issue: onyx-1767106262992\nrig: beads","status":"closed","priority":2,"issue_type":"merge-request","created_at":"2025-12-30T06:59:46.964658-08:00","created_by":"beads/polecats/onyx","updated_at":"2025-12-30T15:44:43.3647-08:00","closed_at":"2025-12-30T10:27:23.072233-08:00"} {"id":"bd-0oqz","title":"Add GetMoleculeProgress RPC endpoint","description":"New RPC endpoint to get detailed progress for a specific molecule. Returns: moleculeID, title, assignee, and list of steps with their status (done/current/ready/blocked), start/close times. Used when user expands a worker in the activity feed TUI.","status":"closed","priority":2,"issue_type":"feature","created_at":"2025-12-23T16:26:38.137866-08:00","updated_at":"2025-12-23T18:27:49.033335-08:00","closed_at":"2025-12-23T18:27:49.033335-08:00"} {"id":"bd-0qx5","title":"Implement Jira issue timestamp comparison for sync","description":"In cmd/bd/jira.go:633, there's a TODO for a full implementation that would fetch the Jira issue and compare timestamps to detect conflicts during sync.\n\nFile: cmd/bd/jira.go:633","status":"closed","priority":4,"issue_type":"feature","created_at":"2025-12-28T16:32:52.601594-08:00","created_by":"stevey","updated_at":"2025-12-30T18:12:30.977631-08:00","closed_at":"2025-12-30T16:00:07.968921-08:00","close_reason":"Implemented Jira timestamp comparison for sync. Added fetchJiraIssueTimestamp() to fetch timestamps from Jira REST API, updated detectJiraConflicts() to compare actual timestamps, and improved conflict resolution functions to display timestamp details."} -{"id":"bd-0sgd","title":"Design escalation inbox for stuck workflows","description":"## Summary\n\nExtend the existing `gt escalate` system with tiered routing, structured decision patterns, and integration with gates and patrol lifecycles.\n\n## Background\n\nFrom gate design discussion and workflow analysis. Gas Town needs:\n1. Structured way for workers to request decisions (not just free-form escalation)\n2. Tiered routing (Deacon -\u003e Mayor -\u003e Overseer) instead of direct-to-human\n3. Integration with gates (timeout -\u003e escalate)\n4. Formalized patterns for all worker exit scenarios\n\n## Current State (what exists)\n\nThe escalation system is already partially built:\n\n- `gt escalate` command: CRITICAL/HIGH/MEDIUM severity\n- Creates bead tagged `escalation`\n- Sends mail to `overseer`\n- Mayor checks pending escalations on `gt prime`\n- Exit type `ESCALATED` for polecats\n- Event logging: `escalation_sent`\n\nSee: `gastown/docs/escalation.md`\n\n## What's Missing\n\n| Gap | Current | Proposed |\n|-----|---------|----------|\n| Tiered routing | Direct to overseer | Deacon -\u003e Mayor -\u003e Overseer |\n| Decision pattern | Free-form topic | Structured options in issue |\n| Categories | Just \"escalation\" tag | decision, help, blocked, failed, emergency |\n| Gate integration | None | Gate timeout -\u003e escalate |\n| Patrol integration | Ad-hoc | Formalized paths |\n\n## Design\n\n### Escalation Categories\n\n| Category | Description | Default Destination |\n|----------|-------------|---------------------|\n| `decision` | Multiple valid paths, need choice | Deacon -\u003e Mayor |\n| `help` | Need guidance/expertise | Deacon -\u003e Mayor |\n| `blocked` | Waiting on unresolvable dependency | Mayor |\n| `failed` | Unexpected error, can't proceed | Deacon |\n| `emergency` | Security/data integrity | Overseer (direct) |\n| `gate_timeout` | Gate didn't resolve in time | Deacon |\n| `lifecycle` | Worker stuck/needs recycle | Witness |\n\n### Extended Command\n\n```bash\n# Current (unchanged)\ngt escalate \"Something went wrong\"\ngt escalate -s CRITICAL \"Data corruption\"\n\n# New: Category-based\ngt escalate --type decision \"Which auth approach?\"\ngt escalate --type help \"Need architecture guidance\"\ngt escalate --type blocked \"Waiting on bd-xyz\"\ngt escalate --type failed \"Tests failing unexpectedly\"\ngt escalate --type emergency \"Security vulnerability found\"\n\n# New: Tiered routing\ngt escalate --to deacon \"Infra issue\"\ngt escalate --to mayor \"Cross-rig coordination needed\"\ngt escalate --to overseer \"Human judgment required\"\n\n# New: Structured decision\ngt escalate --type decision \\\n --question \"Which authentication approach?\" \\\n --options \"JWT tokens,Session cookies,OAuth2\" \\\n --context \"Admin panel needs login\" \\\n --issue bd-xyz\n```\n\n### Decision Pattern in Issues\n\nWhen `--type decision` is used, the issue is updated with structured format:\n\n```markdown\n## Decision Needed\n\n**Question:** Which authentication approach?\n\n| Option | Description |\n|--------|-------------|\n| A | JWT tokens |\n| B | Session cookies |\n| C | OAuth2 |\n\n**Context:** Admin panel needs login\n\n**Escalated by:** beads/polecats/obsidian\n**Escalated at:** 2026-01-01T15:00:00Z\n\n**To resolve:**\n1. Comment with chosen option (e.g., \"Decision: A\")\n2. Reassign to work queue or original worker\n```\n\nThis makes the issue the async communication channel for decisions.\n\n### Tiered Escalation Flow\n\n```\nWorker encounters issue\n |\n v\ngt escalate --type \u003ccategory\u003e --to \u003ctier\u003e\n |\n v\n[Deacon receives]\n |\n +-- Can resolve? --\u003e Updates issue, re-slings work\n |\n +-- Cannot resolve? --\u003e gt escalate --to mayor --forward\n |\n v\n [Mayor receives]\n |\n +-- Can resolve? --\u003e Updates issue, re-slings\n |\n +-- Cannot resolve? --\u003e gt escalate --to overseer\n |\n v\n [Overseer resolves]\n```\n\nEach tier can resolve OR forward. The escalation bead tracks the chain via comments/notes.\n\n### Integration Points\n\n#### Gate Timeouts (bd-7zka.2)\n\n```go\n// In Witness patrol (timer gates)\nif gate.Expired() {\n exec.Command(\"gt\", \"escalate\",\n \"--type\", \"gate_timeout\",\n \"--severity\", \"HIGH\",\n \"--issue\", gate.BlockedIssueID,\n fmt.Sprintf(\"Gate %s timed out after %s\", gate.ID, gate.Timeout)).Run()\n}\n```\n\n#### Witness Patrol\n\nWitness already detects stuck polecats. Formalize as escalation:\n\n```go\n// Instead of ad-hoc mail\nexec.Command(\"gt\", \"escalate\",\n \"--type\", \"lifecycle\",\n \"--to\", \"mayor\",\n \"--issue\", polecat.CurrentIssue,\n fmt.Sprintf(\"Polecat %s stuck: no progress for %d minutes\", polecat.ID, minutes)).Run()\n```\n\n#### Refinery\n\nOn merge failures that can't be auto-resolved:\n\n```go\nexec.Command(\"gt\", \"escalate\",\n \"--type\", \"failed\",\n \"--issue\", mr.IssueID,\n \"Merge failed: \"+reason).Run()\n```\n\n### Polecat Exit with Escalation\n\n```bash\n# Worker reaches decision point\n\n# 1. Update issue with decision structure\nbd update $ISSUE --notes \"$(cat \u003c\u003cEOF\n## Decision Needed\n\n**Question:** Which approach for caching?\n\n| Option | Description |\n|--------|-------------|\n| A | Redis (external dependency) |\n| B | In-memory (simpler, no persistence) |\n| C | SQLite (local persistence) |\n\n**Context:** API response times are slow, need caching layer.\nEOF\n)\"\n\n# 2. Escalate\ngt escalate --type decision --issue $ISSUE \"Caching approach needs decision\"\n\n# 3. Exit cleanly\ngt done --exit ESCALATED\n```\n\n### New Issue Statuses\n\nConsider adding to beads:\n\n| Status | Meaning |\n|--------|---------|\n| `decision_needed` | Waiting for decision from escalation |\n| `escalated` | General escalation pending |\n\nOr keep using `blocked` with escalation tag - simpler.\n\n## Implementation Plan\n\n### Phase 1: Extend gt escalate\n- Add `--type` flag for categories\n- Add `--to` flag for routing (deacon, mayor, overseer)\n- Add `--forward` flag for tier forwarding\n- Keep backward compatibility\n\n### Phase 2: Decision Pattern\n- Add `--question`, `--options`, `--context` flags\n- Auto-update issue with decision structure\n- Parse decision from issue comments on resolution\n\n### Phase 3: Gate Integration\n- Add `gate_timeout` escalation type\n- Witness: check timer gates, escalate on timeout\n- Refinery: check GH gates, escalate on timeout/failure\n\n### Phase 4: Patrol Integration\n- Formalize Witness stuck-polecat as escalation\n- Formalize Refinery merge-failure as escalation\n- Unified escalation handling in Mayor\n\n## Acceptance Criteria\n\n- [ ] `gt escalate --type decision` creates structured issue update\n- [ ] `gt escalate --to deacon|mayor|overseer` routes correctly\n- [ ] Gate timeouts trigger escalation (after bd-7zka.2)\n- [ ] Witness uses escalation for stuck polecats\n- [ ] Refinery uses escalation for merge failures\n- [ ] Escalation chain tracked in bead (who forwarded to whom)\n- [ ] `bd list --tag=escalation --type=decision` filters work\n\n## References\n\n- bd-7zka.2: Gate evaluation (uses escalation for timeouts)\n- gastown/docs/escalation.md: Current escalation protocol\n- gastown/crew/max/internal/cmd/escalate.go: Current implementation","status":"open","priority":2,"issue_type":"feature","created_at":"2026-01-01T15:03:37.684701-08:00","created_by":"beads/crew/fang","updated_at":"2026-01-01T15:15:11.955572-08:00"} +{"id":"bd-0sgd","title":"Design escalation inbox for stuck workflows","description":"## Summary\n\nExtend the existing `gt escalate` system with tiered routing, structured decision patterns, and integration with gates and patrol lifecycles.\n\n## Background\n\nFrom gate design discussion and workflow analysis. Gas Town needs:\n1. Structured way for workers to request decisions (not just free-form escalation)\n2. Tiered routing (Deacon -\u003e Mayor -\u003e Overseer) instead of direct-to-human\n3. Integration with gates (timeout -\u003e escalate)\n4. Formalized patterns for all worker exit scenarios\n\n## Current State (what exists)\n\nThe escalation system is already partially built:\n\n- `gt escalate` command: CRITICAL/HIGH/MEDIUM severity\n- Creates bead tagged `escalation`\n- Sends mail to `overseer`\n- Mayor checks pending escalations on `gt prime`\n- Exit type `ESCALATED` for polecats\n- Event logging: `escalation_sent`\n\nSee: `gastown/docs/escalation.md`\n\n## What's Missing\n\n| Gap | Current | Proposed |\n|-----|---------|----------|\n| Tiered routing | Direct to overseer | Deacon -\u003e Mayor -\u003e Overseer |\n| Decision pattern | Free-form topic | Structured options in issue |\n| Categories | Just \"escalation\" tag | decision, help, blocked, failed, emergency |\n| Gate integration | None | Gate timeout -\u003e escalate |\n| Patrol integration | Ad-hoc | Formalized paths |\n\n## Design\n\n### Escalation Categories\n\n| Category | Description | Default Destination |\n|----------|-------------|---------------------|\n| `decision` | Multiple valid paths, need choice | Deacon -\u003e Mayor |\n| `help` | Need guidance/expertise | Deacon -\u003e Mayor |\n| `blocked` | Waiting on unresolvable dependency | Mayor |\n| `failed` | Unexpected error, can't proceed | Deacon |\n| `emergency` | Security/data integrity | Overseer (direct) |\n| `gate_timeout` | Gate didn't resolve in time | Deacon |\n| `lifecycle` | Worker stuck/needs recycle | Witness |\n\n### Extended Command\n\n```bash\n# Current (unchanged)\ngt escalate \"Something went wrong\"\ngt escalate -s CRITICAL \"Data corruption\"\n\n# New: Category-based\ngt escalate --type decision \"Which auth approach?\"\ngt escalate --type help \"Need architecture guidance\"\ngt escalate --type blocked \"Waiting on bd-xyz\"\ngt escalate --type failed \"Tests failing unexpectedly\"\ngt escalate --type emergency \"Security vulnerability found\"\n\n# New: Tiered routing\ngt escalate --to deacon \"Infra issue\"\ngt escalate --to mayor \"Cross-rig coordination needed\"\ngt escalate --to overseer \"Human judgment required\"\n\n# New: Structured decision\ngt escalate --type decision \\\n --question \"Which authentication approach?\" \\\n --options \"JWT tokens,Session cookies,OAuth2\" \\\n --context \"Admin panel needs login\" \\\n --issue bd-xyz\n```\n\n### Decision Pattern in Issues\n\nWhen `--type decision` is used, the issue is updated with structured format:\n\n```markdown\n## Decision Needed\n\n**Question:** Which authentication approach?\n\n| Option | Description |\n|--------|-------------|\n| A | JWT tokens |\n| B | Session cookies |\n| C | OAuth2 |\n\n**Context:** Admin panel needs login\n\n**Escalated by:** beads/polecats/obsidian\n**Escalated at:** 2026-01-01T15:00:00Z\n\n**To resolve:**\n1. Comment with chosen option (e.g., \"Decision: A\")\n2. Reassign to work queue or original worker\n```\n\nThis makes the issue the async communication channel for decisions.\n\n### Tiered Escalation Flow\n\n```\nWorker encounters issue\n |\n v\ngt escalate --type \u003ccategory\u003e --to \u003ctier\u003e\n |\n v\n[Deacon receives]\n |\n +-- Can resolve? --\u003e Updates issue, re-slings work\n |\n +-- Cannot resolve? --\u003e gt escalate --to mayor --forward\n |\n v\n [Mayor receives]\n |\n +-- Can resolve? --\u003e Updates issue, re-slings\n |\n +-- Cannot resolve? --\u003e gt escalate --to overseer\n |\n v\n [Overseer resolves]\n```\n\nEach tier can resolve OR forward. The escalation bead tracks the chain via comments/notes.\n\n### Integration Points\n\n#### Gate Timeouts (bd-7zka.2)\n\n```go\n// In Witness patrol (timer gates)\nif gate.Expired() {\n exec.Command(\"gt\", \"escalate\",\n \"--type\", \"gate_timeout\",\n \"--severity\", \"HIGH\",\n \"--issue\", gate.BlockedIssueID,\n fmt.Sprintf(\"Gate %s timed out after %s\", gate.ID, gate.Timeout)).Run()\n}\n```\n\n#### Witness Patrol\n\nWitness already detects stuck polecats. Formalize as escalation:\n\n```go\n// Instead of ad-hoc mail\nexec.Command(\"gt\", \"escalate\",\n \"--type\", \"lifecycle\",\n \"--to\", \"mayor\",\n \"--issue\", polecat.CurrentIssue,\n fmt.Sprintf(\"Polecat %s stuck: no progress for %d minutes\", polecat.ID, minutes)).Run()\n```\n\n#### Refinery\n\nOn merge failures that can't be auto-resolved:\n\n```go\nexec.Command(\"gt\", \"escalate\",\n \"--type\", \"failed\",\n \"--issue\", mr.IssueID,\n \"Merge failed: \"+reason).Run()\n```\n\n### Polecat Exit with Escalation\n\n```bash\n# Worker reaches decision point\n\n# 1. Update issue with decision structure\nbd update $ISSUE --notes \"$(cat \u003c\u003cEOF\n## Decision Needed\n\n**Question:** Which approach for caching?\n\n| Option | Description |\n|--------|-------------|\n| A | Redis (external dependency) |\n| B | In-memory (simpler, no persistence) |\n| C | SQLite (local persistence) |\n\n**Context:** API response times are slow, need caching layer.\nEOF\n)\"\n\n# 2. Escalate\ngt escalate --type decision --issue $ISSUE \"Caching approach needs decision\"\n\n# 3. Exit cleanly\ngt done --exit ESCALATED\n```\n\n### New Issue Statuses\n\nConsider adding to beads:\n\n| Status | Meaning |\n|--------|---------|\n| `decision_needed` | Waiting for decision from escalation |\n| `escalated` | General escalation pending |\n\nOr keep using `blocked` with escalation tag - simpler.\n\n## Implementation Plan\n\n### Phase 1: Extend gt escalate\n- Add `--type` flag for categories\n- Add `--to` flag for routing (deacon, mayor, overseer)\n- Add `--forward` flag for tier forwarding\n- Keep backward compatibility\n\n### Phase 2: Decision Pattern\n- Add `--question`, `--options`, `--context` flags\n- Auto-update issue with decision structure\n- Parse decision from issue comments on resolution\n\n### Phase 3: Gate Integration\n- Add `gate_timeout` escalation type\n- Witness: check timer gates, escalate on timeout\n- Refinery: check GH gates, escalate on timeout/failure\n\n### Phase 4: Patrol Integration\n- Formalize Witness stuck-polecat as escalation\n- Formalize Refinery merge-failure as escalation\n- Unified escalation handling in Mayor\n\n## Acceptance Criteria\n\n- [ ] `gt escalate --type decision` creates structured issue update\n- [ ] `gt escalate --to deacon|mayor|overseer` routes correctly\n- [ ] Gate timeouts trigger escalation (after bd-7zka.2)\n- [ ] Witness uses escalation for stuck polecats\n- [ ] Refinery uses escalation for merge failures\n- [ ] Escalation chain tracked in bead (who forwarded to whom)\n- [ ] `bd list --tag=escalation --type=decision` filters work\n\n## References\n\n- bd-7zka.2: Gate evaluation (uses escalation for timeouts)\n- gastown/docs/escalation.md: Current escalation protocol\n- gastown/crew/max/internal/cmd/escalate.go: Current implementation","status":"hooked","priority":2,"issue_type":"feature","assignee":"beads/polecats/quartz","created_at":"2026-01-01T15:03:37.684701-08:00","created_by":"beads/crew/fang","updated_at":"2026-01-01T16:11:05.385332-08:00"} {"id":"bd-0vg","title":"Pinned issues: persistent context markers","description":"Add ability to pin issues so they remain visible and are excluded from work-finding commands. Pinned issues serve as persistent context markers (handoffs, architectural notes, recovery instructions) that should not be claimed as work items.\n\nUse Cases:\n1. Handoff messages - Pin session handoffs so new agents always see them\n2. Architecture decisions - Pin ADRs or design notes for reference \n3. Recovery context - Pin amnesia-cure notes that help agents orient\n\nCore commands: bd pin, bd unpin, bd list --pinned/--no-pinned","status":"closed","priority":1,"issue_type":"epic","created_at":"2025-12-18T23:33:10.911092-08:00","updated_at":"2025-12-21T11:30:28.989696-08:00","closed_at":"2025-12-21T11:30:28.989696-08:00"} {"id":"bd-0vtq","title":"Investigate JSONL hash mismatch warnings (bd-160)","description":"During v0.39.1 release, saw repeated warnings:\n\nWARNING: JSONL file hash mismatch detected (bd-160)\n This indicates JSONL and export_hashes are out of sync.\n Clearing export_hashes to force full re-export.\n\nThis appeared multiple times during wisp close operations. Questions:\n1. What causes export_hashes to drift from actual JSONL content?\n2. Is this expected during wisp operations (since wisps do not export)?\n3. Should wisp operations skip the hash check entirely?\n4. Is there actual data integrity risk or just noise?\n\nThe warning references bd-160 - may need to check that issue for context.","status":"closed","priority":2,"issue_type":"bug","created_at":"2025-12-27T22:51:25.448856-08:00","created_by":"beads/crew/emma","updated_at":"2025-12-27T23:22:09.589444-08:00","closed_at":"2025-12-27T23:22:09.589444-08:00"} {"id":"bd-0w5","title":"Fix update-hooks verification in version-bump.yaml","description":"The update-hooks task verification command at version-bump.yaml:358 always succeeds due to '|| echo ...' fallback. Remove the fallback so verification actually fails when hooks aren't installed.","status":"tombstone","priority":3,"issue_type":"bug","created_at":"2025-12-17T22:23:06.55467-08:00","updated_at":"2025-12-25T01:21:01.952723-08:00","deleted_at":"2025-12-25T01:21:01.952723-08:00","deleted_by":"batch delete","delete_reason":"batch delete","original_type":"bug"} @@ -198,7 +198,7 @@ {"id":"bd-7xrg","title":"Refinery Patrol","description":"Merge queue processor patrol loop with verification gates.","status":"closed","priority":2,"issue_type":"molecule","created_at":"2025-12-27T18:14:31.190713-08:00","updated_at":"2025-12-30T18:12:30.974709-08:00","closed_at":"2025-12-30T18:11:14.234636-08:00"} {"id":"bd-7yg","title":"Git merge driver uses invalid placeholders (%L, %R instead of %A, %B)","description":"## Problem\n\nThe beads git merge driver is configured with invalid Git placeholders:\n\n```\ngit config merge.beads.driver \"bd merge %A %O %L %R\"\n```\n\nGit doesn't recognize `%L` or `%R` as valid merge driver placeholders. The valid placeholders are:\n- `%O` = base (common ancestor)\n- `%A` = current version (ours)\n- `%B` = other version (theirs)\n\n## Impact\n\n- Affects ALL users when they have `.beads/beads.jsonl` merge conflicts\n- Automatic JSONL merge fails with error: \"error reading left file: failed to open file: open 7: no such file or directory\"\n- Users must manually resolve conflicts instead of getting automatic merge\n\n## Root Cause\n\nThe `bd init` command (or wherever the merge driver is configured) is using non-standard placeholders. When Git encounters `%L` and `%R`, it either passes them literally or interprets them incorrectly.\n\n## Fix\n\nUpdate the merge driver configuration to:\n```\ngit config merge.beads.driver \"bd merge %A %O %A %B\"\n```\n\nWhere:\n- 1st `%A` = output file (current file, will be overwritten)\n- `%O` = base (common ancestor)\n- 2nd `%A` = left/current version\n- `%B` = right/other version\n\n## Action Items\n\n1. Fix `bd init` (or equivalent setup command) to use correct placeholders\n2. Add migration/warning for existing users with misconfigured merge driver\n3. Update documentation with correct merge driver setup\n4. Consider adding validation when `bd init` is run","status":"tombstone","priority":1,"issue_type":"bug","created_at":"2025-11-21T19:51:55.747608-05:00","updated_at":"2025-12-25T01:21:01.952723-08:00","deleted_at":"2025-12-25T01:21:01.952723-08:00","deleted_by":"batch delete","delete_reason":"batch delete","original_type":"bug"} {"id":"bd-7z4","title":"Add tests for delete operations","description":"Core delete functionality including deleteViaDaemon, createTombstone, and deleteIssue functions have 0% coverage. These are critical for data integrity and need comprehensive test coverage.","status":"closed","priority":1,"issue_type":"task","created_at":"2025-12-18T07:00:34.867680882-07:00","updated_at":"2025-12-23T23:48:50.087306-08:00","closed_at":"2025-12-23T23:48:50.087306-08:00","dependencies":[{"issue_id":"bd-7z4","depends_on_id":"bd-6ss","type":"discovered-from","created_at":"2025-12-18T07:00:34.870254935-07:00","created_by":"matt"}]} -{"id":"bd-7zka","title":"Implement formula features: Step.Condition and Step.Gate","description":"Multiple formula features in internal/formula/types.go are marked as \"Not yet implemented\":\n\nIMPLEMENTED (TODOs removed):\n- Step.Expand: Inline expansion - implemented in ApplyInlineExpansions (expand.go)\n- Step.ExpandVars: Variable overrides for expansion - implemented alongside Expand\n\nSTILL NOT IMPLEMENTED (TODOs remain):\n- Step.Condition: Make step optional based on variable (types.go:177-180)\n- Step.Gate: Async wait condition for step (types.go:185-187)\n- Gate struct: Schema defined but not processed in bd cook (types.go:209-210)\n\nFile: internal/formula/types.go","status":"open","priority":3,"issue_type":"feature","created_at":"2025-12-28T16:32:54.493002-08:00","created_by":"stevey","updated_at":"2025-12-30T19:32:30.362068-08:00"} +{"id":"bd-7zka","title":"Implement formula features: Step.Condition and Step.Gate","description":"Multiple formula features in internal/formula/types.go are marked as \"Not yet implemented\":\n\nIMPLEMENTED (TODOs removed):\n- Step.Expand: Inline expansion - implemented in ApplyInlineExpansions (expand.go)\n- Step.ExpandVars: Variable overrides for expansion - implemented alongside Expand\n\nSTILL NOT IMPLEMENTED (TODOs remain):\n- Step.Condition: Make step optional based on variable (types.go:177-180)\n- Step.Gate: Async wait condition for step (types.go:185-187)\n- Gate struct: Schema defined but not processed in bd cook (types.go:209-210)\n\nFile: internal/formula/types.go","status":"hooked","priority":3,"issue_type":"feature","assignee":"beads/polecats/jasper","created_at":"2025-12-28T16:32:54.493002-08:00","created_by":"stevey","updated_at":"2026-01-01T16:11:22.018289-08:00"} {"id":"bd-7zka.1","title":"Implement Step.Condition evaluation in bd cook","description":"## Summary\nImplement conditional step execution based on variable values.\n\n## Location\n- Schema: `internal/formula/types.go:177-180`\n- Implement in: `internal/formula/cook.go` (or new file `condition.go`)\n\n## Current Schema\n```go\n// Condition makes this step optional based on a variable.\n// Format: \"{{var}}\" (truthy) or \"{{var}} == value\".\n// TODO(bd-7zka): Not yet implemented in bd cook. Filed as future work.\nCondition string `json:\"condition,omitempty\"`\n```\n\n## Implementation\n\n### Parsing\nSupport two formats:\n1. `\"{{var}}\"` - truthy check (non-empty, non-\"false\", non-\"0\")\n2. `\"{{var}} == value\"` - equality check\n\n```go\nfunc evaluateCondition(condition string, vars map[string]string) (bool, error) {\n // Check for equality format\n if strings.Contains(condition, \"==\") {\n parts := strings.SplitN(condition, \"==\", 2)\n varExpr := strings.TrimSpace(parts[0])\n expected := strings.TrimSpace(parts[1])\n \n // Extract variable name from {{var}}\n varName := extractVarName(varExpr)\n actual := vars[varName]\n return actual == expected, nil\n }\n \n // Truthy check\n varName := extractVarName(condition)\n val := vars[varName]\n return val != \"\" \u0026\u0026 val != \"false\" \u0026\u0026 val != \"0\", nil\n}\n```\n\n### Integration with bd cook\nIn the step processing loop, check condition before creating issue:\n```go\nif step.Condition != \"\" {\n include, err := evaluateCondition(step.Condition, vars)\n if err != nil {\n return fmt.Errorf(\"invalid condition %q: %w\", step.Condition, err)\n }\n if !include {\n continue // Skip this step\n }\n}\n```\n\n## Example Usage\n```yaml\nsteps:\n - title: \"Run integration tests\"\n condition: \"{{run_integration}}\"\n \n - title: \"Deploy to staging\"\n condition: \"{{environment}} == staging\"\n```\n\n## Testing\n- Test truthy evaluation (empty, \"false\", \"0\", valid value)\n- Test equality check\n- Test invalid condition format\n- Test missing variable (should be falsy)\n\n## Acceptance Criteria\n- [x] Truthy conditions work\n- [x] Equality conditions work\n- [x] Steps are skipped when condition is false\n- [x] Clear error on malformed condition\n- [x] Works with variable substitution","status":"closed","priority":3,"issue_type":"task","created_at":"2025-12-30T19:31:57.979217-08:00","created_by":"beads/crew/emma","updated_at":"2025-12-31T00:33:25.954831-08:00","closed_at":"2025-12-31T00:33:25.954831-08:00","close_reason":"Implemented Step.Condition evaluation in stepcondition.go with tests","dependencies":[{"issue_id":"bd-7zka.1","depends_on_id":"bd-7zka","type":"parent-child","created_at":"2025-12-30T19:31:57.97973-08:00","created_by":"beads/crew/emma"}]} {"id":"bd-7zka.2","title":"Implement Gate evaluation in bd cook","description":"## Summary\nImplement async wait conditions (gates) for formula steps.\n\n## Design Decision: RESOLVED\n\n**Gates are issues.** A gate is a `bd-gate-*` prefixed issue that blocks the step it guards.\n\n### Gate Issue Structure\n```\nbd-gate-abc: Gate: gh:run test.yml\n type: gate\n gate_type: gh:run\n gate_target: test.yml\n gate_timeout: 1h\n gate_created: 2025-01-01T12:00:00Z\n blocks: bd-xyz # The step issue waiting on this gate\n```\n\n### Gate Types and Watchers\n\n| Gate Type | Signal Source | Watcher | Trigger |\n|-----------|---------------|---------|---------|\n| bead (cross-rig) | bd sync | Existing dep resolution | Sync |\n| gh:run | GitHub API | Refinery | Patrol poll |\n| gh:pr | GitHub API | Refinery | Patrol poll |\n| timer | Clock | Witness | Patrol cycle |\n| human | Human | None | bd close |\n| mail | Inbox | Deacon | Mail receipt (future) |\n\n### Visibility\n- bd list hides gate-type issues by default\n- bd gate list shows all open gates\n- bd mol show displays gates inline in molecule view\n\n### Timeouts\n- Gate timeout triggers escalation to Deacon/Overseer inbox\n- See: bd-0sgd (escalation inbox design)\n\n## Implementation Phases\n\n### Phase 1: Gate Issues + Human Gates\n- bd cook creates bd-gate-* issues for steps with gates\n- Gate issues block the next step via dependency\n- Human gates: just bd close bd-gate-xxx\n- bd list filters out type=gate by default\n- bd gate list command\n\n### Phase 2: Timer Gates\n- Witness patrol includes bd gate check --type=timer\n- Gate metadata: timeout, created_at\n- Expired gates escalate (not auto-close)\n\n### Phase 3: GitHub Gates\n- Refinery patrol includes bd gate check --type=gh\n- Uses gh CLI to check workflow/PR status\n- Resolved gates close\n\n### Phase 4: Cross-Rig Bead Gates\n- Leverage existing external dep resolution\n- bd cook creates gate with external dep on target bead\n- bd ready / bd sync resolves naturally\n\n### Phase 5: Mail Gates (future)\n- Deacon watches for mail responses\n- Complex - may YAGNI\n\n## Commands\n\n```bash\nbd gate list # Show open gates\nbd gate check # Evaluate all gates\nbd gate check --type=timer # Check only timer gates\nbd gate check --type=gh # Check only GitHub gates\nbd gate resolve \u003cid\u003e [--reason] # Force-close a gate\n```\n\n## Location\n- Schema: internal/formula/types.go\n- Gate issue creation: internal/formula/cook.go\n- Gate commands: cmd/bd/gate.go (new)\n- List filtering: cmd/bd/list.go\n\n## Acceptance Criteria\n- [ ] bd cook creates bd-gate-* issues for gated steps\n- [ ] Gate issues block subsequent steps\n- [ ] bd list hides gates by default\n- [ ] bd gate list shows all gates\n- [ ] bd gate check --type=timer works (Witness integration)\n- [ ] bd mol show displays gates in molecule view\n- [ ] Human gates closeable via bd close","status":"open","priority":3,"issue_type":"task","created_at":"2025-12-30T19:32:19.664542-08:00","created_by":"beads/crew/emma","updated_at":"2026-01-01T15:35:02.840468-08:00","dependencies":[{"issue_id":"bd-7zka.2","depends_on_id":"bd-7zka","type":"parent-child","created_at":"2025-12-30T19:32:19.666332-08:00","created_by":"beads/crew/emma"},{"issue_id":"bd-7zka.2","depends_on_id":"bd-0sgd","type":"related","created_at":"2026-01-01T15:04:06.917484-08:00","created_by":"beads/crew/fang"}]} {"id":"bd-801b","title":"Merge: bd-bqcc","description":"branch: polecat/capable\ntarget: main\nsource_issue: bd-bqcc\nrig: beads","status":"closed","priority":2,"issue_type":"merge-request","created_at":"2025-12-23T00:26:04.306756-08:00","updated_at":"2025-12-23T01:33:25.728087-08:00","closed_at":"2025-12-23T01:33:25.728087-08:00"} @@ -775,7 +775,7 @@ {"id":"bd-s5kf","title":"Merge: onyx-1767083477016","description":"branch: polecat/onyx-1767083477016\ntarget: main\nsource_issue: onyx-1767083477016\nrig: beads","status":"closed","priority":2,"issue_type":"merge-request","created_at":"2025-12-30T00:37:08.214926-08:00","created_by":"beads/polecats/onyx","updated_at":"2025-12-30T00:54:59.041942-08:00","closed_at":"2025-12-30T00:54:59.041942-08:00","close_reason":"Branch polecat/onyx-1767083477016 no longer exists on remote"} {"id":"bd-sal9","title":"bd mol current: soft cursor showing current/next step","description":"Add bd mol current command for molecule navigation orientation.\n\n## Usage\n\nbd mol current [mol-id]\n\nIf mol-id given, show status for that molecule.\nIf not given, infer from in_progress issues assigned to current agent.\n\n## Output\n\nYou're working on molecule gt-abc (Feature X)\n\n [done] gt-abc.1: Design\n [done] gt-abc.2: Scaffold \n [done] gt-abc.3: Implement\n [current] gt-abc.4: Write tests [in_progress] \u003c- YOU ARE HERE\n [pending] gt-abc.5: Documentation\n [pending] gt-abc.6: Exit decision\n\nProgress: 3/6 steps complete\n\n## Key behaviors\n- Shows full molecule structure with status indicators\n- Highlights current in_progress step\n- If no in_progress, highlights first ready step\n- Works without explicit cursor tracking (inferred from state)\n\n## Implementation notes\n- Query children of mol-id\n- Sort by dependency order\n- Find first in_progress or first ready\n- Format with status indicators\n\n## Gas Town integration\n- gt-lz13: Update templates with nav workflow\n- gt-um6q: Update docs with nav workflow","status":"closed","priority":1,"issue_type":"feature","created_at":"2025-12-22T17:03:30.245964-08:00","updated_at":"2025-12-22T17:36:31.936007-08:00","closed_at":"2025-12-22T17:36:31.936007-08:00"} {"id":"bd-sco6","title":"Emit issue title with dep/label mutation events","description":"When dependencies or labels are added, mutations are emitted without title/assignee:\n\n```go\ns.emitMutation(MutationUpdate, depArgs.FromID, \"\", \"\") // server_labels_deps_comments.go:68\ns.emitMutation(MutationUpdate, issueID, \"\", \"\") // server_labels_deps_comments.go:101\n```\n\nThis causes bd activity (and gt feed) to show less informative entries like:\n```\n[20:42:17] โ†’ gt-4ntnq updated\n```\n\nInstead of:\n```\n[20:42:17] โ†’ gt-4ntnq updated ยท Pipeline Reliability: Fix work loss...\n```\n\n**Fix**: Look up issue title in dep/label handlers before emitting mutation. This adds one extra DB read per dep/label operation, but these are infrequent enough that it's acceptable.\n\n**Related**: gt feed now deduplicates rapid updates in gastown commit (to be pushed).","status":"closed","priority":3,"issue_type":"bug","created_at":"2025-12-30T21:13:31.574249-08:00","created_by":"gastown/crew/joe","updated_at":"2025-12-30T21:21:45.081602-08:00","closed_at":"2025-12-30T21:21:45.081602-08:00","close_reason":"Added lookupIssueMeta helper; mutation events now include title/assignee for dep/label/comment operations"} -{"id":"bd-sfcq","title":"Tests fail due to .beads directory discovery escaping temp dirs","description":"Multiple tests fail when run from within the beads repo tree:\n\n- TestFindBeadsDir (autoimport_test.go)\n- TestFindBeadsDir_ParentDirectory (autoimport_test.go)\n- TestFindDatabasePathEnvVar (beads_test.go)\n- TestFindDatabasePathInTree (beads_test.go)\n- TestIsConfiguredWithDB (syncbranch_test.go)\n\nRoot cause: Tests create temp directories and call functions that walk upward to find .beads directories. When tests run inside the beads repo, the walk escapes the temp dir and finds /Users/stevey/gt/beads/mayor/rig/.beads instead.\n\nFix approaches:\n1. Set BEADS_DB env var in tests to prevent discovery\n2. Use t.Setenv() with BEADS_DISCOVERY_ROOT or similar\n3. Add a stop-at-git-root behavior\n4. Mock the discovery function in tests","status":"open","priority":1,"issue_type":"bug","created_at":"2026-01-01T15:50:04.141197-08:00","created_by":"beads/refinery","updated_at":"2026-01-01T15:50:04.141197-08:00"} +{"id":"bd-sfcq","title":"Tests fail due to .beads directory discovery escaping temp dirs","description":"Multiple tests fail when run from within the beads repo tree:\n\n- TestFindBeadsDir (autoimport_test.go)\n- TestFindBeadsDir_ParentDirectory (autoimport_test.go)\n- TestFindDatabasePathEnvVar (beads_test.go)\n- TestFindDatabasePathInTree (beads_test.go)\n- TestIsConfiguredWithDB (syncbranch_test.go)\n\nRoot cause: Tests create temp directories and call functions that walk upward to find .beads directories. When tests run inside the beads repo, the walk escapes the temp dir and finds /Users/stevey/gt/beads/mayor/rig/.beads instead.\n\nFix approaches:\n1. Set BEADS_DB env var in tests to prevent discovery\n2. Use t.Setenv() with BEADS_DISCOVERY_ROOT or similar\n3. Add a stop-at-git-root behavior\n4. Mock the discovery function in tests","status":"in_progress","priority":1,"issue_type":"bug","assignee":"beads/polecats/obsidian","created_at":"2026-01-01T15:50:04.141197-08:00","created_by":"beads/refinery","updated_at":"2026-01-01T16:11:16.310203-08:00"} {"id":"bd-sh4c","title":"Improve test coverage for cmd/bd/setup (28.4% โ†’ 50%)","description":"The setup package has only 28.4% test coverage. Setup commands are critical for first-time user experience.\n\nCurrent coverage: 28.4%\nTarget coverage: 50%","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-13T20:43:04.409346-08:00","updated_at":"2025-12-23T22:37:13.494999-08:00","closed_at":"2025-12-23T22:37:13.494999-08:00"} {"id":"bd-si4g","title":"Verify release artifacts","description":"Check GitHub releases page - binaries for darwin/linux/windows should be available","status":"closed","priority":1,"issue_type":"task","created_at":"2025-12-19T22:56:04.183029-08:00","updated_at":"2025-12-20T00:49:51.92894-08:00","closed_at":"2025-12-20T00:25:52.720816-08:00","dependencies":[{"issue_id":"bd-si4g","depends_on_id":"bd-6s61","type":"parent-child","created_at":"2025-12-19T22:56:15.173619-08:00","created_by":"daemon"},{"issue_id":"bd-si4g","depends_on_id":"bd-otli","type":"blocks","created_at":"2025-12-19T22:56:23.428507-08:00","created_by":"daemon"}]} {"id":"bd-siz1","title":"GH#532: bd sync circular error (suggests running bd sync)","description":"bd sync error message recommends running bd sync to fix the bd sync error. Fix error handling to provide useful guidance. See GitHub issue #532.","status":"tombstone","priority":2,"issue_type":"bug","created_at":"2025-12-16T01:04:00.543573-08:00","updated_at":"2025-12-17T16:11:17.070763-08:00","deleted_at":"2025-12-17T16:11:17.070763-08:00","deleted_by":"batch delete","delete_reason":"batch delete","original_type":"bug"}