Skip to content

test(matrix): deduplicate CLI fixtures - #117651

Merged
steipete merged 1 commit into
mainfrom
codex/goal100k-matrix-cli-wave6
Aug 1, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/goal100k-matrix-cli-wave6

Conversation

@steipete

@steipete steipete commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • centralize Matrix CLI command execution behind a fresh-per-run Commander harness
  • replace repeated account, backup, verification, and bootstrap literals with focused file-local fixtures
  • table-drive the adjacent backup-status guidance cases while preserving their names and assertions

Repair shape

  • Root cause: the Matrix CLI test owner repeated command construction, canonical argv, and complete nested result shapes across 55 tests, so each behavior addition copied substantial setup.
  • Architectural owner: extensions/matrix/src/cli.test.ts remains the sole owner of these test fixtures; production behavior is unchanged.
  • Canonical fix: one fresh-command runner plus immutable-per-call fixture builders. No shared Commander or mutable fixture state was introduced.
  • Removed paths: duplicate test-only command setup and repeated fixture literals. Production LOC delta: 0.
  • Test delta: +414 / -789, net -375 LOC.

Preservation proof

  • AST trace: 55 expanded test names match base byte-for-byte and in order.
  • Invocation trace: all 64 argv vectors match base byte-for-byte and in order; all 64 now receive fresh Command instances.
  • Assertion trace: 233 runtime matcher invocations and 132 exact called-with checks before and after.
  • Preserved hostile shell quoting, ANSI/C1 sanitization, 1 MiB multi-chunk and multibyte stdin boundaries, destructive --yes, recovery-key rotation, account auth/config/readiness, and JSON/text exit semantics.
  • Pinned Commander 15.0.0 source/types inspected for readonly argv and parse state restoration.
  • Independent xhigh review: clean, no blockers, confidence 0.99.
  • Current-main merge-tree proof is clean against 99f9c433be67fd9c958759ffc9c76f515005d5a1.

Tests

  • pnpm test extensions/matrix/src/cli.test.ts — 55 passed
  • pnpm test extensions/matrix/src/cli.test.ts extensions/matrix/index.test.ts — 59 passed
  • pnpm test extensions/matrix — 120 files, 1,611 tests passed
  • pnpm check:changed — passed, including format, lint, extension test typecheck, plugin boundaries, and dead-export scans
  • git diff --check — passed

@openclaw-barnacle openclaw-barnacle Bot added channel: matrix Channel integration: matrix size: XL maintainer Maintainer-authored PR labels Aug 1, 2026
@steipete steipete self-assigned this Aug 1, 2026
@steipete
steipete merged commit 3772f07 into main Aug 1, 2026
94 of 99 checks passed
@steipete
steipete deleted the codex/goal100k-matrix-cli-wave6 branch August 1, 2026 22:05
@steipete

steipete commented Aug 1, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

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

Labels

channel: matrix Channel integration: matrix maintainer Maintainer-authored PR size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant