Skip to content

fix: narrow unconfigured GitHub tools in the built-in harness - #197592

Closed
roboclaw-bot wants to merge 3 commits into
mainfrom
openclaw/marine-lobster-3
Closed

roboclaw-bot wants to merge 3 commits into
mainfrom
openclaw/marine-lobster-3

Conversation

@roboclaw-bot

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Fixes the built-in OpenClaw harness offering authenticated GitHub operations after the GitHub owner has confirmed that no publishing identity is configured.

User Impact

Unconfigured built-in listings keep credential-free readiness, setup/status, and original publication-receipt observation without advertising unsupported writes. Public GitHub read/search remain available. Native-default authentication, configured but unhealthy identities, unknown discovery, and possible delegated publishers are preserved; no migration or new setting is required.

Scope: Codex and other native/SDK harnesses without the embedded declaration pin retain their existing listings. Omission there is deferred rather than risking warm-thread rotation or adding a native custody lifecycle. Another configured agent conservatively retains the broader surface because it may own a delegated publishing target.

Why This Change Was Made

The existing GitHub lifecycle publishes authoritative configuration facts off the turn path. Tool construction consumes those facts without reading credentials or probing authentication. Known absence selects a compact readiness-only schema; failed discovery is unknown, not absence. A linked human GitHub account is not treated as the managed bot publisher.

The existing session-prompt owner pins the declaration before catalog compaction, so background discovery cannot rewrite an established provider prefix. Configuration/support changes and explicit refresh re-evaluate it. Fresh execution closures, current authority, private access, direct-only handoffs, and accepted-operation settlement remain with their existing owners.

Evidence

Actual built-product before/after

Matched source builds: BASE 24819901d92ee379b5b36a957276d3b3657d7b79 and the candidate's unchanged production tree. Both use the actual built Gateway and served Control UI, a separately paired synthetic test viewer, visible composer/Send, and the same neutral loopback provider. No mocked baseline Gateway. These are original UTF-8 HTTP body bytes, not JSON reserialization.

Workload BASE body bytes FIX body bytes GitHub actions
Native empty 160,902 154,773 9 → 1
Native configured 160,902 160,902 9 → 9
Native unknown/error 160,902 160,902 9 → 9
Managed configured/unhealthy 160,902 160,902 9 → 9
Existing synthetic uncertain receipt 160,942 154,813 9 → 1
Code Mode, native empty 47,359 41,230 9 → 1
Code Mode, native configured 47,359 47,359 9 → 9

Exactly 6,129 bytes are removed from the publisher definition: 6,954 → 825 bytes. In direct mode tool JSON is 126,204 → 120,075 bytes; system JSON is unchanged at 31,911 and remaining bytes at 2,787 (2,827 for the receipt case). In Code Mode tool JSON is 16,832 → 10,703; system JSON is unchanged at 27,740 and remaining bytes at 2,787. These scopes are not added together.

  • Direct mode retains 57 tools. Code Mode retains 6 direct tools and 54 catalog targets; publishing stays direct-only and public read/search/identity status stay discoverable. Unrelated catalog names were not exhaustively queried.
  • Steady-state construction adds zero native GitHub commands and zero publication-preparation actions. Off-turn sampling adds two commands for empty/unknown, one for configured, and zero for managed-only; explicit status and UI account reads are counted separately.
  • Forty-seven raw bodies are hash-verified across 15 owned test instances. The synthetic failed/dispatched receipt is observed twice with its original request ID, without resubmission; no push occurred.
  • Actual FIX system/tool JSON stays byte-identical after background discovery. A legitimate fixture configuration refresh restores the full declaration. Four catalog and three pin runs have successful terminal receipts. Event-wake/checkpoint-reload coverage is the separate committed production-composition regression.

Checks and review

  • Current affected owner tests: 120 passed; retained public GitHub reader suite: 174 passed. Native host construction is exercised through actual Codex spec conversion/fingerprinting, not a real Codex thread.
  • Core/touched-test typechecks, scoped lint, formatting, diff checks and exact regression allocations pass. Separate +411 owner-regression and +207 browser-workload allocations leave the shared scalar and suppression inventories unchanged.
  • Runtime build passed through the canonical owner after adding the maintained workload; current build/runtime signatures match the source. Four nonfatal UI-size warnings also occur on the untouched baseline. No visual UI changes.
  • The committed browser workload passes on selected BASE and FIX artifacts: two provider POSTs per run, public read/search/status retained, absent publisher 9 → 1 actions and configured-unhealthy publisher 9 → 9. These smaller invocations differ by six system-fragment bytes, so only their tool-object delta is compared; the matched matrix above owns the whole-body result. A replay exposed a screen-reader announcement/visible-reply locator ambiguity; targeting the rendered paragraph in the active pane fixes it, and the repaired case passes. The failure remains recorded.
  • Fresh independent P0–P3 review covers production, the maintained workload and final locator repair; no actionable findings remain. Final local Autoreview (Codex, P0–P3) completed BASE → 8e86fe88d51c135071a05c3b5e550cf57cf2272d with intact owner context: scoped-clean, no findings. The current-head local ClawSweeper attempt failed in its reviewer process (exit 101, no verdict); earlier completed passes are prior-head evidence only. Following the documented maintainer fallback, one hosted review will be requested after publication.
  • Owned Gateways, observers, state roots, fixture providers and Chromium are cleaned up; the test TLS private key was removed. An earlier cleanup-deadline failure remains separately recorded, not relabeled a pass.

Limits: synthetic provider, not real-model quality or live GitHub authentication/publication/private-access proof. No latency, token, billing or cache-performance claim. The matched FIX capture reused audited byte-identical outputs with matching production-source signatures; the original precommit stamp was preserved, not relabeled. The rejected CLI/agent-exec branch remains stopped/unqualified; the independent browser fixture used its own canonical local owner and preserved both attribution markers.

Rerunnable workload: OPENCLAW_E2E_USE_PREBUILT_DIST=1 node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/chat-github-tool-surface.real-gateway.e2e.test.ts --maxWorkers=1. OPENCLAW_GITHUB_TOOL_BUILD_ROOT selects an already-qualified build; OPENCLAW_GITHUB_TOOL_STAGE=base|fix selects the expected declaration. Full evidence and commands are retained in the implementation work session.

Contributor credit

Requested by @vincentkoc, based on the original idea from @jalehman. Commit coauthor credit also includes @GrahamMcBain.

Work sessions

Linked for team reference; these sessions aren’t public.

Worked on by

roboclaw-bot and others added 3 commits November 12, 2026 04:49
Keep credential-free readiness and original receipt observation when the built-in listing owner knows no publisher is configured. Preserve unknown/native/managed selections and pin discovery-dependent declarations through the existing prompt owner. Native harness omission remains deferred.

Co-authored-by: vincentkoc <[email protected]>
Co-authored-by: jalehman <[email protected]>
Co-authored-by: GrahamMcBain <[email protected]>
Exercise an absent publisher and configured-unhealthy identity through a paired synthetic browser and the actual built Gateway. Capture original provider request bytes and action counts without live credentials or publication.

Co-authored-by: vincentkoc <[email protected]>
Co-authored-by: jalehman <[email protected]>
Co-authored-by: GrahamMcBain <[email protected]>
Worked on by:
- @jalehman
- @GrahamMcBain
- @vincentkoc

Co-authored-by: jalehman <[email protected]>
Co-authored-by: GrahamMcBain <[email protected]>
Co-authored-by: vincentkoc <[email protected]>
OpenClaw-Publication: 46ccf8c9-3348-8666-b35f-4e205cbb1daf
@clawsweeper

clawsweeper Bot commented Nov 12, 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 docs Improvements or additions to documentation app: web-ui App: web-ui gateway Gateway runtime agents Agent runtime and tooling extensions: codex size: XL labels Nov 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Security sensitive changes

This maintainer PR changes sensitive security components.

No secops approval is required. This comment is informational because the PR author has Maintain or Admin access.

  • Current SHA: e2d29cd99b7f243823d40e054e3e38b82b0105d0
  • Maintainer: @roboclaw-bot
  • Repository role: maintain

These security sensitive changes were made:

  • src/gateway/github-oauth-lifecycle-helpers.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.
  • src/gateway/github-oauth-lifecycle.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.

Carefully review these changes before merging.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 12, 2026
@clawsweeper

clawsweeper Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR narrows built-in GitHub publication declarations to readiness when no publishing identity is configured, while preserving session prompt stability.

Example: A new built-in session has authoritative confirmation that no GitHub publisher is configured.

  • Before: github_publish advertises 9 actions, including authenticated operations.
  • After: github_publish advertises readiness only; public read, search, identity status, and existing receipt observation remain available.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Useful, coherent implementation with production-entry-point results and focused lifecycle regressions; optional checkpoint metadata requires no migration, and native behavior remains unchanged.
Proof confidence 🐚 platinum hermit (4/6) This maintainer-authored PR is outside the ordinary contributor proof gate; its self-contained built-Gateway/browser results exercise declaration narrowing, configured and unknown retention, receipt observation, and background-discovery stability using a synthetic provider.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: The built-in agent advertises authenticated GitHub operations after the configuration owner has established that no publisher is configured.
Reason: Maintainer authorship establishes direction, and the bounded fix preserves public reads, setup/status, uncertain discovery, and accepted publication receipts.

Merge readiness

⛔ Needs changes before merge - 1 item remains

Keep open: this maintainer-authored PR provides a useful declaration correction with no actionable introduced bug found, but GitHub reports a merge conflict.

Priority: P2
Reviewed head: e2d29cd99b7f243823d40e054e3e38b82b0105d0

Before merge

  • Complete next step - The PR owner should resolve the reported merge conflict and validate the affected paths on the resolved head.

Findings

None.

Agent review details

How this fits together

The GitHub lifecycle supplies configuration facts to tool assembly; the session prompt owner pins declarations before catalog compaction, while existing Gateway owners authorize execution.

flowchart LR
  A[GitHub configuration] --> B[Lifecycle discovery]
  B --> C[Tool assembly]
  C --> D[Session declaration pin]
  D --> E[Provider tool catalog]
  E --> F[Gateway action owners]
Loading

Technical review

Best possible solution:

Land the focused declaration correction through the existing GitHub lifecycle and session prompt owners after resolving the reported conflict.

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

Current-main construction advertises authenticated publication actions without checking publisher configuration, and the PR supplies a concrete built-Gateway before/after scenario; no target code was executed during this review.

Is this the best way to solve the issue?

The change uses authoritative configuration discovery and the existing declaration checkpoint, preserves unknown and delegated cases, and avoids changing native harness lifecycle contracts.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • GitHub publication declarations changes intended behavior with a stated reason (77d0f72: Keep schemas stable across turn kinds and leave action authorization with the Gateway.)
  • Session tool checkpoints keeps the original intent (1f7b2f1: Preserve provider prompt prefixes across event turns and restore pinned definitions from existing transcript checkpoints.)
  • GitHub identity selection keeps the original intent (6e458d8: Provide explicit per-agent identities while preserving native inheritance and credential precedence.)
  • GitHub maintenance scheduling keeps the original intent (833face: Keep OAuth maintenance under the existing scheduler with single-flight execution and shutdown ownership.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 6e458d8 adds src/agents/github-tool-identity.ts:90 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 6e458d84bfc1; files: src/agents/github-tool-identity.ts)

PR surface

Source +297, Tests +620, Docs +17, Other +4. Total +938 across 31 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 18 414 117 +297
Tests 10 679 59 +620
Docs 1 17 0 +17
Config 0 0 0 0
Generated 0 0 0 0
Other 2 4 0 +4
Total 31 1114 176 +938

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

  • add P2: This improves capability accuracy and reduces unnecessary provider request content without addressing an urgent runtime outage.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P2: This improves capability accuracy and reduces unnecessary provider request content without addressing an urgent runtime outage.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 12, 2026, 1:49 AM ET / 06:49 UTC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: web-ui App: web-ui clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. docs Improvements or additions to documentation extensions: codex gateway Gateway runtime security-sensitive-changed size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant