Skip to content

feat(automation): add explicit bounded source-fix command - #2175

Draft
seonghobae wants to merge 15 commits into
mainfrom
feat/source-fix-comment-command
Draft

seonghobae wants to merge 15 commits into
mainfrom
feat/source-fix-comment-command

Conversation

@seonghobae

Copy link
Copy Markdown
Contributor

Problem

@opencode-agent, /opencode, /oc, and @cwl-noema-review are intentionally review-only. Appending fix or repair never created a source writer, so comments could be mistaken for repair progress even though no repository mutation path existed.

Change

Add a separate explicit command, @cwl-source-fix <instruction>, with a central write-capable path rather than weakening the review-agent boundary.

The router and organization sweep bind each request to the target repository, PR, source comment, requester, full instruction digest, exact base/head refs and SHAs, and an existing-pr-files-only write mode. The worker revalidates the requester's current write|maintain|admin permission, re-fetches the unchanged command and exact live PR identity, requires a complete authenticated PR Files receipt, and exposes only non-removed files already present in that PR diff as the mutation scope.

Model execution stays on contextual-orchestrator/orchestrator/free; GitHub/OIDC credentials are removed from the model process and shell/external/web/task capabilities are denied. After editing, changed paths are checked against the authenticated scope, git diff --check runs, changed Python is compiled, changed YAML is parsed, and the live head is revalidated before one ordinary commit is pushed to the existing PR branch. The worker never approves or merges the PR. A moved head/base, edited command, revoked permission, incomplete file receipt, out-of-scope edit, missing mutation credential, or claim mismatch fails closed.

A durable exact-name Actions artifact deduplicates the immutable request. Sibling repositories are covered by the same scheduled central sweep pattern already used for review mentions.

Evidence

  • New focused tests cover command boundaries, trust filtering, exact instruction/head/base binding, the 10-key dispatch ceiling, router/worker canonical-claim parity, tamper rejection, and traversal rejection.
  • New operational documentation records the write boundary and distinguishes it from the existing review-only handles.
  • No BandScope or other consumer repository copies the implementation; .github remains the canonical owner.

This PR starts as Draft until its exact-head central checks and independent review are available.

@coderabbitai

coderabbitai Bot commented Sep 13, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copy link
Copy Markdown
Contributor Author

@opencode-agent review

현재 exact head의 신규 write-capable @cwl-source-fix 경로를 독립적으로 검토해 주세요. 특히 old-comment replay 방지, current write-permission 재검증, exact base/head/comment digest binding, authenticated PR-files-only mutation scope, model credential isolation, push 전 head revalidation, durable invocation dedupe가 실제 fail-closed인지 확인해 주세요. 리뷰 전용 경로이며 source 수정은 하지 마세요.

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 13, 2026

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown
Contributor Author

Preservation/consolidation note: keep this PR Open/Draft while #2174 is evaluated as the canonical source-repair owner. This branch has unique semantic evidence that must not be lost: the dedicated mutation-only @cwl-source-fix command, exact-name artifact dedupe/claim key, organization sweep, YAML validation, and the hosted RED→fix at 1aed8784f2bf0e7e53144b10bc23e037bf4d1f27 (hashlib.compare_digesthmac.compare_digest).

Do not close this PR until #2174 either carries these deltas/tests/evidence or records an exact reason each is redundant or rejected. Conversely, do not merge this branch independently while its fresh exact-head checks are queued and while the stricter protected-base opt-in / not_before and control-plane path-exclusion semantics in #2174 have not been reconciled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant