Spaces:
Sleeping
Sleeping
Commit History
-
Harden public feedback form against abuse + roster leakβ
Piers Lyon +1: Claude Opus 4.7 (1M context)Tightens the unauth /?form=feedback page so the only thing it can do is accept signed-attribution feedback from people who already received a digest. Changes: - HMAC-sign the recipient name in digest URLs. The footer link is now /?form=feedback&from=Stu&sig=<16-hex>. Form only honours ?from= when the signature verifies AND the name is in team_emails. Forged or forwarded links can no longer pose as a colleague or enumerate the team roster. - When no valid signature is present, the form shows a generic "Your name (optional)" text field instead of a dropdown β no internal team names exposed to outsiders. - Per-session rate limit: max 5 submissions, 20s cooldown between submits. Stops accidental spam + caps LLM-cost amplification from a misbehaving client. - Input limits: 8 < body β€ 4000 chars (hard-truncate above). - LLM parser system prompt now explicitly treats reply text as untrusted; "ignore previous instructions" patterns in user input no longer have grammatical β¦bd531ac -
Add unauth web feedback form β primary capture pathβ
Piers Lyon +1: Claude Opus 4.7 (1M context)Email replies are messy: the tenant Application Access Policy blocked Mail.Read on the digest mailbox, and recipients reading from a personal inbox would never have their replies routed back to us anyway. A web form sidesteps all of it. What ships: - New feedback_form.py renders a single-purpose Streamlit page (name dropdown pre-filled from ?from= query param, free-text body, one submit button, tight thank-you). No login required. - app.py recognises ?form=feedback BEFORE the auth gate and routes to the public form, st.stop()'s before anything else loads. No other page is affected. - Form submissions flow through the SAME parser + storage path as mailbox replies (feedback_ingest.parse_reply_to_signals β _store_message). A new recipient_override kwarg lets web-form submissions tag the colleague directly, since the synthetic web-form sender address wouldn't match team_emails. - Digest footer now leads with a prominent "Open feedback form β" button (URL pre-filled with β¦b28e767 -
Drop visible feedback tokens β natural-language replies onlyβ
Piers Lyon +1: Claude Opus 4.7 (1M context)The token render was unreliable (LLM dropped the instruction inconsistently) and visually noisy. Recipients will write "Bentley felt thin" / "more food manufacturing" / "loved the FDE theme" β not "lead-bentley-motors-2026w19". Changes: - Digest prompt no longer asks Claude to append a slug tag to <h3>. - Feedback footer rewritten: short paragraph + three natural-language example phrases, no token syntax. - Parser system prompt updated: keeps target_token=null, leans on target_label resolution from the natural-language reference. The feedback_token field is still computed per lead (internal use β reserved for future structured workflows like clickable feedback URLs or per-lead vote endpoints) but no longer surfaced in the rendered email. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>e83d1af -
Closed-loop feedback: recipients reply, system digests, recap surfacesβ
Piers Lyon +1: Claude Opus 4.7 (1M context)Adds a feedback round-trip so each weekly digest learns from the recipient's reply to the previous one. Capture - Every lead in the email gets a stable feedback token (lead-<company-slug>-<isoYYYYwWW>) printed as a small grey tag next to the company name. - A "Help us tune this β just reply" footer is appended to every email body, telling recipients they can either quote a lead token ("lead-bentley-motors-2026w19 β already knew") or write naturally ("more food manufacturing", "loved the FDE theme"). - Reply-To remains the existing ADMIN_EMAIL convention; no recipient workflow change required. Ingest (feedback_ingest.py) - Polls the mailbox via the SAME Microsoft Graph app registration used for sendMail. Requires Mail.Read permission to be granted on the app β fails cleanly with a 403 in logs otherwise (digest still ships, recap section just renders empty). - Mailbox priority: FEEDBACK_INBOX > MS_GRAPH_REPLY_TO > ADMIN_EMAIL > MS_GRAPH_FROM_EMAIL. - For each new reβ¦3395614