Repository navigation
Conversation
|
Thanks @Dante-dan for the thorough PR watch design, including rate-limit handling and GHES endpoints. Sorry this sat for a while. Because this changes shipped code, the changelog gate needs one fragment at |
|
Thanks for adding the changelog fragment, @Dante-dan. CI now fails only the lint ratchet ( if (this.#cache.size >= 256 && !this.#cache.has(url)) this.#cache.delete(this.#cache.keys().next().value!)Something like this avoids it: const oldest = this.#cache.keys().next()
if (this.#cache.size >= 256 && !this.#cache.has(url) && !oldest.done) this.#cache.delete(oldest.value)I've queued the full review in the meantime, so findings will come here either way. |
|
Thanks, @Dante-dan. The full review at Before merge:
Smaller:
|
Summary
Persist OpenCode PR watches so a session can register once and receive actionable observations across host restarts. This implements the OpenCode runtime slice of #9493 and includes #9684's batched fingerprint prerequisite while that PR remains open.
Changes
GH_HOST. Host-qualified PR URLs are rejected before authentication if they do not match the project host.team-corefile-lock protocol for registry transactions and one host-owner lock spanning polling and receipt/dispatch. A persisted polling deadline prevents consecutive processes from repeating a pass; a persisted retry deadline prevents immediate ambiguous redispatch.QA & Evidence
52 pass; 0 fail; 177 expect() calls, across watcher, transport, monitor and fingerprint suites. Covers both terminal states, late subscribers, UNKNOWN conflict suppression, multiline check names, failed receipts, accepted dispatch followed by restart before acknowledgment, legacy receipts, message ordering, idle legacy cleanup, private file modes and 500 acknowledged events remaining below 1500 bytes. Two actual child runtimes preserve both registrations while producing one poll and one dispatch. Artifact:.omo/evidence/20261105-9693-review/focused-knip-fix.txt.absent -> absent; every QA child exits. Sandbox rules deny writes to the real OMO config and OpenCode DB. Artifacts:.omo/evidence/20261105-9693-review/live07/{live-result,isolation}.json.bun run typecheckpasses after the export cleanup. Fullbun run buildpasses at the runtime revision with Bun 1.4.4 / Node 26 and the repository's existingOMO_SKIP_MATERIALIZE=1switch; unrelated generated output changes are excluded. The OpenCode source bundle is rebuilt successfully after the final declaration/internal-export-only cleanup. Current upstream ratchet rules report zero diagnostics for watcher/tool sources. The latest head's complete typecheck job passes TypeScript, lint, lint ratchet and the knip dead-code check. The separate Lint ratchet job also passes. Other current-head CI jobs remain in progress.bun test --timeout 20000 --bailremains failed/incomplete: 21,700 passed, 65 skipped and 1 failed, stopping after 21,766 tests across 2,603 files (677.79 s). The watcher boot-cleanup regression that failed in the earlier intermediate run passes here. The remaining failure ispackages/omo-senpi/src/components/memory/worker/run-reconciliation-liveness.test.ts:58; that test is byte-identical to targetdevand passes when run alone (1 pass; 0 fail). The full-run failure cause and a matching base-suite failure are not established. Artifacts:.omo/evidence/20261105-9693-review/{root-frozen-result.json,root-failure-isolated.txt}.Decisive real-harness capture:
{"sourcePlugin":true,"officialOpenCode":"1.18.34","controlledSeedNotRealGitHubTransition":true,"firstReceiptCount":1,"secondReceiptCount":1,"outboxPruned":true,"registrationPruned":true,"realSessionCountBefore":"absent","realSessionCountAfter":"absent"}Local ignored evidence hashes:
Risks & Residuals
Related Issues
Related to #9493. Depends on #9684. Does not close the entire issue.
Summary by cubic
Makes OpenCode PR watches durable across host restarts: a session registers once, polls each distinct PR once per minute, and is woken on check, conflict, or comment changes instead of relying on per-invocation fingerprint reads.
Behavior
watch_pull_request,list_pull_request_watches, andunwatch_pull_requestto the enabled monitor tools.Depends on #9684 for the batched fingerprint primitive; does not close the full #9493 scope.
Written for commit 4d9ea8d. Summary will update on new commits.