Skip to content

refactor(line): simplify auto-reply helper ownership - #150043

Merged
steipete merged 1 commit into
mainfrom
codex/line-auto-reply-owner47-7ad
Sep 17, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/line-auto-reply-owner47-7ad

Conversation

@steipete

@steipete steipete commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

LINE auto replies carried a private dependency object even though their only production caller always supplied the same helpers, leaving duplicate wiring maintained mainly for tests.

User Impact

No user-visible behavior change is intended. Reply and push ordering, fallback handling, reply-token consumption, receipts, media, quotes and quick replies retain their existing behavior. Configuration and public plugin APIs are unchanged, including the genuine runtime.channel.line injection boundary.

Why This Change Was Made

The delivery owner now imports the existing canonical helpers directly. The contextual reply-error callback remains a direct optional parameter, called at the same catch boundary before push fallback. The monitor no longer assembles the fixed helper object.

Tests use scoped module spies, capturing real implementations before installation and restoring owned spies in reverse order. Existing assertions and real-renderer cases are retained. The nine-file change removes 47 net production lines and 20 net test/support lines.

Evidence

  • The unchanged-original diagnostic, original-production fixture port and production cutover each passed the same 147 cases across ten LINE suites, with identical case identities and per-file order. Coverage includes recovery, partial delivery, quote handling, renderer overflow, carousel delivery, monitor lifecycle, streaming and webhook wiring. Existing loopback cases exercise real HTTP serialization against a synthetic local endpoint.
  • A normal build passed all 16 phases. A separate fresh Node import of the newly built LINE runtime barrel passed using the existing isolated-home lifecycle. This proves loadability, not a running account or full Gateway conversation.
  • The complete trusted-local changed gate passed all 26 checks, including six Doctor cases. This is local macOS evidence, not hosted/Linux evidence.
  • Separate precommit and exact-saved-commit Codex reviews each completed two partitions with no actionable P0–P2 findings. The unchanged quote-store file was omitted by the review helper's filename policy and inspected separately; this is not complete transitive review coverage.

Limits and retained failures: the first pristine attempt ended during the runner's startup no-output deadline without case results. The successful unchanged-original diagnostic used a warmer cache and did not establish a cause or repair. The first changed gate passed 20 checks, then failed the test helper's array-reversal lint rule; five checks were unrun. After the equivalent toReversed() change, focused lint and the complete 26-check gate passed. The earlier 147-case/build/import results remain their original test-helper epoch; production bytes were unchanged.

No live LINE account or provider call was authorized or used for this internal consolidation. The proof does not establish LINE service/TLS delivery, a full registered Gateway turn, exact unmocked microtask timing or performance equivalence. Hosted exact-head CI passed: CI run 35095853207.

Remove the fixed dependency bag and monitor forwarding in favor of the
existing delivery owners. Preserve the contextual reply-error callback,
runtime.channel.line injection, delivery ordering and recovery behavior.

Move delivery fixtures to scoped module spies without dropping assertions.

Validation: prior 147-case original-diagnostic, fixture-port and cutover
epochs, a full build and a native runtime-barrel import. The later test-only
toReversed correction passed focused lint and the complete changed gate.
Proof is local and synthetic, not real LINE service delivery.
@clawsweeper

clawsweeper Bot commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added channel: line Channel integration: line size: M maintainer Maintainer-authored PR labels Sep 16, 2026
@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 Sep 16, 2026
@clawsweeper

clawsweeper Bot commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 16, 2026, 8:22 PM ET / September 17, 2026, 00:22 UTC (Revision 3).

ClawSweeper review

What this changes

LINE auto-reply delivery imports its existing helpers directly, removes fixed wiring from the monitor, and moves test substitutions into scoped module spies.

Merge readiness

✅ Ready for maintainer review

Keep open: this remains a distinct, focused cleanup, and no actionable introduced defect was found. The protected maintainer signal also excludes automatic closure.

Priority: P3
Reviewed head: 1c0801ae2cdf2521ccd8c1c3b9b5fed5a02d4518

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, behavior-preserving cleanup with retained regression coverage and no actionable findings.
Proof confidence 🌊 off-meta tidepool Not applicable: The supplied maintainer-author classification exempts this internal consolidation from the external-contributor proof gate. Reported validation covers the delivery owner through synthetic loopback HTTP and runtime loading; it does not establish live LINE account delivery, and the diff introduces no material authority change.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The supplied maintainer-author classification exempts this internal consolidation from the external-contributor proof gate. Reported validation covers the delivery owner through synthetic loopback HTTP and runtime loading; it does not establish live LINE account delivery, and the diff introduces no material authority change.
Evidence reviewed 8 items Pinned production change: The introduced production diff replaces the fixed dependency object with the same helper imports previously supplied by the monitor. The callback remains before push fallback, with batching, token consumption and partial-delivery handling preserved.
Still distinct from current main: Fetched main retains LineAutoReplyDeps and the deps parameter. The proposed consolidation is therefore still absent from the reviewed main revision.
Complete private caller cutover: Repository-wide production references identify the monitor as the helper's sole caller. Public barrels do not expose this helper, and outbound delivery retains its separate runtime.channel.line injection boundary.
Findings None None.
Security None None.

