Skip to content

fix(copilot): answer native side questions with request policy - #205963

Merged
vincentkoc merged 5 commits into
mainfrom
fix/copilot-native-side-questions-20261126
Nov 26, 2026
Merged

vincentkoc merged 5 commits into
mainfrom
fix/copilot-native-side-questions-20261126

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Nov 26, 2026 •

Copy link
Copy Markdown
Member

Related: #205897
Builds on merged #205962.

What Problem This Solves

The native Copilot runtime cannot answer /btw side questions through its own SDK session. Falling back to another runtime loses native Fusion behavior and its conversation context.

User Impact

Copilot answers side questions in a fresh, tool-free session with sanitized conversation context and current images. It honors the configured Fusion tier, reports usage, and preserves the existing session-fork owner. Request hooks can redact or reject the exact text and inline images before dispatch.

Why This Change Was Made

Expose optional host preparation on the existing harness side-question contract and reuse the existing isolated completion owner. The host keeps transcript, credential, and authority decisions; the plugin translates the prepared request to SDK messages. The existing request gate accepts inline images only for callers that supplied an image-capable payload.

Evidence

  • 18 focused side-question tests pass across native SDK dispatch, core history/image preparation, and request-hook redaction/rejection.
  • All 8 CLI request-hook tests pass, including rejection of file attachments and image additions to text-only requests. The hook uses the existing record guard instead of unchecked object assertions.
  • Independent source review and final local ClawSweeper review found no actionable defect after the request-policy and usage repairs.
  • Full Plugin SDK declarations, the public Copilot package typecheck, and targeted core/plugin lint pass after correcting the authorization discriminator.
  • Current-head hosted CI is pending on this main-targeted PR.
  • A live end-to-end /btw run remains untested. Ordinary Fusion turns and finalization are covered separately by fix(copilot): honor configured Fusion tiers #205907.

@vincentkoc vincentkoc self-assigned this Nov 26, 2026
@clawsweeper

clawsweeper Bot commented Nov 26, 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 agents Agent runtime and tooling extensions: copilot size: L labels Nov 26, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. impact:other This issue has meaningful maintainer-visible impact outside the owned taxonomy. clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Nov 26, 2026
@vincentkoc
vincentkoc force-pushed the fix/copilot-native-completion-policy-20261126 branch from 7fb9522 to 94e3216 Compare November 26, 2026 13:42
@vincentkoc
vincentkoc force-pushed the fix/copilot-native-side-questions-20261126 branch from 2e1cf5c to 062dfed Compare November 26, 2026 13:42
@vincentkoc
vincentkoc marked this pull request as ready for review November 26, 2026 14:13
@vincentkoc
vincentkoc force-pushed the fix/copilot-native-side-questions-20261126 branch from 062dfed to addc0f7 Compare November 26, 2026 14:23
Base automatically changed from fix/copilot-native-completion-policy-20261126 to main November 26, 2026 14:38
@github-actions

github-actions Bot commented Nov 26, 2026 •

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: 05eaf99be48a4962a7b5a26a99e25eff13a8661a
  • Maintainer: @vincentkoc
  • Repository role: admin

These security sensitive changes were made:

  • src/agents/btw-isolated-authorization.ts: Controls credential persistence, secret resolution, or redaction. Check storage permissions, credential scope, and exposure in logs or responses.

Carefully review these changes before merging.

@vincentkoc
vincentkoc force-pushed the fix/copilot-native-side-questions-20261126 branch from addc0f7 to 05eaf99 Compare November 26, 2026 14:39
@vincentkoc
vincentkoc enabled auto-merge (squash) November 26, 2026 14:43
@vincentkoc
vincentkoc merged commit b13c10d into main Nov 26, 2026
160 checks passed
@vincentkoc
vincentkoc deleted the fix/copilot-native-side-questions-20261126 branch November 26, 2026 14:59
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash auto-merge.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 27, 2026
…law#205963)

* fix(copilot): support native side questions with request policy

* test(copilot): include settled context in native request policy proof

* fix(copilot): retain isolated authorization discriminant

* refactor(copilot): clean native side-question validation

* refactor(copilot): validate request objects with shared guard
obviyus added a commit that referenced this pull request Nov 27, 2026
## Problem
`main` fails two checks:
- `plugin-sdk:surface:check`: public exports 3932 > 3930, callable exports 2259 > 2258. #205963 added `AgentHarnessSideQuestionRequest` and #206839 added `hasReplyRestartResume` without budget lines.
- Dead-export scan: `buildRestartSentinelRow`, `nextRevision` and `readRestartSentinelRowForKeySync` in `src/infra/restart-sentinel-store.ts` have no outside readers after #206700.

## Change
- Make the three restart-sentinel helpers module-private. The read-worker test and the managed-handoff lifecycle fixture write their rows directly. The lifecycle test decodes the row and compares it with the payload, so a wrong column fails it.
- Record the two SDK exports in the budgets. Both have bundled consumers (copilot side questions, telegram restart recovery).

## User impact
None. Behavior does not change. The diff touches only CI budgets, export visibility and one test fixture.

## Evidence
- `pnpm plugin-sdk:surface:check`: exit 0.
- `node --import tsx scripts/check-deadcode-exports.mts`: script, production and full-tree scans each report 0 entries.
- `src/infra/restart-sentinel.read.worker.test.ts`: pass.
- `src/infra/update-managed-service-handoff-engine.test.ts` (uses the lifecycle fixture): 14 passed, 5 skipped (PostgreSQL).
- `pnpm tsgo:core`, `pnpm tsgo:core:test`: clean.

