Skip to content

test: consolidate auto-reply fixtures - #118086

Merged
steipete merged 1 commit into
mainfrom
codex/goal100k-autoreply-fixture-wave15-2d45
Aug 2, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/goal100k-autoreply-fixture-wave15-2d45

Conversation

@steipete

@steipete steipete commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Consolidate repeated auto-reply freshness, command authorization, approval, follow-up admission, Slack lifecycle, and source-delivery fixture setup into shared helpers and explicit tables.
  • Preserve the exact test-name multiset and all 433 expanded focused cases, assertions, synchronization gates, and cleanup ordering.
  • Remove the two obsolete max-lines suppressions and their exact sorted baseline entries after both test files dropped below the threshold.

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

  • Focused local proof through the repository wrapper: 5 files / 433 tests passed.
  • Blacksmith Testbox full src/auto-reply: 176 files / 3,960 tests passed (tbx_01kz1p90nse9vq7vpb74e3s2ea).
  • Blacksmith Testbox final 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).
  • Two independent xhigh reviewers: CLEAN on final artifact SHA-256 63b851b3d3a65cd69dc3ba798ef158a747c51d4e386e9098fdfcd38b9ff21939.
  • Latest-main synthetic merge against 603321a315692444d63ad3d5941a66753856874a: clean; synthetic tree 0c484a1e6fbc6e92a321507fced517e953a8b7a1.
  • Central collision delta through 2026-08-02T17:33Z: zero matches on all six auto-reply paths. The baseline file overlaps only coordinated campaign PRs with distinct sorted-line deletions.

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.

@openclaw-barnacle openclaw-barnacle Bot added size: XL maintainer Maintainer-authored PR labels 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, 1:44 PM ET / 17:44 UTC.

ClawSweeper review

What this changes

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

⚠️ Ready for maintainer review - 5 items remain

Keep this PR open for the protected maintainer handling path. The inspected branch is test-only, reduces duplicated fixture setup, and has no discrete correctness or security finding; remaining approval should wait for exact-head CI completion and a maintainer decision on the retained Codex-precedence test contract.

Priority: P3
Reviewed head: 5cb7b94a59fcc218ea693f4b7b945208379eab94
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The patch is a focused, net-reducing test refactor with no concrete defect found, while final merge confidence depends on the direct Codex contract check and remaining exact-head CI.
Proof confidence 🌊 off-meta tidepool Not applicable: This protected, test-only refactor has no directly user-visible changed behavior to demonstrate; focused and exact-head test evidence is the relevant proof path.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This protected, test-only refactor has no directly user-visible changed behavior to demonstrate; focused and exact-head test evidence is the relevant proof path.
Evidence reviewed 6 items Test-only patch scope: The branch changes six auto-reply test files plus two removed max-lines baseline entries; no runtime, dependency, config, schema, or workflow files are touched.
Freshness helper preserves the race ordering: The extracted helper still starts the older delivery, waits for its delivery gate, runs the newer message, releases the older gate, and awaits the older dispatch before returning results to each assertion.
Current runtime owner remains unchanged: The production dispatch entry point remains in the current-main auto-reply reply module; this branch refactors only its surrounding regression fixtures.
Findings None None.
Security None None.

How this fits together

OpenClaw'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
Loading

Decision needed

Question Recommendation
Should this protected maintainer-labelled fixture refactor land after exact-head CI completes, with the retained Codex-precedence contract rechecked directly against sibling Codex source? Recheck contract, then land: Verify the retained Codex delivery-precedence expectations against the sibling Codex source and merge once the current head's required checks are green.

Why: Repository policy reserves protected maintainer items for explicit human handling, and the local review environment could not inspect the required sibling Codex source for the dependency-backed precedence cases.

Before merge

  • Add real behavior proof - Not applicable: This protected, test-only refactor has no directly user-visible changed behavior to demonstrate; focused and exact-head test evidence is the relevant proof path.
  • Resolve merge risk (P1) - The PR retains tests whose expected delivery precedence is described as Codex-dependent, but sibling Codex source was unavailable for the repository-required direct contract check.
  • Resolve merge risk (P1) - Several exact-head CI jobs were still in progress in the supplied PR state; no failure is shown, but merge readiness is not yet established.
  • Complete next step (P2) - A protected maintainer label and unavailable direct Codex dependency source require explicit maintainer handling rather than automated repair or closure.
Agent review details

Security

None.

PR surface

Source -361, Tests -491, Other -2. Total -854 across 7 files.

View PR surface stats
Area Files Added Removed Net
Source 2 242 603 -361
Tests 4 543 1034 -491
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 0 2 -2
Total 7 785 1639 -854

Review metrics

None.

Stored data model

Persistent data-model change detected: serialized state: src/auto-reply/reply/followup-turn-admission.test.ts. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    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.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

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

Labels

Label changes:

  • add P3: This is a behavior-neutral test-fixture consolidation with no production surface 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 protected, test-only refactor has no directly user-visible changed behavior to demonstrate; focused and exact-head test evidence is the relevant proof path.

Label justifications:

  • P3: This is a behavior-neutral test-fixture consolidation with no production surface 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 protected, test-only refactor has no directly user-visible changed behavior to demonstrate; focused and exact-head test evidence is the relevant proof path.

Evidence

What I checked:

  • Test-only patch scope: The branch changes six auto-reply test files plus two removed max-lines baseline entries; no runtime, dependency, config, schema, or workflow files are touched. (src/auto-reply/dispatch.freshness.test.ts:92, 5cb7b94a59fc)
  • Freshness helper preserves the race ordering: The extracted helper still starts the older delivery, waits for its delivery gate, runs the newer message, releases the older gate, and awaits the older dispatch before returning results to each assertion. (src/auto-reply/dispatch.freshness.test.ts:92, 5cb7b94a59fc)
  • Current runtime owner remains unchanged: The production dispatch entry point remains in the current-main auto-reply reply module; this branch refactors only its surrounding regression fixtures. (src/auto-reply/reply/dispatch-from-config.ts:23, 1704ea591820)
  • Patch hygiene: The branch diff has no whitespace errors. (config/max-lines-baseline.txt:496, 5cb7b94a59fc)
  • History signal: Current-main blame attributes the surrounding freshness fixture and its ordering contract to a recent auto-reply test change; shallow/promisor history prevented a broader reliable feature-history trail. (src/auto-reply/dispatch.freshness.test.ts:77, 568bfd0a123d)
  • Dependency-contract gap: The PR retains Codex delivery-precedence cases, but the required sibling Codex checkout was absent and network resolution prevented obtaining it, so this review cannot independently validate that external contract.

Likely related people:

  • zengLingbiao: Current-main blame attributes the adjacent freshness fixture and its delivery-ordering setup to this recent contributor; deeper provenance was unavailable from the partial local history. (role: recent area contributor; confidence: low; commits: 568bfd0a123d; files: src/auto-reply/dispatch.freshness.test.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Recheck the retained Codex-precedence expectations against sibling Codex source before merge.
  • Wait for the in-progress exact-head CI jobs to complete successfully.

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 1f7e2f0 into main Aug 2, 2026
125 of 130 checks passed
@steipete
steipete deleted the codex/goal100k-autoreply-fixture-wave15-2d45 branch August 2, 2026 18:16
@steipete

steipete commented Aug 2, 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

maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XL 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