Repository navigation
refactor(line): simplify auto-reply helper ownership - #150043
Conversation
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.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 16, 2026, 8:22 PM ET / September 17, 2026, 00:22 UTC (Revision 3). ClawSweeper reviewWhat this changesLINE 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 Review scores
Verification
How this fits togetherThe 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
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource -47, Tests -20. Total -67 across 9 files. View PR surface stats
Review metricsNone. Technical reviewBest 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. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
Merged via squash.
|
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.
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.lineinjection 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
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.