Skip to content

refactor: narrow bundled session runtime barrels#96507

Merged
jalehman merged 1 commit into
openclaw:mainfrom
jalehman:josh/path3-runtime-barrel-cleanup
Jun 24, 2026
Merged

refactor: narrow bundled session runtime barrels#96507
jalehman merged 1 commit into
openclaw:mainfrom
jalehman:josh/path3-runtime-barrel-cleanup

Conversation

@jalehman

Copy link
Copy Markdown
Contributor

What Problem This Solves

Path 3.1b still had Feishu and Mattermost bundled runtime barrels exporting deprecated session whole-store helpers even though the remaining production callers only need targeted session-entry reads. That kept private bundled runtime/API surfaces wider than the accessor migration needs.

Why This Change Was Made

The runtime read paths can use the existing session accessor seam directly while preserving current behavior, including latest-read semantics and Mattermost parent model-override inheritance. Feishu doctor/migration code keeps its file-backed compatibility import because doctor cleanup is the correct owner for that legacy whole-store mutation.

User Impact

No user-visible behavior change is intended. Feishu reasoning previews and Mattermost model-picker summaries continue to read the same session metadata, but the bundled runtime barrels no longer expose deprecated whole-store helpers for those hot paths.

Evidence

  • node scripts/run-vitest.mjs extensions/feishu/src/reasoning-preview.test.ts extensions/mattermost/src/mattermost/model-picker.test.ts src/plugin-sdk/session-store-runtime.test.ts test/scripts/check-session-accessor-boundary.test.ts passed 4 Vitest shards.
  • node scripts/check-session-accessor-boundary.mjs passed.
  • git diff --check passed.
  • AGENTS_HOME="$HOME/.agents" "$HOME/.agents/skills/autoreview/scripts/autoreview" --mode branch --base upstream/main reported no accepted/actionable findings.
  • Live local OpenClaw proof was judged unnecessary for this slice because it is private API/barrel cleanup plus unit-covered targeted read-path preservation, not a live gateway behavior change.

Refs #88838

@openclaw-barnacle openclaw-barnacle Bot added channel: mattermost Channel integration: mattermost scripts Repository scripts channel: feishu Channel integration: feishu size: S maintainer Maintainer-authored PR labels Jun 24, 2026
@clawsweeper

clawsweeper Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed June 24, 2026, 1:07 PM ET / 17:07 UTC.

Summary
This PR moves Feishu reasoning-preview and Mattermost model-picker runtime reads from deprecated whole-store session helpers to targeted getSessionEntry reads, adds an optional latest-read parameter, and updates the boundary guard coverage.

PR surface: Source +38, Tests +75, Other +2. Total +115 across 11 files.

Reproducibility: not applicable. this is a refactor/private API cleanup PR, not a bug report with a failing user flow. The behavior-preservation claim is source-checkable through the accessor and model override paths plus focused tests.

Review metrics: 1 noteworthy metric.

  • Plugin SDK read surface: 1 optional parameter added. session-store-runtime is a plugin SDK subpath, so maintainers should notice the additive latest-read option before merge even though it is not a breaking change.

Stored data model
Persistent data-model change detected: serialized state: extensions/mattermost/src/mattermost/model-picker.test.ts, serialized state: src/plugin-sdk/session-store-runtime.ts. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster
Relationship: fixed_by_candidate
Canonical: #88838
Summary: This PR is an implementation slice for the broader session/transcript accessor migration tracker, not an independent root-cause report.

Members:

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

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🌊 off-meta tidepool
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • none.

Risk before merge

  • [P1] Some broad CI shards were still in progress at review time; no branch-attributable failure was visible in the checks inspected.

Maintainer options:

  1. Decide the mitigation before merge
    Keep this in the normal maintainer PR flow, with final merge gated on the remaining CI and any maintainer review for the protected label.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge

  • [P1] No ClawSweeper repair lane is needed because no narrow actionable defect was found; the protected maintainer-labeled PR should stay in normal review/CI flow.

Security
Cleared: The diff does not change dependencies, lockfiles, CI permissions, secret handling, install hooks, or external code execution paths.

Review details

Best possible solution:

Keep this in the normal maintainer PR flow, with final merge gated on the remaining CI and any maintainer review for the protected label.

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

Not applicable; this is a refactor/private API cleanup PR, not a bug report with a failing user flow. The behavior-preservation claim is source-checkable through the accessor and model override paths plus focused tests.

Is this the best way to solve the issue?

