Spaces:
Running
Running
Commit History
4 days ago
-
fix(sonar): wave 7 - cleanup round from live scan (93 findings across 65 files)
Z User- 34 in-scope follow-ups exposed by the 17:59 scan (refactor residuals: S3776 helper splits, S4323 type aliases, S6759 readonly on extracted components, S8786 bounded-regex justifications, S6551 scrub patterns, S9440/S7924 CSS at new positions) - python leftovers: 29x S1481 positional _, S8786 regex canonicalization (fuzz-verified), S3776 task24 step-fn hoisting, S1192 dialog/content-type consts - operator tooling: S9382 documented NOSONARs for deliberate poll/throttle loops + Promise.all for independent probes, S8689 second log site routed through redact(), S5144 second fetch site behind UPSTREAM_HOST_ALLOWLIST Verified: tsc clean, vitest 1394/1394, node --check + py_compile on touched scripts.6780540 -
fix(sonar): wave 4 - resolve 114 findings (payment-router, sld render/repair, chatbot-prompts, cache, Register, ArticleDetail, chat-format, user-ai-provider, image-quota, email, chatbot-errors, push-state, Footer, notes-router, local-auth, think-filter, settings/maintenance/paymob routers, youtube-watcher, referral, env)
Z User- S3776 extractions (getSystemPrompt via SystemPromptArgs, chatbot-prompts 51->15, email OTP verify flow, local-auth register/login/updateProfile) - S9382: NOSONAR only for documented sequential necessities (Redis SCAN pagination, bulkUpsert pool cap, ordered SQL dump, oEmbed concurrency pool) - S8786: credential regex de-duplicated quantifiers, email validator split, UA WebView regex preserved via differential corpus test - S6551: describeCause/JSON diagnostics; S6759 readonly props; S5906 in tests - contract tests re-pinned to helper-based equivalents (2FA helper call site, finalizeEmailVerification pendingEmail flow, changeEmailWithVerification rate-limit-inside-branch) - all runtime invariants unchanged Verified: tsc clean, eslint 0 errors, vitest 1394/1394.da57150
22 days ago
-
hardening(audit-run2-w2): wave-2 clean + 3 real fixes from hunter notes
Z UserWave-2 (2 batched hunters over the critic's 5 gap units): ALL COVERED, zero new candidates — paymob terminal-state guard verified end-to-end, error-scrub parallel lanes verified clean, ThinkStreamFilter state machine verified across all 3 constructors, lesson-video presign provenance holds (admin-only writer gate), 5 unnamed tRPC routers verified (auth levels correct, prefs user-scoped, poll router confirmed dead-but-safe). Fixes from hunter hardening notes: - ai-router drain loop: emit() already accounts the FILTERED text — the raw 'total += ev.text' double-counted and polluted the visible-only total with think content (skewed looksComplete/rescue heuristics) - scrubCredentials: sensitive-substring containment for query keys (client_secret=/api-key=/x-api-key= style namespaced keys now redacted) - search-router: escape LIKE wildcards (%, _) like course-browse.list Full suite: 714 passed. tsc clean.3c1e637
-
feat(chatbot): reach-gems v3.3.0 — evidence model, unified error envelope, doctor (Agent-Reach distill)
Z UserDistilled from Panniantong/Agent-Reach (MIT, reference-only, zero deps): - ANSWER-SOURCE (EVIDENCE) MODEL: three explicit evidence layers (certain / derivation / MISSING) + metadata-is-not-content + unverified-attribution rejection + no-unsourced-legitimization + deliver-what-you-have + name-standards-never-link. thinking full, instant one-line anchor. - Provider secrecy hardened: providers unnamed even in negations (observed live failure mode). - Unified error envelope (8 codes + AR/EN + hints) + credential scrubbing wired into 15 router call sites — additive, frontend contract intact. - chatbot-doctor.ts: agent-reach-style health check (13 checks). - live-chatbot-eval.ts: 9-question real-model behaviour QA harness. - Tests: +23 (vitest 388/388), evidence_honesty meter category 0%->100%. Gates: tsc clean, eslint clean, vitest 388/388, build PWA v1.3.0, doctor 13/13, live eval 9/9 -> 9/9 (zero regression).0f94611