Repository navigation
refactor(migrate-hermes): consolidate migration test fixtures - #118182
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed August 2, 2026, 4:30 PM ET / 20:30 UTC. ClawSweeper reviewWhat this changesThis PR replaces duplicated temporary-path, runtime, provider, and secret-enabled migration-context setup with suite-local fixtures in the Hermes config and credential migration tests. Merge readinessKeep this maintainer-labeled test refactor open for normal merge handling. The available patch preserves all 47 test cases while centralizing only repeated suite setup; no production, configuration, dependency, or credential-handling code changes. Priority: P3 Review scores
Verification
How this fits togetherThe Hermes migration plugin reads a source installation and builds config and credential migration items for OpenClaw. These tests prepare isolated source, workspace, state, report, and agent-store paths, then exercise the plugin’s planning and apply behavior. flowchart LR
A[Hermes source fixture] --> B[Suite-local paths and context]
B --> C[Hermes migration provider]
C --> D[Config migration items]
C --> E[Secret migration items]
D --> F[Config runtime assertions]
E --> G[Agent store assertions]
Decision needed
Why: The PR carries the protected Before merge
Agent review detailsSecurityNone. PR surfaceTests -233. Total -233 across 2 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Merge the fixture consolidation after the remaining required checks finish and the branch is refreshed against current main if GitHub requires it; retain the separate config-path and secret-context fixtures so secret opt-in stays explicit. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR refactors test setup rather than reporting a user-facing failure. The relevant verification is semantic parity of the existing test scenarios and their migration-context inputs. Is this the best way to solve the issue? Yes. Suite-local fixtures are the narrowest maintainable solution because the repeated paths and secret-enabled context remain explicit while each scenario preserves per-test overrides. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against d4b96d98cfe8. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
* origin/main: feat(gateway): track event-loop degradation persistence and add concurrency benchmark (#118193) fix(config): preserve secret ownership when configuration rows move (#118149) fix(cron): deliver failure alerts after persistence (#118200) chore(lint): clear 172 lint:all baseline violations in five batches (#118098) perf(gateway): remove streaming hot-path rescans (#118192) test(gateway): use in-memory task registry (#118191) test(macos): fix three races in the bounded process suites (#118196) refactor(migrate-hermes): consolidate test fixtures (#118182) test(android): share Wear transport fixtures (#118177) test(ui): deduplicate control UI e2e setup (#118180) fix(plugins): unblock prerelease validation (#118103) test(cli): reduce redundant process launches (#118141) test(gateway): compact terminal observer fixtures (#118179) fix(agents): make requested threads sidebar-visible (#118073) test(plugins): canonicalize native resolver fixtures (#118174) test: deduplicate agent runner fixtures (#118176) refactor(policy): consolidate doctor test fixtures (#118173) fix(plugins): remove disabled channel plugin configuration on uninstall (#118127) refactor(matrix): consolidate monitor test fixtures (#118175)
* origin/main: feat(gateway): track event-loop degradation persistence and add concurrency benchmark (openclaw#118193) fix(config): preserve secret ownership when configuration rows move (openclaw#118149) fix(cron): deliver failure alerts after persistence (openclaw#118200) chore(lint): clear 172 lint:all baseline violations in five batches (openclaw#118098) perf(gateway): remove streaming hot-path rescans (openclaw#118192) test(gateway): use in-memory task registry (openclaw#118191) test(macos): fix three races in the bounded process suites (openclaw#118196) refactor(migrate-hermes): consolidate test fixtures (openclaw#118182) test(android): share Wear transport fixtures (openclaw#118177) test(ui): deduplicate control UI e2e setup (openclaw#118180) fix(plugins): unblock prerelease validation (openclaw#118103) test(cli): reduce redundant process launches (openclaw#118141) test(gateway): compact terminal observer fixtures (openclaw#118179) fix(agents): make requested threads sidebar-visible (openclaw#118073) test(plugins): canonicalize native resolver fixtures (openclaw#118174) test: deduplicate agent runner fixtures (openclaw#118176) refactor(policy): consolidate doctor test fixtures (openclaw#118173) fix(plugins): remove disabled channel plugin configuration on uninstall (openclaw#118127) refactor(matrix): consolidate monitor test fixtures (openclaw#118175)
What Problem This Solves
The Hermes migration config and credential suites repeated temporary-root, canonical path, migration context, runtime, provider, report, and agent-store setup across nearly every scenario. That duplication made security-sensitive migration cases harder to compare and maintain.
Why This Change Was Made
This maintainer-requested cleanup introduces suite-local fixtures: a path-only helper for config mapping and an explicitly secret-enabled context helper for credential migration. The helpers preserve per-test overrides and keep config-versus-secret semantics separate; production code and public behavior are unchanged.
User Impact
No user-visible behavior changes. Maintainers get the same migration coverage with 233 fewer test lines and less duplicated setup around auth, conflict, revalidation, and provider-routing scenarios.
Evidence
+126/-359, net-233; production/config/default/schema/docs delta0.main:tbx_01kz1z3h9rnb1d0p048g1skz02:extensions/migrate-hermes: 102/102 passedpnpm check:changed: passed, including ratchets, formatting, extension-test typecheck, and lintcodex-rs/protocol/src/auth.rs,codex-rs/login/src/auth/manager.rs,codex-rs/model-provider-info/src/lib.rs, and core session/thread startup. Canonical provider identity remainsopenai; legacyopenai-codexremains migration input only.AI-assisted: yes. I reviewed the production migration/auth ownership chain, understand the helper boundaries, and validated the final tree through focused, adjacent, remote, structural-parity, and independent-review gates.