-
Notifications
You must be signed in to change notification settings - Fork 0
feat: harden CI autopilot worker runtime #1966
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
ae2f052
fix(runner): resolve F-01 clean persistent workspace
Aitomates b622adf
fix(ci): resolve F-02 pin workflow actions
Aitomates 364f4a2
fix(worker): resolve F-03 validate boundaries with tests
Aitomates 53ae712
fix(test): resolve F-04 enforce test discovery
Aitomates 8a5c893
fix(setup): resolve F-05 align Python 3.12
Aitomates aae07d2
fix(ops): resolve F-06 schedule runner health checks
Aitomates 4da6055
fix(ops): resolve F-07 externalize email recipient
Aitomates 21b8065
fix(docs): resolve F-08 state read-only worker contract
Aitomates dd4cc15
fix(runner): resolve F-01 preserve logs after clean checkout
Aitomates b129f3a
fix(docs): resolve F-08 remove stale capability claims
Aitomates 9385ee0
fix(test): resolve F-04 ignore generated test artifacts
Aitomates afa47d9
docs(audit): record GSD audit-fix report
Aitomates d77ed0b
docs(audit): record workflow-scope delivery blocker
Aitomates File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| __pycache__/ | ||
| *.py[cod] | ||
| .venv/ | ||
| logs/ |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| # CI Autopilot Audit-Fix Report | ||
|
|
||
| Date: 2026-06-10 | ||
| Source: gsd-audit-fix (fresh repository audit; no existing UAT phase artifacts) | ||
| Arguments: `--severity all --max 8` | ||
| Scope: worker/runtime correctness, security boundaries, CI, tests, packaging, reliability, documentation | ||
|
|
||
| ## Classification | ||
|
|
||
| | ID | Finding | Severity | Classification | Result | | ||
| |---|---|---|---|---| | ||
| | F-01 | Persistent self-hosted checkout retained prior-job files | high | auto-fixable | Fixed; clean checkout moved before log creation | | ||
| | F-02 | External GitHub Actions used mutable tags | high | auto-fixable | Fixed; pinned to immutable commits | | ||
| | F-03 | Worker accepted malformed repo/API inputs and had no boundary tests | high | auto-fixable | Fixed; validation, error wrapping, response checks, tests | | ||
| | F-04 | CI did not execute tests and local tests left generated artifacts | medium | auto-fixable | Fixed; discovery in CI and ignore rules | | ||
| | F-05 | Bootstrap installed Python 3.11 while CI/runtime require 3.12 | medium | auto-fixable | Fixed | | ||
| | F-06 | Runner health monitor was manual-only despite 15-minute runbook claim | medium | auto-fixable | Fixed; schedule added | | ||
| | F-07 | Runner-health email recipient was hard-coded personal data | medium | auto-fixable | Fixed; `EMAIL_TO` secret | | ||
| | F-08 | Docs claimed autonomous dispatch not present in implementation | high | auto-fixable | Fixed; read-only contract documented | | ||
| | F-09 | Failure-intake shell interpolates `workflow_run` fields directly into Bash | high | auto-fixable | Not attempted; `--max 8` reached | | ||
| | F-10 | Two failure-intake workflows overlap with inconsistent deduplication and labels | medium | manual-only | Choose and migrate to one canonical intake contract | | ||
| | F-11 | Guarded autonomous repair dispatcher and queue state machine are absent | high | manual-only | Requires trust policy, sandbox, allowlists, PR-only output, authorization | | ||
| | F-12 | Persistent runner host hardening and isolation controls are not implemented as code | high | manual-only | Requires deployment architecture and host policy | | ||
| | F-13 | Runner identity is hard-coded as `MyLocalPC` | medium | auto-fixable | Not attempted; `--max 8` reached | | ||
| | F-14 | Runner-health authentication depends on a manually scoped PAT | medium | manual-only | Prefer GitHub App or centrally governed fine-grained identity | | ||
| | F-15 | Scheduled fixer has no concurrency guard | medium | auto-fixable | Not attempted; `--max 8` reached | | ||
| | F-16 | Queue inventory is limited to the first API page and displays only five items | low | manual-only | Define inventory/processing pagination contract first | | ||
|
|
||
| ## Fixed Commits | ||
|
|
||
| - F-01: `ae2f052`, `dd4cc15` | ||
| - F-02: `b622adf` | ||
| - F-03: `364f4a2` | ||
| - F-04: `53ae712`, `9385ee0` | ||
| - F-05: `8a5c893` | ||
| - F-06: `aae07d2` | ||
| - F-07: `4da6055` | ||
| - F-08: `21b8065`, `b129f3a` | ||
|
|
||
| ## Verification | ||
|
|
||
| - `python -m unittest discover -v`: 6 passed | ||
| - `python -m py_compile agent/poll_once.py`: passed | ||
| - `python -m compileall -q agent tests`: passed | ||
| - `git diff --check`: passed | ||
| - Existing PR: https://github.com/Coding-Autopilot-System/ci-autopilot/pull/1965 | ||
|
|
||
| ## Manual Gate | ||
|
|
||
| Do not grant worker write permissions or execute issue content until F-11 and F-12 have approved designs and testable controls. | ||
| ## Delivery Status | ||
|
|
||
| Local branch tip is ready, but HTTPS push is blocked because the configured OAuth credential lacks the GitHub workflow scope. SSH authentication is not configured. PR #1965 therefore remains at its prior remote tip until credentials are refreshed. |
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding this schedule activates the monitor every 15 minutes even when
RUNNER_PATis absent. In that default configuration,GH_TOKENfalls back togithub.token, the runner-list request can fail due to insufficient runner-administration permission, and lines 26–27 convert that failure tounknown; the notification step then opens an issue and adds another comment on every scheduled run under the misleadingRunner offlinetitle. Gate scheduled notifications on a configured credential or handleunknownas a configuration error without repeated offline alerts.Useful? React with 👍 / 👎.