Yes; this is the best current shape for this slice because it reuses the existing session accessor seam, preserves Feishu latest-read semantics, and preserves Mattermost parent model override inheritance without widening private runtime barrels.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 4ae0a5d958a0.

Label changes

Label changes:

  • add P3: This is a low-risk cleanup/refactor slice with no intended 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: The PR is maintainer-labeled private API/barrel cleanup with focused source and unit proof; the external contributor real-behavior proof gate does not apply here.

Label justifications:

  • P3: This is a low-risk cleanup/refactor slice 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 PR is maintainer-labeled private API/barrel cleanup with focused source and unit proof; the external contributor real-behavior proof gate does not apply here.
Evidence reviewed

PR surface:

Source +38, Tests +75, Other +2. Total +115 across 11 files.

View PR surface stats
Area Files Added Removed Net
Source 7 56 18 +38
Tests 3 85 10 +75
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 2 0 +2
Total 11 143 28 +115

What I checked:

  • Root and scoped policy read: Read root AGENTS.md plus extensions/AGENTS.md, src/plugin-sdk/AGENTS.md, scripts/AGENTS.md, and test/AGENTS.md; plugin/SDK boundary guidance drove the review of private barrels, SDK subpath changes, and boundary guard coverage. (AGENTS.md:1, 4ae0a5d958a0)
  • Full PR diff inspected: The patch removes Feishu/Mattermost private-barrel whole-store exports, migrates the two runtime read paths to targeted accessors, and adds focused tests for Feishu latest reads and Mattermost parent override inheritance. (extensions/mattermost/src/mattermost/model-picker.ts:236, 10b26fd3850e)
  • Accessor contract supports latest reads: Current main already has SessionAccessScope.readConsistency?: "latest" and loadSessionEntry bypasses cache when latest consistency is requested; the PR threads that existing internal contract through the SDK runtime adapter. (src/config/sessions/session-accessor.ts:907, 4ae0a5d958a0)
  • Mattermost parent inheritance compared against shared helper: resolveStoredModelOverride already accepts a parent session key plus a store map; the PR preserves that behavior by targeted-reading the parent entry and passing a one-entry map rather than exposing the whole store to the UI path. (src/auto-reply/reply/stored-model-override.ts:36, 4ae0a5d958a0)
  • Related tracker context: The linked tracker explicitly lists this PR as the current 3.1b bundled Feishu/Mattermost runtime-barrel cleanup and says live proof is not required for this private API/barrel slice.
  • CI and local evidence checked: The PR body reports focused Vitest, boundary guard, git diff --check, and branch autoreview; live check data showed check-session-accessor-boundary, check-prod-types, check-lint, check-test-types, and security scans succeeded while some broad CI shards were still running. (10b26fd3850e)

Likely related people:

  • jalehman: Recent merged history on src/plugin-sdk/session-store-runtime.ts and the linked tracker shows repeated Path 3 session-accessor migration slices and boundary guard updates. (role: recent session-accessor stack contributor; confidence: high; commits: b58e6e0734f2, acc2a0ee7297, c588606a9bf3; files: src/plugin-sdk/session-store-runtime.ts, scripts/check-session-accessor-boundary.mjs, test/scripts/check-session-accessor-boundary.test.ts)
  • steipete: History on the Mattermost model-picker and plugin SDK session helper surfaces includes model catalog extraction, Mattermost picker maintenance, SDK surface reduction, and session entry workflow helpers. (role: adjacent plugin SDK and Mattermost area contributor; confidence: medium; commits: 30e1556cdac9, c4a5bba800d7, 827b0de0ce74; files: extensions/mattermost/src/mattermost/model-picker.ts, src/plugin-sdk/session-store-runtime.ts)
  • vincentkoc: History on Feishu reasoning preview and the session SQLite rollback path makes this a relevant routing candidate for Feishu behavior and migration safety. (role: adjacent Feishu/session migration contributor; confidence: medium; commits: d609f71c9b74, 7f1d82ab2518; files: extensions/feishu/src/reasoning-preview.ts, src/plugin-sdk/session-store-runtime.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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.

How this review workflow works
  • 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.

@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 Jun 24, 2026
@jalehman jalehman changed the title refactor(path3): narrow bundled session runtime barrels refactor: narrow bundled session runtime barrels Jun 24, 2026
@jalehman
jalehman merged commit 4d4769c into openclaw:main Jun 24, 2026
209 of 217 checks passed
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jun 25, 2026
QiuYuang pushed a commit to QiuYuang/openclaw that referenced this pull request Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: feishu Channel integration: feishu channel: mattermost Channel integration: mattermost 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. scripts Repository scripts size: S 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