Cleanup Baseline — 2026-04-09
Baseline marker tag: cleanup-2026-04-09
Tag target: 2c868e0b (chore(cleanup): remove generated output and tmp artifacts)
Scope
This baseline captures the repo-wide stale-file and stale-reference cleanup pass and the immediate hardening that followed.
Changelog (short)
2c868e0b— remove tracked generated output and tmp artifacts.7ac50f08— prune stale/contradictory.gitignorerules.2e23cd52— patch frontend/CRE audit vulnerabilities (vite,hono,vitestchain).
Verification snapshot
pnpm -C frontend lint— passpnpm -C frontend typecheck— passpnpm -C frontend test --run— passpnpm -C cre test— passpnpm -C frontend audit— no actionable findings; only residualellipticlow (no upstream fixed version published)pnpm -C cre audit— clean
Endpoint hardening deltas (post-baseline)
GET /api/v1/agents/creators?listed=falsenow requires an authenticated admin principal (not just any authenticated user) and keepsprivate, no-storeresponse caching for unlisted reads.GET /api/token/imagenow applies dual throttles (per-IP and per-IP+token-address) with explicitRetry-After+ rate-limit headers before any expensive RPC/image processing.POST /api/agent/streamnow enforces explicit request-body size bounds and strict JSON object parsing formessage/contextinput paths.POST /api/paymasterlegacy-withdraw mode now enforces extra wrapper/share provenance checks (deployed-code checks plus wrapper/share/vault/creator-token relationship validation) before sponsorship.POST /api/rpcnow enforces an explicit in-flight concurrency ceiling (RPC_PROXY_MAX_IN_FLIGHT) and fails fast with503 rpc_proxy_busy+Retry-Afterwhen saturated.POST /api/telegram/link/telemetrynow bounds/sanitizes event metadata (field lengths, payload keys/depth/array sizes, string truncation, prototype-pollution key filtering) before persistence/logging.POST /api/accounts/linkandPOST /api/accounts/unlinknow reject invalid/oversized caller-suppliedvaluepayloads instead of accepting unbounded input.PATCH /api/portfolio/menow has explicit write-side rate limiting and rejects non-http(s) or protocol-relative profile URL values.POST /api/v1/chat/telemetryandPOST /api/v1/chat/command-preflightnow use stricter bounded string/object parsing and returnRetry-Afteron local limiter denials.POST /api/v1/agents/feedback/submitnow enforces stricter numeric/hash/string validation (including explicit hash-format checks) and returnsRetry-Afteron limiter denials.GET /api/v1/agents/feedbacknow validatesmodeandclientquery params more strictly, normalizes indexed paging inputs, and returnsRetry-Afteron limiter denials.POST /api/v1/agents/feedback/reviewnow validates optional review target URLs as http(s), bounds optional string inputs, and returnsRetry-Afteron limiter denials.POST /api/creator-access/requestnow enforces strict payload shape and explicit coin-address validation instead of silently accepting malformedcoinvalues.POST /api/waitlist/bootstrapnow enforces a smaller request-body budget and rejects invalid typedemail/referralCodepayload fields.POST /api/v1/build/charm/*andPOST /api/v1/build/charm/vault/*now share a centralized body-size constant, normalize non-object payloads to a safe empty-object shape, and emitRetry-Afterheaders on local limiter denials.POST /api/v1/agents/access-proof/request,POST /api/v1/agents/access-proof/verify,POST /api/v1/agents/{telegram|xmtp}/join, andPOST /api/v1/agents/identity/set-agent-walletnow emitRetry-Afteron local limiter denials and normalize non-object JSON payloads before schema validation.GET /api/v1/agents/profile,GET /api/v1/agents/creators, andGET /api/v1/agents/identity/verificationnow emitRetry-Afteron local limiter denials;POST /api/v1/agents/creators/{enable|provision-wallet}now also emitsRetry-Afterand normalizes non-object payloads./api/agents,/api/v1/spec.json, and the remaining v1 read clusters (auction,lottery,gauge,vault,ve4626,charm/strategy) now emitRetry-Afteron local limiter denials for consistent client/backoff handling.POST /api/admin/waitlist/{approve|deny|delete}andPOST /api/admin/creator-access/{approve|deny|revoke}now use tighter JSON body limits, normalize non-object payloads, and emitRetry-Afteron limiter denials.POST /api/accounts/{link|unlink}and Lens write builders (/api/lens/agent-registration,/api/lens/feedback-payload,/api/lens/reputation-graph) now use tighter JSON body budgets and normalize non-object payloads before parsing/validation./api/v1/workspace/{rooms|monitoring|activity|strategies|tasks|settings|summary|actions}now emitRetry-Afteron local limiter denials; wallet limiter tests now assertRetry-Afteracross/api/wallet/*rate-limit paths.- Non-v1 API surfaces now have consolidated
Retry-Afterhardening coverage per family:telegram/*,uniswap/*,image/*, andzora/*(including explicit header assertions on local429responses). - Remaining non-v1 ops surfaces now have consistent
429backoff signaling:cre/runtime/*emitsRetry-Afteron limiter denials,status/_vaultReportemitsRetry-Afteron upstream RPC429responses, and new consolidated hardening tests covercre/*,deploy/*, andstatus/*429 + Retry-Afterbehavior. - Final non-v1 consistency sweep:
auth/_handoff-{create,redeem}andadmin/creator-access/_allowlistnow emitRetry-Afteron limiter denials, with a consolidated regression test covering these remaining surfaces. - Cache/body guard sweep: write-side Zora trend endpoints now explicitly return
Cache-Control: no-storeand reject oversized payloads (413), andPOST /api/agent/processnow setsno-storeat handler entry for all responses. - Telegram write-path body hardening:
telegram/_{unlink,link-ready,link-complete,miniapp-session,bot-config,link-telemetry}now enforce bounded pre-parsed body size checks (preventingreq.bodymax-bytes bypass) and return413on oversized payloads, with regression tests across the Telegram endpoint suite. - Shared body-read hardening + CI guarding: API handlers now consume
readBoundedJsonObjectBodyfrom server-core (includingauth/_handoff-create,waitlist/_bootstrap,keepr/actions/_updateStatus, andtoken/_managedTokenList), and newguard:api-nonv1-hardeningCI checks block non-v1429responses without Retry-After context plusreadJsonBody(req) ?? req.bodybypass patterns.
Hardening exceptions (intentional)
/api/rpcuses a dedicated in-handler dual-bucket limiter (principal + ip) plus JSON-RPC method blocking because it is a high-throughput RPC proxy surface with chain-aware forwarding behavior./api/telegram/link-telemetryusescheckDurableRateLimit(instead of the default in-memory limiter) because telemetry events can arrive across multiple instances and still require a shared per-IP budget.
Follow-ups
- Residual
ellipticadvisory tracking: Issue #227