Repository navigation
refactor(channels): require canonical private-network settings - #163535
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review blockedAutomated review did not run, so no review verdict was produced. Reason: The input-safety check rejected material in this revision. No detected value, path, or scanner output is reproduced here. Automatic review is on hold, including after source changes. Request a fresh re-review after resolving the failure; maintainers can also release the hold through an intentional scanner-policy update. Next step: If this is a genuine credential, remove and rotate it. If it is an intentional test fixture, a maintainer must review and qualify it. |
|
Codex review: needs maintainer review before merge. Reviewed October 3, 2026, 8:32 AM ET / 12:32 UTC (Revision 11). ClawSweeper reviewWhat this changesMatrix, Mattermost, and Tlon now read canonical nested private-network settings, with updated regression coverage and Doctor recovery guidance. Merge readiness✅ Ready for maintainer review This PR remains useful: current main still accepts legacy private-network inputs. The new published-updater evidence resolves the previous review’s blocker, and no actionable introduced defect remains. Likely related people: steipete, a recent contributor to these channel and Doctor owners (medium confidence). Priority: P2 Review scores
Verification
How this fits togetherChannel plugins resolve operator configuration into network policies for requests to their servers. Doctor normalizes supported legacy settings before the channel runtimes consume them. flowchart TD
A[Operator configuration] --> B[Doctor normalization]
B --> C[Channel account settings]
C --> D[Canonical private-network opt-in]
D --> E[Guarded network requests]
E --> F[Allowed server traffic or rejection]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource -26, Tests +24, Docs +15, Other 0. Total +13 across 15 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep legacy normalization in Doctor, consume canonical settings in bundled runtimes, and preserve external-plugin SDK compatibility. Do we have a high-confidence way to reproduce the issue? Yes, from source: current main’s Tlon resolver accepts legacy true before checking canonical false, contradicting Doctor’s canonical precedence. No reviewer-side runtime reproduction was executed. Is this the best way to solve the issue? Yes. The patch uses existing canonical configuration and migration owners without changing the public compatibility API or introducing a parallel repair path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 1a5eb7fdfee7. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (10 earlier review cycles; latest 8 shown)
|
870d399 to
415dd74
Compare
d864beb to
fc07c74
Compare
* origin/main: fix(test): restore fixture state and await async completion (#164222) refactor(sessions): stage and settle pending inputs in workers (#164284) fix: speech-only replies fail when models include reasoning (#164285) fix(nextcloud-talk): avoid webhook migration for unconfigured channels fix: guide background skill reviews through Workshop proposals (#164292) test(build): reject AI dependencies in retained config repairs refactor(channels): require canonical private-network settings (#163535) fix(memory): migrate embedding cache in bounded batches and record oversized rows (#164303) feat(state): incognito actor memory and Codex history routing (P5c, inactive) (#164224) refactor(synology-chat): remove unused route account ID (#164280) test(ui): await web push preference publications (#164295) perf(scripts): avoid compiler projects for runtime import parsing (#164243) fix(worktrees): create workspaces from nested Windows repositories (#164249) test(agents,channels,cli): remove low-value tests (batch d173) (#164302) perf(workboard): serve cards per board revision and push changes instead of polling (#164301) refactor(sqlite): deslop sqlite stores (#164271) chore(ui): refresh control ui locales (#164299) refactor(events): deslop listener and disposal plumbing (#164221) fix: canonicalize fresh worker reasoning signatures (#164287)
…law#163535) * refactor(channels): require canonical private-network settings * fix(matrix): require Doctor before configuring legacy settings * refactor(channels): honor retired private-network migration paths * refactor(mattermost): prepare probe options after lazy loading * chore(config): shrink retired Tlon cast baseline * refactor(channels): separate the Nextcloud version dependency * test(channels): use canonical resolved-account fixtures
What Problem This Solves
Bundled channel runtimes pass whole configuration records to public SDK helpers that accept legacy private-network inputs. This lets the flat
allowPrivateNetworkkey enable requests, including when the canonical nested setting explicitly disables access.Matrix, Mattermost, and Tlon now read
network.dangerouslyAllowPrivateNetworkdirectly. Tlon's flat-key fallback and unnecessary record casts are removed. Matrix keeps its existing root/account OR behavior. Public Plugin SDK polymorphic adapters and exports remain compatible for external plugins.User Impact
Tlon retains its plugin-owned Doctor transform, including explicit canonical
falseprecedence and the normal config backup flow. Updates invoke that same owner; directly replaced binaries requireopenclaw doctor --fixbefore using that legacy configuration. Deferred plugin migrations retain their input without enabling runtime private-network access.Matrix and Mattermost's flat-key migrations remain retired. Their old configurations must be repaired with Doctor on
2026.9.7before upgrading. This cutover preserves main's retirement policy and adds no replacement compatibility reader or retirement detector.Why This Change Was Made
The public SDK helpers serve external-plugin compatibility contracts. Bundled runtime callers already have typed canonical configuration, so they now pass its boolean directly instead of invoking that compatibility policy independently. Existing Doctor owners perform supported normalization; no new migration or backup scaffolding is introduced.
Significant main overlaps: #163740 retired Matrix's migration and simplified setup dependency handling; #163767 retired Mattermost's migration and consolidated setup/read authorization. The branch preserves those changes. Open #161607 changes a separate Matrix invite-matcher helper. The base also includes account-preservation repair #163974: an actual published-driver update exposed its earlier Doctor defect, so this is a material update-proof dependency. No independent account migration is added here.
Production delta (
src/**andextensions/**, excluding tests and test support/helpers/utilities, E2E, and fixtures): +20 / -46 / net -26, confirmed by the fully paginated GitHub file list at the current head: 17 files total, 11 production files. The Tlon assertion-safety baseline shrinks from three assertions to the one still present; no exception or budget is widened.Current PR head:
a53f4b97749714ed2cb0a836bfe1fdc8e7c3fd84.Retained production/package/update identity:
f0675d10fe513838bc7f65e3d8f8d4c7277b781c, based ondd66b67807344d7754de8f7bc29af7c9e9e59bf7. The a53 commit changes exactly two test fixtures; every production and package input remains unchanged.Nextcloud Talk follow-up
Nextcloud Talk is separated into #164258 (draft head
5d8c5493c770cb02a98ff5049646a088b1ea0035). Main's webhook migration owner atc7c937abfea22f17be5cac24bfc906d4d91368f6retired its pre-July flat private-network input and raised its standalone peer host and Plugin API requirements to >=2026.9.9. Its canonical runtime-reader cleanup needs its own update proof; this PR neither restores the retired transform nor claims it remains supported.The attempted pre-split native package build passed in 685.71 s, then canonical composition correctly refused Nextcloud Talk after 13.39 s because the source host version is 2026.9.7. Native run:
run_5c5db0ddfd99d3dc9b4b6474d26ee78d, leasecbx_2bd50ab12012. Live main260a31989937cb1ac3d2d0a2280a65ef5312a81ais 2026.9.8 and retains the same >=2026.9.9 floor. No version override, guard relaxation, or generated-artifact edit was made. The completed build and failed receipts remain retained. The separate cut excludes the obsolete Nextcloud migration test and preserves the required complete-account fixture.Evidence
All builds and tests run remotely with native lease/run identity, pinned source, private state, and frozen installs. No local builds or tests ran. The source and proof templates have independent Codex reviews through P2. Current proof uses Hetzner lease
cbx_2bd50ab12012; the retained channel test evidence below usedcbx_82ecc3069e04.Current-head fixture completion: CI run
37122862622, job111202428646, exposed nine task-caused deterministic fixture failures: eight Mattermost directory cases mocked resolved accounts without the requiredconfigobject, and one Matrix auth case still authored the retired flat private-network setting. The a53 commit addsconfig: {}to those account fixtures and uses the canonical nested setting in the Matrix input. All assertions, case counts, runtime code, and production/package bytes remain unchanged; these were fixture omissions, not flakes or inherited failures.Native run
run_61d7ee8bb74cb29137caed188fbd0619passed the exact a53 two-file delta on leasecbx_2bd50ab12012:extensions/matrix/src/matrix/client.test.tsextensions/mattermost/src/mattermost/directory.test.tsEach complete test file ran once using
pnpm test <file> --maxWorkers=1; wall times include compilation and runner startup. The existing auth and directory assertions exercise behavior through their owning entry points; no duplicate tests, retries, longer timeouts, or broader mocks were added. Admission verifies exactly the two test paths and patch SHA256535557c078545e700af1d58afc5396873bfc487076c2463fa0e4590cf5da9a86. Native result SHA256fb87b1b14ffedd3606d14be90499d0151da2fdfb7e58cff54879c618090c0026matches the downloaded receipt and binds the source/test reports to a53. Source and harness reviews are clean through P2. Exact-head CI run37123826328passed. Its complete changed-extension bundle job111205203972took 228 s (the whole selected cohort, not incremental test cost). The unchanged production checks, SDK, package, and successful update cell below remain attributed to f067; they were not rebuilt or relabeled as a53 artifacts.Published driver × retained f067 production candidate: passed. The genuine pnpm-installed
[email protected]updated to exact candidatef0675d10fe513838bc7f65e3d8f8d4c7277b781cin native runrun_67efc3aa9dcaee036b0f7440652c726aon Hetzner leasecbx_2bd50ab12012. The cell completed in 327.09 s. All five Tlon migration scopes and ten canonical Matrix/Mattermost controls passed, including explicit canonicalfalseprecedence, unchanged shared root/account settings, and exact authored plugin policy. The original config backup matched the authored bytes, and Doctor retained a private pre-normalization backup. Config validation and candidate plugin discovery passed; the installed Tlon resolver returned the expected true/false values for all four account cases. All 12,049 runtime entries underdist/**andopenclaw.mjsmatched the candidate inventory. A second full Doctor run left both config bytes and backup inventory unchanged.The completed native receipt SHA256 is
6acc7c829df83ecd9cb8b7ffb2df850bbf8db5ced34b6a5b9e12ed09952ebf0a, bound to reviewed cell harnessd134b2a29ef9f54089f0ba700c5e6dd7e9721427c598d7048c92196565c86796. All five priority result/runtime/idempotence/dependency-metadata artifacts match that receipt. The post-assertion pnpm dependency report and verified launcher metadata are retained with their actual installation-root binding. This proves the requested config update path;--no-restartdoes not establish service-restart behavior.Retained f067 production checks: native run
run_5fda811dbed6bc45d61b79db123fc8e0passed canonicalcheck-changedatf0675d10fe513838bc7f65e3d8f8d4c7277b781cin 766.75 s, including core/extension type checks, lint, boundaries, and changed-file guards. All 13 artifacts were downloaded through the pinned host and hash-verified. Native output binds result SHA256d51dafbf5eb673e319074c238fd9b5926f8cd9d137c03476992d901b9e5b9ef4to source harness28a2db7ab87d98b019c8bdb81951c0ae1b2f8f00bea8d1f4db8b3abec2aee409; the source record matches the exact head/base and reviewed patch SHA2567128db61611970d91cf065a41a6b6a866a5ad7b7f620d98b3677d93e29add589. Tests and profiles already retained below were not replayed. The completed update cell is recorded above.Retained f067 SDK: native run
run_5fda811dbed6bc45d61b79db123fc8e0completed SDK API generation in 273.57 s with no API changes: no entrypoints added/removed and no export changes. All 16 artifacts were verified against native result SHA256857ee88d327aec2fb0b8e968b39631262951a97fe6a88dd8255200b111dff13f. The source-head, base, and workflow-bound report was independently inspected and approved with digestff7b090f43d2d90e4cd883d95840d6b752475a7a1769e295fb4cbb558a6ffb64. Public SDK exports and surface budgets remain unchanged. The corrected, manifest-aware three-channel package completed as recorded below; the final update cell passed as recorded above.Retained f067 package: native run
run_32d871e18d1618ab15adbe4dc495e439completed the exact f067 build in 688.06 s, package creation in 91.41 s, extraction in 0.82 s, and package identity checks in 0.58 s. The distribution contains normal bundled plugins plus selected Matrix, Mattermost, and Tlon. Candidate tarball SHA256:b46b986d85f08aef638b53914ff4f3f5dc24d9c678a2e5875936b28f0737ea37. Native result SHA256:c5a5458d3454e4a5cae0842ce07441b418c137241bab30e99a4f24deb502211a, bound to package harnessf4dc60b164316acbbe82dbdf7b2e5a5f9022620991eafdc44f3ed5f0b4d9913f. The producer verified 12,049 runtime entries underdist/**andopenclaw.mjs, separately recording 68 manifest-bearing plugins and non-plugin directories. The successful cell used that exact native producer and tarball and completed update, backup, runtime, and idempotence assertions.Retained pre-split Doctor and checks: native run
run_0a9fc7b34d1e06e7aa554a37ef7e185fpassed the following at the exact pre-split headfc07c74f65a3c3c8054b1ac109a2f92fbf23974d:pnpm test src/commands/doctor-legacy-config.migrations.test.ts --maxWorkers=1node scripts/check-changed.mjs --base <proof-base> --head <candidate> --timedThe Doctor file includes the six-channel regression preserving existing account sets and shared root policies. The profile commands are verification only; no comparative performance improvement is claimed. Doctor result SHA256:
5f750559da8b1d237db05ef73bf69641740c98f08ae36c773d6f2ebe4b90c585. Checks result SHA256:f1fc8319bd608616686f3632b1338f8c9d9583dd0837d3aa0c9ea2d1083c5247. Both native output lines bind those results to harness manifestde08502bd6eb4996eb5f383df5908c1de826950171ea7ae41f898aa86ebf5426. All 30 completed Doctor/check artifacts (13 + 17) were downloaded through the pinned host and verified against their receipts.Retained pre-split SDK (fc07): the same native run passed API generation in 268.80 s with no API changes. All 16 SDK artifacts match the native result receipt
ed6171210208072100949cbe75d2a3f567c0220a1a426d8e706ee074a3673b80. The head/base-bound report was reviewed and approved with digestff7b090f43d2d90e4cd883d95840d6b752475a7a1769e295fb4cbb558a6ffb64. Public SDK exports and surface budgets remain unchanged. That pre-split package run later failed at the Nextcloud peer check described above. Current-head checks and SDK evidence are recorded separately above; this pre-split report is retained under its original head.Baseline regressions: at original base
b641b4be58768c70bd0ef784afde76c4f0ec6930, Tlon produced the three intended failures and one passing canonical control (41.96 s); Nextcloud Talk produced the intended rejected-request assertion failure (32.00 s). Original run:run_5d5c39b09e7067c0e8f5dfbf29968ee9. A validator initially expected the wrong Vitest error-class prefix; the retained reports were validated with the corrected per-label prefix inrun_9771b19e61edffbfbf81bd75eecfe282, without rerunning those tests. Failure messages, counts, and teardown/error checks stayed intact.Retained four-channel candidate tests: 174 cases across 15 files, including the now-separated Nextcloud work, passed at
415dd74089f420c07076093d7967c73d8becb40e. After the small Mattermost probe-call cleanup, the three affected probe/runtime/status files passed at70f1331526d26f307a80bd6fd7a796b87721a170. The original d864 final commit only shrank the assertion baseline. The five-commit rebase onto the proof base left every code patch unchanged;git range-diffshows only a documentation-context difference. These 174 + 23 cases remain attributed to their original heads and runs, not to the rebased head. Pre-split source admission pinned the complete base-to-fc07 diff (SHA256f4e08be76d154c450dc741c2f6fe75aae6785147c1ec582d9adde7675049b46f).Measured
pnpm test <file> --maxWorkers=1command wall times:extensions/tlon/src/core.test.ts415dd74089f4extensions/matrix/src/matrix/client/config.test.ts415dd74089f4extensions/mattermost/src/mattermost/send.loopback.test.ts415dd74089f4extensions/mattermost/src/mattermost/target-resolution.test.ts415dd74089f4extensions/nextcloud-talk/src/send.fetch-timeout.test.ts415dd74089f4extensions/nextcloud-talk/src/send.cfg-threading.test.ts415dd74089f4415dd74089f4extensions/mattermost/src/mattermost/probe.test.ts70f1331526d2extensions/mattermost/src/channel.runtime.test.ts70f1331526d2extensions/mattermost/src/channel-actions-setup-status.contract.test.ts70f1331526d2The first six files ran in
run_9771b19e61edffbfbf81bd75eecfe282; the nine-file group ran inrun_f58fa4eb4247a7de0426fb83f11d02cd; the affected Mattermost files ran inrun_6cdb556f8b3d3302bf476528955c11d8. A deleted Mattermost Doctor filename initially stopped the nine-file invocation before collection. Only that stale selector was removed, and the six completed files were retained rather than rerun. The tests use existing fixtures and assert runtime, migration, or plugin boundaries; no retries, sleeps, timeout increases, weaker assertions, or new worker pins were added. The listed wall times include existing compilation/runner startup, not only assertion time.Published-driver update evidence and remaining cell: the original d864 package was built in
run_e312058a131ee03502534eb3413c8430(667.70 s build, 102.57 s package), with 16,925 product entries and tarball SHA256dd537e1d163914dc902f3221f5910c32c9503802e97f3cc1a3da8d563ffc6e9d. Its four selected channel plugins extended the normal bundled plugin set; they are not the entire package inventory.The real npm-installed
[email protected]update inrun_f121cc38ec251482903ebca32930538cpassed candidate Doctor, lint, config, plugin, recovery, and Gateway-startup admission, then failed package swap withPackage rollback verification entry limit exceeded. The published installation stayed at 2026.9.7. The installed driver's candidate activation seal has a fixed 50,000-entry tree limit; native censuses found 44,099 entries in the release and 56,095 in the candidate installation (run_235074b9750c09efa46243bc9f99dcfc,run_30f207ed8926b0ba53acf6f18c4a2832). That remains a failed update, not passing activation proof.The supported pnpm route reached successful package activation in
run_3d3a7ab4db3a470cacf6b0ba40388db0, using the regenerated d864 package fromrun_6e123feb6b898323f9582a546ded72c1(tarball SHA256e945ebfb3652ae7ab3ec6a0604852f628f23483ee55e06492c0c9b7c64bde2a0). The full cell then failed its unchanged channel-preservation assertion: the old Doctor inventedaccounts.defaultbeside existing named accounts and moved root fields into it across all four channels. The existing main repair at408987260140b81abe855c1da97bbebaa307f4fdfixes that owner by preserving nonempty account maps. The branch was rebased to include the fix; the assertion was not weakened. Backup/runtime/idempotence proof did not complete in that failed cell.First f067 cell: native run
run_f4e94d61183ff0074a4d07ca0701e7c3completed the real update, config validation, candidate plugin discovery, and actual Tlon runtime assertions, then failed final byte idempotence (321.48 s for the cell phase). The exact config difference added 30 disabled skill entries and refreshed onlywizard.lastRunAt. Ordinarydoctor --fixintentionally repairs unavailable skills, while update-mode Doctor skips that optional environment repair. The corrected synthetic fixture uses the documentedagents.entries.main.skills: []policy. An empty bundled-skill allowlist would be unrestricted and is not used. All config-byte, wizard, backup-inventory, channel, plugin, and runtime assertions remain unchanged; this failed run is not a passing full cell.That run also reported original-state capture unavailable because the task lease directory allowed group writes. The prepared bootstrap verifies the exact native lease directory's current-user ownership, real path, and identity, then sets only that no-follow directory descriptor to mode 0700 and verifies the result. Parent directories, other leases, and the existing snapshot guard are unchanged. No complete original-state-capture custody is claimed for the failed run; the later corrected cell passed with the reviewed environment preparation. Raw Doctor output remains private.
The successful three-channel cell covers five supported Tlon migration scopes plus ten canonical Matrix/Mattermost neighbor scopes, exact installed
dist/**andopenclaw.mjsbytes/layout, exact original config backup bytes, Doctor backup preimages, canonical precedence, unrelated config preservation, plugin discovery, actual Tlon account resolution, and second-Doctor idempotence. Its fixture predeclares the already-required Codex plugin as enabled and allowed: the existing implicit-default-route repair had otherwise added exactly those two policy fields. This makes unrelated plugin policy canonical before update while preserving exact whole authoredplugins.allowandplugins.entriescomparisons. Its selected channel plugins are Matrix, Mattermost, and Tlon, with fifteen channel scopes. The earlier four-channel cells remain historical evidence and are not relabeled as this proof.The supplemental installed-byte comparison covers
dist/**andopenclaw.mjs, with package name/version checked separately; other package-root files and dependencies are outside that supplemental inventory. The genuine updater retains its own package-verification checks. No installed driver is patched, no files or dependencies are pruned, and no integrity assertion is disabled. Pnpm 12's observedPNPM_HOME/binlayout is bound through public manager root/bin/list queries and launcher identity. The initial pnpm transport fixture failed before driver installation because it usedPNPM_HOMErather thanPNPM_HOME/bin; that harness defect was corrected before the activation run. The--no-restartcell does not establish service-restart proof. Current-head fixture costs and retained f067 source, SDK, package, and update-cell costs are recorded above. The current-head CI extension cohort passed in 228 s, as recorded above.