Co-authored-by: Ayaan Zaidi <[email protected]>
obviyus added a commit that referenced this pull request Nov 28, 2026
…lot (#207061)

## Problem
- `AgentHarnessSideQuestionRequest` was published in the Plugin SDK (#205963) only so the bundled Copilot plugin could name its side-question request. It has no other consumer.
- Main's SDK budget check is red: #206995 added `compactCatalogForSkillRead` to `agent-harness-runtime` (consumer: bundled Codex harness) without a budget line.

## Change
- Copilot declares its own `CopilotSideQuestionRequest`, the same four fields. The SDK export is removed.
- Budgets: public −1 (the type) +1 (`compactCatalogForSkillRead`) = 3932, unchanged. Callable +1 = 2260, recorded with a budget line like `hasReplyRestartResume`.

## User impact
None. The type is structural, so Copilot side questions send the same request.

## Evidence
- ClawHub `sdk-export:openclaw/plugin-sdk/agent-harness-runtime#AgentHarnessSideQuestionRequest`: 0 public consumers (2338 complete / 432 partial / 3 failed coverage). The only bundled consumer is Copilot, migrated here. The export is in no released tag.
- `pnpm plugin-sdk:surface:check`: pass (`no unauthorized removals`). `tsgo:extensions`: clean.
- Copilot `side-question.test.ts`, `isolated-completion.*.test.ts`: 8/8 pass.
- Adversarial review (Fable): no finding. The local type assigns both ways to the host's `prepareRequest`.

Co-authored-by: Ayaan Zaidi <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 28, 2026
## Problem
`main` fails two checks:
- `plugin-sdk:surface:check`: public exports 3932 > 3930, callable exports 2259 > 2258. openclaw#205963 added `AgentHarnessSideQuestionRequest` and openclaw#206839 added `hasReplyRestartResume` without budget lines.
- Dead-export scan: `buildRestartSentinelRow`, `nextRevision` and `readRestartSentinelRowForKeySync` in `src/infra/restart-sentinel-store.ts` have no outside readers after openclaw#206700.

## Change
- Make the three restart-sentinel helpers module-private. The read-worker test and the managed-handoff lifecycle fixture write their rows directly. The lifecycle test decodes the row and compares it with the payload, so a wrong column fails it.
- Record the two SDK exports in the budgets. Both have bundled consumers (copilot side questions, telegram restart recovery).

## User impact
None. Behavior does not change. The diff touches only CI budgets, export visibility and one test fixture.

## Evidence
- `pnpm plugin-sdk:surface:check`: exit 0.
- `node --import tsx scripts/check-deadcode-exports.mts`: script, production and full-tree scans each report 0 entries.
- `src/infra/restart-sentinel.read.worker.test.ts`: pass.
- `src/infra/update-managed-service-handoff-engine.test.ts` (uses the lifecycle fixture): 14 passed, 5 skipped (PostgreSQL).
- `pnpm tsgo:core`, `pnpm tsgo:core:test`: clean.

Co-authored-by: Ayaan Zaidi <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 28, 2026
…lot (openclaw#207061)

## Problem
- `AgentHarnessSideQuestionRequest` was published in the Plugin SDK (openclaw#205963) only so the bundled Copilot plugin could name its side-question request. It has no other consumer.
- Main's SDK budget check is red: openclaw#206995 added `compactCatalogForSkillRead` to `agent-harness-runtime` (consumer: bundled Codex harness) without a budget line.

## Change
- Copilot declares its own `CopilotSideQuestionRequest`, the same four fields. The SDK export is removed.
- Budgets: public −1 (the type) +1 (`compactCatalogForSkillRead`) = 3932, unchanged. Callable +1 = 2260, recorded with a budget line like `hasReplyRestartResume`.

## User impact
None. The type is structural, so Copilot side questions send the same request.

## Evidence
- ClawHub `sdk-export:openclaw/plugin-sdk/agent-harness-runtime#AgentHarnessSideQuestionRequest`: 0 public consumers (2338 complete / 432 partial / 3 failed coverage). The only bundled consumer is Copilot, migrated here. The export is in no released tag.
- `pnpm plugin-sdk:surface:check`: pass (`no unauthorized removals`). `tsgo:extensions`: clean.
- Copilot `side-question.test.ts`, `isolated-completion.*.test.ts`: 8/8 pass.
- Adversarial review (Fable): no finding. The local type assigns both ways to the host's `prepareRequest`.

Co-authored-by: Ayaan Zaidi <[email protected]>
tideclaw-bot pushed a commit that referenced this pull request Nov 30, 2026
* fix: show Claude CLI document uploads only once in chat

* fix: show Claude CLI document uploads only once in chat

OpenClaw-Publication: 4555cb04-bff2-43b3-aff8-ec271d6567b2

* fix: keep Claude document uploads on the message that sent them

* fix: preserve the released message queue result contract

Release adaptation: Use an optional accepted-input observer instead of widening
queueMessage's released Promise<void> contract. Reuse the stable steering and
transcript-rewrite handlers; leave source admission, native image steering,
config, and all SQLite schemas unchanged. The existing history index columns
also carry exact document correlation. Keep the released model-hook test layout.

Companion audit through be407a4: no later #203866 reference. PRs #208535
(Claude compacted fork summaries), #206158 (native subagent status), and
#205663 (image dimensions) are separate. PRs #208252 (Codex source), #207022
(embedded prompt dispatch), #206969 (fallback), #205963 (Copilot question
policy), and 50a7368 (snooze) do not own this path. SHA mentions in
#204700 and #204685 are update/qualification records, not follow-ups.

(cherry picked from commit 269f884)

Co-authored-by: RomneyDa <[email protected]>
tideclaw-bot pushed a commit that referenced this pull request Nov 30, 2026
* fix(copilot): support native side questions with request policy

* test(copilot): include settled context in native request policy proof

* fix(copilot): retain isolated authorization discriminant

* refactor(copilot): clean native side-question validation

* refactor(copilot): validate request objects with shared guard

(cherry picked from commit b13c10d)

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

Labels

agents Agent runtime and tooling clawsweeper:intake:feature Preliminary submission classification; full source review pending. docs Improvements or additions to documentation extensions: copilot impact:other This issue has meaningful maintainer-visible impact outside the owned taxonomy. P2 Normal backlog priority with limited blast radius. security-sensitive-changed size: L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant