Repository navigation
refactor(types): drain chained-assertion ledger β agents - #124354
Conversation
|
π¦π Pull request received. I will update this pull request when review starts. |
|
Codex review: found issues before merge. Reviewed August 15, 2026, 11:01 PM ET / August 16, 2026, 03:01 UTC. ClawSweeper reviewWhat this changesThis PR replaces broad chained-type-assertion exclusions in agent and meeting-bot code with typed runtime boundaries and named file-level ledger entries. Merge readinessKeep open: the prior stream-iterator blocker is fixed, but the provider-hook cleanup replaces a chained assertion with prohibited reflection and needs one focused revision. Priority: P2 Review scores
Verification
How this fits togetherAgent runtime assembles file tools, provider-failure classifiers, and model event streams before passing results into sessions and channels. This PR tightens type boundaries around those internal adapters. flowchart LR
A[Model tool calls] --> B[Agent tool assembly]
B --> C[File tool adapters]
C --> D[Session operations]
E[Provider errors] --> F[Failover classifier]
G[Model event streams] --> H[Stream normalization]
H --> D
Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource +71, Tests +31, Other +12. Total +114 across 8 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Keep the typed file-tool and stream-boundary refactor, but invoke the validated provider export directly instead of using reflection. Do we have a high-confidence way to reproduce the issue? Not applicable for this cleanup PR; the previous PR-head stream-descriptor regression is now directly covered by a focused source test. Is this the best way to solve the issue? No: the stream repair is appropriate, but the provider-hook change should use a narrowed direct call rather than reflection. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against a73249c7cd81. 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)
|
4aafe13 to
215704d
Compare
215704d to
ada4b5c
Compare
|
Merged via squash.
|
β¦4354) * refactor(types): drain chained-assertion ledger β agents * fix(agents): preserve non-configurable stream iterators * refactor(agents): call provider failover hook directly
What Problem This Solves
The chained-type-assertion boundary rule could not enforce
src/agentsorsrc/meeting-botbecause both directories were excluded wholesale, leaving 34 production findings hidden behind two scope-level ledger entries.Why This Change Was Made
This removes both scope exclusions, repairs 11 assertions at their owning type boundaries, and converts the 23 load-bearing remainder into 14 explicit file-level entries with one-line reasons. The main owner repair is a single schema-checked erasure adapter for all six session file-tool factories; the other repairs use a discriminated pagination API, parsed dynamic-module hooks, guarded plugin metadata lookup, assignment-compatible stream iterator replacement, and existing session-entry narrowing.
The file-level remainder records the actual contracts that need broader redesign: synthetic messages without provider metadata, provider-only media blocks, DOM/Undici type namespaces, config-only hashing, generic session and meeting projections, SDK header sentinels, and global symbol/Proxy state.
User Impact
No user-visible behavior changes. New chained assertions are now enforced throughout both assigned directories except for the named, reviewable file-level seams.
Evidence
node scripts/run-oxlint.mjs --openclaw-focused-config --config config/oxlint/boundary-guards.json src/agents src/meeting-botnode scripts/run-oxlint.mjs --openclaw-focused-config --config config/oxlint/boundary-guards.json src extensions packages ui/srcCannot redefine property: Symbol(Symbol.asyncIterator)and passes with the assignment-compatibleReflect.setimplementation.OPENCLAW_HEAVY_CHECK_LOCK_SCOPE=worktree node scripts/check-changed.mjspassed after the remoteci-fastbackend was unavailable and the wrapper fell back locally..claude/skills/autoreview/scripts/autoreview --mode branch --base origin/mainreported no accepted/actionable findings on the refreshed head.