Commit Graph

6191 Commits

Author SHA1 Message Date
Christian Gunderman 6b8cef1a54 chore(ci): revert memory baselines 2026-05-15 13:47:34 -07:00
Christian Gunderman 5a18711726 fix(ci): fix yamllint errors and update memory baselines 2026-05-15 13:45:05 -07:00
Christian Gunderman 9fefbc1727 fix(core): revert paths.ts changes to match main 2026-05-15 13:19:30 -07:00
Christian Gunderman 351a16c905 test(core): verify GEMINI_CLI_ variables bypass value redaction 2026-05-15 13:17:22 -07:00
Christian Gunderman 998e94a32f fix(core): restore strict sanitization config and allow list precedence 2026-05-15 13:12:23 -07:00
Christian Gunderman 1ff17334a9 fix(ci): capture agent's true base SHA to prevent patch conflicts
The reasoning job now captures the HEAD commit SHA prior to patch generation (`patch_base_sha`) and passes it to the publish job. The publish job then checks out this precise SHA rather than the original `target_sha`. This ensures that if the agent checks out an existing PR branch to resolve comments, the generated patch is applied cleanly against the tip of that branch instead of causing a merge conflict with main.
2026-05-15 12:38:49 -07:00
Christian Gunderman 9be8a0e9e5 fix(ci): pin target commit SHA in Gemini Bot workflow 2026-05-15 11:55:42 -07:00
Christian Gunderman 289e061d54 revert: undo bot exclusion in pr-rate-limiter.yaml 2026-05-15 11:42:21 -07:00
Christian Gunderman c53aa072b4 fix(issue-fixer): reduce max active PRs to 7 2026-05-15 11:37:11 -07:00
Christian Gunderman 5b912ac444 fix(prs): mandate issue linking in PR description 2026-05-15 11:31:08 -07:00
Christian Gunderman 8eacf5097f fix(prs): clarify staging and PR desc updates in recovery 2026-05-15 11:28:30 -07:00
Christian Gunderman 600ff5d316 fix(bot): add anti-hallucination rule to prompts 2026-05-15 11:24:23 -07:00
Christian Gunderman 62246d2fad chore: revert out of scope changes and fix GH_TOKEN allowlist 2026-05-15 11:10:48 -07:00
Christian Gunderman 12233fd34b docs(bot): instruct agent to use git blame and CODEOWNERS for reviewers 2026-05-15 10:20:21 -07:00
Christian Gunderman 7fb9e05d36 docs(bot): use robust search and explicit repo in prs skill 2026-05-15 09:16:06 -07:00
Christian Gunderman 295c0ac072 docs(bot): clarify PR maintenance expectations in prs skill 2026-05-14 20:12:34 -07:00
Christian Gunderman 6b7174703c fix(ci): add pull-requests: read permission to brain job 2026-05-14 20:03:23 -07:00
Christian Gunderman 1a36cbc3cf fix(ci): fallback to default branch name if bot branch name is invalid 2026-05-14 19:21:15 -07:00
Christian Gunderman 81af9b3bb0 fix(ci): base bot PRs on main in brain workflow 2026-05-14 16:51:52 -07:00
Christian Gunderman 4293ddfcc7 fix(ci): fix repo context for gh run in brain workflow 2026-05-14 16:18:39 -07:00
Christian Gunderman 53a573d7ef fix(ci): fix paths and cache in gemini-cli-bot-brain workflow 2026-05-14 16:14:54 -07:00
Christian Gunderman 6b6f0a3655 fix(ci): update bot workflow to use multi-directory checkout 2026-05-14 16:06:14 -07:00
Christian Gunderman 3795f40cf6 fix(bot): forbid agent from fixing metrics scripts and enforce issue tracker 2026-05-14 14:11:59 -07:00
Christian Gunderman 67b46ee365 fix(bot): mandate internal skill activation and workspace root writes in task skills 2026-05-14 12:05:47 -07:00
Christian Gunderman ad612d9311 chore(bot): strengthen mandate execution and skill activation instructions 2026-05-14 12:03:27 -07:00
Christian Gunderman 00aaba6759 fix(bot): ensure management files are written to and read from workspace root 2026-05-14 11:50:19 -07:00
Christian Gunderman 48e6cc179e fix(bot): explicitly target branch in 'gh pr edit' to ensure labeling 2026-05-14 11:11:44 -07:00
Christian Gunderman 746be830fe fix(bot): ensure branch names always start with 'bot/' prefix 2026-05-14 10:23:03 -07:00
Christian Gunderman f65cacfea4 fix(bot): exempt bots from PR rate limiter 2026-05-14 09:13:50 -07:00
Christian Gunderman 8d6b0effc3 fix(bot): always target main in brain workflow to prevent leaking feature branch changes 2026-05-14 09:08:00 -07:00
Christian Gunderman 6efdbd3e48 fix(bot): improve reasoning resilience and prevent infinite loops
- Update PR skill to allow informed escalation and help requests when stuck.

