fix(#12274): fallback-slop sweep — app plugins B (wallet/vision/music/agent-skills/browser/workflow/training) - #12825
Conversation
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
8c37740 to
eea44a6
Compare
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
|
Reviewed (#12274 slop sweep, app plugins B): browser-capture stop-path errors now log at debug with the error message (non-fatal but observable); the wallet LocalEoaBackend gets tests proving invalid Solana keys / missing config fail loud with typed |
…, annotate justified handlers App plugins B slice (wallet/vision/music/agent-skills/browser/workflow/training). High-confidence conversions only; large sitesLeft by design (precision over completeness). - wallet/local-eoa-backend: resolveSolanaKeypair swallowed the typed SolanaPrivateKeyInvalidError into null, so a configured-but-malformed SOLANA_PRIVATE_KEY read identically to "no wallet configured" (WalletBackendNotConfiguredError). Let the typed invalid-key error propagate; a real test asserts the malformed-key path now surfaces and the genuine no-key path still reports NO_WALLET_CONFIGURED. - browser/workspace/browser-capture: the two real empty catches in stopBrowserCapture are teardown — annotated error-policy:J6 with logger.debug. - browser/bridge-policy + routes/workspace: URL/tab-id parse helpers returning null on malformed input are explicit typed-invalid signals — annotated error-policy:J3. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
eea44a6 to
5f4d4cc
Compare
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
…/fabricated-default/promise-swallow to fail-fast (#13270) Residual deep sweep over the app-plugins-B slice (wallet/vision/music/ agent-skills/browser/workflow/training) after the primary #12274 sweep (#12825). Converts the clear-slop that survived, keeps and annotates genuine J-categories, defers the ambiguous return-null/false + ??-literal tail for a judgment pass. Fabricated-healthy (data-loss) — agent-skills skill preference/acknowledgment loaders returned `{}` on a cache *read failure*, conflating "DB read failed" with "nothing persisted". Callers read-modify-write these maps and save them back (`prefs[id]=true; save(prefs)`), so the fabricated empty overwrote every other skill's saved preference on a transient DB error. Now the read failure propagates to the route boundary (a genuinely-empty cache still returns `{}` via `?? {}`). Fixed in both the exported helpers and the duplicated local copies in skills-routes.ts. Empty catch — browser-service target-resolution failover scan swallowed an unhealthy candidate's availability error with an empty `catch {}`. Kept as designed failover (other targets still resolve, unlike the pinned path which throws) but annotated `// error-policy:J4` and now logs the exclusion so a systemically broken target is observable. Tests — new skill-discovery-helpers.test.ts asserts a cache read failure now throws (would have resolved `{}` before); browser-service.test.ts gains a failover-scan case asserting the broken candidate is excluded, a healthy one still resolves, and the exclusion is logged. Refs #12274 Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
…/fabricated-default/promise-swallow to fail-fast Residual deep sweep over the app-plugins-B slice (wallet/vision/music/ agent-skills/browser/workflow/training) after the primary #12274 sweep (#12825). Converts the clear-slop that survived, keeps and annotates genuine J-categories, defers the ambiguous return-null/false + ??-literal tail for a judgment pass. Fabricated-healthy (data-loss) — agent-skills skill preference/acknowledgment loaders returned `{}` on a cache *read failure*, conflating "DB read failed" with "nothing persisted". Callers read-modify-write these maps and save them back (`prefs[id]=true; save(prefs)`), so the fabricated empty overwrote every other skill's saved preference on a transient DB error. Now the read failure propagates to the route boundary (a genuinely-empty cache still returns `{}` via `?? {}`). Fixed in both the exported helpers and the duplicated local copies in skills-routes.ts. Empty catch — browser-service target-resolution failover scan swallowed an unhealthy candidate's availability error with an empty `catch {}`. Kept as designed failover (other targets still resolve, unlike the pinned path which throws) but annotated `// error-policy:J4` and now logs the exclusion so a systemically broken target is observable. Tests — new skill-discovery-helpers.test.ts asserts a cache read failure now throws (would have resolved `{}` before); browser-service.test.ts gains a failover-scan case asserting the broken candidate is excluded, a healthy one still resolves, and the exclusion is logged. Refs #12274 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Fallback-slop sweep (#12182): app plugins B — wallet / vision / music / agent-skills / browser / workflow / training
Executes the #12182 rubric against the app-plugins-B slice. This is behavior-changing
work, so it is deliberately a small, precise PR: high-confidence slop converted to
fast-fail, plausibly-justified handlers annotated, everything ambiguous left untouched
and counted. Precision over completeness — a reckless large sweep here would fake wallet
success or drop a designed browser/workflow degrade.
Foundation (#12263) is used as-is:
ElizaErrorcode/context/cause, and the diff-scopedbun run audit:error-policy-ratchet.Re-derived suspect counts (this slice @ base
36be3c8655).catch(()=>…)?? <lit>|| <lit>Site table (verdict per touched site)
plugin-wallet/src/wallet/local-eoa-backend.ts:83-87return nullSolanaPrivateKeyInvalidErrorpropagateplugin-browser/src/workspace/browser-capture.ts:244logger.debug+ annotateplugin-browser/src/workspace/browser-capture.ts:250logger.debug+ annotateplugin-browser/src/bridge-policy.ts:41new URL()catch → nullplugin-browser/src/routes/workspace.ts:176decodeURIComponentcatch → nullPer-category tally
local-eoa-backend.ts(money path).APY service (
Math.random()-fabricated data — a larp rewrite, out of a fallback sweep'sscope), workflow-service generation/deploy degrades (
getRuntimeContext/fixWorkflowErrors/activateWorkflowlog-and-continue — nuanced product-degrade judgment, not money paths),agent-skills load paths (already
logger.warnper failure — not silent), and the wallet?? "0"transaction/LP defaults (ERC20value=0, optional second LP token — legitimatedefaults, not catch-swallow). Precision beats completeness; these are candidates for a
follow-up with the product owner, not high-confidence one-shot conversions.
Exemplar before → after (the money-path conversion)
resolveSolanaKeypairswallowed a carefully-typed error, conflating "invalid configured key"with "no key configured":
Test (real error path, no mocked dependency)
plugin-wallet/src/wallet/local-eoa-backend.test.tsdrives the real key-derivation path(real
@solana/web3.jsKeypair, real base58):getAddresses().solanamatches,canSign('solana'));rejects.toBeInstanceOf(SolanaPrivateKeyInvalidError);SolanaPrivateKeyInvalidError;WalletBackendNotConfiguredError(absence path preserved).Verification
bun run --cwd plugins/plugin-wallet test→ 126 passed, 1 skipped (incl. the 4 new tests).bun run --cwd plugins/plugin-browser test→ 147 passed.bun run --cwd plugins/plugin-wallet check→ clean;bun run --cwd plugins/plugin-browser typecheck→ clean.bun run audit:error-policy-ratchet→ pass; browser-captureemptyCatch 2→0, no new slop in any touched file.Refs #12274 · parent #12182 · foundation #12263.
🤖 Generated with Claude Code