Commit Graph

10 Commits

Author SHA1 Message Date
HAL9000 81935a9cf7 chore(agents): improve ca-test-infra-improver — strengthen duplicate avoidance
CI / coverage (push) Blocked by required conditions
CI / docker (push) Blocked by required conditions
CI / status-check (push) Blocked by required conditions
CI / benchmark-regression (push) Waiting to run
CI / unit_tests (push) Has started running
CI / benchmark-publish (push) Has started running
CI / lint (push) Successful in 1m10s
CI / quality (push) Successful in 1m29s
CI / typecheck (push) Successful in 1m36s
CI / security (push) Successful in 1m39s
CI / helm (push) Successful in 35s
CI / push-validation (push) Successful in 50s
CI / build (push) Successful in 57s
CI / e2e_tests (push) Successful in 4m0s
CI / integration_tests (push) Successful in 4m20s
CI / lint (pull_request) Successful in 1m4s
CI / quality (pull_request) Successful in 1m6s
CI / typecheck (pull_request) Successful in 1m30s
CI / security (pull_request) Successful in 1m31s
CI / push-validation (pull_request) Successful in 37s
CI / helm (pull_request) Successful in 39s
CI / build (pull_request) Successful in 58s
CI / benchmark-publish (pull_request) Has been skipped
CI / benchmark-regression (pull_request) Failing after 1m22s
CI / integration_tests (pull_request) Successful in 4m35s
CI / e2e_tests (pull_request) Failing after 5m18s
CI / unit_tests (pull_request) Successful in 7m26s
CI / docker (pull_request) Successful in 3m9s
CI / coverage (pull_request) Successful in 14m19s
CI / status-check (pull_request) Failing after 3s
Expand the Duplicate Avoidance section from a 3-step placeholder into a
comprehensive 6-step process to prevent the 48+ duplicate TEST-INFRA issues
observed across 8 topic clusters.

Key additions:
- CRITICAL blockquote: when in doubt, skip
- Keyword extraction before filing
- Keyword-based search (open AND closed issues, not just TEST-INFRA: prefix)
- Semantic comparison with concrete examples
- Cross-agent prefix checking (TEST-INFRA:, BUG-HUNT:, UAT:)
- Post-filing verification with 5-second delay for race condition handling
- Duplicate Check audit section requirement in every filed issue body

ISSUES CLOSED: #2370
2026-05-05 04:53:48 +00:00
freemo bdcc44cb09 build: read and write permissions set seperate edit since read seems to be getting denied as does write
CI / helm (push) Successful in 39s
CI / lint (push) Successful in 57s
CI / build (push) Successful in 53s
CI / quality (push) Successful in 1m24s
CI / typecheck (push) Successful in 1m30s
CI / security (push) Successful in 1m43s
CI / integration_tests (push) Successful in 3m31s
CI / e2e_tests (push) Failing after 3m49s
CI / push-validation (push) Successful in 25s
CI / unit_tests (push) Successful in 4m42s
CI / docker (push) Successful in 1m28s
CI / coverage (push) Successful in 10m44s
CI / status-check (push) Failing after 3s
CI / benchmark-publish (push) Successful in 1h30m7s
2026-05-01 17:58:29 -04:00
HAL9000 87f44e556a chore(agents): fix ca-test-infra-improver health comment spam
CI / lint (push) Successful in 59s
CI / quality (push) Successful in 1m16s
CI / build (push) Successful in 37s
CI / typecheck (push) Successful in 1m18s
CI / helm (push) Successful in 36s
CI / security (push) Successful in 1m24s
CI / push-validation (push) Successful in 22s
CI / benchmark-publish (push) Failing after 42s
CI / integration_tests (push) Successful in 4m48s
CI / e2e_tests (push) Successful in 4m48s
CI / unit_tests (push) Successful in 6m6s
CI / docker (push) Successful in 1m30s
CI / coverage (push) Successful in 11m52s
CI / status-check (push) Successful in 3s
CI / benchmark-publish (pull_request) Has been skipped
CI / helm (pull_request) Successful in 39s
CI / lint (pull_request) Successful in 1m16s
CI / build (pull_request) Successful in 58s
CI / quality (pull_request) Successful in 1m45s
CI / typecheck (pull_request) Successful in 1m52s
CI / security (pull_request) Successful in 1m58s
CI / push-validation (pull_request) Successful in 23s
CI / e2e_tests (pull_request) Successful in 4m10s
CI / unit_tests (pull_request) Successful in 5m43s
CI / integration_tests (pull_request) Successful in 5m55s
CI / docker (pull_request) Successful in 1m32s
CI / coverage (pull_request) Successful in 11m12s
CI / status-check (pull_request) Successful in 3s
Replace fragile cycle-modulo health posting guard with timestamp-based
approach and state-change-only posting. The inner monitoring loop no
longer posts health comments — posting is gated by a 10-minute timer
OR meaningful state changes (worker completion, dispatch events).

Approved proposal: #3385
Pattern: workflow_fix
Evidence: Agent posted 44 of 52 session comments in 20 minutes, all
identical, drowning out other agent signals.
Fix: Timestamp-based health posting with state-change triggers.
2026-04-30 08:15:32 +00:00
freemo 602d56f347 chore(agents): fix ca-test-infra-improver health comment spam
Approved proposal: #3385
Pattern: workflow_fix
Evidence: Agent posted 44 of 52 comments in 20 minutes, drowning out all
other agent signals. The cycle % 60 guard was ambiguous and ignored by the
model.
Fix: Replace fragile modulo guard with explicit timestamp-based rate
limiting (10-minute minimum between health posts). Add prominent CRITICAL
warning about rate limiting. Clarify that health posting runs in the outer
loop, not the inner monitoring loop.

ISSUES CLOSED: #3385
2026-04-30 08:15:32 +00:00
freemo 1885990081 build: auto opencode agents rewritten
CI / build (push) Waiting to run
CI / docker (push) Blocked by required conditions
CI / helm (push) Waiting to run
CI / push-validation (push) Waiting to run
CI / status-check (push) Blocked by required conditions
CI / lint (push) Waiting to run
CI / typecheck (push) Waiting to run
CI / security (push) Waiting to run
CI / quality (push) Waiting to run
CI / unit_tests (push) Waiting to run
CI / integration_tests (push) Waiting to run
CI / e2e_tests (push) Waiting to run
CI / coverage (push) Blocked by required conditions
CI / benchmark-publish (push) Waiting to run
2026-04-27 12:49:08 -04:00
freemo cd35284e31 chore(agents): improve ca-test-infra-improver — graceful handling of clone and tool failures
CI / lint (pull_request) Successful in 21s
CI / quality (pull_request) Successful in 33s
CI / typecheck (pull_request) Successful in 53s
CI / security (pull_request) Successful in 58s
CI / build (pull_request) Successful in 26s
CI / helm (pull_request) Successful in 24s
CI / unit_tests (pull_request) Successful in 6m34s
CI / docker (pull_request) Successful in 11s
CI / coverage (pull_request) Successful in 11m4s
CI / e2e_tests (pull_request) Successful in 17m14s
CI / integration_tests (pull_request) Successful in 23m37s
CI / status-check (pull_request) Successful in 1s
CI / benchmark-publish (pull_request) Has been skipped
CI / benchmark-regression (pull_request) Successful in 57m12s
Approved proposal: #1809
Pattern: prompt_improvement — infrastructure failure misreporting
Evidence: Agent filed 10+ issues about its own infrastructure failures (clone
failures using wrong hostname, tool crashes, environment limitations) instead of
handling them gracefully. Issues #1673, #1686, #1691, #1694, #1699, #1713, #1732
were all clone failures; #1695, #1726, #1727, #1740 were tool failures.
Fix: Add hostname resolution guidance, clone failure handling with retry logic,
tool failure handling with graceful degradation, and explicit scope restriction
against filing issues about own environment.

ISSUES CLOSED: #1809
2026-04-05 06:56:24 +00:00
freemo a538713134 refactor(agents): enforce strict curl-only permissions for all supervisors
CI / lint (push) Failing after 35s
CI / quality (push) Successful in 45s
CI / security (push) Failing after 47s
CI / typecheck (push) Failing after 48s
CI / coverage (push) Has been skipped
CI / helm (push) Successful in 23s
CI / unit_tests (push) Failing after 2m8s
CI / docker (push) Has been skipped
CI / build (push) Successful in 3m20s
CI / integration_tests (push) Has been cancelled
CI / e2e_tests (push) Has been cancelled
CI / benchmark-publish (push) Has been cancelled
CI / benchmark-regression (push) Has been cancelled
CI / status-check (push) Has been cancelled
BREAKING CHANGE: Supervisors can no longer use Task tool to launch workers

Major refactor of the permission model for product-builder and all 15
continuous supervisors to enforce strict separation: supervisors MUST use
curl/prompt_async via bash to launch workers, and CANNOT use the Task tool.

Key Changes:

1. Product-Builder Permissions (product-builder.md):
   - Removed ALL Task permissions for supervisors (previously had 17)
   - Kept Task permissions ONLY for 7 one-shot agents:
     ca-project-bootstrapper, ca-ref-reader, ca-issue-finder,
     ca-session-persister, ca-product-verifier, ca-milestone-reviewer,
     ca-final-reporter
   - Restricted bash to: echo, curl, sleep, jq only
   - Removed Phase B (Architecture) and Phase C.1 (Planning)
   - Updated to launch 15 supervisors (up from 13)

2. New Continuous Supervisors:
   - ca-architect: Converted from one-shot to continuous supervisor
     Monitors for spec needs, new milestones, ambiguities
   - ca-epic-planner: Converted from one-shot to continuous supervisor
     Monitors for milestones without issues, incomplete epics

3. All 15 Supervisors - Standardized Permissions:
   - Removed ALL Task permissions for launching workers
   - Workers MUST be launched via curl to OpenCode Server prompt_async API
   - Added 'jq *' for JSON parsing (replacing python3)
   - Restricted bash to specific commands only (deny all, allow specific)
   - Git commands restricted to specific operations (clone*, fetch*, etc.)
   - Directory operations (cd, mkdir, rm -rf) only where needed

4. Supervisor-Specific Updates:
   - issue-implementor: Removed ca-issue-worker task permission
   - ca-continuous-pr-reviewer: Added git + directory ops, removed worker tasks
   - ca-uat-tester: Added read-only file/git commands, removed self-dispatch
   - ca-bug-hunter: Restricted git to read-only, removed self-dispatch
   - ca-test-infra-improver: Added read-only commands, removed self-dispatch
   - ca-human-liaison: Removed ca-epic-planner/ca-architect task permissions
   - ca-agent-evolver: Added git + directory operations
   - ca-architecture-guard: Added read-only + git clone operations
   - ca-spec-updater: Added git + directory operations
   - ca-backlog-groomer: Removed ca-epic-planner task permission
   - ca-docs-writer: Added git + directory operations
   - ca-timeline-updater: Added git + directory operations
   - ca-project-owner: Minimal permissions (curl, jq, sleep only)

Impact:
- Proper separation of concerns: supervisors orchestrate, workers execute
- No possibility of supervisors blocking on Task tool calls
- True fire-and-forget worker launching via prompt_async
- Consistent permission model across all 15 supervisors
- Maximum parallelism with proper isolation

