Skip to content

Finish adapter guides, clarify first-run errors and rehearse upgrades from 0.2.0 - #211

Open
harshsaver wants to merge 11 commits into
maint/verified-mainfrom
maint/adapters-and-usability
Open

harshsaver wants to merge 11 commits into
maint/verified-mainfrom
maint/adapters-and-usability

Conversation

@harshsaver

Copy link
Copy Markdown
Member

Follow-up to #210, kept separate so it can be reviewed on its own. Base is maint/verified-main; it will be retargeted to main once #210 merges.

Adapters (#37, #33, #34)

  • OpenCode guide. The guide now walks through connecting OpenCode to the public daemon and a peer. It explains that OpenCode allows MCP tools unless a permission block says otherwise; ask is rejected automatically by headless opencode run. It also covers replacement and recovery.
  • Host health checks replace live sessions. claude mcp list, claude mcp get and opencode mcp list start their own bridge with the configured agent ID. That bridge replaces a running session with the same ID and leaves the agent offline. This is now documented next to the existing Cursor list-tools note and listed in the adapter manifests. doctor --harness is the safe check.
  • Clearer error after replacement. When another window took the agent ID or the token rotated, the first tool call returned a bare Invalid agent token or Unauthorized. The bridge only noticed at its next heartbeat. A rejected call now checks the execution and returns the usual execution-ended message with recovery steps.
  • Doctor no longer leaves sessions behind. doctor --harness used a new doctor-<pid>-<time> agent on every run, and each one stayed in the session list permanently. It now reuses one agentintercom-doctor ID.
  • New observations. Partial, unreviewed records for Claude Code 2.1.332 and OpenCode 1.19.6 on Linux x86_64. Each host completed the two-host scenario with the other in both directions, plus approvals, replacement, rotation and a credential scan. Adapter status and the registry are unchanged.

Upgrade rehearsal

scripts/rehearse-upgrade.mjs only accepted an rc.4 baseline. Even then, it expected a version string the real rc.4 binary does not print. It now takes the published previous release from OCTOBER_BUS_PREVIOUS_BINARY; the old variable still works. It compares SQLite schema versions before and after the upgrade and checks rollback to match. It passes against the published 0.2.0 and rc.4 Linux binaries.

First-run errors

  • A missing workspace credential now names the workspace and says how to create or recover it. Before, the error ended in an lstat of a hashed file path.
  • status, stop and the commands that need the daemon say it is not running, instead of printing lstat <runtime-dir>: no such file or directory.
  • Re-running workspace create points to connect, or to scope rotate-token when this machine has no credential for the workspace.
  • harness --help and harness config --help print usage. harness config warns when the workspace does not exist yet.

Testing

  • go test, go test -race, go vet, the demo, and the PostgreSQL hosted tests.
  • TypeScript SDK checks, integration, and distribution packing and install.
  • Script regressions.

harshsaver and others added 11 commits November 27, 2026 22:15
Each doctor --harness run registered a new doctor-<pid>-<time> agent.
Agents cannot be deleted, so every run left another offline session in
the workspace's session list and peer views. The probe now uses a fixed
agentintercom-doctor ID, so a later run replaces the earlier probe.
When another window takes the same agent ID or the scope token rotates,
a self-registered bridge only noticed at its next heartbeat. Calls made
in between returned a bare "Invalid agent token" or "Unauthorized"
transport error with no recovery steps. A failed call now checks the
execution's status and, when its authority is gone, returns the usual
execution-ended message.
Both hosts completed the two-host scenario in each direction against a
local daemon, using the generated configurations unchanged. The notes
also cover tool approvals, replacement, token rotation and the host
commands that start their own bridge. They are partial, unreviewed
observations and do not change the adapters' status (#37, #34).
The OpenCode guide only pointed at the shared setup. It now walks
through connecting OpenCode to the public daemon and a peer, explains
that OpenCode allows MCP tools unless a permission block says otherwise,
and describes replacement, recovery and the opencode mcp list caveat
(#34).
claude mcp list, claude mcp get and opencode mcp list start a bridge
with the configured agent ID, which replaces a running session with that
ID and leaves the agent offline. Document this next to the existing
Cursor list-tools note and point to doctor --harness, which probes under
its own ID (#37).
Commands given a workspace that was never created on this machine
printed "cannot read local scope credential" followed by an lstat
error for a hashed file path. They now name the workspace and the data
directory, and say how to create or recover it.
harness --help and harness config --help reported an unknown host named
--help. They now print usage and exit successfully. harness config also
warns when the named workspace has no local credential, since the host
would otherwise only show a server that fails to start.
Re-running workspace create printed "Scope <name> already exists". It
now points to connect for the existing workspace, or to scope
rotate-token when this data directory lacks the workspace's credential.
status, stop and commands that need the local daemon failed with a raw
"lstat <runtime-dir>: no such file or directory" before anything had
been started. A missing run file now reports that Agent Intercom is not
running and names the runtime directory it looked in.
The upgrade rehearsal only accepted an rc.4 baseline, and even then it
expected an agentintercom version string that the real rc.4 binary
(october-bus) does not print. 0.2.0 also rejects tasks without a title.

The rehearsal now takes the previous release from
OCTOBER_BUS_PREVIOUS_BINARY (the rc.4 variable still works), reads the
SQLite schema version before and after the candidate runs, and checks
rollback accordingly: with an unchanged schema the previous release
must run the upgraded database; with a changed schema it must refuse
it, and any automatic backup must restore the original work. Verified
against the published 0.2.0 and rc.4 Linux binaries.
…e RC4 rehearsal alias, remove the OpenCode tool-call timeout

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@harshsaver harshsaver added the agentbox: ready to merge Audited by Claude and Codex; Harsh can merge label Nov 28, 2026
@harshsaver

Copy link
Copy Markdown
Member Author

🤖 Agentbox PR audit: small fixes applied, then ready to merge

What this PR changes

  • What it does:

    • Completes the OpenCode setup walkthrough and says which OpenCode configuration format it was checked with.
    • Explains host approvals and session replacement.
    • Improves the setup error messages.
    • Stops doctor from leaving another leftover session behind on every run.
    • Rehearses upgrades from the release users actually have (0.2.0).
  • What changes in the product:

    • When the daemon is stopped, you get a readable message instead of a missing-file error.
    • A missing workspace credential names the workspace and explains how to create or recover it.
    • Creating a workspace that already exists points to the next command to run.
    • Harness help works, and generating a config warns when the workspace credential is missing.
    • The first tool call rejected after replacement or token rotation explains how to reconnect.
    • Doctor reuses one recognizable diagnostic session.
    • A newly generated OpenCode entry no longer cuts off inbox waits after 10 seconds.
  • Why it exists: The adapter issues (Complete the OpenCode adapter #34, Complete the Claude Code adapter #37) ask for usable setup guides. The PR description and the test-run notes show the confusing errors and the doctor sessions piling up.

  • Why merge (or why not yet): Ready for Harsh to merge once the final checks pass. The audit fixed three problems on the PR branch:

    • Remote token rotation and workspace deletion work again on machines with no local daemon running.
    • The obsolete previous-release variable name is gone.
    • The OpenCode entry no longer times out the guide's own inbox waits.

    The changelog now lists these user-visible changes.

  • What to expect after merging:

    • PR Fix CLI exit and error reporting, runtime discovery ownership, task errors and hosted OAuth hardening #210 is still the open base, so merge it first and retarget this PR, as the author describes.
    • Release operators must now set OCTOBER_BUS_PREVIOUS_BINARY; the old name no longer works.
    • OpenCode users with an older generated entry should regenerate it to drop the 10-second timeout.
    • Old doctor sessions in existing workspaces stay, because agents cannot be deleted.
    • Still open as follow-ups: a macOS run of this candidate, an OpenCode 2 run, and a quiet OpenCode inbox wait checked by hand.
Full audit (Claude (claude-opus-5-5, xhigh) × Codex (gpt-6.1-sol, xhigh), 3 turns, commit 9ebd0df)

PR audit: #211 — Finish adapter guides, clarify first-run errors and rehearse upgrades from 0.2.0

Head: 8c30bbe

Sign-off

  • Claude (claude-opus-5-5, xhigh): ✅ satisfied — decision is fix. I checked Codex's OpenCode timeout blocker against the 1.19.6 source and our Go code, and it is real. I accept Codex's corrections on Node readOnly, OpenCode 2 config support and rc.5. The fix plan is complete and still under 50 lines.
  • Codex (gpt-6.1-sol, xhigh): ❌ not satisfied — agree with fix, but the audit missed OpenCode's tool-call timeout; the added blocker and revised fix plan need Claude's review.

Decision

fix — Three small, understood changes, roughly under 50 lines, with no product decision needed:

  • repair remote scope administration;
  • remove the obsolete environment-variable fallback;
  • remove an OpenCode timeout override that conflicts with the new inbox-wait instructions.

Should this exist?

  • Verdict: yes. Issues #34 and #37 ask for runnable public-daemon guides, respect for host permissions and correct replacement behaviour. The doctor sessions that pile up and the confusing CLI errors justify the usability fixes. The release checklist needs a rehearsal from the published 0.2.0.
  • Product-rule issues:
    • No new caps, periodic cleanup or shutdown policy.
    • The new 3-second status check after a failed call (cmd/agentintercom/mcp_stdio.go:347) uses the same budget as the existing daemon checks (main.go:222,284).
    • The guide's new 10-second inbox wait conflicts with the existing generated 10-second tool-call timeout; the fix plan resolves this.
    • Reusing the doctor ID stops diagnostic entries from accumulating.
  • Simpler alternative: Delete the old environment-variable alias and the OpenCode timeout override, and let the host use its existing request defaults.
  • Real-launch evidence: present, partial. The two Linux observation records name the builds and the manual scenarios for the bridge and doctor changes, including commit 672c153. They publish no startup-log bundle, include no macOS run of this candidate, and predate the first-run-error commits. Missing evidence stays non-blocking under Harsh's temporary rule.

What changes (plain language)

  • What it does:

    • Completes the OpenCode setup walkthrough and says which OpenCode configuration format it was checked with.
    • Explains host approvals and session replacement.
    • Improves the setup error messages.
    • Stops doctor from leaving another leftover session behind on every run.
    • Rehearses upgrades from the release users actually have (0.2.0).
  • What changes in the product:

    • When the daemon is stopped, you get a readable message instead of a missing-file error.
    • A missing workspace credential names the workspace and explains how to create or recover it.
    • Creating a workspace that already exists points to the next command to run.
    • Harness help works, and generating a config warns when the workspace credential is missing.
    • The first tool call rejected after replacement or token rotation explains how to reconnect.
    • Doctor reuses one recognizable diagnostic session.
    • A newly generated OpenCode entry no longer cuts off inbox waits after 10 seconds.
  • Why it exists: The adapter issues (Complete the OpenCode adapter #34, Complete the Claude Code adapter #37) ask for usable setup guides. The PR description and the test-run notes show the confusing errors and the doctor sessions piling up.

  • Why merge (or why not yet): Ready for Harsh to merge once the final checks pass. The audit fixed three problems on the PR branch:

    • Remote token rotation and workspace deletion work again on machines with no local daemon running.
    • The obsolete previous-release variable name is gone.
    • The OpenCode entry no longer times out the guide's own inbox waits.

    The changelog now lists these user-visible changes.

  • What to expect after merging:

    • PR Fix CLI exit and error reporting, runtime discovery ownership, task errors and hosted OAuth hardening #210 is still the open base, so merge it first and retarget this PR, as the author describes.
    • Release operators must now set OCTOBER_BUS_PREVIOUS_BINARY; the old name no longer works.
    • OpenCode users with an older generated entry should regenerate it to drop the 10-second timeout.
    • Old doctor sessions in existing workspaces stay, because agents cannot be deleted.
    • Still open as follow-ups: a macOS run of this candidate, an OpenCode 2 run, and a quiet OpenCode inbox wait checked by hand.

Findings

Blocking

  • cmd/agentintercom/admin_operations.go:78,97 — remote token rotation and deletion break when no local daemon runs.

    • The new error type: ReadRunFile now wraps a missing directory or file in daemonNotRunning (bus/daemon.go:75-101). It unwraps to fs.ErrNotExist, but os.IsNotExist does not follow arbitrary Unwrap methods. The pinned Go 1.27 source confirms it only unwraps known OS error types (src/os/error.go:117-140).
    • What used to happen: the raw *PathError matched these checks. Now both helpers return an error instead of skipping the local credential cache.
    • This is a supported remote path:
      • scopeAdmin accepts --address and takes the lock before the remote change (admin_operations.go:18,30-39).
      • adminClient accepts an explicit administrator token (main.go:337-344).
      • The comment at admin_operations.go:71 explicitly keeps remote URLs out of local credential caching.
    • Effect: with a remote address and token and no local run file, rotation and deletion fail before reaching the remote daemon. Because the lock fails first, neither change is left half-done.
    • Why tests miss it: the existing rotation and deletion tests use a local daemon (mcp_self_register_test.go:112,119,266). These are the only two production os.IsNotExist checks on the changed discovery error.
  • scripts/rehearse-upgrade.mjs:10-14 — unnecessary compatibility fallback, against the ruleset.

    • previousBinaryPath keeps OCTOBER_BUS_RC4_BINARY as a fallback behind OCTOBER_BUS_PREVIOUS_BINARY. The helper is imported in scripts/validate-launch.mjs:7,53, tested at rehearse-upgrade.test.mjs:20-21 and documented at docs/launch-validation.md:54.
    • Nothing in the repository sets the old name, workflows included. Release operators set it by hand.
    • Harsh requires obsolete paths to be removed rather than kept as compatibility fallbacks. Reading the one supported variable directly also removes the helper and the cross-script import.
  • adapters/opencode/README.md:29,49,53,75 with adapters/opencode/opencode.json.example:21 — the recommended inbox wait races OpenCode's tool-call timeout.

    • The contradiction: the guide raises the recommended wait from 1000 to 10000 ms and says the generated 10000 ms timeout applies to startup, not tool calls. That is false for the observed OpenCode 1.19.6.
    • Upstream evidence:
    • Why the call fails:
      • An empty inbox waits the full requested time on the daemon (bus/runtime.go:295-321) before the result travels back through the bridge. A 10000 ms wait therefore cannot reliably finish within a 10000 ms host deadline.
      • Valid waits up to 25000 ms (bus/server.go:287-304) are also cut short.
    • The fix: delete the override rather than invent another deadline. OpenCode's own connection and tool-listing defaults remain, and its pinned MCP SDK 1.29.0 provides a 60-second default request timeout, which covers the documented waits.
    • The observations don't settle it either way: they don't show an empty inbox completing a full wait with this configuration. An interrupted 25-second wait can end before the host deadline, so they don't disprove this finding.

Non-blocking

  • adapters/opencode/README.md:57-71 — a version scope is useful, but the earlier OpenCode 2 concern was overstated.

    • Native V2 configuration uses permissions, mcp.servers, disabled and timeout objects. However, OpenCode's migration guide explicitly supports V1 configuration and converts it in memory, including permissions and MCP settings.
    • The earlier guess that V2 silently ignores this permission block is withdrawn. The V1 permissions documentation confirms the object syntax, the permissive defaults and last-match ordering.
    • Keep an honest version note: the live observation covers 1.19.6, and no OpenCode 2 run is recorded. The fix plan scopes the whole guide and points to the matching V1 documentation; it does not require supporting a second format.
  • Real-launch evidence remains partial. Ask the author to add a macOS candidate startup log and a short manual record covering:

    • status and stop with the daemon stopped;
    • repeated workspace creation, with and without a credential;
    • harness help;
    • the first rejected call after duplicate-ID replacement;
    • a quiet OpenCode inbox wait after the timeout fix.

    This alone never blocks merging under Harsh's temporary rule.

  • cmd/agentintercom/mcp_stdio.go:326-353 — limited extra work on failed calls.

    • Each failed upstream call can make one extra GET /v1/me, unless the session has already ended. This includes remote and hosted self-registration (:187-244), not just loopback.
    • Because the check uses context.WithoutCancel, it can run for up to 3 seconds after the call is cancelled.
    • There is no new periodic polling, and the daemon sends no MCP progress notifications (no progress code in bus/ or cmd/).
    • Replacement and expired leases produce CodeUnauthenticated (bus/store.go:396-416); any other error keeps the original result. No correctness blocker in this wrapper.
  • scripts/rehearse-upgrade.mjs:176-184 — rollback coverage is weaker when there is no automatic backup.

    • A schema change without an automatic backup now passes with a manual-backup warning.
    • The existing additive migrations migrateV10–migrateV12 make no backup (bus/migration.go:151-188), so this branch is real. It is documented at docs/launch-validation.md:60, but the rehearsal never demonstrates a manual restore.
    • Revisit this release gate at the next schema bump; this PR adds no migration.
  • scripts/rehearse-upgrade.mjs:114-115 — the title-less task branch is too broad.

    • Keeping the rc.4 scenario is justified by the explicitly supported schema-2 migration (bus/migration.go:11-13).
    • Not every 0.1.x release predates task titles, though: v0.1.0-rc.5:bus/runtime.go:436 requires one. An rc.5 baseline passes version validation and then fails task creation, because startsWith('0.1.') drops the title.
    • This doesn't affect the documented 0.2.0 baseline or the rc.4 path. Narrow the check if rc.5 rehearsal is wanted.
  • cmd/agentintercom/workspace.go:23-28 — recovery can misdiagnose an unreadable credential. Every credential-read error becomes "has no credential", including permission and symlink failures. Those need the local file repaired before rotation can save a replacement (bus/local_credentials.go:85-90,129-149). Keep the underlying error in a later refinement.

  • Recovery advice leaves out what rotation does to the whole workspace. workspace.go:28 and bus/local_credentials.go:127 recommend rotation without saying it disconnects current sessions. The shared guide explains this at adapters/README.md:63. Saying it where the recovery advice is given would help.

  • No automated test for doctor ID reuse.

    • Both harness diagnostic tests use a missing daemon or scope (harness_test.go:12-23,26-65), so neither reaches probeLocalBridge. The live observations are the only evidence for reuse.
    • Concurrent doctor runs share the fixed ID and can replace each other. The "safe at any time" wording should not imply each check gets its own identity.
  • Documentation consistency.

    • The unused recommendedWaitMs metadata is still 1000 (adapters/opencode/adapter.json:39; declared at adapters/config.go:23), while this README recommends 10000.
    • The manifest's docs link (adapters/opencode/adapter.json:38) still points to the V2 page after the README moves to the V1 page. No code reads it, so updating it is optional.
    • The Claude Code guide still uses the older scope-token workflow and a 1000 ms example.
    • None of these change runtime behaviour.
  • The OpenCode observation doesn't record the tool-call timeout. compatibility/RUNBOOK.md:31 says to record host startup, discovery and tool-call timeout settings separately. The 1.19.6 record says only that opencode.json came unchanged from the generator, which is how the 10-second tool-call limit went unnoticed. Future runs should state it.

  • Help cleanup. cmd/agentintercom/harness.go:34-38 writes the usage text twice, and harness list --help still returns an error. By reading the code, the top-level and config help paths work as intended.

  • Scope and changelog. The three themes could be separate PRs, but each is small and the description keeps them apart. No Unreleased changelog entry describes these user-visible fixes; the fix plan adds them.

  • Node finding withdrawn. The Node 22.13.0 documentation explicitly lists readOnly. There is no reason to replace the PR's 22.13 minimum with Node 24.

Fix plan

  1. cmd/agentintercom/admin_operations.go

    • At lines 78 and 97, replace os.IsNotExist(err) with errors.Is(err, os.ErrNotExist). Both imports already exist.
    • Add cmd/agentintercom/admin_operations_test.go:
      package main
      
      import (
          "path/filepath"
          "testing"
      )
      
      // Remote scope admin skips the local credential cache when no local daemon runs.
      func TestScopeAdminWithoutLocalDaemonSkipsCredentialCache(t *testing.T) {
          root := t.TempDir()
          t.Setenv("OCTOBER_BUS_DATA_DIR", filepath.Join(root, "data"))
          t.Setenv("OCTOBER_BUS_RUNTIME_DIR", filepath.Join(root, "run"))
          unlock, err := lockLocalScopeCredentials("http://127.0.0.1:1")
          requireNoError(t, err)
          unlock()
          requireNoError(t, updateLocalScopeCredential("http://127.0.0.1:1", "remote-scope", ""))
      }
    • Run gofmt on the new Go file.
  2. Remove the old rehearsal environment-variable alias.

    • scripts/rehearse-upgrade.mjs: delete lines 10-14, including previousBinaryPath. At lines 42-43, use process.env.OCTOBER_BUS_PREVIOUS_BINARY instead of calling it. Keep the existing required-input message.
    • scripts/validate-launch.mjs: delete the helper import at line 7, and check process.env.OCTOBER_BUS_PREVIOUS_BINARY directly at line 53.
    • scripts/rehearse-upgrade.test.mjs: remove previousBinaryPath from the import and delete its two assertions at lines 20-21. Rename the test to rehearsal accepts only released baselines.
    • docs/launch-validation.md:54: delete "The older OCTOBER_BUS_RC4_BINARY name is still accepted."
  3. Fix OpenCode's request timeout and its documentation.

    • adapters/opencode/opencode.json.example:20-21: delete "timeout": 10000 and the trailing comma after "enabled": true. OpenCode and its SDK then use their existing defaults.
    • adapters/opencode/README.md:29: replace the last sentence with: "The entry uses OpenCode's default request timeouts. An explicit server timeout also limits tool calls, so keep it above any check_inbox wait."
    • Directly after the Status line at line 3, add this paragraph: "This guide and the generated entry use OpenCode's V1 configuration format, observed with 1.19.6. OpenCode 2 supports V1 configuration, but no live run of this adapter on OpenCode 2 has been recorded."
    • At line 81, point the "Upstream configuration documentation" link to https://opencode.ai/v1/docs/mcp-servers/, which matches the documented format.
    • Keep the 10000 ms inbox-wait examples; no new timeout number is needed.
  4. CHANGELOG.md

    • Add these bullets at the end of the Unreleased list, after the redeemed OAuth authorization-code bullet and before ## 0.2.0 (release candidate):
      • Report the execution-ended message, with recovery steps, on the first tool call rejected after another window takes the agent ID or the scope token is rotated, instead of Invalid agent token or Unauthorized.
      • doctor --harness reuses one agentintercom-doctor agent ID instead of leaving a new offline session on every run.
      • Say when the daemon is not running, name the workspace and how to create or recover it when its local credential is missing, point a repeated workspace create to connect or scope rotate-token, add harness --help, and warn from harness config when the workspace does not exist yet.
      • Let OpenCode use its own request timeouts so the generated entry does not cancel the guide's inbox waits after 10 seconds.

Message to the developer

n/a

Questions for Harsh

n/a

Verification

  • Read-only review:
    • Read the complete 21-file diff and the code around it: daemon discovery, credential storage, CLI admin and onboarding, bridge and session lifecycle, the REST client and authentication, migrations, adapter rendering, the upgrade scripts and tests.
    • Traced the changed error types through every caller, and checked the proposed remote-admin test against the helper code.
  • PR and issues: Read the PR description and discussion with gh pr view --json plus the review and comment APIs; plain gh pr view --comments fails on GitHub's deprecated Projects field. There are no PR comments or reviews. Read issues Complete the Cursor adapter #33, Complete the OpenCode adapter #34 and Complete the Claude Code adapter #37, and confirmed Fix CLI exit and error reporting, runtime discovery ownership, task errors and hosted OAuth hardening #210 is still the open base.
  • Repository checks: the pinned Go 1.27 OS error code (confirmed src/os/error.go:117-140), task schemas and validation per release tag (confirmed rc.5 requires a title at bus/runtime.go:436), migration backup behaviour, every use of the two rehearsal variables, doctor test coverage, adapter render tests, and the Unreleased changelog.
  • Upstream sources checked:
    • Official OpenCode V1, current and migration documentation.
    • The exact v1.19.6 MCP request and tool source. Re-checked in turn 3:
      • requestTimeout returns the per-server timeout for tool calls;
      • convertTool passes it to callTool with resetTimeoutOnProgress: true;
      • an unset value falls through to the SDK default;
      • connecting and listing tools default to 30 000 ms.
    • The pinned @modelcontextprotocol/sdk 1.29.0 timeout (DEFAULT_REQUEST_TIMEOUT_MSEC = 60000).
    • Node's archived 22.13.0 SQLite documentation.
    • Our side: grepped bus/ and cmd/ and found no MCP progress notifications, so OpenCode's timer is never reset during an inbox wait. An empty inbox waits the full waitMs (bus/runtime.go:295-321). No test or validator reads the OpenCode template's timeout (adapters/config_test.go, scripts/check-compatibility.mjs).
  • Not run: dependency installation, builds, tests, typecheck, lint and live app launches, as instructed. No tracked files were changed; only the untracked audit document was written. The author's reported runs and green CI are not presented as independently rerun results.
  • Final checks, run once both reviewers agree:
    • Run npm --prefix sdk/typescript run validate:launch -- --all-platforms. Its plan includes git diff HEAD --check, node --test scripts/*.test.mjs, node scripts/check-compatibility.mjs, go test -race -count=1 ./..., go vet ./..., the SDK checks, native builds, distribution packing, integration and a fresh package install.
    • Watch these tests in particular: TestReadRunFileReportsStoppedDaemon, TestLocalScopeCredentials, TestWorkspaceCreateExplainsExistingWorkspace, TestCLIHelpExitStatus, TestMCPStdioSelfRegisteredLifecycle, TestEveryConfigurationRendersWithoutCredentials and the new TestScopeAdminWithoutLocalDaemonSkipsCredentialCache.
  • Optional:
    • Upgrade rehearsal: if a checksum-verified 0.2.0 executable is available, add --upgrade to the final validation with OCTOBER_BUS_PREVIOUS_BINARY set. The standalone equivalent puts a versioned candidate in OCTOBER_BUS_BINARY and runs node scripts/rehearse-upgrade.mjs.
    • OpenCode inbox wait (recommended, not a merge gate): in OpenCode 1.19.6 with the regenerated entry, run an empty inbox at 10000 and 25000 ms. Each must return normally, and a following tool call must still work. The timeout fix rests on the upstream source, so it does not depend on this run.
    • macOS and OpenCode 2 runs have not been done.

Audit log

  • Turn 1 (Claude (claude-opus-5-5, xhigh)): Wrote the first audit after reading the whole diff and the code around it.
    • Found a blocking regression: os.IsNotExist at admin_operations.go:78 and :97 no longer matches the new daemonNotRunning error, which breaks remote scope rotate-token and scope delete when no local daemon runs.
    • Flagged the OCTOBER_BUS_RC4_BINARY fallback as a ruleset violation.
    • Checked the OpenCode claims against upstream docs: tool naming and last-match-wins are confirmed, but the docs now describe an OpenCode 2 permissions format. Added a version-scope sentence to the fix plan and a follow-up.
    • Confirmed the rehearsal's schema and backup logic against bus/migration.go and the release tags.
    • Decision: fix (about 40 lines: two Go lines, one test, script cleanup, a CHANGELOG entry and one README sentence).
  • Turn 2 (Codex (gpt-6.1-sol, xhigh)): Independently confirmed both blockers and the fix decision.
    • Added the OpenCode inbox-wait / host-timeout blocker, with an exact deletion and documentation fix.
    • Disproved the Node readOnly concern and the guess that V2 rejects the permission block, using primary documentation.
    • Corrected the rc.5 title assumption and the remote status-check cost, and noted credential-error masking.
    • No tests or builds run. Material changes need Claude's next review.
  • Turn 3 (Claude (claude-opus-5-5, xhigh)): Re-checked Codex's turn-2 changes against primary sources and the code.
    • Confirmed the timeout blocker:
      • In OpenCode v1.19.6, requestTimeout and convertTool pass the server timeout to callTool; when it is unset, the SDK's 60 s default applies, and connecting and tool listing default to 30 s.
      • Our Go code sends no progress notifications, so resetTimeoutOnProgress never fires.
      • An empty inbox blocks for the full waitMs.
      • No test or validator depends on the template's timeout.
    • Accepted Codex's other corrections: confirmed rc.5's required title (v0.1.0-rc.5:bus/runtime.go:436), Node 22.13.0's readOnly, and that the OpenCode 2 migration guide keeps V1 config working. I withdraw my earlier V2 and Node concerns.
    • Non-blocking notes added: the manifest docs link still points at V2, and the OpenCode observation doesn't record the tool-call timeout that RUNBOOK.md:31 asks for.
    • Wording: marked the manual OpenCode check as recommended, not a merge gate.
    • Result: no change to the decision, the blockers or the fix plan.

Fixes applied by the audit

  • Applied all four Fix plan items in commit 9ebd0df: admin_operations.go now uses errors.Is(err, os.ErrNotExist) at lines 78 and 97 and has a new test for the no-local-daemon case; removed the OCTOBER_BUS_RC4_BINARY alias and the previousBinaryPath helper from the rehearsal scripts, test and docs; removed the OpenCode tool-call timeout and fixed its README lines (version scope, timeout sentence, V1 docs link); added four Unreleased CHANGELOG bullets. No builds or tests were run. Formatting checks only: gofmt reports both Go files clean, git diff --check is clean, and the OpenCode template still parses as JSON.
  • Reviewed by Codex (gpt-6.1-sol, xhigh): The fixes implement the agreed plan exactly, are correct by inspection, follow the ruleset and add no scope. No files modified or checks run; ready for final validation.

Final checks (run once, after both agents agreed)

npm --prefix sdk/typescript ci — PASS.
git diff af89cad..HEAD --check — PASS.
gofmt -l on changed Go files — PASS.
node --check on all three changed JavaScript files — PASS.
validate:launch --all-platforms — stopped at unavailable race detector; all remaining stages completed separately through the repository's validation runner.
node --test scripts/*.test.mjs — PASS, 34 tests.
node scripts/check-compatibility.mjs — PASS, no warnings.
go test -race -count=1 ./... — UNAVAILABLE: ThreadSanitizer unsupported VMA range; identical failure reproduced on base af89cad.
go test -count=1 ./... — PASS across all packages.
go vet ./... — PASS.
npm run typecheck — PASS.
npm run build — PASS.
npm run test:errors — PASS, error checks and 23 tests.
npm run build:native -- --all — PASS, all six platform builds.
go build ./cmd/agentintercom-conformance with output under HOME — PASS.
npm run pack:distribution -- --all — PASS.
npm run test:integration — PASS.
npm run test:distribution — PASS, including installed CLI demo and invocation checks.
npm audit --audit-level=high — PASS, zero vulnerabilities.
node scripts/rehearse-upgrade.mjs — PASS against checksum-verified published 0.2.0; preserved work and unchanged-schema rollback verified.
Optional OpenCode host smoke test — not run; OpenCode is not installed. macOS/Windows binaries cross-built but not executed here.
Final tracked-file integrity check — PASS, no tracked changes.
Logs: /home/harshsaver/pr211-validation.4mYzXw

Automated review by Harsh's agentbox: two AI reviewers audited this PR against the project ruleset and agreed on it.

This branch has not been deployed

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

Labels

agentbox: ready to merge Audited by Claude and Codex; Harsh can merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant