fix(compress): make preemptive acknowledgeRisk a no-op instead of an error [stable] - #303
Open
ranxianglei wants to merge 1 commit into
Open
fix(compress): make preemptive acknowledgeRisk a no-op instead of an error [stable]#303ranxianglei wants to merge 1 commit into
ranxianglei wants to merge 1 commit into
Conversation
…error (#301) The model routinely carries acknowledgeRisk:true over from non-quality errors (e.g. argument validation failures like a missing topic), because the quality-gate rejection template teaches 'add acknowledgeRisk: true to retry'. The old preemptive guard hard-failed those calls with 'no quality gate rejection is pending', producing a confusing error loop (issue #301). Now: acknowledgeRisk without a pending rejection is ignored — quality checks still run, and the result carries a note teaching correct usage. Only a real quality-gate rejection arms the bypass, so the gate's protection is unchanged. - lib/compress/range.ts: no-op semantics + ignore note in result - lib/compress/quality-gate: remove buildPreemptiveAcknowledgeError - lib/state/types.ts: update qualityGateRetryPending lifecycle doc - tests: replace preemptive-rejection test with no-op coverage (bad summary + ack still rejected by quality; good summary + ack succeeds with ignore note)
📦 Built Plugin ArtifactBranch: Option A — Install from npm PR tag (recommended)opencode plugin opencode-acp@pr-303 --globalEach push to this PR publishes a new version under the Option B — Install from GitHubopencode plugin "github:ranxianglei/opencode-acp#2026-08-14_fix-acknowledge-risk-stable" --globalOption C — Download artifact
tar xzf opencode-acp-pr303.tgz
cp -r package/dist ~/.cache/opencode/packages/opencode-acp@latest/node_modules/opencode-acp/dist
This comment is automatically updated on each push. |
6 tasks
Owner
Author
Owner
Author
6 tasks
Owner
Author
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.
Stable/minimal split of PR #302 — contains only the core #301 fix (acknowledgeRisk). Merge this first; the topic-fallback commit stays in #302 for a follow-up merge.
问题
模型从质量门拒绝模板学到"重试要加 acknowledgeRisk: true",于是把它带进了所有重试——包括参数校验失败这类与质量门无关的错误。校验错误不会置位
qualityGateRetryPending,重试即撞上 preemptive 错误,形成错误循环。修复
无 pending 拒绝时的
acknowledgeRisk改为 no-op:质量检查照常运行(质量门保护不变),成功结果附带提示教模型正确用法。删除buildPreemptiveAcknowledgeError。验证
tsc --noEmit通过tests/quality-gate-enforcement.test.ts13/13