Skip to content

fix(automation): recover OpenCode acknowledgement after dispatch - #1135

Closed
seonghobae wants to merge 4 commits into
mainfrom
fix/agent-mention-acknowledgement-recovery-20260819
Closed

fix(automation): recover OpenCode acknowledgement after dispatch#1135
seonghobae wants to merge 4 commits into
mainfrom
fix/agent-mention-acknowledgement-recovery-20260819

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Incident

Operational acceptance after merged #1115 proved that the bounded OpenCode wrapper and review-only scheduler were invoked, but the source issue_comment workflow could still conclude failure and leave no user-visible receipt. The live failure occurred only after dispatch while adding the cosmetic eyes reaction:

RuntimeError: gh api failed with exit code 1: gh: Resource not accessible by integration (HTTP 403)

The durable exact-name invocation artifact then prevented duplicate dispatch, but the old early return also prevented a later protected sweep from healing the missing acknowledgement. Maintainers therefore saw no receipt even though dispatch had succeeded.

Test-first repair

RED commit 63c69cd262425e3a82a84e2c936f646f48351dea established that:

  • an existing durable invocation must recreate a missing receipt without redispatch;
  • cosmetic reaction failure must not suppress a successful dispatch acknowledgement; and
  • acknowledgement-comment failure must remain visible so a later sweep can repair it.

Exact current head d8cac901c9c300567f1890f9acb0cbf340aa725a implements the bounded repair:

  • distinguish existing durable agent claims from a completed acknowledgement cache entry;
  • publish Already queued … on this exact request when dispatch already exists but its receipt does not;
  • treat reaction failure as an advisory warning only;
  • keep acknowledgement-comment failure fail-visible;
  • cache the receipt only after comment publication succeeds;
  • preserve mutation-free rejected and empty requests; and
  • document the recovery contract.

No reviewer identity, credential, repository allowlist, exact-head/base binding, branch-update policy, merge policy, release authority, or review implementation changed.

Exact-head verification

All current-head hosted workflows returned by GitHub are terminal-success, including Agent Mention Router Quality CI, CodeQL, Security Scan, Python Security, Semgrep, Secret Scan, OSV, Scorecard, and SBOM. The focused quality workflow binds the complete repository tests, owned production coverage/docstrings, compilation, and clean-worktree checks to this head. No unresolved review thread is currently present.

Ready-for-review and auto-merge are enabled, but protected integration still requires current-head semantic review and every live branch-protection condition. Queued, stale, predecessor-head, author-only, status-only, or synthetic evidence is not acceptance.

Operational acceptance

After protected integration, a fresh trusted @opencode-agent request must prove all of the following on one exact request:

  1. dispatch succeeds and creates the durable exact-name invocation claim;
  2. a reaction 403 cannot suppress the acknowledgement comment;
  3. an existing claim with a missing receipt is healed without a duplicate dispatch; and
  4. the acknowledgement contains the source-comment receipt marker and exact PR head.

Static source merge alone does not close the incident.

@coderabbitai

coderabbitai Bot commented Aug 19, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 036b4b08-3ff5-4d13-b4a1-cec869f849d4


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.

@seonghobae
seonghobae force-pushed the fix/agent-mention-acknowledgement-recovery-20260819 branch from 63c69cd to 6bf57cb Compare August 19, 2026 08:01
@seonghobae seonghobae moved this from Todo to In Progress in naruon Platform Roadmap Aug 19, 2026
@seonghobae

Copy link
Copy Markdown
Contributor Author

Current-head repair request (2026-08-19)

Rebased and pushed fix 6bf57cb6e042f4e27df7e7dc887fe9ab44c5c7ef. Root cause is fixed in the shared router: an existing durable exact invocation now republishes a missing acknowledgement without redispatch; reaction failures are warnings and cannot hide the durable acknowledgement comment; successful comments are cached per exact request to avoid same-run receipt duplicates.

Evidence: full suite 1204 passed, 16 subtests passed; focused mention/recovery suite 37 passed; compileall and git diff --check passed. Please review this exact head and run the protected checks.

@seonghobae
seonghobae force-pushed the fix/agent-mention-acknowledgement-recovery-20260819 branch from 6bf57cb to d8cac90 Compare August 19, 2026 09:42
@seonghobae

Copy link
Copy Markdown
Contributor Author

Follow-up coverage repair pushed at exact head d8cac901. The required quality gate missed the false branch for an already-filtered empty request; added the minimal regression test. Post-rebase full suite: 1220 passed, 16 subtests passed; targeted mention suite 33 passed; branch coverage for both router/sweep sources is 100%; compileall and git diff --check passed. Project #1 remains In Progress.

@seonghobae
seonghobae marked this pull request as ready for review August 19, 2026 12:17
@seonghobae
seonghobae enabled auto-merge (squash) August 19, 2026 12:17

Copy link
Copy Markdown
Contributor Author

@opencode-agent review
@cwl-noema-review review

Review exact head d8cac901c9c300567f1890f9acb0cbf340aa725a against protected main@9e9f59f3ac1e96a960c021b131d768c238f4c21a. Verify that an existing durable exact-name dispatch claim can heal only the missing acknowledgement without redispatch, reaction failure remains advisory, acknowledgement-comment failure remains visible for a later sweep, rejected or empty requests stay mutation-free, and the cache cannot suppress the first required receipt. Confirm no reviewer identity, credential, allowlist, exact-head/base, branch-update, merge, release, or publication authority changed. Bind any verdict to this unchanged head and current terminal checks.

Copy link
Copy Markdown
Contributor Author

@opencode-agent Review exact current head d8cac901c9c300567f1890f9acb0cbf340aa725a. There are no unresolved review threads and the focused Agent Mention Router Quality CI is green; verify durable invocation recovery never redispatches, reaction 403 is cosmetic only, acknowledgement failure stays fail-visible, and receipt caching happens only after successful comment publication. Submit the formal exact-head verdict.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Exact current-head evidence for d8cac901c9c300567f1890f9acb0cbf340aa725a: all agent-mention tests passed (76 passed), router branch coverage is 100% statements/branches, compileall and diff check pass. The durable artifact ledger and target acknowledgement remain fail-closed/idempotent; protected checks and review still govern merge. No bypass, self-approval, or Copilot token.

@opencode-agent
opencode-agent Bot disabled auto-merge August 19, 2026 13:32
@seonghobae
seonghobae force-pushed the fix/agent-mention-acknowledgement-recovery-20260819 branch from d8cac90 to 81f5e4a Compare August 19, 2026 14:38
@seonghobae

Copy link
Copy Markdown
Contributor Author

Current-head base repair published at 81f5e4a8e6ba9a04bf925db68a96142ecb2fad36; base is now current main@bbedc1a51ec1a2421f129955c629b3cd0507a4ec instead of the stale 9e9f59f. Rebase completed without conflicts. Fresh exact-head evidence: full pytest -> 1220 passed, 16 subtests passed; full coverage report -> 100% (7810 statements, 0 missed); compileall, interrogate, and diff check pass. No bypass, self-approval, or admin merge was used; protected hosted checks are re-queued.

Copy link
Copy Markdown
Contributor Author

Superseded by #1144 exact head 48f58dbba5b18e192b348c57f79205341b4d1370. The successor is a forward merge of this acknowledgement-recovery lineage and the current-main bounded fanout/workflow-syntax lineage. Its fresh Agent Mention Router Quality CI passed with 1229 passed, 16 subtests passed, 100% statement/branch coverage for both router and sweep, 100% interrogate, compileall, and clean diff. Closing this overlapping branch prevents two competing control-plane PRs; no acknowledgement-recovery behavior is discarded.

@seonghobae seonghobae closed this Aug 19, 2026
@github-project-automation github-project-automation Bot moved this from In Progress to Done in naruon Platform Roadmap Aug 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant