Skip to content

fix: shell test env isolation, Gemini worker mode, improve loop sequencing - #113

Closed
laird wants to merge 25 commits into
masterfrom
fix/test-fixes-and-improve-loop
Closed

fix: shell test env isolation, Gemini worker mode, improve loop sequencing#113
laird wants to merge 25 commits into
masterfrom
fix/test-fixes-and-improve-loop

Conversation

@laird

@laird laird commented Aug 8, 2026

Copy link
Copy Markdown
Owner

Summary

  • test_issue_source_lib.sh: Replace VAR=value func prefix syntax with explicit export before the call. Bash saves/restores per-call env for shell functions, undoing the function's own export on return; persistent exports avoid this.

  • worker-launch-lib.sh: Switch Gemini workers from a shell-script wrapper (gemini-fix-loop.sh) to interactive mode with /fix-loop, matching the Antigravity parallel implementation and what test_worker_launch_lib.sh has always asserted.

  • skills/improve/SKILL.md: Enforce one-run-at-a-time in the swarm-mode cadence. Remove the "early rerun to verify" coordinator shortcut that could start a new run while the swarm was still implementing fixes. Coordinator now lands all entangled fixes first, dispatches the swarm batch, waits for completion, then does the single batch acceptance rerun at step 5.

  • test_issues_gh_search.sh: Clear BASH_ENV before running the backend subprocess in capture_search. BASH_ENV=/home/laird/.bashenv prepends $HOME/bin to PATH inside every bash subprocess, causing the real gh auth-switching wrapper to shadow the test stub.

Test plan

  • bash tests/test_issue_source_lib.shok issue-source-lib
  • bash tests/test_worker_launch_lib.shok worker-launch-lib
  • bash tests/test_issues_gh_search.shResults: 15 passed, 0 failed
  • Full batch: all tests pass (0 failures)

🤖 Generated with Claude Code

laird and others added 25 commits August 7, 2026 15:36
…g to N-clean; scope + exercise preflight; swarm cadence)
Design spec for adding a human-gated planning capability to the manager
session (brainstorm → spec → critical review → decompose to stories →
existing fleet implements), plus renaming /fix→/dev and /fix-loop→/dev-loop
with aliases. Reuses existing skills and the decomposed/subtask convention;
adds two backlog-aware behaviors to the manager loop.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Critical-design-review round 1 approved the planning-pipeline spec as-is:
0 literal-wrongness findings, 0 forced decisions. Empirically confirmed the
two load-bearing hand-off facts (subtask is claimable; decomposed parents are
excluded from claiming). Recorded the CDR approval in the spec status and
carried the three CIR-deferred items forward as notes B8/B9 (+ existing B5).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…eview-1 to autocoder-planning-pipeline-implementation-plan
Tracks the 2026-07-28 handoff documenting the /fix→/dev rename and
peters-toolkit:bugfix integration, plus the still-unaddressed critical
review of the planning-pipeline implementation plan.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
… reimplemented on master + platform drift repair
… exclusion, drift repair), marketplace to 3.32.0
…ound/improved/learned per round, verdict chapter)
…e v2 removal

Atlassian removed POST /rest/api/2/search from Jira Cloud (HTTP 410,
CHANGE-2046). list and any-claimable now use POST /rest/api/3/search/jql
with an explicit fields list, nextPageToken pagination (no startAt), and
existence-of-first-page instead of the removed total for any-claimable.
Issue lifecycle endpoints stay on v2 (not removed; plain-string bodies).
The fake serves the new contract, enforces a settable page cap to exercise
the token loop, and returns 410 on v2 search so regressions cannot pass.

Live verification against real Jira Cloud pending by coordinator.
…text

Live smoke showed /rest/api/3/search/jql returns description as an ADF
document object, not v2's plain string. The list reshape now walks ADF
content nodes collecting text (paragraphs joined with newlines; tolerates
null, plain strings, malformed nodes), so body stays a plain string for
all consumers. v2 CRUD read paths are untouched (still plain strings).
The fake now serves ADF descriptions from v3 search to pin the contract.
…-smoke-test.sh; live validation pending an ADO sandbox)
…gents

