Repository navigation
refactor(test): adopt codex app-server test harness in worst-preamble suites - #120065
Merged
Merged
Conversation
steipete
marked this pull request as ready for review
August 6, 2026 23:29
Contributor
Author
|
Incident-mode landing note (operator-directed). GitHub's Actions incident left CI queued and blocked ClawSweeper; the operator directed landing. Gates satisfied: coordinator review (harness/fixture promotion only, zero production changes under extensions/codex/src; a mechanical check found zero describe/it title deltas across all touched files); structured Codex autoreview clean (0.99); 552 tests green across 13 files; format, lint, typechecks, guards, import cycles green. Test scaffolding −647 net. The original 2,500-4,000 estimate over-counted (several worst-preamble files already used the harness; bespoke auth/transport setups were correctly left local). Landed via operator-authorized admin merge at the verified head. |
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Aug 7, 2026
… suites (openclaw#120065) * refactor(test): share codex app-server client fixtures * refactor(test): share codex turn identifiers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Problem This Solves
The 126 Codex app-server test files contain 9,712 lines before their first suite declaration. The 12 measured target files alone contained 4,111 preamble lines, much of it repeated client-handler plumbing, standard thread/turn results, runtime identity methods, and thread/turn identifiers.
Why This Change Was Made
This adds one dependency-light test fixture for the repeated fake client, standard thread/turn builders, runtime identity methods, and current-turn identifiers. The existing run-attempt harness now delegates to that fixture, and the target suites reuse it without changing test titles or assertions.
The N-way comparison also showed that the remaining 1,038-line run-attempt preamble and 277-line thread-lifecycle binding preamble are already harness adopters and mostly contain suite-specific setup. Auth bridge is likewise auth-specific. Those paths were left local instead of moving one-off fixtures into a shared file.
User Impact
No runtime behavior changes. This is test-scaffolding-only cleanup. Across the branch, test code changes by +516/-1,163 lines for a net reduction of 647 lines; production runtime code changes by +0/-0.
The selected files' measured preambles fall from 4,111 to 3,606 lines. The reduction is smaller than the initial 2,500-4,000 estimate because the two largest files had already adopted the harness and their remaining setup was not repeated across three target suites.
Evidence
OPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS=300000 node scripts/run-vitest.mjs extensions/codex/src/app-server/run-attempt.context-engine.test.tsOPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS=300000 node scripts/run-vitest.mjs extensions/codex/src/app-server/auth-profile-runtime-contract.test.tsOPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS=300000 node scripts/run-vitest.mjs extensions/codex/src/app-server/run-attempt-thread-cleanup.test.tsOPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS=300000 node scripts/run-vitest.mjs extensions/codex/src/app-server/side-question.test.tsOPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS=300000 node scripts/run-vitest.mjs extensions/codex/src/app-server/native-subagent-monitor.test.tsOPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS=300000 node scripts/run-vitest.mjs extensions/codex/src/app-server/bounded-turn.test.tsOPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS=300000 node scripts/run-vitest.mjs extensions/codex/src/app-server/approval-bridge.test.tsOPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS=300000 node scripts/run-vitest.mjs extensions/codex/src/app-server/elicitation-bridge.test.tsOPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS=300000 node scripts/run-vitest.mjs extensions/codex/src/app-server/attempt-startup.test.tsOPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS=300000 node scripts/run-vitest.mjs extensions/codex/src/app-server/run-attempt.test.tsOPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS=300000 node scripts/run-vitest.mjs extensions/codex/src/app-server/thread-lifecycle.binding.test.tsOPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS=300000 node scripts/run-vitest.mjs extensions/codex/src/app-server/run-attempt.usage-limits.test.tsOPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS=300000 node scripts/run-vitest.mjs extensions/codex/src/app-server/run-attempt.hooks.test.tspnpm format <11 changed paths>passed.node scripts/run-oxlint.mjs <11 changed paths>passed.node scripts/check-changed.mjscould not provision the routed remote backend because Azure rejected its configured image selector withadmin_required; Blacksmith and Daytona were unavailable first.OPENCLAW_CHECK_CHANGED_REMOTE_CHILD=1 node scripts/check-changed.mjs --timedpassed all extension production/test type checks, lint partitions, formatting, boundary checks, ratchets, dead-export scan, storage guards, and import-cycle checks locally.git diff origin/main...HEAD --numstat: production runtime +0/-0; test scaffolding +516/-1,163 (net -647).