From 4914585595f134190d9dc8ebd5b826d669c6e56d Mon Sep 17 00:00:00 2001 From: bougyman's bot Date: Mon, 28 Sep 2026 08:23:39 -0400 Subject: [PATCH 1/2] chore: updates linear-cli version and prompts --- .ai/workflows/bug-fix.yaml | 12 ++++++++++++ .ai/workflows/feature.yaml | 14 +++++++++++++- vendor/linear-cli | 2 +- vendor/stokowski | 2 +- workflow.glean.yaml | 37 ++++++++++++++++++++++++++++++++++--- 5 files changed, 61 insertions(+), 6 deletions(-) diff --git a/.ai/workflows/bug-fix.yaml b/.ai/workflows/bug-fix.yaml index f3c0d35..b812c69 100644 --- a/.ai/workflows/bug-fix.yaml +++ b/.ai/workflows/bug-fix.yaml @@ -112,6 +112,7 @@ states: session: fresh transitions: complete: merge + blocked: merge-review merge: type: agent @@ -124,6 +125,17 @@ states: session: fresh transitions: complete: done + blocked: merge-review + + # Parks the issue when improvement or merge reports the PR cannot merge yet. + # Approve once the PR is mergeable to run merge; rework reruns improvement. + merge-review: + type: gate + linear_state: review + rework_to: improvement + max_rework: 5 + transitions: + approve: merge done: type: terminal diff --git a/.ai/workflows/feature.yaml b/.ai/workflows/feature.yaml index 01bcf48..e229f87 100644 --- a/.ai/workflows/feature.yaml +++ b/.ai/workflows/feature.yaml @@ -97,7 +97,7 @@ states: transitions: approve: improvement - # Mechanical: acts only on explicitly approved Glean candidate IDs. + # Mechanical: creates the approved Glean follow-ups, then checks the PR. improvement: type: agent prompt: .ai/prompts/improvement.md @@ -109,6 +109,7 @@ states: session: fresh transitions: complete: merge + blocked: merge-review # Mechanical: independently re-check approvals and CI, then merges. merge: @@ -122,6 +123,17 @@ states: session: fresh transitions: complete: done + blocked: merge-review + + # Parks the issue when improvement or merge reports the PR cannot merge yet. + # Approve once the PR is mergeable to run merge; rework reruns improvement. + merge-review: + type: gate + linear_state: review + rework_to: improvement + max_rework: 5 + transitions: + approve: merge done: type: terminal diff --git a/vendor/linear-cli b/vendor/linear-cli index b528a58..d5ee641 160000 --- a/vendor/linear-cli +++ b/vendor/linear-cli @@ -1 +1 @@ -Subproject commit b528a58fc4c5b1fcb7a44ce69c1ba5020efc6d4f +Subproject commit d5ee641578461d35cf7ee86e4b4afbebc8a44782 diff --git a/vendor/stokowski b/vendor/stokowski index 79fa1bb..d8c8d86 160000 --- a/vendor/stokowski +++ b/vendor/stokowski @@ -1 +1 @@ -Subproject commit 79fa1bb032fdb4517a28a2f6dcf074ff4571829e +Subproject commit d8c8d86e15b896c06f638090bc9b2995c61d3e1f diff --git a/workflow.glean.yaml b/workflow.glean.yaml index 6b63335..be03963 100644 --- a/workflow.glean.yaml +++ b/workflow.glean.yaml @@ -14,7 +14,7 @@ linear_states: terminal: [Done, Closed, Cancelled, Canceled, Duplicate] polling: - interval_ms: 15000 + interval_ms: 30000 workspace: root: ~/.local/share/stokowski/workspaces/fantasia @@ -24,10 +24,41 @@ hooks: git clone --depth 1 --recursive git@github.com:rubyists/fantasia . mise trust mise install + mise exec -- mix deps.get mise exec -- mix setup before_run: | - git fetch origin main - git rebase origin/main 2>/dev/null || git rebase --abort + # Best-effort refresh onto origin/main. A failed hook fails the whole agent + # run, so only a rebase that cannot be cleaned up is fatal. + if ! git fetch origin main; then + echo "before_run: git fetch origin main failed; skipping rebase" >&2 + exit 0 + fi + if ! changes="$(git status --porcelain)"; then + echo "before_run: git status failed; skipping rebase" >&2 + exit 0 + fi + if [ -n "$changes" ]; then + echo "before_run: preserving uncommitted workspace changes; skipping rebase" + exit 0 + fi + # A branch that tracks a remote branch (main, or a pushed PR branch) is + # shared history: fast-forward it to its own upstream and never rewrite + # it. Rebasing a PR branch onto main drops its merge commits and leaves + # the workspace diverged from the PR. Only an unpushed branch rebases. + if git rev-parse --abbrev-ref --symbolic-full-name '@{upstream}' >/dev/null 2>&1; then + if ! git pull --ff-only; then + echo "before_run: cannot fast-forward to the upstream branch; leaving it as is" >&2 + fi + exit 0 + fi + if ! git rebase origin/main; then + echo "before_run: rebase onto origin/main failed; aborting it" >&2 + if ! git rebase --abort; then + echo "before_run: git rebase --abort failed; the workspace needs manual repair" >&2 + exit 1 + fi + fi + exit 0 timeout_ms: 240000 claude: From 351ceb46da8e74266a87118ee632fd8cd8ac56da Mon Sep 17 00:00:00 2001 From: "Tj (bougyman) Vanderpoel" Date: Mon, 28 Sep 2026 08:55:44 -0400 Subject: [PATCH 2/2] fix: fix fragile compatibility test --- .../stokowski/test/stokowski/compatibility_test.exs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/apps/stokowski/test/stokowski/compatibility_test.exs b/apps/stokowski/test/stokowski/compatibility_test.exs index ae231e6..e7518c1 100644 --- a/apps/stokowski/test/stokowski/compatibility_test.exs +++ b/apps/stokowski/test/stokowski/compatibility_test.exs @@ -147,14 +147,19 @@ defmodule Stokowski.CompatibilityTest do commit_rows = inventory["commits"] expected_commits = Enum.map(commit_rows, & &1["sha"]) - assert {checkout, 0} = System.cmd("git", ["-C", vendor, "rev-parse", "HEAD"]) - assert String.trim(checkout) == pin + assert {_output, 0} = + System.cmd("git", ["-C", vendor, "cat-file", "-e", "#{pin}^{commit}"], + stderr_to_stdout: true + ) + assert List.last(expected_commits) == pin assert length(expected_commits) == MapSet.size(MapSet.new(expected_commits)) - # actions/checkout intentionally leaves a submodule with only its pinned object. + # This is a point-in-time audit: `pin` documents history up to a past commit, + # not the vendor's current HEAD, so the submodule can advance without touching + # this fixture. We only require that `pin` still exists in the vendored history. # Compare the exact ancestry whenever the baseline object is available locally; - # the fixture's structural and checkout-pin assertions still run in shallow CI. + # the fixture's structural assertions still run in shallow CI. case System.cmd("git", ["-C", vendor, "cat-file", "-e", "#{baseline}^{commit}"], stderr_to_stdout: true ) do