How this fits together

The LINE monitor passes generated replies and conversation details to the delivery helper. That helper renders content, batches reply-token and push requests, and reports delivery outcomes back to the monitor.

flowchart TD
  A[Generated reply and conversation] --> B[LINE monitor]
  B --> C[Auto-reply delivery]
  C --> D[Canonical content helpers]
  D --> E[Reply token or push batches]
  E --> F[LINE transport]
  F --> G[Delivery outcome]
  G --> B
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source -47, Tests -20. Total -67 across 9 files.

View PR surface stats
Area Files Added Removed Net
Source 2 32 79 -47
Tests 7 134 154 -20
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 9 166 233 -67

Review metrics

None.

Technical review

Best possible solution:

Keep fixed helper selection inside LINE delivery while preserving contextual callbacks, delivery semantics and the genuine outbound runtime injection boundary.

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

Not applicable: this PR removes redundant private wiring rather than reporting a broken user flow.

Is this the best way to solve the issue?

Yes: the sole production caller supplied these same helpers, so direct imports remove duplication without replacing a supported extension point.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against a11a431e380f.

Labels

Label justifications:

  • P3: This is a bounded internal cleanup with no intended 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: The supplied maintainer-author classification exempts this internal consolidation from the external-contributor proof gate. Reported validation covers the delivery owner through synthetic loopback HTTP and runtime loading; it does not establish live LINE account delivery, and the diff introduces no material authority change.

Evidence

What I checked:

  • Pinned production change: The introduced production diff replaces the fixed dependency object with the same helper imports previously supplied by the monitor. The callback remains before push fallback, with batching, token consumption and partial-delivery handling preserved. (extensions/line/src/auto-reply-delivery.ts:95, 1c0801ae2cdf)
  • Still distinct from current main: Fetched main retains LineAutoReplyDeps and the deps parameter. The proposed consolidation is therefore still absent from the reviewed main revision. (extensions/line/src/auto-reply-delivery.ts:32, a11a431e380f)
  • Complete private caller cutover: Repository-wide production references identify the monitor as the helper's sole caller. Public barrels do not expose this helper, and outbound delivery retains its separate runtime.channel.line injection boundary. (extensions/line/src/monitor.ts:266, 1c0801ae2cdf)
  • Fixture lifecycle and retained coverage: The fixture captures implementations before installing spies and restores its owned spies after each case. Reviewed tests retain assertions for message ordering, quotes, media, rejected replies, partial delivery and overflow recovery. (extensions/line/src/auto-reply-delivery.test-helpers.ts:30, 1c0801ae2cdf)
  • Validation scope and review continuity: The captured PR body reports matching 147-case runs, build/runtime-import validation, and a completed changed gate; it explicitly disclaims live LINE service coverage. The inspected loopback test calls the delivery owner and real send helpers through redirected HTTP, including rejected-card recovery. Previous reviews at this same head retain no findings or published rank-up moves. This review ran no tests or target code. (extensions/line/src/row-overflow-delivery.loopback.test.ts:539, 1c0801ae2cdf)
  • Feature-history routing: Current-main history contains repeated delivery, recovery and refactoring work by Eden and Peter Steinberger. GitHub commit reads map the sampled commits to edenfunf and steipete; these support routing suggestions, not causal attribution. (extensions/line/src/auto-reply-delivery.ts, a11a431e380f)

Likely related people:

  • edenfunf: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • steipete: 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.

History

Review history (2 earlier review cycles)
  • reviewed 2026-09-16T12:22:40.260Z sha 1c0801a :: needs maintainer review before merge. :: none
  • reviewed 2026-09-16T12:31:12.593Z sha 1c0801a :: needs maintainer review before merge. :: none

@steipete
steipete marked this pull request as ready for review September 16, 2026 12:26
@steipete steipete self-assigned this Sep 17, 2026
@steipete
steipete merged commit 85ee6a5 into main Sep 17, 2026
168 checks passed
@steipete
steipete deleted the codex/line-auto-reply-owner47-7ad branch September 17, 2026 01:21
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 17, 2026
Remove the fixed dependency bag and monitor forwarding in favor of the
existing delivery owners. Preserve the contextual reply-error callback,
runtime.channel.line injection, delivery ordering and recovery behavior.

Move delivery fixtures to scoped module spies without dropping assertions.

Validation: prior 147-case original-diagnostic, fixture-port and cutover
epochs, a full build and a native runtime-barrel import. The later test-only
toReversed correction passed focused lint and the complete changed gate.
Proof is local and synthetic, not real LINE service delivery.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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