Architecture now enforces: Product-builder → 15 supervisors → N workers
All launched via curl/prompt_async, NO Task tool for supervisors.
2026-04-03 02:33:00 +00:00
freemo 921c13f410 fix(agents): restore server mode + prompt_async supervisor launch from 9bbec0e6
CI / integration_tests (push) Has started running
CI / e2e_tests (push) Has started running
CI / status-check (push) Blocked by required conditions
CI / benchmark-publish (push) Has started running
CI / build (push) Successful in 18s
CI / lint (push) Failing after 21s
CI / helm (push) Successful in 23s
CI / quality (push) Successful in 41s
CI / typecheck (push) Failing after 46s
CI / coverage (push) Has been skipped
CI / benchmark-regression (push) Has been skipped
CI / security (push) Failing after 50s
CI / unit_tests (push) Failing after 1m49s
CI / docker (push) Has been skipped
Restores the working OpenCode server mode + curl-based async supervisor
launch functionality from commit 9bbec0e6 (2026-04-02) and updates it for
the current 13-supervisor architecture.

Changes applied to 7 agent files (938 insertions, 221 deletions):

1. product-builder.md: Restored from 9bbec0e6 and updated for 13 supervisors
   - Full bash permissions for curl/sleep
   - Server URL: http://localhost:4096
   - Launch via POST /session + POST /session/:id/prompt_async
   - Session resume (adopts existing [CA-AUTO] sessions)
   - Added ca-test-infra-improver and ca-project-owner to launch sequence
   - Updated concurrent worker calculations (~5N + ~8 singletons)

2. issue-implementor.md: Restored curl-based worker dispatch
   - 10-second polling loop with bash sleep
   - Worker sessions via prompt_async
   - Session resume for existing workers

3. ca-continuous-pr-reviewer.md: Restored curl dispatch pattern
4. ca-uat-tester.md: Restored curl pool mode
5. ca-bug-hunter.md: Restored curl pool mode
6. ca-test-infra-improver.md: Added self-dispatch permission
7. ca-session-cleanup.md: Restored utility agent

Architecture: 5 pool supervisors (N workers each) + 8 singleton supervisors
= 13 total supervisors running async via prompt_async.

Replaces the broken prompt_async implementation from commit 074c472e that
removed supervisors from task permissions without working server launch.

To use: Start OpenCode with --port 4096, then launch product-builder.

Refs: commit 9bbec0e6 (working version), commit 074c472e (broken version)
2026-04-02 20:56:06 -04:00
freemo 074c472e36 build(agents): restructure product-builder as supervisor launcher, force prompt_async everywhere
CI / build (push) Successful in 18s
CI / lint (push) Failing after 18s
CI / helm (push) Successful in 24s
CI / typecheck (push) Failing after 54s
CI / security (push) Failing after 54s
CI / coverage (push) Has been skipped
CI / benchmark-regression (push) Has been skipped
CI / unit_tests (push) Failing after 1m51s
CI / docker (push) Has been skipped
CI / quality (push) Successful in 3m41s
CI / integration_tests (push) Has been cancelled
CI / benchmark-publish (push) Has been cancelled
CI / e2e_tests (push) Has been cancelled
CI / status-check (push) Has been cancelled
The product-builder was ignoring prompt_async instructions and implementing
tickets directly because its identity was "autonomous product builder that
handles everything." The LLM absorbed this framing and defaulted to doing
the work itself rather than launching supervisors.

Root cause fix — two structural changes applied to product-builder AND all
5 pool supervisors:

1. IDENTITY REFRAME: The product-builder is now explicitly a "Supervisor
   Launcher and Monitor" — not a "product builder." The opening section
   states: "YOUR ONLY JOB: Launch 13 supervisor sessions via bash curl
   and keep them alive." A prominent DO NOT list prohibits implementing
   issues, creating PRs, writing code, or doing any work a supervisor
   handles. The file was compressed from 975 to 312 lines — prerequisites
   are brief, the supervisor launch is the first major section, and the
   monitoring loop is the primary content.