The SKILL.md had no model guidance. Top-level coordinator (scope/grade/fix
decisions) uses the deep model; subagents and swarm workers use the balanced
model. Mirrors the autocoder manager/worker tier pattern.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… model selection (#110)

* feat(autocoder): add model-config startup confirmation and env-var-driven model selection

Autocoder agents now resolve model tiers from env vars → .autocoder.json →
built-in defaults (claude-opus-5 / claude-sonnet-5 / claude-haiku-4-5 on
Claude Code; gemini-2.5-pro / gemini-2.0-flash on Antigravity).

On first run with no model config found, the agent presents the defaults and
asks the user to confirm or override before proceeding.  The confirmed models
are exported as MANAGER_MODEL / WORKER_MODEL / FAST_MODEL and referenced in
every Task tool call in the workflow so agents actually use them.

Also adds skills/autocoder/references/model-config.md documenting the tier
system and how to persist overrides via .autocoder.json.

Parallel maintenance: plugins/autocoder/commands/fix.md ↔ .agent/workflows/fix.md

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* chore: bump autocoder to 4.11.0, marketplace to 3.33.0

Reflects model-config startup confirmation and env-var-driven model
selection added in the previous commit.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
#112)

Switch fix.md and model-config.md from full API model IDs (claude-opus-5)
to platform tier shorthand (opus/sonnet/haiku for Claude Code, pro/flash
for Gemini). Agents inherit credentials from the running session — no
separate API keys needed.

Rename skills/harden → skills/improve to reflect the general improvement
and validation loop, not just security hardening.

Bump autocoder 4.11.0 → 4.12.0, marketplace 3.33.0 → 3.34.0.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
…ncing

- tests/test_issue_source_lib.sh: replace VAR=value function-prefix syntax
  with explicit `export` before the call. Bash restores the caller's env
  after a shell-function-prefix invocation, undoing the function's own
  export; using persistent exports avoids this.

- plugins/autocoder/scripts/worker-launch-lib.sh: switch Gemini workers
  from a shell-script wrapper (gemini-fix-loop.sh) to interactive mode
  with /fix-loop, matching the Antigravity parallel implementation and
  what test_worker_launch_lib.sh has always asserted.

- skills/improve/SKILL.md: enforce one-run-at-a-time in swarm-mode
  cadence. Remove the 'early rerun to verify' coordinator shortcut that
  could start a new run while the swarm was still implementing fixes.
  Coordinator now lands all entangled fixes first, then dispatches the
  swarm batch; the single rerun at step 5 is the only run for that batch.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
BASH_ENV=/home/laird/.bashenv prepends $HOME/bin to PATH for every bash
subprocess. This causes the real gh wrapper to shadow the test stub in
capture_search, making all search-string assertions fail (empty capture).

Setting BASH_ENV="" for the backend subprocess ensures the stub directory
stays first in PATH.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
laird added a commit that referenced this pull request Aug 17, 2026
Removed the "early rerun to verify" coordinator shortcut from the swarm-mode
cadence, which could start a new exercise run while the swarm was still
implementing the current batch's fixes -- wasting the run and making grading
ambiguous about which fixes it was actually exercising. The coordinator now
lands all entangled/seam-uncertain fixes first, dispatches the independent
findings to the swarm, waits for the batch to fully complete, then does a
single batch acceptance rerun.

Includes the packaged mirror at plugins/autocoder/skills/improve/SKILL.md
(tests/test_skill_packaging.sh requires the two stay identical).

The other three fixes originally bundled in PR #113 (test_issue_source_lib.sh
explicit-export syntax, worker-launch-lib.sh Gemini interactive mode,
test_issues_gh_search.sh BASH_ENV clearing) are already present on current
master -- each conflicted on cherry-pick with only a comment-wording
difference, no functional diff. Reapplying them would have been a no-op.
laird added a commit that referenced this pull request Aug 17, 2026
)

docs(improve): enforce one-run-at-a-time in the swarm-mode cadence. Split from #113 -- the other 3 bundled fixes were already on master. Unrelated pre-existing shell CI failure tracked as #125.
@laird

laird commented Aug 17, 2026

Copy link
Copy Markdown
Owner Author

Superseded by #129, which lands the one genuine fix from this PR's four bundled changes.

Checked each of the four independently on cherry-pick onto current master:

  1. test_issue_source_lib.sh explicit-export syntax -- already on master (comment-only conflict, no functional diff)
  2. worker-launch-lib.sh Gemini interactive mode -- already on master (comment-only conflict; master's wording is more specific)
  3. skills/improve/SKILL.md swarm-cadence enforcement -- genuinely unlanded; this is what docs(improve): enforce one-run-at-a-time in the swarm-mode cadence #129 merges
  4. test_issues_gh_search.sh BASH_ENV clearing -- already on master (comment-only conflict, no functional diff)

Closing rather than merging to avoid a no-op re-diff on (1), (2), (4).

@laird laird closed this Aug 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant