Skip to content

fix(commands): restore tool inventory for dynamic models - #119306

Merged
vincentkoc merged 7 commits into
mainfrom
fix/qa-telegram-live-timeout
Aug 4, 2026
Merged

vincentkoc merged 7 commits into
mainfrom
fix/qa-telegram-live-timeout

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Aug 4, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Fixes an issue where /tools could return a temporary inventory failure for dynamic-provider sessions because the command tried to resolve tools before publishing or borrowing the prepared runtime model context.

The Beta 8 release lane also reproduced a separate current-main gate failure: two removed OPENCLAW_* names left the environment-variable ratchet at 515 while the observed production count is 513.

Why This Change Was Made

The command now follows the existing Gateway owner boundary: resolve the effective runtime model context asynchronously, then pass that prepared context into the synchronous tool-inventory projection. The Telegram release-QA scenario uses the established model-aware live-turn timeout and asserts the full expected reply so fallback errors remain visible.

The environment-variable budget is lowered from 515 to 513, matching the repository checker and restoring check:changed on current main.

User Impact

Users running /tools with dynamically prepared models receive the tool inventory instead of a temporary failure. Release validation waits for the provider-aware Telegram response budget without accepting an unexpected reply as success.

Evidence

No changelog edit: the release-owned entry was removed per review, and release generation remains the owner for the eventual note.

Punchcard-Session: amber-workshop-river-yr

@vincentkoc vincentkoc self-assigned this Aug 4, 2026
@vincentkoc
vincentkoc force-pushed the fix/qa-telegram-live-timeout branch from 6527de0 to 01f629a Compare August 4, 2026 18:29
@openclaw-mantis

openclaw-mantis Bot commented Aug 4, 2026 •

Copy link
Copy Markdown
Contributor

Mantis Telegram Live QA

Summary: Mantis ran the Telegram live QA lane with Convex-leased credentials, rendered a redacted transcript in a Crabbox desktop browser, and captured screenshot/video evidence for PR review.

Telegram live transcript

Rendered Telegram live transcript in a Crabbox desktop browser

Telegram motion preview

Animated Telegram live transcript capture

Motion-trimmed clips:

Full videos:

Raw QA files: https://artifacts.openclaw.ai/mantis/telegram-live/pr-119306/run-30954874075-1/index.json

@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. mantis: telegram-visible-proof Mantis should capture Telegram visible proof. P2 Normal backlog priority with limited blast radius. labels Aug 4, 2026
@clawsweeper

clawsweeper Bot commented Aug 4, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 4, 2026, 6:09 PM ET / 22:09 UTC.

ClawSweeper review

What this changes

This PR gives the Telegram /tools compact QA scenario a model-aware live timeout, prepares its model context before resolving the tool list, adds regressions, and lowers the environment-variable count ratchet to the observed total.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

Keep open for maintainer review: the patch uses the existing asynchronous model-context owner before building /tools inventory and applies the established live-turn timeout pattern to the Telegram QA scenario. The draft is behind main and needs fresh exact-head automation validation; the prepared media does not visibly show the claimed Telegram reply.

Priority: P2
Reviewed head: caafd02384d6cc5e1b437f6efe9eaf0e60849867

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The implementation and focused coverage are coherent, while the supplied visual artifact does not itself demonstrate the reported Telegram result.
Proof confidence 🦐 gold shrimp (3/6) Not applicable: The PR author is a repository MEMBER, so the external-contributor proof gate does not apply; a Mantis live-QA result is supplied, although its prepared images do not visibly show the transcript.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The PR author is a repository MEMBER, so the external-contributor proof gate does not apply; a Mantis live-QA result is supplied, although its prepared images do not visibly show the transcript.
Evidence reviewed 7 items Current model-context owner: The shared async helper handles an unpublished prepared-model owner by acquiring a read-only snapshot and resolves the runtime model before inventory projection.
Existing sibling caller: Gateway effective-tools resolution already obtains the same async model context and passes it into the synchronous inventory resolver, establishing the owner-boundary pattern used here.
Exact-head command repair: The PR resolves model context once after authorization and passes it to inventory resolution, avoiding the synchronous unresolved-owner path.
Findings None None.
Security None None.

How this fits together

Telegram release QA sends a native /tools compact command through the gateway and waits for the reply. The command handler obtains model-aware tool availability, which is rendered back to Telegram and checked by the QA scenario.

flowchart LR
  A[Telegram compact command] --> B[Command handler]
  B --> C[Model context lease]
  C --> D[Tool inventory]
  D --> E[Telegram reply]
  E --> F[QA scenario timeout]
Loading

Before merge

  • Resolve merge risk (P1) - Merging changes release-QA automation: the draft is behind main and its current-head checks are skipped, so the model-aware wait and exact scenario need a fresh run after rebase or readiness refresh.
  • Resolve merge risk (P1) - The prepared PNG and GIF show a blank Crabbox terminal rather than the claimed Telegram transcript; the linked live-QA result is useful supplemental evidence but not directly inspectable visual proof.
  • Complete next step (P2) - No repair job is warranted: there is no actionable patch defect, while draft readiness and exact-head release-QA validation remain maintainer-controlled.
Agent review details

Security

None.

PR surface

Source +13, Tests +76, Other 0. Total +89 across 5 files.

View PR surface stats
Area Files Added Removed Net
Source 1 14 1 +13
Tests 2 76 0 +76
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 2 3 3 0
Total 5 93 4 +89

Review metrics

Metric Value Why it matters
Runtime versus test delta runtime +13/-1; QA/config +3/-3; tests +76/-0 The runtime growth has a concrete owner-boundary justification; most added lines are focused regression coverage.
Environment-name budget 515 → 513; observed production count 513 The ratchet remains exact, so automation will not fail from a stale environment-variable baseline.

Mantis proof suggestion

A fresh Mantis transcript would turn the currently blank prepared media into directly reviewable proof of the changed Telegram command behavior. A maintainer can ask Mantis to capture proof by posting this exact PR comment:

@openclaw-mantis telegram live: verify and capture a redacted transcript showing `/tools compact` returns the compact inventory after the model-aware timeout change.

Merge-risk options

Maintainer options:

  1. Refresh exact-head QA proof (recommended)
    Rebase or mark the draft ready, run the Telegram compact-tools QA scenario on the resulting head, and attach a redacted transcript or artifact that visibly shows the reply.
  2. Accept the existing run record
    A maintainer may accept the reported Mantis run as sufficient if the linked Action artifact independently confirms the candidate output.

Technical review

Best possible solution:

Retain the shared model-context handoff and model-aware timeout, then land only after an exact-head Telegram QA run confirms the inventory reply and supplies a visible redacted transcript or equivalent artifact.

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

Yes: current source shows the fixed 60-second Telegram wait while the repository already provides a model-aware live-turn helper; the supplied live-QA report describes the observed timeout path.

Is this the best way to solve the issue?

Yes: reusing the established async model-context handoff and live-turn timeout is narrower and more maintainable than adding a Telegram-specific timeout or a second inventory resolver.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 44f3747daacf.

Labels

Label changes:

  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp 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 author is a repository MEMBER, so the external-contributor proof gate does not apply; a Mantis live-QA result is supplied, although its prepared images do not visibly show the transcript.
  • remove rating: 🧂 unranked krab: Current PR rating is rating: 🦐 gold shrimp, so this older rating label is no longer current.
  • remove status: 📣 needs proof: Current PR status label is status: 👀 ready for maintainer look.
  • remove proof: 📸 screenshot: Current real behavior proof evidence kind is not_applicable.

Label justifications:

  • P2: This repairs release-QA reliability for a bounded Telegram command scenario without evidence of an immediate end-user runtime outage.
  • merge-risk: 🚨 automation: The patch changes a live Telegram QA timeout and its environment-variable count gate, both of which affect release automation beyond ordinary unit coverage.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp 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 author is a repository MEMBER, so the external-contributor proof gate does not apply; a Mantis live-QA result is supplied, although its prepared images do not visibly show the transcript.
  • mantis: telegram-visible-proof: Mantis should capture Telegram visible proof. The changed /tools compact Telegram reply is directly visible in a short live transcript and is suitable for Telegram proof.

Evidence

What I checked:

