Skip to content

Commit 9689c81

Browse files
committed
Merge origin/main into proof pools
Co-authored-by: Copilot App <[email protected]> Copilot-Session: 3f88934d-97c9-4f4f-9dbd-19827ea2a3cd
2 parents f9d4b4c + ae766dc commit 9689c81

68 files changed

Lines changed: 6619 additions & 427 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/scripts/repository-triage.cjs‎

Lines changed: 1128 additions & 0 deletions
Large diffs are not rendered by default.

‎.github/scripts/repository-triage.test.cjs‎

Lines changed: 1063 additions & 0 deletions
Large diffs are not rendered by default.

‎.github/workflows/ci.yml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ jobs:
2626
exit 1
2727
fi
2828
29+
- name: Test repository triage automation
30+
run: node --test .github/scripts/repository-triage.test.cjs
31+
2932
test:
3033
needs: repo-hygiene
3134
if: ${{ !cancelled() }}
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
name: Repository Triage Report
2+
3+
on:
4+
schedule:
5+
- cron: "23 4 * * *"
6+
workflow_dispatch:
7+
inputs:
8+
operation:
9+
description: Report only, or manually remove safely expired active ownership labels
10+
required: true
11+
type: choice
12+
default: report-only
13+
options:
14+
- report-only
15+
- remove-expired-active-ownership
16+
17+
permissions: {}
18+
19+
concurrency:
20+
group: repository-triage-${{ github.repository }}
21+
cancel-in-progress: false
22+
23+
jobs:
24+
report:
25+
name: Build read-only triage report
26+
runs-on: ubuntu-latest
27+
permissions:
28+
contents: read
29+
checks: read
30+
issues: read
31+
pull-requests: read
32+
statuses: read
33+
steps:
34+
- uses: actions/checkout@v7
35+
with:
36+
persist-credentials: false
37+
38+
- name: Run deterministic triage tests
39+
run: node --test .github/scripts/repository-triage.test.cjs
40+
41+
- name: Build triage report
42+
uses: actions/github-script@v9
43+
env:
44+
OUTPUT_DIR: ${{ runner.temp }}/repository-triage
45+
with:
46+
github-token: ${{ github.token }}
47+
script: |
48+
const triage = require("./.github/scripts/repository-triage.cjs");
49+
await triage.run({
50+
github,
51+
context,
52+
core,
53+
outputDir: process.env.OUTPUT_DIR,
54+
operation: "report-only",
55+
});
56+
57+
- name: Upload triage report
58+
if: ${{ always() }}
59+
uses: actions/upload-artifact@v7
60+
with:
61+
name: repository-triage-report
62+
path: ${{ runner.temp }}/repository-triage
63+
if-no-files-found: warn
64+
retention-days: 30
65+
66+
remove-expired-active-ownership:
67+
name: Remove safely expired active ownership
68+
if: ${{ github.event_name == 'workflow_dispatch' && inputs.operation == 'remove-expired-active-ownership' }}
69+
needs: report
70+
runs-on: ubuntu-latest
71+
permissions:
72+
contents: read
73+
checks: read
74+
issues: write
75+
pull-requests: write
76+
statuses: read
77+
steps:
78+
- uses: actions/checkout@v7
79+
with:
80+
ref: ${{ github.event.repository.default_branch }}
81+
persist-credentials: false
82+
83+
- name: Run deterministic triage tests before mutation
84+
run: node --test .github/scripts/repository-triage.test.cjs
85+
86+
- name: Re-check and remove allowlisted expired labels
87+
uses: actions/github-script@v9
88+
env:
89+
OUTPUT_DIR: ${{ runner.temp }}/repository-triage-cleanup
90+
with:
91+
github-token: ${{ github.token }}
92+
script: |
93+
const triage = require("./.github/scripts/repository-triage.cjs");
94+
await triage.run({
95+
github,
96+
context,
97+
core,
98+
outputDir: process.env.OUTPUT_DIR,
99+
operation: "remove-expired-active-ownership",
100+
});
101+
102+
- name: Upload cleanup audit
103+
if: ${{ always() }}
104+
uses: actions/upload-artifact@v7
105+
with:
106+
name: repository-triage-cleanup-audit
107+
path: ${{ runner.temp }}/repository-triage-cleanup
108+
if-no-files-found: warn
109+
retention-days: 90

‎docs/ARCHITECTURE.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ leading and trailing pipe. Columns, in order:
189189
| chat-content-formatting | authoritative | src/OpenClaw.Tray.WinUI/Chat/OpenClawChatDataProvider.cs | content text formatting, truncation, content-block seam repair, and trace hashing | ChatContentFormatting | thin provider forwarders (TruncateForChatEntry, LooksLikeSystemControlNote, RepairContentBlockSeams, TruncateChatEvent) kept for existing test call sites; system-note, native tool, and flattened-history projection belongs to NativeToolProjector | content truncation and seam repair output is preserved byte-for-byte while tool identity/classification has one canonical owner | ContentBlockSeamRepairTests.RepairsKnownSeams | behavioral | when provider forwarders are removed and callers use focused owners directly |
190190
| chat-metadata-store | authoritative | src/OpenClaw.Tray.WinUI/Chat/OpenClawChatDataProvider.cs | live tool/attachment metadata dictionaries, scoped native-tool identity upsert, save locks/timers/versions, atomic JSON persistence, session eviction, and attachment-marker build/escape/rehydration | ChatMetadataStore | ChatConversationState supplies a typed session/reset/correlation write plan; provider retains the public static image-preview cache | metadata persistence, identity-strength upgrade, normalization, bounded eviction, marker security, and generation-aware idempotent reset eviction are owned under the metadata lock without raw attachment bytes on disk | ToolMetaCacheTests.CacheToolMeta_SameToolCallId_UpgradesSpecificIdentityWithoutDuplicate | behavioral | - |
191191
| chat-state-persistence | authoritative | src/OpenClaw.Tray.WinUI/Chat/OpenClawChatDataProvider.cs | persisted aborted-message IDs plus last-chat-state debounce/version/atomic save lifecycle | ChatStatePersistence | provider retains the nested LastChatState compatibility type and owns bridge history fetch orchestration | corrupted state fails closed, reset removes aborted IDs, stale reset generations cannot persist, and selected/snapshot state writes remain atomic | ChatStatePersistenceTests.ResetFence_RejectsStaleAbortedIds | behavioral | - |
192-
| app-activation-router | authoritative | src/OpenClaw.Tray.WinUI/App.xaml.cs | deep-link/protocol/toast/forwarded activation normalization, current-user IPC, input guards, and confirmation decisions | ActivationRouter | App.ActivationRouter.cs implements IActivationPlanSink only and applies exactly one typed semantic plan through existing A2 owners and services | launch, protocol, toast, and forwarded activation resolve to the same routes; current-user IPC, oversized-payload rejection, and confirmation/redaction semantics are preserved | ActivationRouterTests.ForwardThenListen_DispatchesRouteFromForwardedDeepLink | behavioral | - |
192+
| app-activation-router | authoritative | src/OpenClaw.Tray.WinUI/App.xaml.cs | deep-link/protocol/toast/forwarded activation normalization, current-user IPC, input guards, and confirmation decisions | ActivationRouter | App.ActivationRouter.cs implements IActivationPlanSink only and applies exactly one typed semantic plan through existing A2 owners and services | launch, protocol, toast, and forwarded activation resolve to the same routes; a no-argument secondary launch retries the existing IPC boundary and forwards the default Hub route; current-user IPC, oversized-payload rejection, and confirmation/redaction semantics are preserved | ActivationRouterTests.ForwardLaunchToPrimaryAsync_ListenerStartsLate_RetriesAndDispatchesDefaultHub | behavioral | - |
193193
| app-activation-router-closed | closed | src/OpenClaw.Tray.WinUI/App.xaml.cs | concrete deep-link IPC, toast argument routing, and single-instance forwarding production logic | ActivationRouter | App.ActivationRouter.cs implements IActivationPlanSink only, dispatching one typed plan per activation | App does not regain a parallel activation production path outside ActivationRouter | AppRefactorContractTests.ToastActivation_RoutesOnUiThread | source-shape | when App is replaced as the WinUI composition root |
194194
| app-settings-change-coordinator | authoritative | src/OpenClaw.Tray.WinUI/App.xaml.cs | detached snapshot comparison, SettingsChangeClassifier use, concurrent save serialization, and the full post-save effect order | SettingsChangeCoordinator | App supplies the existing effects as delegates and triggers synchronous Apply from one explicit post-save call | browser proxy sync, reconnect, MCP, hotkey, autostart, telemetry, and surface notification order is preserved; MCP-only behavior and credential precedence are unaffected | SettingsChangeCoordinatorTests.Apply_GatewayUrlChange_PreparesBeforeReconnect | behavioral | - |
195195
| app-settings-change-coordinator-closed | closed | src/OpenClaw.Tray.WinUI/App.xaml.cs | OnSettingsSaved impact classification, reconnect switch, and inline effect ordering | SettingsChangeCoordinator | App.SettingsChangeCoordinator.cs wires effect delegates only; OnSettingsSaved forwards to Apply | App does not regain a parallel settings-change orchestration path outside SettingsChangeCoordinator | PresentationSeamContractTests.App_AppliesToolCallVisibilityFromPersistedSettings | source-shape | when App is replaced as the WinUI composition root |

‎docs/ONBOARDING_WIZARD.md‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ The setup flow no longer configures remote/manual gateways inline. The Welcome p
2121
## Screen Details
2222

2323
### Welcome
24-
Displays the OpenClaw icon, app title, and a brief description. If an app-owned local WSL gateway already exists, the primary CTA reads **Install new WSL Gateway** and confirmation warns that the current OpenClaw WSL gateway and distro will be deleted. If only an external gateway exists, the CTA remains **Set up locally** and confirmation explains that the external connection remains available in Connections.
24+
Displays the OpenClaw icon, app title, and a brief description. Choosing local gateway setup runs the read-only WSL readiness gate before the Capabilities page or its Local AI decision UI can open. WSL2 environment failures, including disabled hardware virtualization, are shown as WSL readiness failures and block both Local AI and non-Local-AI local gateway setup. The readiness dialog can retry with a fresh inspection after the user resolves the reported problem. If an app-owned local WSL gateway already exists, the primary CTA reads **Install new WSL Gateway** and confirmation warns that the current OpenClaw WSL gateway and distro will be deleted. If only an external gateway exists, the CTA remains **Set up locally** and confirmation explains that the external connection remains available in Connections.
2525

2626
### Local setup progress
27-
Installs and connects a new app-owned `OpenClawGateway` WSL instance from a clean WSL baseline. Setup does not export from or mutate an existing user Ubuntu distro; if WSL cannot create the named app-owned distro directly, setup fails with an actionable update message. Cleanup automatically unregisters a distro only when durable OpenClaw evidence is paired with exactly one readable current-user WSL registration whose canonical base path matches the expected managed install path. Automatic orphan-directory cleanup requires a marker bound to that exact path. An unproven same-named distro or leftover data directory is preserved unless the user explicitly confirms its permanent replacement in the setup UI or passes `--confirm-destructive`. When replacing an app-owned local gateway, the removal step is shown as part of progress and can be retried on failure.
27+
Installs and connects a new app-owned `OpenClawGateway` WSL instance from a clean WSL baseline. If the WSL platform is missing or its optional component is not initialized, setup requests administrator approval to install it, re-inspects readiness, and reports when a Windows restart is required. Setup does not export from or mutate an existing user Ubuntu distro; if WSL cannot create the named app-owned distro directly, setup fails with an actionable update message. Cleanup automatically unregisters a distro only when durable OpenClaw evidence is paired with exactly one readable current-user WSL registration whose canonical base path matches the expected managed install path. Automatic orphan-directory cleanup requires a marker bound to that exact path. An unproven same-named distro or leftover data directory is preserved unless the user explicitly confirms its permanent replacement in the setup UI or passes `--confirm-destructive`. When replacing an app-owned local gateway, the removal step is shown as part of progress and can be retried on failure.
2828

2929
The managed distro is locked down and is not intended to be a normal interactive Ubuntu profile. For editing `openclaw.json` as the `openclaw` user and using root for protected-file administration, see [Managing the locked-down WSL gateway](WSL_GATEWAY_ADMIN.md).
3030

@@ -47,6 +47,8 @@ If the gateway doesn't support the wizard protocol or is unreachable, this scree
4747

4848
The wizard keeps recovery choices visible while setup steps are running so users can start the wizard again or skip it for now if an auth flow stalls. If the gateway restarts or the wizard connection is lost while setup is running, the same recovery choices are presented in the error state so the user is not trapped retrying a broken session.
4949

50+
Gateway-driven onboarding does not show a Back action. There is no dedicated `wizard.back` RPC. Gateways can instead provide in-band `__back` or `back` options, which protocol clients submit through `wizard.next`; Companion intentionally filters those options because its former local payload replay displayed stale state while the authoritative Gateway session remained on a later step. Users can restart onboard or skip and exit from **More options** instead.
51+
5052
Exact Gateway 2026.7.1 has a terminal compatibility path for an app-managed local WSL gateway. When the final `model-check` answer produces WebSocket close 1012 before the gateway can return `done`, setup retries the temporary `NoListener` state and the typed snapshot-changed race that can occur while the listener is restarting. Other unknown or conflicting endpoint ownership fails immediately, and no credential is sent until the managed endpoint is verified again. A retryable startup close 1013 remains inside the existing reconnect timeout. Setup completes only after a fresh authenticated `hello-ok` handshake. Other versions and steps keep the normal managed-local wizard replay behavior with the same bounded ownership wait; remote gateways and other disconnects do not enter this recovery path.
5153

5254
The headless setup engine also treats one terminal wizard payload as completion instead of failure. When the answers applied by the wizard restart the gateway, the gateway can tear down its own hosted wizard TUI and return a terminal payload whose error is exactly `Error: TUI exited from signal SIGTERM`. Setup accepts that result only when the payload is terminal and the request it just sent answered the authoritative final step, so the wizard is not cancelled after it already finished. The final step must be a plain acknowledgement note with no options whose id or title normalizes to `done`, and when the gateway supplies step position metadata it must also be the last step. An earlier `SIGTERM`, a progress poll, a replayed wizard session, any answerable step, any other step id or title, a non-terminal payload, and any other message (different signal, extra text, or different casing) all keep the wizard failure. Only surrounding whitespace is tolerated in the message. Reload-mode restoration, the one-shot managed restart, health verification, and provenance checks are unchanged and still fail closed.

0 commit comments

Comments
 (0)