Repository navigation
refactor(types): drain chained-assertion ledger — extensions - #124378
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 15, 2026, 11:47 PM ET / August 16, 2026, 03:47 UTC. ClawSweeper reviewWhat this changesEnables chained-type-assertion enforcement for bundled extensions, replaces selected assertions with parsing or typed reconstruction, and narrows remaining exceptions to documented files. Merge readinessKeep this maintainer-authored PR open. The prior browser depth-truncation finding appears addressed, but repository policy requires a direct sibling Codex protocol inspection for the retained Codex-specific ledger entries; that checkout and GitHub network access are unavailable here. Priority: P2 Review scores
Verification
How this fits togetherBundled extensions convert channel, provider, webhook, and MCP input into typed plugin runtime values. The boundary guard and exception ledger control where assertion-based conversions are prohibited or explicitly justified. flowchart LR
A[Channel provider and tool data] --> B[Bundled extension]
B --> C[Boundary parser]
C --> D[Typed plugin runtime]
D --> E[Extension behavior]
F[Assertion guard ledger] --> B
Before merge
Agent review detailsSecurityNone. PR surfaceSource +315, Other +38. Total +353 across 13 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Re-run the exact-head review with the sibling Codex checkout available, validate the retained Codex exception entries against its app-server protocol, and retain the iterative Chrome snapshot conversion. Do we have a high-confidence way to reproduce the issue? Not applicable: this is an internal assertion-safety refactor; the repaired browser path was source-checked but not executed in the read-only checkout. Is this the best way to solve the issue? Unclear: the iterative browser conversion resolves the prior concrete concern, but the overall solution cannot be confirmed without the directly cited Codex protocol source. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 057f98359eb0. 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)
|
|
Land-ready follow-up on the latest ClawSweeper moves:
The old review referenced |
|
Merged via squash.
|
…w#124378) * refactor(types): drain chained-assertion ledger — extensions * fix(types): parse Matrix summary events at the boundary * style(types): satisfy extension map lint * style(types): name the Tlon image marker cleanly * fix(browser): preserve deep MCP snapshots iteratively
What Problem This Solves
The no-chained-type-assertions guard still excluded every bundled plugin scope, leaving 124 findings in 82 extension files outside enforcement.
Why This Change Was Made
This drains the extension portion of the burn-down ledger. Twenty-one fixable assertions now retain type evidence through boundary parsers, schema validation, owner return types, or typed reconstruction. The remaining 103 assertions are narrowed to 70 exact files, each with a reviewable reason describing the dependency, SDK, lifecycle, test-support, or protocol seam that still requires the assertion.
Notable owner fixes include a Zod-owned QA bus request envelope, validated Matrix/Chrome/Zalo/Reef boundary objects, typed provider doctor migrations, and reuse of Discord's canonical persisted-binding normalizer. No public Plugin SDK shape changes.
User Impact
No user-facing feature change. Extension code now gets the chained-assertion guard by default, while malformed external inputs are parsed before entering typed runtime paths.
Evidence
node scripts/run-oxlint.mjs --openclaw-focused-config --config config/oxlint/boundary-guards.json extensions— passnode scripts/run-oxlint.mjs --openclaw-focused-config --config config/oxlint/boundary-guards.json src extensions packages ui/src— passnode scripts/run-vitest.mjs test/scripts/oxlint-boundary-guards.test.ts— 4 tests passnode scripts/check-changed.mjs— changed production/test typechecks and extension/script lint pass; final unrelated runtime-sidecar guard cannot run in this linked worktree because localnode_modules/playwright-coreis intentionally absent (remoteci-fastbackend was unavailable).claude/skills/autoreview/scripts/autoreview --mode branch --base origin/main— clean, no accepted/actionable findings+357/-42(net +315, primarily runtime boundary schemas/parsers); tooling ledger+70/-32; tests+0/-0Codex-backed seams were checked directly against upstream app-server protocol ownership in
codex-rs/app-server-protocol/src/protocol/v2/model.rs,protocol/v2/thread.rs, andprotocol/event_mapping.rs; the Codex assertions remain exact-file entries for transcript and staged lifecycle bridges.