Repository navigation
refactor(scripts): remove test-only extension package boundary helper - #129171
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: found issues before merge. Reviewed August 25, 2026, 5:26 AM ET / 09:26 UTC. ClawSweeper reviewWhat this changesThe PR deletes a test-only extension package-boundary helper and rewrites its contract test to read the live TypeScript path configuration. Merge readinessKeep open: the prior P2 remains. The replacement test accepts any contained alias and no longer enforces the complete approved alias inventory that the deleted helper supplied. Priority: P3 Review scores
Verification
Live VerificationCommand: Result: PASS (completed) Assertions:
How this fits togetherExtension package-boundary checks restrict which declaration surfaces bundled plugins can compile against. Shared alias configuration feeds extension TypeScript projects and CI’s package-boundary compiler check. flowchart LR
A[Package metadata] --> C[Boundary contract test]
B[Shared alias configuration] --> C
C --> D[Extension TypeScript projects]
C --> E[Allowed declarations]
C --> F[Rejected boundary escapes]
F --> G[CI compiler check]
Before merge
Findings
Agent review detailsSecurityNone. PR surfaceTests +95, Other -363. Total -268 across 2 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Retain a complete owner-derived allowed alias inventory and add a regression proving an undeclared but contained alias fails while every declared alias remains valid. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible: an extra alias rooted under ../dist satisfies the changed generic containment loop, despite not being in the former approved inventory. Is this the best way to solve the issue? No: normalized traversal rejection is useful, but it does not restore the exact alias-inventory protection removed with the helper. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 6fb330349200. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Merged via squash.
|
…openclaw#129171) * refactor(scripts): remove test-only extension package boundary helper * test(plugins): preserve exact extension boundary containment
What Problem This Solves
The plugin package-boundary checks maintained a separate 363-line executable mirror of the actual checked-in TypeScript alias configuration even though no runtime, build, package script, release workflow, or shipped command ever consumed that mirror. Its only consumer was one contract test, so adding or changing a real plugin alias required keeping an obsolete second owner synchronized.
Why This Change Was Made
Delete the unused executable mirror completely and make the existing architecture contract verify the real configuration owners directly. The test now derives private SDK aliases from the live SDK entrypoint registry, ACP declarations from the real package exports, and every xAI override from the actual shared alias map. It independently pins all eight security-sensitive omitted aliases and rejects normalized path traversal outside each declaration's originally declared safe root. It retains all exact include/exclude rules, per-plugin inheritance and SDK dependencies, xAI omissions/stubs, private-memory SDK exports, and core-isolation checks. No production replacement, public contract, release command, or package-boundary CI guard is added or changed.
User Impact
No user-visible behavior changes. Maintainers get one canonical package-boundary configuration instead of a second executable copy that existed solely for a test. Net production change: -363 lines; retained contract-test change: +95 lines, including explicit declaration-root traversal security coverage.
Evidence
OPENCLAW_VITEST_FS_MODULE_CACHE_PATH=/private/tmp/openclaw-cleanup20k-lane1-vitest-cache node scripts/run-vitest.mjs --configLoader runner src/plugins/contracts/extension-package-project-boundaries.test.ts test/scripts/check-extension-package-tsc-boundary.test.ts test/scripts/prepare-extension-package-boundary-artifacts.test.ts— 49 tests passed across all three actual contract, typecheck-owner, and artifact-owner suites.../dist/../src/gateway/auth.tsand equivalentpackages/extensionsescapes are rejected while real declaration targets remain valid.node --import tsx scripts/prepare-extension-package-boundary-artifacts.mts --print-input-fingerprint— actual hosted-CI fingerprint command succeeds.node scripts/run-oxlint.mjs --tsconfig config/tsconfig/oxlint.core.json src/plugins/contracts/extension-package-project-boundaries.test.ts— clean.