Likely related people:

  • Shakker: Current-main blame attributes the command and model-context lines to the same recent commit; the available local history is shallow, so longer-term ownership is uncertain. (role: recent current-main contributor; confidence: medium; commits: 77dd5cd3d9a1; files: src/auto-reply/reply/commands-info.ts, src/agents/tools-effective-inventory.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Refresh the Telegram live-QA run on the exact merge head and attach a redacted transcript, terminal output, or artifact that visibly shows /tools compact returning the inventory.

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 (3 earlier review cycles)
  • reviewed 2026-08-04T20:04:12.601Z sha 78f430323b995be967a3efb50d34ff1d8ce7523c :: needs maintainer review before merge. :: none
  • reviewed 2026-08-04T20:12:52.403Z sha ee564b3ff20f4a10964eadf9120d4bb7c7435acd :: needs maintainer review before merge. :: none
  • reviewed 2026-08-04T21:04:46.548Z sha 72a1fea084d1e436fabff939b285370b602c36a4 :: found issues before merge. :: [P2] Remove the release-owned changelog entry

@clawsweeper clawsweeper Bot added proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. and removed 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 4, 2026
@vincentkoc
vincentkoc force-pushed the fix/qa-telegram-live-timeout branch from ee564b3 to 72a1fea Compare August 4, 2026 20:55
@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Aug 4, 2026
@vincentkoc
vincentkoc force-pushed the fix/qa-telegram-live-timeout branch from 72a1fea to 8aff719 Compare August 4, 2026 21:28
Punchcard-Session: amber-workshop-river-yr
Punchcard-Session: amber-workshop-river-yr
Punchcard-Session: amber-workshop-river-yr
Punchcard-Session: amber-workshop-river-yr
Punchcard-Session: amber-workshop-river-yr
@vincentkoc
vincentkoc force-pushed the fix/qa-telegram-live-timeout branch from 8aff719 to e8b83b8 Compare August 4, 2026 21:55
Punchcard-Session: amber-workshop-river-yr
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Aug 4, 2026
@vincentkoc vincentkoc changed the title fix(qa): scale Telegram compact command timeout fix(commands): restore tool inventory for dynamic models Aug 4, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review August 4, 2026 22:35
@vincentkoc
vincentkoc merged commit fb81d03 into main Aug 4, 2026
197 of 205 checks passed
@vincentkoc
vincentkoc deleted the fix/qa-telegram-live-timeout branch August 4, 2026 22:57
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Aug 5, 2026
Punchcard-Session: crisp-lantern-orchard-nv

* origin/main:
  perf(memory): defer session backfill runtime (#119372)
  fix(ci): isolate built TUI PTY fixture (#119339)
  fix(commands): restore tool inventory for dynamic models (#119306)
  fix(media): release rejected BytePlus and Runway video downloads under debug capture (#119257)
  docs: add ChromeOS (Crostini) platform install guide (#107663)
  test(msteams): serve JWKS from in-process server in auth coverage (#119354)
  fix(qa): enable OpenAI for stored audio scenario (#119349)
  test(agents): realpath apply-patch temp dir fixture (#119353)
  test(slack): drop redundant .js-suffixed system-event mock (#119352)
  fix(exec): leave safe builtins unrewritten in enforced mode (#119351)
  fix(sessions): keep gateway responsive while large transcript archives are built (#112424)
  fix(tui): restore provider auth in installed local mode (#119283)
vincentkoc added a commit that referenced this pull request Aug 5, 2026
…time

* origin/main: (75 commits)
  fix(commands): restore tool inventory for dynamic models (#119306)
  fix(media): release rejected BytePlus and Runway video downloads under debug capture (#119257)
  docs: add ChromeOS (Crostini) platform install guide (#107663)
  test(msteams): serve JWKS from in-process server in auth coverage (#119354)
  fix(qa): enable OpenAI for stored audio scenario (#119349)
  test(agents): realpath apply-patch temp dir fixture (#119353)
  test(slack): drop redundant .js-suffixed system-event mock (#119352)
  fix(exec): leave safe builtins unrewritten in enforced mode (#119351)
  fix(sessions): keep gateway responsive while large transcript archives are built (#112424)
  fix(tui): restore provider auth in installed local mode (#119283)
  fix(release): accept legacy empty core artifacts (#119337)
  fix(qa): carry selected runtime into flow scenarios (#119324)
  fix(ci): retry interrupted Windows dashboard release checks (#119095)
  fix(release): filter validation ancestry fetch (#119334)
  fix(release): accept trusted extended-stable validation evidence (#119264)
  fix(sessions): preserve recorder-owned user turns (#119307)
  perf(cli): split plugin registry startup timing (#119318)
  fix(qa): align release scenario setup and compaction proof (#119188)
  fix(ci): avoid duplicate Matrix release QA runs (#119171)
  perf(agents): reuse provider policy manifest registry (#119305)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 5, 2026
…9306)

* fix(qa): scale Telegram compact command timeout

* fix(qa): surface Telegram compact reply failures

Punchcard-Session: amber-workshop-river-yr

* fix(commands): prepare tool inventory model context

Punchcard-Session: amber-workshop-river-yr

* test(commands): type runtime context mock

Punchcard-Session: amber-workshop-river-yr

* docs(changelog): note tool inventory repair

Punchcard-Session: amber-workshop-river-yr

* chore(release): defer tool inventory note

Punchcard-Session: amber-workshop-river-yr

* fix(ci): lower environment variable budget

Punchcard-Session: amber-workshop-river-yr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extensions: qa-lab maintainer Maintainer-authored PR mantis: telegram-visible-proof Mantis should capture Telegram visible proof. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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