chore: sync upstream v2026.3.7 to v2026.3.8#2360
Merged
alexey-pelykh merged 1 commit intomainfrom Apr 15, 2026
Merged
Conversation
Disposition-filtered diff-sync of 769 upstream files: 439 INCLUDE, 249 EXCLUDE, 21 EXTRACT (deferred), 60 PROTECTED. Key upstream changes adopted: - Cron: stagger missed jobs on restart, catch-up flow refactor, gmail hook - Telegram: abort getUpdates on shutdown, polling session extract - Gateway: detect launchd supervision via XPC, config pre-flight, release lock on restart failure, health state configPath - Skills: pin validated download roots, remote skill eligibility - Node-host: bind bun/deno approval scripts - Android: remove self-update, mic/screen foreground services, location mode - Mattermost: threaded replies via root_id - TUI: infer workspace agent - Docs: configuration-reference, troubleshooting, feishu channel screenshots - Extensions: releaseChecks for 6 plugins - Talk: silenceTimeoutMs schema, provider cross-validation - Cron delivery: double-announce guard fix - Dockerfile: runtime-assets stage with pnpm prune - Added @larksuiteoapi/node-sdk dep (Feishu extension runtime) Build stabilization: - Rebrand transforms (OpenClaw→RemoteClaw in identifiers, paths, re-exports) - Compat aliases for upstream function renames in agent-scope.ts - Reverted model-auth.ts/transcript.ts (gutted pi-* import regression) - Domain refs (.ai→.org), docs framework compat (Accordion→details) - Dead code chain elimination via error cascade discovery: - 16 dead files deleted (no stubs created) - skillCommands pipeline cascade-removed (16 consumer files) - SkillCommandSpec type cascade-removed - Reverted pi-tools.policy.ts, transcript-policy.ts to fork versions - Extracted KEEP additions into fork cron test harnesses - Surgical import removal from core KEEP files - Rewired mattermost normalizeProviderId to provider-utils.js Test stabilization: - agent-scope aliases: correct null/empty semantics - auth env injection: wire through fork's provider-auth - config schema: per-agent workspace validation, auth/runtime fields - Cron timer: missed-job stagger limit - Security audit: defaults-only workspace resolution 730/730 test files pass, 6427 tests green, 2 skipped. Cherry-picked-from: openclaw/openclaw v2026.3.7..v2026.3.8 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
alexey-pelykh
added a commit
that referenced
this pull request
Apr 19, 2026
…dispatch (#2408) The sync from upstream v2026.3.8 (#2360) replaced the function body with an unconditional-throw stub, crashing every agent dispatch across Slack auto-reply, the /agent CLI, and cron isolated-agent runs. Users saw "⚠️ Agent failed before reply: resolveAgentRuntimeOrThrow is not available in RemoteClaw fork". Restore the prescribed semantics: delegate to the non-throwing sibling resolveAgentRuntime; throw only when no runtime is configured, with a message that names the agent id and points to agents.defaults.runtime. Return type is string (not the literal union) to avoid over-constraining fork-native runtime names, matching resolveAgentRuntime's return shape. All 3 live callers already express this contract; no call-site changes required. Existing call-site mocks return "claude" — they remain semantically valid. Header comment at agent-scope.ts:437 updated from "Upstream-compat stubs (gutted in fork)" to "Fork-native runtime & auth resolvers" since every function in the section is fork-native. Regression test covers both paths: configured → return, missing → throw, with assertions on the throw-message format. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
9 tasks
alexey-pelykh
added a commit
that referenced
this pull request
Apr 19, 2026
…dispatch (#2408) (#2423) The sync from upstream v2026.3.8 (#2360) replaced the function body with an unconditional-throw stub, crashing every agent dispatch across Slack auto-reply, the /agent CLI, and cron isolated-agent runs. Users saw "⚠️ Agent failed before reply: resolveAgentRuntimeOrThrow is not available in RemoteClaw fork". Restore the prescribed semantics: delegate to the non-throwing sibling resolveAgentRuntime; throw only when no runtime is configured, with a message that names the agent id and points to agents.defaults.runtime. Return type is string (not the literal union) to avoid over-constraining fork-native runtime names, matching resolveAgentRuntime's return shape. All 3 live callers already express this contract; no call-site changes required. Existing call-site mocks return "claude" — they remain semantically valid. Header comment at agent-scope.ts:437 updated from "Upstream-compat stubs (gutted in fork)" to "Fork-native runtime & auth resolvers" since every function in the section is fork-native. Regression test covers both paths: configured → return, missing → throw, with assertions on the throw-message format. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This was referenced Apr 19, 2026
alexey-pelykh
added a commit
that referenced
this pull request
Apr 21, 2026
Implements H9 of ADR 0005 — semantic-stub detection that H7 (throwing-stub AST gate) and H8 (test-side mock baseline) cannot see. Every runtime export in src/agents/ depth-1 now carries an attestation declaring the implementation status: "live" / "stub" / "partial" / "deprecated". The attestation-gate CI job enforces structural invariants; CODEOWNERS enforces semantic review. Design decisions (per user direction to proceed as issue describes): - 4-category set including "partial" for legitimately-gutted-to-default functions that work in the narrow case - Inline placement (top of file, after imports) to prevent drift - Plain object with `as const` for tree-shakability (zero bundle cost) - CODEOWNERS /src/agents/ → @alexey-pelykh (solo maintainer project) - Initial scope: src/agents/* depth-1. Expand to src/middleware/, etc., in follow-up issues if the pattern proves valuable Rollout: - 93 attested modules, 319 attestations across src/agents/* depth-1 - Auto-classified "live" by default; 11 semantic-stub exports manually classified "partial" (functions returning hardcoded defaults post- gutting — e.g., lookupContextTokens returns constant 200000, resolveThinkingDefault returns undefined) - No current "stub" or "deprecated" entries (nothing currently broken) Gate invariants: 1. Every runtime export has an attestation entry (missing fails CI) 2. Every entry corresponds to a current export (stale fails CI) 3. "live" attestation on a throwing-stub-shape function fails 4. "stub" attestation on a function with non-test callers fails Enforced via scripts/check-attestations.mjs (AST-based classifier with 10 self-test fixtures covering all 4 invariants, expression-body arrow enumeration, category validation, and non-function exclusion). Polish iterations (3 total): 1. Extracted ~330 LOC of duplicated AST classification into new scripts/lib/throwing-stub-shape.mjs shared by check-attestations, generate-attestations, and check-throwing-stub-callers. Single site for the four calibration signals; net -373 LOC across 3 scripts, +210 LOC shared lib 2. Added --self-test mode with 10 fixtures + wired into CI (symmetric with throwing-stub-callers-gate convention). Regressions in the classifier itself now caught before the main gate runs 3. Aligned test-file filter across both attestation scripts via isTestLikeTypeScriptFile; removed 2 dead MODULE_ATTESTATIONS blocks from test-harness files that slipped past the naive filter Validation (fresh-context subprocess, session 2df6a80c) initially found one blocking issue (expression-body arrows silently excluded by isBlock filter) + 3 non-blocking. All addressed; re-validated CLEAN. Polish (session 9a3fc434): CLEAN after 3 iterations. Dry-run verification: - Probe 1 (delete attestation): FAIL "has no MODULE_ATTESTATIONS entry" - Probe 2 (add stale attestation): FAIL "stale attestation" - Probe 3 (live on throwing-stub): FAIL "attested 'live' but matches throwing-stub pattern" - Probe 4 (stub with live callers): FAIL "has 9 non-test caller(s)" AC 8 (PR #2360 dry-run): time-traveling to PR #2360's state is impractical; verified the equivalent case — a "live" attestation on a throwing-stub-shape function fails, and an unattested new export fails. These are the precise failure modes PR #2360 exhibited. HQ ADR 0005 H9 description updated in parallel (hq commit pending) to reflect the as-shipped scope and 6-month sunset review. scripts/generate-attestations.mjs is a one-shot bootstrap tool that remains as a maintenance utility for extending the attestation scope to new directories (idempotent; skips modules with existing blocks).
7 tasks
alexey-pelykh
added a commit
that referenced
this pull request
Apr 21, 2026
…) (#2446) Implements H9 of ADR 0005 — semantic-stub detection that H7 (throwing-stub AST gate) and H8 (test-side mock baseline) cannot see. Every runtime export in src/agents/ depth-1 now carries an attestation declaring the implementation status: "live" / "stub" / "partial" / "deprecated". The attestation-gate CI job enforces structural invariants; CODEOWNERS enforces semantic review. Design decisions (per user direction to proceed as issue describes): - 4-category set including "partial" for legitimately-gutted-to-default functions that work in the narrow case - Inline placement (top of file, after imports) to prevent drift - Plain object with `as const` for tree-shakability (zero bundle cost) - CODEOWNERS /src/agents/ → @alexey-pelykh (solo maintainer project) - Initial scope: src/agents/* depth-1. Expand to src/middleware/, etc., in follow-up issues if the pattern proves valuable Rollout: - 93 attested modules, 319 attestations across src/agents/* depth-1 - Auto-classified "live" by default; 11 semantic-stub exports manually classified "partial" (functions returning hardcoded defaults post- gutting — e.g., lookupContextTokens returns constant 200000, resolveThinkingDefault returns undefined) - No current "stub" or "deprecated" entries (nothing currently broken) Gate invariants: 1. Every runtime export has an attestation entry (missing fails CI) 2. Every entry corresponds to a current export (stale fails CI) 3. "live" attestation on a throwing-stub-shape function fails 4. "stub" attestation on a function with non-test callers fails Enforced via scripts/check-attestations.mjs (AST-based classifier with 10 self-test fixtures covering all 4 invariants, expression-body arrow enumeration, category validation, and non-function exclusion). Polish iterations (3 total): 1. Extracted ~330 LOC of duplicated AST classification into new scripts/lib/throwing-stub-shape.mjs shared by check-attestations, generate-attestations, and check-throwing-stub-callers. Single site for the four calibration signals; net -373 LOC across 3 scripts, +210 LOC shared lib 2. Added --self-test mode with 10 fixtures + wired into CI (symmetric with throwing-stub-callers-gate convention). Regressions in the classifier itself now caught before the main gate runs 3. Aligned test-file filter across both attestation scripts via isTestLikeTypeScriptFile; removed 2 dead MODULE_ATTESTATIONS blocks from test-harness files that slipped past the naive filter Validation (fresh-context subprocess, session 2df6a80c) initially found one blocking issue (expression-body arrows silently excluded by isBlock filter) + 3 non-blocking. All addressed; re-validated CLEAN. Polish (session 9a3fc434): CLEAN after 3 iterations. Dry-run verification: - Probe 1 (delete attestation): FAIL "has no MODULE_ATTESTATIONS entry" - Probe 2 (add stale attestation): FAIL "stale attestation" - Probe 3 (live on throwing-stub): FAIL "attested 'live' but matches throwing-stub pattern" - Probe 4 (stub with live callers): FAIL "has 9 non-test caller(s)" AC 8 (PR #2360 dry-run): time-traveling to PR #2360's state is impractical; verified the equivalent case — a "live" attestation on a throwing-stub-shape function fails, and an unattested new export fails. These are the precise failure modes PR #2360 exhibited. HQ ADR 0005 H9 description updated in parallel (hq commit pending) to reflect the as-shipped scope and 6-month sunset review. scripts/generate-attestations.mjs is a one-shot bootstrap tool that remains as a maintenance utility for extending the attestation scope to new directories (idempotent; skips modules with existing blocks).
alexey-pelykh
added a commit
that referenced
this pull request
Apr 21, 2026
… + rebaseline allowlist (#2355) Restore ADR 0005 H3 (PR #2357) after it was reverted by the v2026.3.7→v2026.3.8 sync (PR #2360, `fc2cefeeab`), which rolled `scripts/check-no-zombie-imports.mjs` back to its pre-H3 hardcoded form and orphaned the JSON allowlist + baselines. Changes: 1. Restore H3 gate script with registry-derived `deadModulePatterns`, JSON allowlist loader, tombstone existence scan, and baseline comparison — identical to `af4169bf9a` minus the targeted narrowing in point 2. 2. Narrow `acp/runtime` fallback pattern: split broad `acp/runtime` into `acp/runtime/session-meta` and `acp/runtime/session-identifiers` (the only 4-line stubs in that namespace). `acp/runtime/errors`, `acp/runtime/registry`, and `acp/runtime/types` are live public API re-exported by `src/plugin-sdk` — the broad pattern was catching them as false positives. 3. Rebaseline allowlist JSON from 68 → 23 entries: - 42 stale entries removed (line drift during H3's offline period) - 11 false-positive entries removed post-narrowing - 8 previously-unallowed new violations retained - Remaining 23: 13 `agents/model-selection`, 7 `agents/sandbox`, 3 `acp/runtime/session-meta`, 1 `agents/skills` 4. Decrement baselines: - `.zombie-import-allowlist-baseline`: 71 → 23 - `.zombie-tombstone-baseline`: 12 → 0 (all tombstoned files already absent; #2356 is auto-satisfied) `agents/model-selection` broad pattern is KEPT despite the file having live H9-attested functions — those are pending gutting per the Middleware Boundary Principle, tracked debt rather than gate false positives. Follow-up gutting issue to be filed. Gate passes locally: `Zombie-import gate: 36 tombstones, 45 patterns, 23 allowlisted callsites. Import scan: clean.` Refs: ADR 0005 H3 (engineering/decisions/0005-fork-sync-hardening.md) Regression source: #2360 (sync v2026.3.7→v2026.3.8) Auto-satisfied: #2356 (0 tombstoned files exist) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Merged
4 tasks
alexey-pelykh
added a commit
that referenced
this pull request
Apr 21, 2026
… + rebaseline allowlist (#2355) (#2454) Restore ADR 0005 H3 (PR #2357) after it was reverted by the v2026.3.7→v2026.3.8 sync (PR #2360, `fc2cefeeab`), which rolled `scripts/check-no-zombie-imports.mjs` back to its pre-H3 hardcoded form and orphaned the JSON allowlist + baselines. Changes: 1. Restore H3 gate script with registry-derived `deadModulePatterns`, JSON allowlist loader, tombstone existence scan, and baseline comparison — identical to `af4169bf9a` minus the targeted narrowing in point 2. 2. Narrow `acp/runtime` fallback pattern: split broad `acp/runtime` into `acp/runtime/session-meta` and `acp/runtime/session-identifiers` (the only 4-line stubs in that namespace). `acp/runtime/errors`, `acp/runtime/registry`, and `acp/runtime/types` are live public API re-exported by `src/plugin-sdk` — the broad pattern was catching them as false positives. 3. Rebaseline allowlist JSON from 68 → 23 entries: - 42 stale entries removed (line drift during H3's offline period) - 11 false-positive entries removed post-narrowing - 8 previously-unallowed new violations retained - Remaining 23: 13 `agents/model-selection`, 7 `agents/sandbox`, 3 `acp/runtime/session-meta`, 1 `agents/skills` 4. Decrement baselines: - `.zombie-import-allowlist-baseline`: 71 → 23 - `.zombie-tombstone-baseline`: 12 → 0 (all tombstoned files already absent; #2356 is auto-satisfied) `agents/model-selection` broad pattern is KEPT despite the file having live H9-attested functions — those are pending gutting per the Middleware Boundary Principle, tracked debt rather than gate false positives. Follow-up gutting issue to be filed. Gate passes locally: `Zombie-import gate: 36 tombstones, 45 patterns, 23 allowlisted callsites. Import scan: clean.` Refs: ADR 0005 H3 (engineering/decisions/0005-fork-sync-hardening.md) Regression source: #2360 (sync v2026.3.7→v2026.3.8) Auto-satisfied: #2356 (0 tombstoned files exist) Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Disposition-filtered diff-sync of 260 upstream commits (v2026.3.7 → v2026.3.8), 769 files in range.
439 INCLUDE, 249 EXCLUDE, 21 EXTRACT (deferred), 60 PROTECTED. 730/730 tests green.
Key upstream changes adopted
Build stabilization
Test plan
pnpm checkpasses (format + typecheck + lint + rebrand gate)🤖 Generated with Claude Code