- Update main brain prompt to encourage strategic pivoting between hypotheses.

- Explicitly authorize bailing out of tasks that cannot be verified.
2026-05-13 21:50:51 -07:00
Christian Gunderman a2841350ba fix(bot): implement prompt-level loop prevention and enforce test timeouts 2026-05-13 21:15:05 -07:00
Christian Gunderman 928ce879ea fix(bot): improve patch resilience in brain workflow
- Pin publish job to the specific SHA from reasoning job to avoid drift.

- Use git apply --3way --ignore-whitespace for better conflict resolution.
2026-05-13 20:35:02 -07:00
Christian Gunderman 5dc5b4ed4a fix: handle ENAMETOOLONG gracefully during path resolution
This fix was recovered from a timed-out bot run. It addresses issue #26979
where the CLI would crash if a user provided an extremely long path string
in an @ command (e.g. @/aaa...a).

Changes:
- Updated 'robustRealpath' in 'packages/core/src/utils/paths.ts' to catch
  and gracefully handle 'ENAMETOOLONG' and 'EINVAL' errors from fs.realpathSync
  and fs.lstatSync.
- Added a defensive try-catch block to 'checkPermissions' in
  'packages/cli/src/ui/hooks/atCommandProcessor.ts' to prevent long path
  strings from crashing the CLI during @ command parsing.
- Added regression unit tests to verify the fix.
2026-05-13 20:24:15 -07:00
Christian Gunderman 98781cd97d chore(bot): remove maxSessionTurns and improve artifact archiving
- Removed the `maxSessionTurns: 30` limit from the bot's configuration as requested.
- Added `if: always()` to the `Archive Brain Data` step in the workflow to ensure logs (telemetry, debug) are available even when the agent fails or times out.
2026-05-13 18:37:18 -07:00
Christian Gunderman daaa631071 feat(bot): optimize search strategy in issue-fixer skill
Updated the issue-fixer skill to instruct the bot to search one top-level
folder at a time and avoid problematic directories with large data files
(memory-tests, last_brain_data) to prevent grep_search timeouts.
2026-05-13 18:27:39 -07:00
Christian Gunderman 506184d739 fix(bot): cap reasoning loops to 30 turns
The non-interactive CLI defaults to infinite `maxSessionTurns`. This causes the bot to get stuck in infinite trial-and-error loops when it struggles to fix a failing test suite, only stopping when the 60-minute GitHub Actions timeout kills the runner.

