Repository navigation
refactor(paths): keep identity lookup imports passive - #200203
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesThis PR moves unchanged path-identity resolvers into the existing path-existence module and updates consumers to import narrow helper owners. Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR makes a focused import-boundary improvement without an identified correctness regression; it remains a draft with unfinished validation. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherAgent, session, CLI, and database owners pass filesystem paths into shared identity helpers, which return canonical ancestor-based identities or absolute lexical fallbacks. flowchart TD
A[Agent and session callers] --> C[Path existence owner]
B[CLI and database callers] --> C
C --> D[Native filesystem probes]
D --> E[Canonical identity or lexical fallback]
F[Boundary operations] --> G[Existing fs safe boundary owner]
Technical reviewBest possible solution: Retain the focused owner move and complete validation of the reviewed candidate before taking this PR out of draft. Do we have a high-confidence way to reproduce the issue? Source inspection establishes the broad imports on the base and their replacement with narrow owners; no runtime reproduction was run for this behavior-preserving refactor. Is this the best way to solve the issue? The change uses existing owners, preserves resolver semantics, removes superseded internal exports, and migrates callers without introducing parallel machinery. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against ec025eba2df1. Provenance checked
TestingProof path: none. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +4, Tests +19. Total +23 across 57 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes: No label changes. Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 16, 2026, 1:37 PM ET / 18:37 UTC. |
|
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
…200242) #200203 moved resolveIdentityPathViaExistingAncestor from src/infra/boundary-path.ts to src/infra/path-existence.ts. #200192, merged just before it, added a new import of that function from boundary-path.js in oauth-refresh-peers.ts, so main has failed to typecheck and bundle since 9e66164. Import it from path-existence.js, as #200203 did for the other callers.
* fix(paths): keep identity lookup imports passive * fix(paths): keep ancestor probe private after owner move
…penclaw#200242) openclaw#200203 moved resolveIdentityPathViaExistingAncestor from src/infra/boundary-path.ts to src/infra/path-existence.ts. openclaw#200192, merged just before it, added a new import of that function from boundary-path.js in oauth-refresh-peers.ts, so main has failed to typecheck and bundle since 8ecc0fc. Import it from path-existence.js, as openclaw#200203 did for the other callers.
What Problem This Solves
Path-identity and shared-state lookups import broad filesystem-operation code even though they only need ancestor resolution and existing path helpers.
User Impact
No intended user-visible behavior change. Symlink identity, missing-path handling, Windows path behavior, and the existing Bun caller-lifetime workaround remain unchanged. No configuration, schema, or public SDK changes are included.
Why This Change Was Made
Move the two unchanged identity resolvers into the existing path-existence owner and migrate their internal consumers. Shared-main and state-database paths now import their existing home/state helpers directly. The old internal identity exports are removed; the broader boundary resolver remains in its current owner. The async ancestor probe is now private because its sole caller lives in the same file.
Existing identity tests move with the implementation. Caller mocks follow the canonical owner, and the existing source import-boundary test covers the three passive roots. Production changes add four net lines from import formatting; tests/support add 19. No cache, wrapper, or new runtime module is introduced.
Evidence
Frozen base:
3c512c5830183db9d4754f3a46a82248351a8138; signed candidate:ce26d9003bac855029b5d28fa56600a13c0ba2d5.Both resolver implementations are byte-identical after relocation. Review of all internal consumers found no stale imports; the existing public SDK exports are unchanged. Independent owner/caller review found no source blocker. Formatting, commit-hook checks, and
git diff --checkpassed.Native source review at P0–P3 completed for the original owner move: two caller assignments and the integration assignment report no findings. The integration completion covers all 57 original patches, the complete three-root source closure, and pinned dependency source. A separate exact-commit review of the subsequent unused-export correction is also complete with no findings. These are static source reviews, not executed runtime proof.
The first Node CI attempt selected source
36b74b20da86ea7385bb88669b593e6cede3820fwith separate trusted harness4940240568f12255fb7e392357f5b741b742311c, Node 24.22.1, and Node test policy. It exposed the unused async-probe export, which is corrected in the current head. Relevant type graphs and its dist build step passed, but the attempt was superseded and finished cancelled; unfinished jobs were intentionally cancelled and are not counted as passing. Its other recorded failures are retained for attribution, not waived.Local dependencies are unqualified, and an earlier native allocation still has unresolved settlement. No replacement native allocation or local dependency reconciliation is being made. The repository's authorized draft/exact-SHA CI route supplies the new head's required proof.
The replacement Node CI attempt verified selected source
ce26d9003bac855029b5d28fa56600a13c0ba2d5, separate trusted harness54cb172fb2adf6f77c936c80e3a7ee82cb74e135, Node 24.22.1, and Node test policy. All other workflow inputs retain their defaults. This follows the export correction; it is not a retry of the unchanged earlier candidate.Current-head production, test, script, and tooling type checks passed: 38 native typecheck leaves, with every planned leaf completed. The build-artifacts job passed
pnpm build:ci-artifacts, generated-asset/schema checks, CLI help/status smoke checks, native-host checks, and built artifact tests. A separate exact-headscripts/build-all.mtsrun completed the full build and cache-miss unified declarations. Its laternpm pack --ignore-scriptsstep timed out after 900,000 ms, so packaging and Docker remain failed with cause UNKNOWN. Observed warnings remain explicit: largest CSS gzip exceeded its ceiling by 844 bytes; gateway watch used 12,000 ms CPU in a 10,000 ms window against an 8,000 ms threshold. Neither warning is attributed as a change caused by this PR.The exact-head runtime archive confirms the three shared passive entry chunks resolve to 22 emitted files, 44,774 bytes, 25 source regions, and 56 static imports. Their closure excludes
boundary-path, the broad config/path and utils entries,fs-safe/advanced, and active auth/database loaders. The only non-builtin external is the pinnedfs-safe/pathentry. This is static dependency proof, not executed lifetime or RSS evidence; separate standalone build groups are outside this closure.Current-head focused proof passed:
agent-dir-registry.test.ts8 cases,path-existence.test.ts14, service-installation policy 25,server-import-boundary.test.ts39 including the three new passive roots, and operation-admission 49. The built boundary suite also passed 126 cases across 11 files, including the changed lexical-fallback case and home/path siblings. The mapped jobs completed successfully; no Windows or actual Bun execution is inferred from Node results.This manual run is not green. Recorded failures include fixture/expectation and tooling failures with source or earlier-run evidence. Unresolved cases include the source session-history benchmark 60-second deadline, npm CLI recovery 240-second deadline, retained-pool synchronous-I/O observations, goal continuation ordering, and transport logging host/context state. The isolated Gateway registry-change and a separate
config.applytimeout also remain UNKNOWN. The local-socket failure has a concrete existing fixture-length cause. These remain UNKNOWN where causality is unproved; no blanket inherited-failure waiver is claimed.Native preparation completed on unchanged
ce26without rebasing. The ordinary PR CI attempt tested merge3cd6bd6e642b2d6c4c7db4d5ce15045f98466611with ordered parents091a90e567c19d1dd2e3bcd8f5a35d479fd9d3e9andce26d9003bac855029b5d28fa56600a13c0ba2d5. All 147 jobs are terminal: 120 passed, 25 skipped, one FaceTime test-import failure and its aggregate failed. Security-fast, build, and all PostgreSQL jobs passed. The FaceTime test supplies a spawn-only child-process mock; its existing SDK test-helper import reachespromisify(execFile)introduced before this branch, so the missing export fails collection. All eight inspected failure inputs are identical between the tested main parent and merge. This is concrete source/history attribution, not a claimed earlier matching test run. The supported native exception is being reviewed for that sole current failure; the accepted squash auto-merge request remains gated and the PR is not yet merged. Earlier manual packaging and UNKNOWN failures retain their original failed status.The exact-head ClawSweeper review found no actionable source issue. Its Rank-up request for candidate validation and emitted-boundary inspection is addressed by the focused, type, build, declaration, and compiled-closure evidence above. The sole ordinary-PR failure is attributed above and proposed for the supported native exception. The earlier manual-run UNKNOWN cases and packaging failure remain unresolved and are not relabeled as inherited or passing.
No RSS reduction, whole-Gateway memory improvement, or executed compiled-lifetime result is claimed.