Skip to content

test(feishu): consolidate backoff coverage at its owner - #134289

Merged
steipete merged 1 commit into
mainfrom
codex/test-feishu-backoff-owner
Aug 31, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/test-feishu-backoff-owner

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

The file named typing.test.ts exercises only the extracted backoff classifier. It also repeats a catch/rethrow implementation inside the test, which cannot detect a regression in the real typing owner.

Why This Change Was Made

Rename the suite to typing-backoff.test.ts, retain every classifier and response input in explicit tables, and check error identity and metadata together for both backoff codes. Remove the copied catch/rethrow demonstration and consolidate its duplicate class checks.

User Impact

Coverage now clearly belongs to the backoff owner. All distinct classifier inputs, response codes, rejection inputs and error metadata assertions remain. Production +0/-0; tests +90/-149. This is a coverage cleanup, with no elapsed-time speedup claim.

Evidence

  • The original classifier and reply-dispatcher suites passed 164 tests; the reorganized suites passed 161. The classifier keeps 12 error rows, eight response rows and two complete error-class rows.
  • Full changed-file checks, formatting, diff checks and structured Codex autoreview passed.
  • Reviewed the classifier, both actual typing callers and the original rate-limit repair and extraction history. The dispatcher sibling uses mocked typing functions; it is not proof of SDK rethrow behavior.

Existing follow-up: add direct create/delete owner tests for backoff rethrow in typing.ts. The removed simulation did not cover that boundary, and this PR does not claim otherwise.

@clawsweeper

clawsweeper Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added channel: feishu Channel integration: feishu size: M maintainer Maintainer-authored PR labels Aug 31, 2026
@steipete
steipete marked this pull request as ready for review August 31, 2026 16:54
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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. labels Aug 31, 2026
@clawsweeper

clawsweeper Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 31, 2026, 1:01 PM ET / 17:01 UTC.

ClawSweeper review

What this changes

The PR moves Feishu backoff-helper tests into typing-backoff.test.ts, tables the existing cases, and removes a simulated catch/rethrow test.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

The test-only cleanup appears correct and has no blocking review finding. It remains open for normal maintainer handling because it is maintainer-labeled.

Priority: P3
Reviewed head: 2fac7f290c6359c59aef068a3f11d5b9374aeed2
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, behavior-neutral test cleanup with source-backed preservation of the helper contract.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored, test-only PR does not change the Feishu runtime path; real behavior proof is not applicable to the relocation of helper assertions.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored, test-only PR does not change the Feishu runtime path; real behavior proof is not applicable to the relocation of helper assertions.
Evidence reviewed 4 items Introduced test change: The introduced PR delta only adds the renamed table-driven helper suite and removes the former helper suite; it makes no production-code change.
Owner boundary: The real typing owner classifies non-throwing response codes and rethrows recognized backoff errors; the removed nested simulation did not invoke either owner operation.
Caller and sibling coverage: The reply dispatcher awaits the typing owner for start and stop, while its test suite replaces those calls with mocks; the moved helper tests do not claim to cover that separate boundary.
Findings None None.
Security None None.

How this fits together

Feishu reply dispatch starts and stops typing reactions through the typing owner. That owner classifies rate-limit responses, rethrows backoff failures, and lets the keepalive guard stop retries.

flowchart LR
  A[Feishu reply] --> B[Reply dispatcher]
  B --> C[Typing reaction owner]
  C --> D[Backoff classifier]
  D --> E[Backoff error rethrow]
  E --> F[Keepalive guard]
Loading

Decision needed

Question Recommendation
Should this maintainer-labeled Feishu test cleanup land after the exact-head required checks complete? Land the cleanup: Accept the behavior-neutral test consolidation once the required checks for this head are green.

Why: Automated cleanup should not close a maintainer-labeled PR, although source review found no defect requiring a repair lane.

Before merge

  • Complete next step (P2) - No repair lane is needed: the branch has no identified defect, and protected maintainer review is the remaining action.
Agent review details

Security

None.

PR surface

Tests -59. Total -59 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 2 90 149 -59
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 90 149 -59

Review metrics

Metric Value Why it matters
Production versus test LOC production 0; tests net -59 The patch is a net-negative test reorganization with no runtime or configuration change.

Technical review

Best possible solution:

Keep the classifier coverage beside typing-backoff.ts and add direct create/delete rethrow coverage separately if that owner boundary is later changed.

Do we have a high-confidence way to reproduce the issue?

Not applicable — this is a test-only cleanup, not a report of a failing user flow; the removed test never invoked the typing owner.

Is this the best way to solve the issue?

Yes — locating the helper contract beside typing-backoff.ts preserves the classifier cases while removing a self-contained simulation that could not cover owner rethrow behavior.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 43686bcb0a45.

Labels

Label changes:

  • add P3: This is a low-risk test-coverage cleanup with no 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-authored, test-only PR does not change the Feishu runtime path; real behavior proof is not applicable to the relocation of helper assertions.

Label justifications:

  • P3: This is a low-risk test-coverage cleanup with no 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-authored, test-only PR does not change the Feishu runtime path; real behavior proof is not applicable to the relocation of helper assertions.

Evidence

What I checked:

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Madoka: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

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

Copy link
Copy Markdown
Contributor Author

Maintainer review completed for this test-only cleanup. Read the latest ClawSweeper review and its remaining action: ordinary maintainer handling after exact-head checks. No actionable findings or additional rank-up changes remain. The 161-case classifier/dispatcher proof and full changed-file checks pass, and required CI is green for 2fac7f2.

Proceeding through the native prepare/merge workflow under the requested test-maintenance batch. Direct typing create/delete rethrow coverage remains a named follow-up; the removed simulated rethrow test did not cover that boundary.

@steipete
steipete merged commit b99512e into main Aug 31, 2026
176 checks passed
@steipete
steipete deleted the codex/test-feishu-backoff-owner branch August 31, 2026 17:13
@steipete

Copy link
Copy Markdown
Contributor Author

Merged through the native squash workflow. The response observation was interrupted by concurrent main movement; read-only reconciliation confirmed prepared head 2fac7f2 landed as b99512eefe5a48b15624ef2f03270844523d09da. No second merge request was sent. Exact-head CI and the 161-case focused/sibling proof passed.

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

Labels

channel: feishu Channel integration: feishu 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: 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