Skip to content

test(teamhub): give the process fixture's Codex a version the Daemon accepts - #646

Open
yinwu01 wants to merge 1 commit into
simplexai-labs:mainfrom
yinwu01:test/codex-fakes-at-minimum
Open

yinwu01 wants to merge 1 commit into
simplexai-labs:mainfrom
yinwu01:test/codex-fakes-at-minimum

Conversation

@yinwu01

@yinwu01 yinwu01 commented Nov 24, 2026 •

Copy link
Copy Markdown

What and why

The Daemon requires Codex 0.166.0 since b004fee (native.MinimumVersions),
but the Codex prelude in TeamHub's process fixture
(apps/teamhub/tests/integration/local_daemon_process_fixture_test.go) still
reports codex-cli 0.150.1. Discovery marks that Codex incompatible, so in the
five process tests that start the Local Daemon, the fixture's wait for the
Daemon to register Codex times out with Local Daemon did not register.
Discovery logs:

runtime.diagnostic type=codex status=incompatible version="codex-cli 0.150.1" executable=... models=0 code=RUNTIME_INCOMPATIBLE error="codex version codex-cli 0.150.1 is below minimum 0.166.0"

09363b7 (#693) raised the two fakes in
apps/node-services/tests/agent/runner-gateway/go-local-daemon-process.test.ts
to codex-cli 0.171.0. This raises the TeamHub fixture to the same version,
which is also what the managed Runtime kit installs
(localmodelsTool.runtimeVersions in apps/desktop/distribution/*.json) and
what the Daemon's Go Codex fake reports by default.

How it was verified

  • Focused tests for the changed behavior: TeamHub's process suite
    (make -C apps/teamhub test-integration-process) on 09363b7, without and
    with this change. Without it, the five tests that start the Daemon fail with
    Local Daemon did not register, and discovery logs the line above. With it,
    discovery reports status=ready version="codex-cli 0.171.0" in all five, and
    none of them fails on registration.
  • make check BASE=09363b78 and make check-repository-gate BASE=09363b78,
    and for TeamHub make -C apps/teamhub fmt-check and
    go test ./tests/integration/layout -count=1
  • Contracts regenerated if contracts/openapi/ changed (not touched)

Docker Compose v2.20.2 here rejects name under ports in
docker-compose.test.yml, so the process-suite runs used a PostgreSQL container
started with docker run from the same image and settings, through
with-test-database.sh's TEST_DATABASE_URL path.

The suite still fails with this change, in the same six tests as without it:

  • The five that start the Daemon fail at later steps, for example
    direct delivery did not reach provider and
    replacement Agent admitted duplicate input or Run. In all five, discovery
    reports one Codex model (models=1). In four of them, Agent Service refuses
    placement with
    Runner model "openai/gpt-6-astra" is unavailable for Runtime "codex"
    (model_not_offered).
  • TestAgentCLIReadsAnotherRoomInbox expects the error code NOT_FOUND when it
    reads another Room's inbox, and gets not_found.

These failures predate the 0.166.0 minimum: in an earlier run on 451133a, the
parent of b004fee, where discovery still accepts codex-cli 0.150.1, the same
six tests failed with the same messages. This change does not address them;
apart from the error-code mismatch above, I haven't traced their causes. CI
does not run this suite (the ci.yml header keeps the integration suites
local), so main's checks stay green.

Not run against a live Codex.

Boundary

Tests only: one version string in TeamHub's process fixture. No docs change:
the Daemon's README already documents the 0.166.0 minimum. This does not touch
the user message to provider_ready path.

🤖 Generated with Claude Code

@linger-review linger-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve (0 findings)

Scope: base main, merge-base abfbcb5f, 1 commit, 2 files reviewed at bcdf9881. Helper skills (coderbook, ponytail-review, karpathy-guidelines) were not loaded; this test-only diff was reviewed against the skill's checklist directly. Ran in a separate session.

Findings

None.

Verified as fine

  • The version floor is real. native.MinimumVersions sets Codex 0.166.0 (apps/computer/local-daemon/internal/provider/native/version.go:13-19, documented in apps/computer/local-daemon/README.md:48). The new codex-cli 0.171.0 matches the Daemon's own Go fakes (apps/computer/local-daemon/internal/provider/discovery_test.go:25, cmd/linger-computer-daemon/main_test.go:40).
  • The steer echo matches what the Daemon waits for.
    • codexOperation.steer sends clientUserMessageId as a fresh UUID and blocks until consumed closes (codex_operation.go:455-497). If the process exits first, it fails with "Codex exited before showing the steered input" (codex_operation.go:493), which is the failure the PR describes.
    • codex_events.go:333-336 calls consumeSteer for a userMessage item with a non-nil clientId.
    • The Daemon serializes params with encoding/json, which writes compact "clientUserMessageId":"<uuid>", so the fake's sed pattern matches.
    • $line at that point holds the turn/steer request, because read_request returns on the first line that isn't config/read or thread/name/set (go-local-daemon-process.test.ts:3589-3603).
  • Sending both item/started and item/completed with the same id is harmless. The started event runs consumeSteer and closes the channel. The completed event is processed once (itemsDone, codex_events.go:322-331), and its second consumeSteer call does nothing because the entry was already deleted (codex_operation.go:502-508).
  • The echo applies only to the steer path. It runs only when steer_mode=1 (resumed thread) and outside the hang-marker branch, so the other cases keep their protocol sequence.
  • Remaining sub-0.166 version strings are deliberate. They are Go unit fixtures for incompatibility and version parsing (native/version_test.go:22,25, discovery_test.go:314, execution_failure_test.go:40). None is a process fake that has to pass discovery.
  • Added lines contain no CJK. The commit message follows the conventions. The diff touches only test files, and every changed line traces to the stated goal.

Process notes

  • The branch is 9 commits behind main and needs a rebase. git merge-tree against origin/main shows no conflicts, and main has not changed either touched file since the merge base.

CI

GitHub reports no checks for bcdf9881. As the PR body notes, CI doesn't run go-local-daemon-process.test.ts (it stays local in check-computer) or TeamHub's process suite. I did not run them; the conclusions above come from the code.

Automated review by Claude Code


Automated review of bcdf988 by Claude Code.

@linger-review linger-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve (0 findings)

Scope: follow-up on bcdf988. The head is unchanged since the previous review, so git diff bcdf988..HEAD is empty and the whole merge-base diff was re-checked. Base main, merge base abfbcb5f. 1 commit and 2 files reviewed. Helper skills were not loaded (coderbook, ponytail-review and karpathy-guidelines were applied from the review checklist only). The review ran in a separate session.

Previous findings

The previous review had no findings.

Findings

None.

Verified as fine

  • The version strings now pass discovery. The Daemon's minimum is 0.166.0 (apps/computer/local-daemon/README.md:49). 0.171.0 matches the Daemon's own Go fakes (for example apps/computer/local-daemon/internal/provider/discovery_test.go:25 and cmd/linger-computer-daemon/main_test.go:40). The other below-minimum strings left in the tree are not discovery fakes for a Runtime expected to work:
    • execution_failure_test.go:40 and model_invoke_test.go:125 are version-classification inputs.
    • discovery_test.go:314 (0.99.0) deliberately tests incompatibility.
  • The steer echo matches what the Daemon consumes.
    • The Daemon sends clientUserMessageId (internal/provider/native/codex_operation.go:457).
    • It acknowledges the steer when a userMessage item with clientId arrives (codex_events.go:333-336, which calls consumeSteer at codex_operation.go:502).
    • The new shell fake extracts the id from the turn/steer request in $line, which read_request sets (go-local-daemon-process.test.ts, inside read_request). It then emits that item.
    • This mirrors the Go fake (codex_fake_test.go:380-382).
  • Sending the item twice is harmless. The fake emits it on both item/started and item/completed. consumeSteer closes the channel and deletes the entry, so the second call is a no-op (codex_operation.go:503-508).
  • The change stays within tests. It is test-only, with no Chinese in the added lines or the commit message, and no merge or fixup commits.

Process notes

  • The branch is 38 commits behind main. main requires up-to-date branches, so it needs a rebase before merge.

CI

gh pr checks reports no checks on this branch. As the PR body notes, the touched process tests (go-local-daemon-process.test.ts and TeamHub's process fixture) are not run by CI anyway. I ran no tests myself; the verification above is from the code.

Automated review by Claude Code


Automated review of bcdf988 by Claude Code.

…accepts

The Daemon requires Codex 0.166.0 since b004fee, but the Codex prelude
in TeamHub's process fixture still reports 0.150.1. Discovery marks
that Codex incompatible, so in the process tests that start the Local
Daemon, the fixture's wait for the Daemon to register Codex times out.
09363b7 raised the fakes in go-local-daemon-process.test.ts to
0.171.0; this raises the TeamHub one to the same version.

Verified on 09363b7 with make -C apps/teamhub test-integration-process.
Without this change, the five tests that start the Daemon fail with
"Local Daemon did not register", and discovery logs "codex version
codex-cli 0.150.1 is below minimum 0.166.0". With it, discovery reports
Codex 0.171.0 as ready in all five, and none of them fails on
registration. The suite still fails with this change: those five fail
at later steps, and TestAgentCLIReadsAnotherRoomInbox fails with and
without it. The same six failed the same way in an earlier run on
451133a, the parent of b004fee, where discovery still accepts
0.150.1. This change does not address those failures. Both make check
and the repository gate pass against 09363b7.
@yinwu01
yinwu01 force-pushed the test/codex-fakes-at-minimum branch from bcdf988 to 39f5218 Compare November 25, 2026 07:04
@yinwu01 yinwu01 changed the title test(computer): give the Codex fakes a version the Daemon accepts test(teamhub): give the process fixture's Codex a version the Daemon accepts Nov 25, 2026
@yinwu01

yinwu01 commented Nov 25, 2026

Copy link
Copy Markdown
Author

#693 landed the go-local-daemon-process.test.ts half of this PR (both fakes at 0.171.0 and the userMessage echo after a steer) and conflicted with it, so I rebased onto main and dropped that part.

What's left is TeamHub's process fixture, which still reports codex-cli 0.150.1 on main: discovery logs codex version codex-cli 0.150.1 is below minimum 0.166.0, and the five process tests that start the Daemon time out with Local Daemon did not register. On 09363b7 the version bump gets all five past registration, with Codex 0.171.0 ready in each; the suite still fails in the same six tests as without the bump, and this PR doesn't fix those. I retitled the PR and rewrote the description to match; the runs are in the commit message.

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