-
Notifications
You must be signed in to change notification settings - Fork 0
fix(opencode): retain adversarial fallback scope #1273
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
Open
seonghobae
wants to merge
10
commits into
main
Choose a base branch
from
codex/pr904-current-main-replacement-20260824
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
c3dca30
fix(opencode): retain adversarial fallback scope
seonghobae 7bbbed4
Merge branch 'main' into codex/pr904-current-main-replacement-20260824
opencode-agent[bot] be11494
Merge remote-tracking branch 'refs/remotes/origin/main' into HEAD
seonghobae 4967b28
fix: bind coverage artifacts to workflow attempts (#1278)
seonghobae 359ac2a
test(opencode): track attempt-scoped coverage download
seonghobae 5fff8c8
fix(strix): align coverage artifact contract
seonghobae f8e0fe0
Merge remote-tracking branch 'refs/remotes/origin/pr-1273-head' into …
seonghobae 9fd37e2
fix(strix): classify litellm timeout fallback signals
seonghobae 212d070
Merge branch 'main' into codex/pr904-current-main-replacement-20260824
opencode-agent[bot] 3ab55c3
Merge current main into OpenCode fallback scope PR
seonghobae 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| # OpenCode adversarial fallback scope | ||
|
|
||
| ## Incident boundary | ||
|
|
||
| The central OpenCode fallback allowlist omitted `adversarial_evidence.py` and | ||
| its contract test after the gate was extracted from an already-allowlisted | ||
| review helper. A pull request that changed the extracted trust-boundary code | ||
| therefore lost the bounded central review-process fallback solely because of | ||
| the refactor. | ||
|
|
||
| ## Decision | ||
|
|
||
| Treat the extracted gate and its test as the same review-process unit as the | ||
| normalizer and approval gate by adding their exact repository paths to | ||
| `fallback_changed_file_allowed`. The existing | ||
| `fallback_changed_file_counts_as_core` function already classifies every | ||
| allowlisted central path except `.jules/bolt.md` as core, so no new classifier, | ||
| provider rule, credential, or approval path is needed. | ||
|
|
||
| This keeps the changed control and its regression evidence inside one | ||
| assessment scope. NIST SP 800-53 Rev. 5, control SA-11, requires ongoing unit, | ||
| integration, system, or regression evaluation and evidence at the defined | ||
| depth and coverage (National Institute of Standards and Technology, 2020). | ||
| The stable OWASP Web Security Testing Guide likewise includes positive and | ||
| negative security-control requirements in the security test suite (OWASP | ||
| Foundation, 2020). | ||
|
|
||
| ## Verification | ||
|
|
||
| `tests/test_opencode_agent_contract.py` pins both exact paths in the workflow. | ||
| The allowlist stays closed: unrelated files remain ineligible, and every merge | ||
| still requires the existing exact-head checks and independent review policy. | ||
| The Strix quick-gate self-test names the current-attempt coverage artifact | ||
| download step, so a coverage-artifact hardening rename cannot silently leave | ||
| the protected workflow contract stale. | ||
|
|
||
| ## References | ||
|
|
||
| National Institute of Standards and Technology. (2020). *Security and privacy | ||
| controls for information systems and organizations* (NIST Special Publication | ||
| 800-53, Revision 5). https://doi.org/10.6028/NIST.SP.800-53r5 | ||
|
|
||
| OWASP Foundation. (2020). *OWASP web security testing guide* (Version 4.2). | ||
| https://owasp.org/www-project-web-security-testing-guide/v42/ |
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,44 @@ | ||
| # OpenCode coverage artifact reruns | ||
|
|
||
| ## Customer-operability decision | ||
|
|
||
| OpenCode coverage now accepts only the immutable artifact identifier emitted by | ||
| `actions/upload-artifact` in the current GitHub Actions workflow attempt. The | ||
| producer exports both that identifier and `github.run_attempt`; the | ||
| credential-free coverage consumer checks that the producer attempt equals its | ||
| own attempt before downloading by ID. | ||
|
|
||
| This closes an evidence-integrity gap in failed-jobs-only reruns. GitHub can | ||
| reuse successful job outputs from the earlier attempt, while artifacts can be | ||
| expired or unavailable independently. A static artifact name therefore cannot | ||
| prove that coverage inspected the exact source produced for the current | ||
| attempt. Missing, malformed, expired, or prior-attempt evidence now fails | ||
| closed and tells an operator to use a full rerun or a fresh repository | ||
| dispatch. The existing one-day retention window remains bounded; no lookup or | ||
| fallback to an earlier attempt is permitted. | ||
|
|
||
| ## Verification and rollback | ||
|
|
||
| Repository tests parse the complete producer and consumer job blocks. They | ||
| require the attempt-scoped artifact name, immutable upload output, current | ||
| attempt comparison, exact-ID download, credential-free consumer permissions, | ||
| and actionable recovery message. The central workflow's ordinary full quality | ||
| gate exercises the new contract at 100% statement, branch, and docstring | ||
| coverage. | ||
|
|
||
| Rollback is a normal revert of the workflow, contract test, and fallback-scope | ||
| entry. Operators must not restore name-based or prior-attempt artifact lookup; | ||
| until a replacement contract is available, a missing producer must continue to | ||
| fail closed. | ||
|
|
||
| ## References | ||
|
|
||
| GitHub. (n.d.). *Re-running workflows and jobs*. Retrieved August 24, 2026, | ||
| from https://docs.github.com/en/actions/how-tos/manage-workflow-runs/re-run-workflows-and-jobs | ||
|
|
||
| GitHub. (n.d.). *REST API endpoints for GitHub Actions artifacts*. Retrieved | ||
| August 24, 2026, from | ||
| https://docs.github.com/en/rest/actions/artifacts?apiVersion=2026-03-10 | ||
|
|
||
| GitHub. (n.d.). *upload-artifact* [Computer software]. Retrieved August 24, | ||
| 2026, from https://github.com/actions/upload-artifact/blob/main/README.md |
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.
Uh oh!
There was an error while loading. Please reload this page.