Repository navigation
ci: limit auto-fix agent to Kotlin sources and scope its credentials - #1087
Merged
Merged
Conversation
create_pr.py now only writes .kt files under the library and demo source directories, derives the branch name from the issue number and records the files it changed. The workflow checks out without persisted credentials, commits only those files and authenticates just for the push.
Coverage (unit tests)Compared against
Line and branch coverage from unit test reports. History is recorded on the |
Contributor
Coverage (instrumentation tests)
|
dkhawk
approved these changes
Nov 16, 2026
This was referenced Nov 16, 2026
kikoso
added a commit
that referenced
this pull request
Nov 17, 2026
dkhawk
added a commit
that referenced
this pull request
Nov 17, 2026
…cope (#1088) * ci: limit auto-fix agent to Kotlin sources and scope its credentials create_pr.py now only writes .kt files under the library and demo source directories, derives the branch name from the issue number and records the files it changed. The workflow checks out without persisted credentials, commits only those files and authenticates just for the push. * ci: harden auto-fix path validation, prompt isolation, and PR token scope - Restrict EDITABLE_SOURCE_DIRS to src/main/ (excluding test source sets and generated baseline profiles) and enforce a strict character allowlist regex on relative paths so embedded newlines cannot split mapfile in auto-fix.yml. - Scope list_project_files() to editable .kt files, cap modified/created files per run (MAX_FILES_PER_RUN = 10), add HTTP request timeouts, and abort if no files were changed. - Separate system_instruction from <issue_content>-delimited user input across all Gemini API calls and sanitize PR metadata (single-line commit/title, approved link domains, code-wrapped @mentions, and same-issue closing keywords). - Use GITHUB_TOKEN instead of SYNCED_GITHUB_TOKEN_REPO and create auto-fix PRs as drafts so downstream pull_request workflows do not execute unreviewed AI-generated code with repository secrets. - Remove committed create_pr.cpython-315.pyc bytecode file and block __pycache__/ and *.py[cod] in .gitignore and check_agent_leftovers.py. * chore: untrack the Python bytecode cache committed in #1087 * ci: address review feedback on delimiter escaping and branch guards - Use a case-insensitive regex in sanitize_content() to neutralize mixed-case, spaced, attributed, or unclosed <issue_content> delimiter tags. - Bail out if auto-fix/issue-<N> already exists on origin (both right after checkout and before git push) instead of force-pushing over potential maintainer commits. - Include the draft PR URL and instructions to close/reopen (or push a commit) and mark ready for review to trigger the full CI suite. --------- Co-authored-by: Enrique López Mañas <eenriquelopez@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The auto-fix workflow writes whatever file paths the model returns and then compiles the tree, with the checkout token still in `.git/config`. This tightens what the agent can touch and where credentials are available.
`create_pr.py`
`auto-fix.yml`
Testing