2. WORKER AGENTS REMOVED FROM TASK PERMISSIONS: Every pool supervisor had
   its worker agent in the task permissions, giving the LLM the choice to
   use the Task tool instead of prompt_async. Now removed:
   - issue-implementor: removed ca-issue-worker
   - ca-continuous-pr-reviewer: removed ca-pr-self-reviewer, ca-pr-checker
   - ca-uat-tester: removed ca-uat-tester (self-dispatch)
   - ca-bug-hunter: removed ca-bug-hunter (self-dispatch)
   - ca-test-infra-improver: removed ca-test-infra-improver (self-dispatch)

   Each supervisor now has a prominent framing block at the top: "YOU ARE A
   POOL SUPERVISOR. You dispatch workers via bash curl prompt_async. Worker
   agents have been REMOVED from your task permissions."

   Non-worker task permissions preserved (ca-ref-reader, ca-spec-reader,
   ca-new-issue-creator, etc.) for legitimate one-shot subagent calls.
2026-04-02 18:50:22 -04:00
freemo d2322b3206 build(agents): add test infrastructure improver and project owner agents (13 supervisors)
CI / lint (push) Failing after 18s
CI / build (push) Successful in 20s
CI / helm (push) Successful in 23s
CI / security (push) Failing after 52s
CI / unit_tests (push) Failing after 1m50s
CI / quality (push) Successful in 3m42s
CI / typecheck (push) Successful in 3m56s
CI / coverage (push) Has been skipped
CI / docker (push) Has been skipped
CI / benchmark-regression (push) Has been skipped
CI / integration_tests (push) Has been cancelled
CI / e2e_tests (push) Has been cancelled
CI / benchmark-publish (push) Has been cancelled
CI / status-check (push) Has been cancelled
Adds two new agent types to the autonomous system, bringing the total
from 11 to 13 supervisors launched by the product-builder via prompt_async.

New agents:

1. ca-test-infra-improver (12th supervisor — pool with N workers):
   Dual-mode agent following the ca-bug-hunter pattern. In pool mode,
   dispatches N parallel workers via prompt_async to analyze 8 aspects
   of the testing infrastructure: CI execution time, coverage gaps, test
   architecture (BDD quality), flaky tests, CI pipeline optimization,
   test data quality, missing test levels (Behave/Robot/ASV per
   CONTRIBUTING.md), and dependency security. Workers file actionable
   Type/Testing or Type/Task issues. Hard constraint: never disables
   or weakens existing checks — only proposes additions and optimizations.
   Uses Gemini 2.5 Pro for large context. Follows all established patterns
   (clone isolation, bash sleep, prompt_async dispatch, session resume,
   bot signature).

2. ca-project-owner (13th supervisor — singleton, no pool):
   Acts as autonomous project owner. Continuously triages State/Unverified
   issues following CONTRIBUTING.md's 6-step triage process. Assigns
   MoSCoW labels (Must Have / Should Have / Could Have) based on the
   specification and milestone goals. Makes strategic priority decisions.
   Tags specific developers with questions in Forgejo comments (discovers
   expertise from git history and Forgejo assignments). Periodically
   re-evaluates MoSCoW labels as the project evolves. Follows up on
   unanswered questions after 48 hours. Single instance, not a pool —
   one project owner is sufficient. Uses Opus for nuanced strategic
   judgment. Launched via prompt_async like all other supervisors.

Modified files:

- product-builder.md: Updated from 11 to 13 supervisors in all locations
  (architecture table, Phase C.2 launch list with entries #12 and #13,
  validation count, checkpoint text, self-coordinate table). Added
  test-infra-pool to pool supervisors list and project-owner to singletons.

- ca-human-liaison.md: Clarified MoSCoW responsibility split — the liaison
  only adjusts MoSCoW labels when relaying explicit human feedback. The
  ca-project-owner handles autonomous MoSCoW assignment.
2026-04-02 15:19:53 -04:00