Skip to content

refactor: share LINE message context test fixtures - #157488

Merged
steipete merged 1 commit into
mainfrom
codex/test-line-message-context-fixtures
Sep 24, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/test-line-message-context-fixtures

Conversation

@steipete

@steipete steipete commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Related: #139428

What Problem This Solves

LINE message-context tests repeat the same request defaults at 36 call sites.

User Impact

No user-visible change. All 53 cases retain their event inputs, routing and content assertions.

Why This Change Was Made

A local typed helper reads the current per-case config and retains the account reference while creating a fresh request and default media array. Explicit media/config/account overrides and false authorization values remain at their call sites. This removes 149 test lines without production changes or new test seams.

Evidence

Original and candidate complete files each passed all 53 cases with exact ordered file/name/status parity. The approved proposal's 36 input-field maps and byte-exact inverse are retained; formatting preserves its structural AST. The complete mapped changed gate passed, and independent P2 review found no actionable issues.

With --maxWorkers=1, original command wall time was 30.01 seconds with a compiler-cache miss (13.548 seconds preparation), and candidate wall time was 19.99 seconds with a cache hit (3.974 seconds preparation). These are different preparation conditions, not a speedup comparison. Native cleanup completed with empty owned TMP and no new process holders.

Hosted CI and Workflow Sanity are green. The Linux LINE test job passed all 53 cases with matching ordered names, reporting 41.81 seconds Vitest duration (45-second test step; 80-second job including setup).

@clawsweeper

clawsweeper Bot commented Sep 24, 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 labels Sep 24, 2026
@steipete
steipete marked this pull request as ready for review September 24, 2026 18:38
@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 24, 2026
@clawsweeper

clawsweeper Bot commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 24, 2026, 3:05 PM ET / 19:05 UTC.

ClawSweeper review

What this changes

The branch replaces repeated defaults in LINE message-context tests with a typed local helper while retaining case-specific inputs and assertions.

Merge readiness

✅ Ready for maintainer review

Keep open. This is a useful, bounded part of the linked test-audit campaign, and the shared fixture is absent from current main and the latest release. I found no actionable defect in the introduced change.

Priority: P3
Reviewed head: 7e49284ba70f319f32490cedb6e94b3828862132

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused test cleanup with retained case coverage, head-pinned CI, and no identified correctness or security blocker.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: The branch changes only a test-local helper; the production LINE handler and context builder are unchanged. The reported before-and-after case parity and successful head-pinned hosted job support this cleanup, while no product runtime behavior is claimed and no stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The branch changes only a test-local helper; the production LINE handler and context builder are unchanged. The reported before-and-after case parity and successful head-pinned hosted job support this cleanup, while no product runtime behavior is claimed and no stored-data contract changes.
Evidence reviewed 9 items Introduced helper: The pinned PR delta adds a local helper that supplies fresh default media and spreads per-case overrides after the defaults.
Case-specific coverage: The changed tests retain explicit false authorization, media, account, and config inputs, alongside their assertions.
Production boundary: The LINE handler passes its resolved event, media, account, authorization, and history to the production context builder; the PR does not change this path.
Findings None None.
Security None None.

How this fits together

The LINE plugin turns webhook events, account settings, media, and access decisions into an agent-facing message context and route. This PR changes the tests for that conversion.

flowchart LR
  A[LINE webhook event] --> D[LINE handler]
  B[Account and config] --> D
  C[Media and access decision] --> D
  D --> E[Message context builder]
  E --> F[Agent context and route]
  G[Test fixture and assertions] --> E
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests -149. Total -149 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 67 216 -149
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 67 216 -149

Review metrics

Metric Value Why it matters
Retained LINE cases 53 before, 53 after The reported parity shows the line reduction did not remove test cases.

Root-cause cluster

Relationship: partial_overlap
Canonical: #139428
Summary: This PR is one bounded LINE test-fixture batch within the broader open test-audit campaign.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Technical review

Best possible solution:

Retain the suite-local helper and its explicit exceptional cases, then land the cleanup through normal review and merge gates.

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

Not applicable: the PR reports duplicate test setup, not a product failure. The introduced diff and hosted suite result provide the relevant preservation checks.

Is this the best way to solve the issue?

Yes: a typed helper local to this suite removes repeated setup while keeping the production call and exceptional test inputs explicit.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 0603d46c1b76.

Labels

Label changes:

  • add P3: This is test-maintenance cleanup with no user-visible behavior change.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit 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: The branch changes only a test-local helper; the production LINE handler and context builder are unchanged. The reported before-and-after case parity and successful head-pinned hosted job support this cleanup, while no product runtime behavior is claimed and no stored-data contract changes.

Label justifications:

  • P3: This is test-maintenance cleanup with no user-visible behavior change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit 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 branch changes only a test-local helper; the production LINE handler and context builder are unchanged. The reported before-and-after case parity and successful head-pinned hosted job support this cleanup, while no product runtime behavior is claimed and no stored-data contract changes.

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)
  • edenfunf: 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
steipete merged commit 37783fc into main Sep 24, 2026
181 checks passed
@steipete
steipete deleted the codex/test-line-message-context-fixtures branch September 24, 2026 19:14
vincentkoc added a commit that referenced this pull request Sep 24, 2026
* commit 'a0905dfe5c17053a3f0ef2aa0cf8f421bce9381c': (75 commits)
  fix: preserve conversation titles across split-pane agent switches (#157482)
  test(gateway): settle resumed work before checking announcement
  fix(update): avoid socket-arrival assumptions in deadline tests (#157504)
  fix(ci): include Android Access in release coordination
  refactor: share LINE message context test fixtures (#157488)
  refactor(matrix): reuse startup verification account key (#157310)
  perf(config): avoid repeated environment scans during publication (#156457)
  chore(i18n): refresh native locales (#157495)
  fix(update): show quiet step progress and date recorded outcomes (#153407)
  feat(gateway): preserve browser sign-in requirements before connecting (#157454)
  test(scripts): await CLI admission fixture lifetimes (#157424)
  fix(ci): preserve consumer selection across core type stripes (#157373)
  fix(wizard): preserve typed plugin enum values (#127577) (#138090)
  fix(qa): title mock Code Mode fixture calls
  refactor: simplify SQLite worker lifecycle and test fixtures (#157458)
  test: prebuild run-node signal fixture (#157478)
  refactor(exec): reuse approval policy rule keys (#157198)
  fix(ci): reuse prepared runtime for changed-target E2E shards (#157365)
  fix(config): apply Gateway writes without waiting for file events (#157372)
  fix: count recorded nested tool operations once (#157438)
  ...
vincentkoc added a commit that referenced this pull request Sep 24, 2026
* refactor(acp): consolidate scalar runtime option validation

* chore: merge main for ACP validation

* commit 'a0905dfe5c17053a3f0ef2aa0cf8f421bce9381c': (75 commits)
  fix: preserve conversation titles across split-pane agent switches (#157482)
  test(gateway): settle resumed work before checking announcement
  fix(update): avoid socket-arrival assumptions in deadline tests (#157504)
  fix(ci): include Android Access in release coordination
  refactor: share LINE message context test fixtures (#157488)
  refactor(matrix): reuse startup verification account key (#157310)
  perf(config): avoid repeated environment scans during publication (#156457)
  chore(i18n): refresh native locales (#157495)
  fix(update): show quiet step progress and date recorded outcomes (#153407)
  feat(gateway): preserve browser sign-in requirements before connecting (#157454)
  test(scripts): await CLI admission fixture lifetimes (#157424)
  fix(ci): preserve consumer selection across core type stripes (#157373)
  fix(wizard): preserve typed plugin enum values (#127577) (#138090)
  fix(qa): title mock Code Mode fixture calls
  refactor: simplify SQLite worker lifecycle and test fixtures (#157458)
  test: prebuild run-node signal fixture (#157478)
  refactor(exec): reuse approval policy rule keys (#157198)
  fix(ci): reuse prepared runtime for changed-target E2E shards (#157365)
  fix(config): apply Gateway writes without waiting for file events (#157372)
  fix: count recorded nested tool operations once (#157438)
  ...

Co-authored-by: Vincent Koc <[email protected]>
@roboclaw-bot roboclaw-bot mentioned this pull request Sep 24, 2026
2 of 8 tasks
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 25, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 25, 2026
…#157446)

* refactor(acp): consolidate scalar runtime option validation

* chore: merge main for ACP validation

* commit 'a2532ef8d2eb80fd2fd391ef7ea645c051f8be9c': (75 commits)
  fix: preserve conversation titles across split-pane agent switches (openclaw#157482)
  test(gateway): settle resumed work before checking announcement
  fix(update): avoid socket-arrival assumptions in deadline tests (openclaw#157504)
  fix(ci): include Android Access in release coordination
  refactor: share LINE message context test fixtures (openclaw#157488)
  refactor(matrix): reuse startup verification account key (openclaw#157310)
  perf(config): avoid repeated environment scans during publication (openclaw#156457)
  chore(i18n): refresh native locales (openclaw#157495)
  fix(update): show quiet step progress and date recorded outcomes (openclaw#153407)
  feat(gateway): preserve browser sign-in requirements before connecting (openclaw#157454)
  test(scripts): await CLI admission fixture lifetimes (openclaw#157424)
  fix(ci): preserve consumer selection across core type stripes (openclaw#157373)
  fix(wizard): preserve typed plugin enum values (openclaw#127577) (openclaw#138090)
  fix(qa): title mock Code Mode fixture calls
  refactor: simplify SQLite worker lifecycle and test fixtures (openclaw#157458)
  test: prebuild run-node signal fixture (openclaw#157478)
  refactor(exec): reuse approval policy rule keys (openclaw#157198)
  fix(ci): reuse prepared runtime for changed-target E2E shards (openclaw#157365)
  fix(config): apply Gateway writes without waiting for file events (openclaw#157372)
  fix: count recorded nested tool operations once (openclaw#157438)
  ...

Co-authored-by: Vincent Koc <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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