Repository navigation
test: consolidate auto-reply fixtures - #118086
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed August 2, 2026, 1:44 PM ET / 17:44 UTC. ClawSweeper reviewWhat this changesThis PR replaces repeated auto-reply test setup with shared fixture helpers and table-driven cases, and removes two now-obsolete max-lines baseline entries. Merge readinessKeep this PR open for the protected Priority: P3 Review scores
Verification
How this fits togetherOpenClaw's auto-reply layer turns inbound channel messages into authorized, session-aware agent replies and deliveries. These tests cover the authorization, freshness, session-admission, and harness-delivery boundaries that protect that runtime behavior. flowchart LR
A[Inbound channel message] --> B[Auto-reply dispatch]
B --> C[Authorization and session admission]
C --> D[Agent harness delivery choice]
D --> E[Channel reply delivery]
F[Shared test fixtures] --> B
F --> C
F --> D
Decision needed
Why: Repository policy reserves protected Before merge
Agent review detailsSecurityNone. PR surfaceSource -361, Tests -491, Other -2. Total -854 across 7 files. View PR surface stats
Review metricsNone. Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the refactor test-local, complete the exact-head checks, and have the owning reviewer revalidate the retained Codex-precedence assertions against the sibling Codex source before landing. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR refactors regression fixtures rather than reporting a user-facing defect. The changed suites exercise existing authorization, freshness, admission, and delivery behavior. Is this the best way to solve the issue? Unclear pending the direct Codex contract check: the shared helpers are the repository-preferred way to remove repeated test setup, but the retained Codex-precedence assertions require source-level dependency confirmation. AGENTS.md: unclear because the file could not be read completely. Codex review notes: model internal, reasoning high; reviewed against 1704ea591820. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
Summary
Root cause and boundary
The test suites repeated large fixture arrangements for the same owner contracts. That duplication obscured the invariant under test and made sibling scenarios drift-prone. The canonical fix stays entirely in test/fixture ownership: production owners, configuration behavior, security policy, API contracts, and shipped behavior are unchanged.
Removed paths are repeated test setup only. Production LOC delta: 0. Runtime config/security/API delta: 0. Total delta: 785 additions / 1,639 deletions, net -854 LOC.
Preserved sibling coverage includes foreground visibility freshness, session generation and lifecycle revision fencing, Slack bypass lease settlement/revalidation, command owner versus authorized-sender distinctions, SecretRef fail-closed behavior and log redaction, approval kind probing and gateway scopes, model/harness override precedence, message-tool fallback, and send-policy deny supremacy.
Validation
src/auto-reply: 176 files / 3,960 tests passed (tbx_01kz1p90nse9vq7vpb74e3s2ea).pnpm check:changed: passed, including max-lines ratchet, format, dead export scans, script declarations, core/core-test typechecks, core/scripts lint, import cycles, and storage/security guards (tbx_01kz1qje4prh1k5ry7qceg1yzc; run).63b851b3d3a65cd69dc3ba798ef158a747c51d4e386e9098fdfcd38b9ff21939.603321a315692444d63ad3d5941a66753856874a: clean; synthetic tree0c484a1e6fbc6e92a321507fced517e953a8b7a1.Codex dependency proof
Personally inspected sibling Codex at
ee0247f95a6fe2b094ba2253d82cae2a2b4c2dff: start/resume model-provider inputs and authoritative resolved responses in../codex/codex-rs/app-server-protocol/src/protocol/v2/thread.rs:57,:171,:325,:404; runtime resolution/response paths in../codex/codex-rs/app-server/src/request_processors/thread_processor.rs:990,:1386,:3101,:3381; provider resolution in../codex/codex-rs/core/src/config/mod.rs:3655. This supports retaining the effective model/harness precedence cases rather than treating cached Codex metadata as unconditional.