agents: review fixes — thread attribution, concurrency, rescue stall, docs, CI, pin, cost label #77

Merged
ffaerber merged 1 commits from fix/review-findings into main 2026-07-06 08:48:37 +02:00
Owner

Fixes from a full review of this repo, ranked by impact:

Bugs / regressions

  1. Thread attribution was lostfetch-thread.sh still told agents to find the author in the "🤖 @name" header we removed, so every teammate comment read as an anonymous "AI teammate". Now attributed to the real comment author (agents post as their own users); hidden loop-markers stripped from the thread (prompt noise).
  2. Per-issue concurrency — two quick comments on one issue raced the same ai/issue-N branch (non-fast-forward losses). Runs on one issue now queue (concurrency, no cancel).
  3. Rescue stalled the flow — a rescued PR never pinged @pm (the rescue note is 🤖-marked), silently killing the pm→qa choreography. Rescue now posts an unmarked @pm trigger; also modernized its comment style + added ops to its token case.

Doc drift
4. README said "@qa merges / TOKEN_QA needs write:repository" — inverted since the PM-orchestrated flow. Token table fixed, agent table refreshed (node1-ssh moved to homelab), new "How a task flows" section.
5. agents.json pm/qa descs now describe the orchestrator/reviewer roles (they feed the roster prompt).

Hygiene
6. NEW ci.ymlbash -n + shellcheck -S error on every script, YAML-parse on every workflow, agents.json schema check. The ${x:-{}} brace bug would have been caught here.
7. opencode pinned to 1.17.13 (override OPENCODE_VERSION) — a breaking release (CLI or event schema) no longer takes down every agent at once.
8. Cost footer: ollama/ollama-cloud are subscription-billed → footer says subscription instead of a misleading $0.0000; anthropic keeps real $.
9. route.sh: documented that mention-priority is list-order and load-bearing.

All scripts pass bash -n; workflows YAML-validated; footer + thread jq tested against real samples.

Fixes from a full review of this repo, ranked by impact: **Bugs / regressions** 1. **Thread attribution was lost** — `fetch-thread.sh` still told agents to find the author in the "🤖 @name" header we removed, so every teammate comment read as an anonymous "AI teammate". Now attributed to the **real comment author** (agents post as their own users); hidden loop-markers stripped from the thread (prompt noise). 2. **Per-issue concurrency** — two quick comments on one issue raced the same `ai/issue-N` branch (non-fast-forward losses). Runs on one issue now queue (`concurrency`, no cancel). 3. **Rescue stalled the flow** — a rescued PR never pinged @pm (the rescue note is 🤖-marked), silently killing the pm→qa choreography. Rescue now posts an unmarked `@pm` trigger; also modernized its comment style + added `ops` to its token case. **Doc drift** 4. README said *"@qa merges / TOKEN_QA needs write:repository"* — inverted since the PM-orchestrated flow. Token table fixed, agent table refreshed (node1-ssh moved to homelab), new **"How a task flows"** section. 5. `agents.json` pm/qa descs now describe the orchestrator/reviewer roles (they feed the roster prompt). **Hygiene** 6. **NEW `ci.yml`** — `bash -n` + `shellcheck -S error` on every script, YAML-parse on every workflow, `agents.json` schema check. The `${x:-{}}` brace bug would have been caught here. 7. **opencode pinned** to 1.17.13 (override `OPENCODE_VERSION`) — a breaking release (CLI or event schema) no longer takes down every agent at once. 8. **Cost footer**: ollama/ollama-cloud are subscription-billed → footer says `subscription` instead of a misleading `$0.0000`; anthropic keeps real `$`. 9. `route.sh`: documented that mention-priority is list-order and load-bearing. All scripts pass `bash -n`; workflows YAML-validated; footer + thread jq tested against real samples.
ffaerber added 1 commit 2026-07-06 08:47:35 +02:00
agents: fix review findings — thread attribution, races, rescue stall, docs, CI
ci / lint (pull_request) Successful in 11s
ci / lint (push) Skipped
9b9e1e945d
Fixes from a full repo review:

- fetch-thread.sh: attribute every comment to its REAL author (@pm/@qa/… —
  agents post as their own users now); the old "🤖 @name line at the top" hint
  pointed at headers we removed, leaving every teammate comment anonymous. Also
  strip the hidden loop-prevention marker from bodies (prompt noise).
- agent.yml: per-issue concurrency group (queued, no cancel) — two quick
  comments on one issue no longer race the same ai/issue-N branch.
- rescue-pr.sh: after opening a rescue PR, hand it back into the flow with an
  unmarked @pm trigger (the pm→qa choreography previously stalled silently on
  any rescued run); drop the old "🤖 **@name**" header style; add ops to the
  token case; mark the status note with the hidden marker.
- README: token table said "@qa merges / TOKEN_QA needs write:repository" —
  inverted since the PM-orchestrated flow (@pm merges, autopilot only; @qa is
  read-only). Updated the agent table (descs, node1-ssh moved to homelab) and
  added a "How a task flows" section.
- agents.json: pm/qa descs now describe the orchestrator/reviewer roles (these
  feed the roster prompt agents route by).
- NEW ci.yml: bash -n + shellcheck(-S error) on every script, YAML-parse on
  every workflow, agents.json schema check — the ${x:-{}} brace bug would have
  been caught here before it shipped.
- install-opencode.sh: pin opencode (default 1.17.13, override via
  OPENCODE_VERSION) — a breaking release no longer takes down every agent.
- build-activity-log.sh: ollama/ollama-cloud models are subscription-billed
  (no $/token exists) — label the footer "subscription" instead of a
  misleading $0.0000; metered (anthropic) models keep the real dollar cost.
- route.sh: document that mention-priority is list-order and load-bearing for
  the flow's trigger comments.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
ffaerber force-pushed fix/review-findings from 09c716a8c1 to 9b9e1e945d 2026-07-06 08:47:36 +02:00 Compare
ffaerber merged commit d491a249e9 into main 2026-07-06 08:48:37 +02:00
ffaerber deleted branch fix/review-findings 2026-07-06 08:48:37 +02:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: gitea/agents#77