By setting `maxSessionTurns: 30` in the bot's configuration, the LLM session will gracefully abort with an error if it cannot find a solution within a reasonable number of attempts.
2026-05-13 17:59:25 -07:00
Christian Gunderman 9b3fef4f68 fix(ci): prevent infinite hangs in bot reasoning workflow
- Added a 60 minute timeout to the Reasoning job in the workflow.
- Updated the issue-fixer skill to instruct the bot to wrap 'npm run preflight' with the linux 'timeout' utility to prevent infinite loops from hanging the entire LLM agent.
2026-05-13 17:15:50 -07:00
Christian Gunderman 83d15895f1 fix(bot): archive pr-labels.txt to apply labels to PRs
The pr-labels.txt file was being correctly generated by the bot but was not
being passed to the Publish Artifacts job because it was omitted from the
Archive Brain Data step.
2026-05-13 16:29:02 -07:00
Christian Gunderman 03877eae3b fix(core): trust explicitly allowed variables over name patterns
This removes the `NEVER_ALLOWED_NAME_PATTERNS` filter from `getSecureSanitizationConfig`.

Previously, if a user explicitly added a variable like `GH_TOKEN` to their `allowedEnvironmentVariables` in `settings.json`, it would be silently dropped during configuration parsing because it matched the `NEVER_ALLOWED_NAME_PATTERNS` regex.

This change ensures that explicit user allowlists take precedence over heuristic name-based pattern matching, while still maintaining the strict blocklist for known highly-sensitive system variables (`NEVER_ALLOWED_ENVIRONMENT_VARIABLES`).
2026-05-13 16:11:34 -07:00
Christian Gunderman d17a813cc3 Revert "fix:reorder env var redaction checks to scan values first (#21059)"
This reverts commit 9773a084c9.
2026-05-13 15:29:05 -07:00
Christian Gunderman a6e460e595 feat(bot): add support for applying labels to bot-created PRs
- Update the publish workflow to read labels from a pr-labels.txt file and apply them to the PR using the gh CLI.
- Update the prs skill to instruct the bot to write labels to pr-labels.txt.
- Update the issue-fixer and metrics skills to explicitly request the application of their respective labels in pr-labels.txt.
2026-05-13 15:13:46 -07:00
Christian Gunderman 4449f3f43c chore(bot): configure environment variable redaction bypass
This adds a settings.json file to the bot's configuration to explicitly allow GH_TOKEN and GITHUB_TOKEN to bypass the environment variable redaction engine. This is required because the bot runs in GitHub Actions, which enforces strict redaction mode by default. The workflow file was also simplified by removing the wrapper script that was previously used to bypass redaction.
2026-05-13 15:05:02 -07:00
Christian Gunderman 7789469bd1 fix(bot): provide GH_TOKEN in bot-brain workflow to fix gh cli auth 2026-05-13 12:08:13 -07:00
Christian Gunderman 4464ff23fc fix(bot): disable gh pagers globally via env
- Sets `GH_PAGER: ''` in the workflow environment variables to ensure any `gh` CLI commands executed by the bot or in bash scripts do not hang waiting for user input in the headless CI environment.
2026-05-13 11:36:37 -07:00
Christian Gunderman 8a6ec5978c fix(bot): force json or --no-pager in gh cli commands to prevent hangs
- Replaces `gh issue list` with the `--json` flag to prevent default pagers (like `less`) from waiting for user input and hanging the CI run.
- Adds `--no-pager` to `gh run view`.
2026-05-13 11:17:02 -07:00
Christian Gunderman c460745bcb fix(bot): enforce github-first discovery and forbid local fishing
- Updates the `issue-fixer` skill to strictly forbid the use of local tools (like lint, tsc, grep) for finding tasks.
- Updates `scheduled.md` to clarify that local tools are for verification only.
2026-05-13 10:12:43 -07:00
Christian Gunderman 278858ed11 fix(bot): satisfy YAML lint rules and clarify monorepo build order 2026-05-13 09:54:50 -07:00
Christian Gunderman a58e3f5654 chore(build): standardize all package library targets to ES2023 2026-05-13 09:50:45 -07:00
Christian Gunderman 821cb2be9b feat(ci): re-enable telemetry and debug logging for the bot 2026-05-13 09:27:51 -07:00