Skip to content

refactor(migrate-hermes): consolidate migration test fixtures - #118182

Merged
steipete merged 1 commit into
mainfrom
codex/goal100k-migrate-hermes-fixture-wave19
Aug 2, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/goal100k-migrate-hermes-fixture-wave19

Conversation

@steipete

@steipete steipete commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

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

  • Scope: two test files only; +126/-359, net -233; production/config/default/schema/docs delta 0.
  • Exact AST parity against main:
    • config: 23 declarations, 27 expanded cases, 99 ordered assertions
    • secrets: 26 declarations, 27 expanded cases, 77 ordered assertions
    • title, table-row, and assertion hashes match exactly
  • Focused local proof: 54/54 passed.
  • Blacksmith Testbox tbx_01kz1z3h9rnb1d0p048g1skz02:
    • full extensions/migrate-hermes: 102/102 passed
    • adjacent migration/doctor/secret suites: 96/96 passed
    • pnpm check:changed: passed, including ratchets, formatting, extension-test typecheck, and lint
  • Two independent xhigh reviews: clean; both judged the suite-local fixture shape the best fix after full owner/caller/history review and fresh direct Codex source inspection.
  • Direct Codex contract checks covered codex-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 remains openai; legacy openai-codex remains migration input only.
  • Central collision audit through 2026-08-02T20:13:15Z: zero open-PR overlap for either changed path.

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.

@steipete
steipete marked this pull request as ready for review August 2, 2026 20:26
@steipete steipete self-assigned this Aug 2, 2026
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. labels Aug 2, 2026
@clawsweeper

clawsweeper Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed August 2, 2026, 4:30 PM ET / 20:30 UTC.

ClawSweeper review

What this changes

This 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 readiness

⚠️ Ready for maintainer review - 3 items remain

Keep 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
Reviewed head: c331f1604af750b31e6b47817a5f1defd716db28
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, low-risk test refactor with preserved scenario counts and explicit fixture boundaries; remaining in-progress checks are normal merge gating rather than a patch-quality defect.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-labeled PR changes only test-source organization and does not introduce a user-visible runtime path; the PR body additionally reports focused, extension, adjacent-suite, and changed-check validation.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-labeled PR changes only test-source organization and does not introduce a user-visible runtime path; the PR body additionally reports focused, extension, adjacent-suite, and changed-check validation.
Evidence reviewed 6 items Patch scope and parity: The proposed commit changes only the two Hermes migration test files. Test-case counts remain 22 in the config suite and 25 in the secrets suite before and after the refactor.
Fixture preserves secret opt-in boundary: The new secret fixture creates the same isolated paths and makes the default context explicitly secret-enabled, while spreading per-test overrides last so exceptional tests can still override any context field.
Shared helper contract: The existing context helper maps supplied source, state, workspace, secret-selection, runtime, and override values directly into the migration provider context, so the new fixture is a test-local convenience rather than a new runtime path.
Findings None None.
Security None None.

How this fits together

The 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]
Loading

Decision needed

Question Recommendation
Should the maintainer-requested, test-only fixture refactor be merged once its current-head checks complete? Merge after checks: Accept the test-only consolidation once the remaining required checks complete successfully and the merge result remains clean.

Why: The PR carries the protected maintainer label, so automated cleanup must leave final landing judgment to the responsible human despite no concrete patch defect.

Before merge

  • Add real behavior proof - Not applicable: This maintainer-labeled PR changes only test-source organization and does not introduce a user-visible runtime path; the PR body additionally reports focused, extension, adjacent-suite, and changed-check validation.
  • Complete next step (P2) - The protected maintainer label requires normal human merge judgment; no discrete repair task or review finding warrants an automated fix lane.
Agent review details

Security

None.

PR surface

Tests -233. Total -233 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 2 126 359 -233
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 126 359 -233

Review metrics

None.

Technical review

Best 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.

Labels

Label changes:

  • add P3: The change is a test-only maintainability cleanup with no claimed runtime or user-visible behavior change.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-labeled PR changes only test-source organization and does not introduce a user-visible runtime path; the PR body additionally reports focused, extension, adjacent-suite, and changed-check validation.

Label justifications:

  • P3: The change is a test-only maintainability cleanup with no claimed runtime or user-visible behavior change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-labeled PR changes only test-source organization and does not introduce a user-visible runtime path; the PR body additionally reports focused, extension, adjacent-suite, and changed-check validation.

Evidence

What I checked:

  • Patch scope and parity: The proposed commit changes only the two Hermes migration test files. Test-case counts remain 22 in the config suite and 25 in the secrets suite before and after the refactor. (extensions/migrate-hermes/config.test.ts:29, c331f1604af7)
  • Fixture preserves secret opt-in boundary: The new secret fixture creates the same isolated paths and makes the default context explicitly secret-enabled, while spreading per-test overrides last so exceptional tests can still override any context field. (extensions/migrate-hermes/secrets.test.ts:60, c331f1604af7)
  • Shared helper contract: The existing context helper maps supplied source, state, workspace, secret-selection, runtime, and override values directly into the migration provider context, so the new fixture is a test-local convenience rather than a new runtime path. (extensions/migrate-hermes/test/provider-helpers.ts:84, d4b96d98cfe8)
  • Secret behavior remains owned by provider inputs: Migration secret items remain skipped when includeSecrets is absent and become planned/create candidates only when it is enabled; the PR does not alter that owner logic. (extensions/migrate-hermes/items.ts:84, d4b96d98cfe8)
  • Current-main and provenance check: The PR parent 82540ad is an ancestor of current main, the PR head is not yet on main, and current test files trace most recently to the merged current-main commit 31f64ae. (extensions/migrate-hermes/secrets.test.ts:60, 31f64aeae08e)
  • Release check: No release tag contains the unmerged PR commit, as expected; this is not an implemented-on-main or release-close candidate. (c331f1604af7)

Likely related people:

  • Shakker: Current main attributes the central Hermes config and secret test suites to this contributor’s merged feature work; the latest file-history commit is shared by both suites. (role: recent area contributor; confidence: high; commits: 31f64aeae08e; files: extensions/migrate-hermes/config.test.ts, extensions/migrate-hermes/secrets.test.ts)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete
steipete merged commit dc9c769 into main Aug 2, 2026
148 of 157 checks passed
@steipete
steipete deleted the codex/goal100k-migrate-hermes-fixture-wave19 branch August 2, 2026 21:01
@steipete

steipete commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Aug 2, 2026
* 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)
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 3, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 3, 2026
* 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. plugin: migrate-hermes rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant