Skip to content

feat!: remove the deprecated Python bridge and inert compatibility options - #815

Merged
steipete merged 14 commits into
mainfrom
steipete/deslop-r3-breaking
Oct 1, 2026
Merged

steipete merged 14 commits into
mainfrom
steipete/deslop-r3-breaking

Conversation

@steipete

@steipete steipete commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

The Python configuration bridge has been deprecated since 0.5.0 and only translated old settings into native mode selection, and four public options were accepted solely for type compatibility while doing nothing: secure-temp chmodSync, atomic adapter chmod/chmodSync, Root nonBlockingRead, and ACL principalSids.

User Impact

Breaking (approved by the maintainer for the next minor release):

  • Removed configureFsSafePython, FsSafePythonConfig, pythonPath, and the six Python environment variables (FS_SAFE_PYTHON_MODE, OPENCLAW_FS_SAFE_PYTHON_MODE, FS_SAFE_PYTHON, OPENCLAW_FS_SAFE_PYTHON, OPENCLAW_PINNED_PYTHON, OPENCLAW_PINNED_WRITE_PYTHON). Use configureFsSafeNative, FsSafeNativeConfig, and FS_SAFE_NATIVE_MODE (or OPENCLAW_FS_SAFE_NATIVE_MODE).
  • Posture note: the Python variables are now ignored. A deployment that still pins FS_SAFE_PYTHON_MODE=require or off runs in auto after upgrading until it sets FS_SAFE_NATIVE_MODE; the changelog and migration guide say so explicitly.
  • Removed the inert options above; callers passing them get TypeScript errors. Descriptor-bound permission adapters (descriptor for secure-temp, FileHandle.chmod/fchmodSync for atomic writes), automatic nonblocking read admission, and direct SID classification are unchanged.

No version bump here; releases stay separate.

Why This Change Was Made

Part of the cleanup campaign: compatibility surface that no longer does anything. Net -172 lines (production -69). Persisted formats, lock protocols, receipts, and platform policies from the compatibility inventory are untouched.

Evidence

  • test/public-api.json regenerated via check-pack --update-public-api: only the Python exports change; check-pack, docs:check, documentation-contract, public-api-surface, and api-coverage tests pass (36).

  • Focused affected suites: 363 passed, 25 platform skips; seven deleted tests exercised only the removed Python behavior. A type-rejection probe confirms removed options fail to compile; 28 native-alias/removed-environment cases pass.

  • tsc, lint:file-size, lint:fs-boundary: pass. Codex autoreview (P0-P2): clean.

  • Tests added or updated when behavior changed

  • Security and compatibility impact considered

  • CHANGELOG.md updated when release-relevant

  • No credentials, private paths, private hosts, or sensitive contents included

A deployment that pinned FS_SAFE_PYTHON_MODE=require or off would silently run in auto after the bridge removal; say so in the changelog and migration guide.
@steipete
steipete requested a review from a team as a code owner October 1, 2026 15:06
@clawsweeper

clawsweeper Bot commented Oct 1, 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.

@clawsweeper clawsweeper Bot added P2 Normal priority bug or improvement with limited blast radius. merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. merge-risk: 🚨 security-boundary 🚨 Merging this PR could weaken sandboxing, authorization, credentials, or sensitive data. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 1, 2026
@clawsweeper

clawsweeper Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed October 1, 2026, 12:51 PM ET / 16:51 UTC (Revision 2).

ClawSweeper review

What this changes

The PR removes the deprecated Python configuration bridge and unused public options, updates API snapshots, and documents migration to native configuration.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

⛔ Blocked before merge - 8 items remain

The removal remains distinct from current main and v0.22.0. The previous upgrade-safety finding is still present: existing native-mode requirements silently change after upgrade.

Priority: P2
Reviewed head: c422a27e96fa90d51033135b3c49f3ad1058677a
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The cleanup is coherent, but the unresolved deployed-policy change blocks quality readiness.
Proof confidence 🌊 off-meta tidepool Not applicable: The supplied authoritative Repository State identifies a MEMBER author, so ordinary contributor setup proof is exempt despite conflicting endpoint association metadata. Loader and Root-routing upgrade validation remains an independent unresolved concern; no stored-data contract changes.
Patch quality 🧂 unranked krab (1/6) Security review found an item that needs attention.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The supplied authoritative Repository State identifies a MEMBER author, so ordinary contributor setup proof is exempt despite conflicting endpoint association metadata. Loader and Root-routing upgrade validation remains an independent unresolved concern; no stored-data contract changes.
Evidence reviewed 10 items Repository policy: Read the full root AGENTS.md; no nested AGENTS.md or maintainer-notes directory exists. Public compatibility and fail-closed filesystem guidance informed the review.
Introduced runtime policy change: The pinned introduced delta removes legacy environment precedence from configuration resolution and required-operation routing. Without modern overrides, legacy require/off configurations select auto.
Current main still retains the bridge: Pinned main maps legacy environment settings into native modes and retains the deprecated configuration exports; the requested removal is not implemented there.
Findings 1 actionable finding [P1] Preserve or explicitly reject legacy native-mode policy
Security Needs attention Legacy native requirement becomes optional: An unchanged deployment can move from require-mode failure to supported fallback solely through upgrade. Preserve or explicitly reject that policy before affected filesystem I/O.

How this fits together

fs-safe guards filesystem operations on untrusted paths. Its process-wide configuration selects native operations, supported guarded fallbacks, or failure when required native support is unavailable.

flowchart TD
 A[Startup configuration] --> C[Native mode selection]
 B[Environment settings] --> C
 C --> D{Selected policy}
 D --> E[Native filesystem operations]
 D --> F[Guarded fallback operations]
 D --> G[Helper unavailable error]
Loading

Decision needed

Question Recommendation
Should legacy require/off environment policies remain mapped during migration, or be rejected before filesystem operations? Retain transitional mapping: Preserve legacy require/off semantics with migration warnings while removing the inert public options.

Why: The reported breaking-release approval does not independently establish acceptance of changing deployed native requirements to auto.

Before merge

  • Preserve or explicitly reject legacy native-mode policy (P1) - With only FS_SAFE_PYTHON_MODE=require set, deleting legacy precedence makes configuration and required-operation routing select auto. An unavailable addon then permits supported fallback instead of throwing helper-unavailable; legacy off also starts attempting native loading. These settings remain active in v0.22.0. The migration warning documents the change but does not preserve deployed policy. Retain the mapping or reject obsolete settings before affected operations. This prior finding remains unresolved.
  • Resolve security concern: Legacy native requirement becomes optional - An unchanged deployment can move from require-mode failure to supported fallback solely through upgrade. Preserve or explicitly reject that policy before affected filesystem I/O.
  • Resolve merge risk (P2) - Existing legacy require deployments silently permit supported fallback, while legacy off deployments begin attempting native loading; a safe transition needs an explicit maintainer decision.
  • Resolve merge risk (P1) - Fresh configuration and upgrades from legacy require/off need compatibility validation through the production loader and affected Root routing, including unavailable native support.
  • Complete next step (P2) - Choose and implement a safe legacy-mode transition, then validate fresh configurations and unchanged legacy require/off upgrades through the production loader and affected Root operations.
  • Improve patch quality - Implement the selected transition without silently changing legacy require/off semantics.
  • Improve patch quality - Verify fresh native configuration and unchanged legacy upgrades through production loader and Root routing, including unavailable native support.
  • Resolve maintainer decision - Resolve the maintainer decision shown above before merge.

Findings

  • [P1] Preserve or explicitly reject legacy native-mode policy — src/native-config.ts:33-36
  • [medium] Legacy native requirement becomes optional — src/native-config.ts:36
Agent review details

Security

Needs attention: Removing legacy precedence can silently relax a deployed native requirement; no additional supply-chain change or root-escape exploit was established.

Review metrics

Metric Value Why it matters
Production and test delta production +4/-73; tests and API fixture +21/-107 The branch reduces compatibility surface without production growth; removed legacy-policy coverage is relevant to the upgrade transition.

Merge-risk options

Maintainer options:

  1. Preserve deployed mode policy (recommended)
    Keep legacy environment mapping and warnings, then verify modern fresh configurations and unchanged legacy upgrades through loader and Root routing.
  2. Require explicit migration
    Reject obsolete policy settings before affected filesystem operations and document the resulting upgrade failure with focused compatibility coverage.

Technical review

Best possible solution:

Remove inert type options while retaining transitional legacy mode mapping and warnings, or reject obsolete policy settings before filesystem operations.

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

Yes, from source: with only legacy require/off configured, both mode selectors now choose auto; the loader and Root removal show the resulting policy change. No runtime reproduction was executed.

Is this the best way to solve the issue?

No. Removing inert options is focused, but silently ignoring active legacy policy is less safe than transitional mapping or explicit rejection.

Full review comments:

  • [P1] Preserve or explicitly reject legacy native-mode policy — src/native-config.ts:33-36
    With only FS_SAFE_PYTHON_MODE=require set, deleting legacy precedence makes configuration and required-operation routing select auto. An unavailable addon then permits supported fallback instead of throwing helper-unavailable; legacy off also starts attempting native loading. These settings remain active in v0.22.0. The migration warning documents the change but does not preserve deployed policy. Retain the mapping or reject obsolete settings before affected operations. This prior finding remains unresolved.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.98

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This is a bounded package cleanup with upgrade implications, without evidence of an active released regression.
  • merge-risk: 🚨 compatibility: Removed public members break existing consumers and released legacy settings change effective runtime mode.
  • merge-risk: 🚨 security-boundary: Upgrading can silently replace a configured native requirement with supported fallback.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🌊 off-meta tidepool and patch quality is 🧂 unranked krab.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: The supplied authoritative Repository State identifies a MEMBER author, so ordinary contributor setup proof is exempt despite conflicting endpoint association metadata. Loader and Root-routing upgrade validation remains an independent unresolved concern; no stored-data contract changes.

Evidence

Security concerns:

  • [medium] Legacy native requirement becomes optional — src/native-config.ts:36
    An unchanged deployment can move from require-mode failure to supported fallback solely through upgrade. Preserve or explicitly reject that policy before affected filesystem I/O.
    Confidence: 0.99

What I checked:

  • Repository policy: Read the full root AGENTS.md; no nested AGENTS.md or maintainer-notes directory exists. Public compatibility and fail-closed filesystem guidance informed the review. (AGENTS.md, c422a27e96fa)
  • Introduced runtime policy change: The pinned introduced delta removes legacy environment precedence from configuration resolution and required-operation routing. Without modern overrides, legacy require/off configurations select auto. (src/native-config.ts:36, c422a27e96fa)
  • Current main still retains the bridge: Pinned main maps legacy environment settings into native modes and retains the deprecated configuration exports; the requested removal is not implemented there. (src/native-config.ts, e4d9f9b790ae)
  • Released upgrade contract: v0.22.0 also maps legacy require/off settings, establishing that unchanged released deployments encounter this policy change during upgrade. (src/native-config.ts, ef7b5a909bff)
  • Filesystem consequences: The loader skips loading in off mode, throws helper-unavailable in require mode when unavailable, and returns no binding in auto mode. Root removal separately switches from native removal to fallback when the required-mode predicate becomes false. (src/native.ts:208, c422a27e96fa)
  • Required-operation routing: Root removal consumes the changed predicate before choosing its native or fallback operation owner. (src/root-impl.ts:989, c422a27e96fa)

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)

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 (1 earlier review cycle)
  • reviewed 2026-10-01T15:09:45.089Z sha 96cc1e2 :: blocked before merge. :: [P1] Preserve or explicitly reject legacy native-mode policy

)

Parameterize sync/async twin scenarios in the atomic, copy-fallback, and move regression suites over explicit rows that keep the real entry points, typed fault injectors, and throw-versus-rejection assertions. Test counts are identical in all nine files; net -438 lines.
)

Collapse sync/async twin scenarios into rows, share the Root-read observer and Windows hostile-diagnostic harnesses, table the read-bypass rejections while keeping exact error codes, and delete five smoke tests strictly covered by stronger tests. Tests only; 250 to 246 expanded tests, net -363 lines.
…ptor cases (#806)

Share one cfg(test) temp-path builder and the Windows test directory opener across 20 native test modules, replace six TAR codec fixture arrays with one helper, and parameterize the cancellation and descriptor-rejection twins. All 188 Rust test names are unchanged; Rust test code only, net -247 lines.
Fold the PAX security, decimal, and raw-admission suites into archive-pax.test.ts and the GNU and ignored-member suites into archive-tar-admission.test.ts, sharing one backend matrix and fixture setup while keeping every family's assertions. All 2,048 case names and routes are preserved; the CI lines selecting the removed files are updated. Net -145 test lines.
Share the Root-lock directory-replacement fixture (keeping the Windows and POSIX implementations), table durable-queue transitions, and share ownership-token acquisition and final-resolver interception scaffolding. Test counts identical; tests only, net -168 lines.
…es (#809)

Share temp-workspace observers and lifecycle fixtures, staged-settlement hostile errors, and cleanup bindings through test helpers; table directory-durability error routes; merge the split canonical-admission suite into root discovery. 481 to 480 expanded tests (one merged duplicate scenario keeps both assertions); tests only, net -256 lines.
Merge five split Root test siblings back into their owners once their fixtures are shared, add shared no-replace adapter and selected-target admission helpers, and table writable-open collisions. 168 expanded tests before and after; tests only, net -267 lines and five fewer files.
…es (#811)

Replace 29 copies of the bundled-addon probe with one helper that keeps optional and required-environment policies, share the native archive parity fixture, table permission diagnostics, API wrapper, home-path and queue layout cases, and delete two DACL cases strictly covered by a stronger test. Tests only; net -354 lines.
Merge the Windows locality-failure suite into the portable Windows security suite with shared setup and read spies, run workspace read contracts per sync/async variant from one body, share fallback-write cleanup and the FIFO-swap interceptor, table Root-open mode options, and drop one subsumed smoke test. Tests only; net -175 lines.
…#814)

Share atomic settlement and copy close-precedence test machinery, merge the copy-wrapper and three ZIP admission siblings into their owners, and table copy-fallback guard, publication target-swap, preserved-mode, and TAR boundary twins. 525 registered tests before and after; tests only, net -562 lines and four fewer files.
…pete/deslop-r3-breaking

# Conflicts:
#	test/atomic-dirmode-regression.test.ts
#	test/atomic-fchmod-regression.test.ts
…eaking

# Conflicts:
#	test/atomic-dirmode-regression.test.ts
#	test/atomic-fchmod-regression.test.ts
@steipete
steipete merged commit f5f0c9e into main Oct 1, 2026
43 checks passed
@steipete
steipete deleted the steipete/deslop-r3-breaking branch October 1, 2026 17:05
steipete added a commit that referenced this pull request Oct 16, 2026
Reject removed Python-mode variables with an actionable migration error unless explicit native configuration takes precedence. Preserve the intentional removal from #815 while preventing require/off from silently becoming auto. Document the exact environment and API migration for openclaw/acpx#877.

Run manual release dry runs through unsigned Windows runtime checks and host-package smoke tests without entering release-signing. Preserve protected tag signing, signed runtime validation, package verification, and publication dependencies.

Validation: legacy-version reproduction; focused regression tests; full Crabbox gate with its stale documentation assertion corrected and rerun; package checks; actionlint; isolated Codex autoreview through P2; exact-head cross-platform CI. No version bump, tag, release, security-setting change, or deployment.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. merge-risk: 🚨 security-boundary 🚨 Merging this PR could weaken sandboxing, authorization, credentials, or sensitive data. P2 Normal priority bug or improvement with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant